Two questions about OMP package

Dear LAMMPS developers,

I have a question about the OMP package (my lammps executable is built with the USER-OMP package.):

  1. I’m using the mpirun script to submit the jobs (mpirun -np $SLURM_NTASKS $EXE -sf omp -pk omp 1 -in $input). It seems that no matter I use -sf omp -pk omp 1 or not, the omp is always used. Is that true?

For example, if I use “mpirun -np $SLURM_NTASKS $EXE -in $input”, I still got the message in the log file:

LAMMPS (16 Feb 2016)

using 16 OpenMP thread(s) per MPI task

  1. In my system, I have a hybrid pair_style with lj/mdf and sw. As you know, lj/mdf does not have a omp version. So if I use “mpirun -np $SLURM_NTASKS $EXE -sf omp -pk omp 1 -in $input”, I’m understanding that the sw/omp and lj/mdf will be used. Am I understanding correctly?

Thanks,
Jibao

Dear LAMMPS developers,

I have a question about the OMP package (my lammps executable is built
with the USER-OMP package.):

1) I'm using the mpirun script to submit the jobs (mpirun -np
$SLURM_NTASKS $EXE *-sf omp -pk omp 1* -in $input). It seems that no
matter I use *-sf omp -pk omp 1* or not, the omp is always used. Is that
true?

For example, if I use "mpirun -np $SLURM_NTASKS $EXE -in $input", I still
got the message in the log file:

LAMMPS (16 Feb 2016)
using 16 OpenMP thread(s) per MPI task

​no. this message only indicates that your environment has the variable
OMP_NUM_THREADS set to 16.
​this indicates how many threads would USER-OMP use if you use "-sf omp"
without "-pk omp 1"
you should consult the people operating the cluster you are using how to
best run with hybrid OpenMP/MPI jobs and how to specify how to partition
between MPI and OpenMP tasks. since the MPI parallelization in LAMMPS is
very efficient, you typically get the best results with a small number of
OpenMP threads (2-4).

2) In my system, I have a hybrid pair_style with lj/mdf and sw. As you
know, lj/mdf does not have a omp version. So if I use "mpirun -np
$SLURM_NTASKS $EXE *-sf omp -pk omp 1* -in $input", I'm understanding
that the sw/omp and lj/mdf will be used. Am I understanding correctly?

​yes, you should see a message in your log file of the kind:

Last active /omp style is ...

that is the indication that at least one style from USER-OMP is in use.

axel.​

And after the end of a run, after Loop Time is printed out,
there is info about how many MPI tasks and how many threads/task
were actually used. If it is all MPI tasks, and 0 (or 1?, can’t recall),
it means you did not run with OpenMP, even if the exe
is built with it.

Steve

Dear Axel and Steve,

Thank you. I appreciate your help!

Jibao