duanx
January 5, 2022, 8:31pm
1
Hello,
We built Abinit 9.4.1 with GNU compiler and mkl library on HPE Cray EX machine (128 CPUs per node) . we compiled it with following:
–enable-openmp=“yes”
–enable-mpi-io=“yes”
–with-linalg-flavor=mkl
We could run a job with MPI without problems. But when we run it with OpenMP threads by setting env variable:
“setenv OMP_NUM_THREADS 32”
the job completes OK but it always uses on 1 thread. We have following in an output file:
=== Multicore ===
Parallel build :
Parallel I/O : yes
openMP support : yes
GPU support :
…
==== OpenMP parallelism is OFF ====
…
mpi_procs: 4
omp_threads: 1
Can someone tell us:
how to turn on “OpenMP parallelism” when running a job?
or
if we need recompile the program with more options?
Thanks,
Frank
beuken
January 6, 2022, 5:34pm
2
Hi Frank,
Just to be sure, do you have the following configs :
for compilation ( GNU ) add : -fopenmp
enable OMP in LINALG_LIBS :
LINALG_LIBS=“-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl”
jmb
duanx
January 10, 2022, 11:13pm
3
Hi jmb,
I tried your suggestions above with GNU compiler, but could not compile the executables. However, when I switched to Intel compiler, with the LINALG_LIBS setting as you suggested and “-qopenmp” flag, I could make the executables which now turns on “OpenMP parallelism” as expected.
Thank you!
Frank
beuken
January 11, 2022, 1:55pm
4
I didn’t realize you were using the GNU compiler
so there are 2 changes in LINALG_LIBS with GNU :
LINALG_LIBS=“-L${MKLROOT}/lib/intel64 -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -liomp5 -lpthread -lm -ldl”
duanx
January 27, 2022, 6:43pm
6
Again, thanks for your suggestion. I could also compiled GNU version with the settings. Only thing I needed to change was to use “-lgomp” instead of “-liomp5”.
Frank