Build with openmp

From NWChem

Viewed 2763 times, With a total of 4 Posts
Jump to: navigation, search

Just Got Here
Threads 1
Posts 4
Hi,

I have tried to build nwchem for threaded execution.
I used the following settings:



  1. !/bin/bash
...
...
...
export USE_OPENMP=y
export BLASOPT="$MKLLIB/libmkl_intel.a $MKLLIB/libmkl_intel_thread.a $MKLLIB/libmkl_core.a -lpthread -lguide"
export LAPACKOPT="$MKLLIB/libmkl_intel.a $MKLLIB/libmkl_intel_thread.a $MKLLIB/libmkl_core.a -lpthread -lguide"
...
...
...


I have also added "-openmp" in corresponding lines of CFLAGS, FFLAGS, LDFLAGS in the makefile.h.

The compilation is done without any error.
When I try to run a sample case "h3tr1.nw" using:
"OMP_NUM_THREADS=8 nwchem h3tr1.nw"
the run is successful, but "nproc" in out put remains 1.
I do not want to run using "mpi" in a single box.
How can I fix the problem?
Thanks.
Mahmoud

Forum Vet
Threads 9
Posts 1472
Expected behavior
Mahmoud
The nproc printed at the beginning of the NWChem output correctly reports the number of MPI processes spawned by your job.
OMP_NUM_THREADS=8 will simply have 8 threads that will execute each MKL (=BLAS) call used in your NWChem run.

Cheers, Edo

Just Got Here
Threads 1
Posts 4
Edo

You are right. When I compiled using mpi, nproc=8 was correctly shown in output, but the wall time was too high.
So, I preferred to use the openmp. In my run, the threading was not activated because the wall time remains the same as in the case when using the command "nwchem h3tr1.nw". So, I am not sure if I have built in a correct manner.
Could you please comment the way I compiled for openmp.

Thanks, Mahmoud

Forum Vet
Threads 9
Posts 1472
Mahmoud
I think that you might have compiled correctly for the Openmp parallelization in MKL.
However, the problem might simply be that the input you are using is not make BLAS call that use matrix dimensions large enough to be efficiently spread among the MKL threads.
Edo

Just Got Here
Threads 1
Posts 4
Edo

Thank you very much. I managed to build nwchem suitable to my needs.
Cheers,
            Mahmoud


Forum >> NWChem's corner >> Compiling NWChem



Who's here now Members 0 Guests 1 Bots/Crawler 0


AWC's: 2.5.10 MediaWiki - Stand Alone Forum Extension
Forum theme style by: AWC