The openMP code inside SQM (and some related to QM/MM inside Sander) is
experimental, unfinished and meant for developers only. This is why it
undocumented and not turned on by the openmp flags in the configure
script.
Hence the reason why most of this code is protected by #ifdef OPENMP and
thus it is not surprising turning on the blanket inclusion of OMP flags in
the compiler results in a bunch of undefined references. You have to
specify #ifdef OPENMP as well. Note though that this will get you an
executable (hopefully) but there are then new qmmm name list flags and the
way one runs the code is subtly different. Thus if you want to use it and
experiment please do (note if you are linking to MKL you might have to be
careful with that to get the right version of the MKL library for openMP
code). But it shouldn't be on in the normal configure.
All the best
Ross
/\
\/
|\oss Walker
---------------------------------------------------------
| Assistant Research Professor |
| San Diego Supercomputer Center |
| Adjunct Assistant Professor |
| Dept. of Chemistry and Biochemistry |
| University of California San Diego |
| NVIDIA Fellow |
|
http://www.rosswalker.co.uk |
http://www.wmd-lab.org |
| Tel: +1 858 822 0854 | EMail:- ross.rosswalker.co.uk |
---------------------------------------------------------
Note: Electronic Mail is not secure, has no guarantee of delivery, may not
be read every day, and should not be used for urgent or sensitive issues.
On 10/23/12 8:50 AM, "Gustavo Seabra" <gustavo.seabra.gmail.com> wrote:
>
>On 23/10/2012, at 12:37, Reinis wrote:
>
>> 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
>>
>
>
>The OpenMP support in sqm was not thoroughly tested and, as far as I
>understand, its development has been "dormant" for a while. Thus, it was
>disabled in the config, to avoid confusion.
>
>I suppose the addition of the $omp_flag made the compiler try to use some
>OpenMP commands available there, but probably not all the OpenMP code was
>compiled, since it is isolated by IFDEFs on the code. Have you used
>-DOPENMP in the pre-processing step? That would cause the compilation of
>the whole OpenMP part. (I haven't had any problem with it.)
>
>About the "long OpenMP directive", could you indicate which line is it?
>
>Finally, I think Ross would give more details here, but I'd guess that
>enabling OpenMP as a patch right now is not advisable, since the results
>have not been well tested.
>
>Gustavo Seabra
>Professor Adjunto
>Departamento de Química Fundamental
>Universidade Federal de Pernambuco
>Recife - PE - Brasil
>+55-81-2126-7450 x5023
>
>
>
>
>_______________________________________________
>AMBER mailing list
>AMBER.ambermd.org
>http://lists.ambermd.org/mailman/listinfo/amber
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Tue Oct 23 2012 - 09:30:04 PDT