[molpro-user] How to build parallel Molpro 2012.1.0 with GA-5-1-1
Andy May
MayAJ1 at cardiff.ac.uk
Thu Nov 29 15:03:33 GMT 2012
Regarding the GA build/install directory, these do not need to be the
same, but must still both be present. When you configure Molpro you need
to point -mppbase to the source/build directory, not the install
directory. This way, as you have discovered, it can find config.log,
which contains many useful things and also allows it to find it's way to
the install directory. Copying config.log to the install directory might
be a good solution too.
For the questions:
1. This should be true, and Molpro does not directly call MPI to
initialize the environment or shutdown in this case. Any code developed
inside of the Molpro project is calling the Molpro parallel wrappers,
which will not call MPI routines in this case.
However, some code was developed outside of Molpro, directly calling MPI
routines. To allow this code to work, without asking the authors to
extensively modify their code to call Molpro wrappers, these routines
continue to directly call MPI routines. In the case of GA-TCGMSG-MPI, we
know that MPI is available, so these calls are exposed and mpi.h is
required. This is obviously also true in MPI-2 and GA-MPI builds. In the
case of GA-TCGMSG then these calls are not exposed and that code runs in
serial mode.
2. All 3 types of GA builds should now work with Molpro, and also
without GA at all (with MPI-2 library), i.e. with -auto options:
-auto-ga-tcgmsg
-auto-ga-tcgmsg-mpich2
-auto-ga-mpich2
-auto-mpich2
Regarding building GA with mpif90/mpicc, unfortunately the variables in
config.log that contain the MPI linking flags etc. don't get set. The
information is there in other variables but difficult to extract.
Although the mpicc/mpif90 wrappers are intended to be convenient,
generally most configure scripts immediately try to determine the
underlying compiler in order to know which compiler flags can/should be
used.
Best wishes,
Andy
On 19/11/12 12:07, Reuti wrote:
> Hi Martin,
>
> Am 17.11.2012 um 21:14 schrieb Martin Diefenbach:
>
>> in principle, a build with GA5/MPI-2 using ifort/MKL and Infiniband works for us with the following:
>>
>> BLAS_LIBS="-L${MKLROOT}/lib/intel64 -lmkl_rt -lpthread -lm"
>> LIBMPI="$(mpif90 -show |sed -e 's/^ *[[:graph:]]* //')"
>> #
>> # ga-5-1
>> #
>> ./configure \
>> CFLAGS="-DLARGE_FILES" \
>> CC=icc F77=ifort CXX=icpc \
>> --with-blas8="${BLAS_LIBS}" \
>> --with-mpi="${LIBMPI}" \
>> --with-openib \
>> --prefix=${PREFIX}/ga
>> cp config.log ${PREFIX}/ga
>
> Aha, you found the same that it's looking for config.log :-)
>
>
>> #
>> # molpro-2012.1
>> #
>> ./configure \
>> -batch \
>> -prefix "${PREFIX}" \
>> -blaspath "${MKLROOT}/lib/intel64" \
>> -openmpi \
>> -mpp \
>> -mppbase "${PREFIX}/ga" \
>> -ifort \
>> -icc
>>
>> If ga-5 is built with "native" compilers (not with the mpif90/mpicc variants) the variables are set explicitly in ga-5's config.log, which in turn is then read into molpro's configure, also including CMPPINCLUDE for mpi.h. The -openmpi flag helps if OpenMPI is used (I guess for mvapich2 and others this is different).
>
> Thx for the hints, and using -openmpi allowed at least the `./configure` to succeed. It was again missing the mpi.h but this could easily be fixed added a proper flag inside CONFIG to get a compilation with GA over MPI-2. I'm still looking into buliding it by avoiding the mpi-wrappers like you outlined above.
>
> Question 1: why is a build with GA over TCGMSGMPI still looking for mpi.h? It should use the GA calls to initialize and shut down the environment and not the MPI-2 native ones. Although I could define the necessary path, I wonder whether this is intended. Molpro's website still lists the TCGMSG-MPI on most of the platfiorms.
>
> Question 2: GA over MPI-2 is fully supported by Molpro ? In the past the link step failed due to the unconditonal usage of pbeginf(), which no longer to be the case though. So, at least something changed.
>
> -- Reuti
>
>
>> We do, however, see serious problems under certain circumstances, especially for Hybrid OpenMP/MPI builds (./configure -openmp ...), and for mvapich2 with slurm (srun is process manager, not hydra), the reason for which at least in our hands is not easy to track down.
>>
>> Best
>> Martin
>>
>> On Sat, 17 Nov 2012, Reuti wrote:
>>
>>> I was able to build a serial and a parallel plain MPI-2 version of Molpro 2012.1.0 without any issue (using Open MPI). As we found GA being faster than the plain MPI-2 version in the past I tried to create this in addition. After several unsuccessful attempts I checked the "configure" script of Molpro. The first hidden information I discovered was:
>>>
>>> - GA5 needs to be installed in its source directory itself, neither /usr/lib nor $HOME/local or whatever. The reason is, that Molpro's "configure" is checking "config.log", which isn't of course installed anywhere. Hence the ./configure of GA5 needs an option --prefix=$PWD
>>>
>>> Having done that I wondered about the check for "TCGMSG5" in Molpro's configure. GA5 can be built as TCGMSG, TCGMSGMPI or MPI - but none of this outputs TCGMSG5.
>>>
>>> a) I changed TCGMSG5 to TCGMSGMPI => the configure of Molpro succeeded with the TCGMSG-MPI build of GA, but during `make` it couldn't find "mpi.h". It shouldn't look for it I think, as it should use GA calls like pbeginf() to setup the environment.
>>>
>>> b) Recompiled GA5 as plain MPI-2 version. In this case the the `configure` of Molpro detected this but output after confirming the MPILIB linking flags:
>>>
>>> parallel=
>>> unable to determine parallel type
>>>
>>> Questions:
>>>
>>> 1) How to build a parallel version of Molpro using GA5?
>>>
>>> 2) Which communication types of GA5 are supported right now. In the past it was only TCGMSG and TCGMSG-MPI as the calls were using the ones of GA5 like pbeginf() IIRC. Did this change and a plain MPI-2 version of GA5 is also supported right now?
>>>
>> --
>> Dr. Martin Diefenbach
>> Institut für Anorganische und Analytische Chemie
>> der Johann Wolfgang Goethe-Universität Frankfurt
>> Max-von-Laue-Straße 7, D-60438 Frankfurt am Main
>> Campus Riedberg, N160/207, Tel: +49-69-798-29445
>> E-Mail: diefenbach at chemie.uni-frankfurt.de
>
> _______________________________________________
> Molpro-user mailing list
> Molpro-user at molpro.net
> http://www.molpro.net/mailman/listinfo/molpro-user
>
More information about the Molpro-user
mailing list