Here are some suggestions for using the
-qsmp option:
- Before using -qsmp with automatic parallelization,
test your programs using optimization and -qhot in
a single-threaded manner.
- If you are compiling an OpenMP program and do not want automatic parallelization, use -qsmp=omp:noauto .
- Always use the reentrant compiler invocations (the _r invocations)
when using -qsmp.
- By default, the runtime environment uses all available processors.
Do not set the XLSMPOPTS=PARTHDS or OMP_NUM_THREADS environment
variables unless you want to use fewer than the number of available
processors. You might want to set the number of executing threads
to a small number or to 1 to ease debugging.
- If you are using a dedicated machine or node, consider setting
the SPINS and YIELDS environment
variables (suboptions of the XLSMPOPTS environment
variable) to 0. Doing so prevents the operating system from intervening
in the scheduling of threads across synchronization boundaries such
as barriers.
- When debugging an OpenMP program, try using -qsmp=noopt (without -O)
to make the debugging information produced by the compiler more precise.