On Tue, Oct 23, 2012 at 09:29:28AM -0400, David A Case wrote:
> On Tue, Oct 23, 2012, Reinis Danne wrote:
> >
> > Surprisingly it didn't even build with OpenMP and the issue was raised
> > on ML at least once. This fixes the build, but still it is of limited
> > utility since it hardcodes the number of threads and sets it to 1 thread
> > by default.
>
> I'm a little lost here. As far as I can see, "make openmp" does not attempt
> to do anything with sqm. Can you say what configure and make options you
> used, and what the error was?
I added $omp_flag to C, C++ and Fortran flags, so everything
that had OpenMP directives would be built with it.
The first issue was this:
qm2_read_nm_and_alloc.F90:816.3:
qmmm_omp%diag_threads = qmmm_omp_max_threads
1
Error: Unclassifiable statement at (1)
qm2_read_nm_and_alloc.F90:817.3:
qmmm_omp%pdiag_threads = qmmm_omp_max_threads
1
Error: Unclassifiable statement at (1)
It didn't know about qmmm_omp structure, which is introduced to it by:
use qmmm_module, only : qmmm_omp
Then it didn't find the symbol in qmmm_module:
qm2_read_nm_and_alloc.F90:27.26:
use qmmm_module, only : qmmm_omp
Error: Symbol 'qmmm_omp' referenced at (1) not found in module 'qmmm_module'
qm2_read_nm_and_alloc.F90:816.3:
qmmm_omp%diag_threads = qmmm_omp_max_threads
1
Error: Unclassifiable statement at (1)
qm2_read_nm_and_alloc.F90:817.3:
qmmm_omp%pdiag_threads = qmmm_omp_max_threads
1
Error: Unclassifiable statement at (1)
Marking it public solves the issue:
public :: qmmm_omp
The second issue that OMP directive was too long on one line and
had to be split in two lines.
Regardless if sqm is supposed to be built with OpenMP enabled
the code what is there is wrong.
>
> Amber-developers: is this perhaps unused (or obsolete or unfinished) code?
Developers can clarify, but from the code it looked like mostly
is used with MPI, but there was also some OMP directives inside
MPI ifdefs, so I'm not completely sure if it is expected to be
used with MPI alone or it is just dead code there. I still
haven't looked at building MPI version of AmberTools.
Reinis
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Tue Oct 23 2012 - 09:00:02 PDT