Re: [AMBER] [PATCH 4/8] sqm: Fix OpenMP build

From: Reinis <gam4rei.gmail.com>
Date: Tue, 23 Oct 2012 22:41:11 +0300

On Tue, Oct 23, 2012 at 03:56:42PM -0300, Gustavo Seabra wrote:
>
> >> 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.)
> >
> > $omp_flag expands to -fopenmp -DOPENMP and I tried to add it
> > also to FPPFLAGS and there was no difference, still fails. I'm
> > also using ifdefs in my patch to isolate OPENMP parts, so it
> > does receive that directive.
>
> Where did you add this? If you add it to the Amber/AmberTools
> configure, it is not passed down to the sqm compilation. The
> only way to compile sqm with OpenMP support is looking for the
> specific calls in the Makefile in the sqm directory, and
> altering it there.

I added this in AmberTools/src/configure2, that is the only
place where it makes sense to modify general flags such as
FFLAGS, CFLAGS and CXXFLAGS which influence all of the
applications built. In fact configure files are the only ones
which should require modifications (if at all) by users (given
proper build system).

These variables are set by configure and referenced by
Makefiles, so every change is propagated to them. And they are
propagated since I can make sqm to use any number of threads I
want by using omp_get_max_threads().

Obviously, your way is not the only way. I think we already
established that from the time Ross Walker worked with it the
code was changed in a way that it breaks OpenMP build.


Reinis

_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Tue Oct 23 2012 - 13:00:04 PDT
Custom Search