Re: AMBER: Fwd: Amber9 parallel compilation openmpi issues

From: Mark Williamson <Mark.Williamson.imperial.ac.uk>
Date: Wed, 25 Jul 2007 20:19:29 +0100

David A. Case wrote:
> In my view(!), the key thing is to follow the instructions of Benjamin Juhl:
> you have to edit the config.h file (to replace "ifort" with "mpif90"). After
> that, things should(!?!) be OK. Since mpif90 is in your PATH, just
> substituting "mpif90" for "ifort" in config.h should get you most of the way
> home....

I'm desperately trying not cloud the waters here, but here's my take on
it :)

When AMBER's configure script is run with the openmpi flag, the
following section of code within this script is visited:



...blah....

openmpi)
     if [ -z "$MPI_HOME" ]; then
         PAR="OPENMPI"
         FILES="mpif.h and libmpi.a, liblam.a or liblamf77mpi.a"
         EXAMPLE="/usr/local/openmpi-1.0"
         par_error
     fi
     echo "MPI_HOME is set to $MPI_HOME"
     loadlib=`$MPI_HOME/bin/mpif90 -showme | perl -p -e
's/(-[lLW]\S+\s)|\S+\s/$1/g'`
     fppflags="-I$MPI_HOME/include $fppflags -DMPI"
     ;;

...blah....


If MPI_HOME set, then configure will attempt to execute
$MPI_HOME/bin/mpif90 -showme to ascertain which libs it will need for
linking to. It will then pipe this via perl to do some clean ups and
then set the result of this to loadlib. Ultimately, this manifests
itself as LOADLIB=<parsed output of $MPI_HOME/bin/mpif90 -showme> in the
resulting config.h file.

You have already stated in an email that your MPI_HOME is set to
"/usr/local/openmpi-1.2.3". The fact that in the config.h that you
attached to a previous email, the LOADLIB= variable is empty, suggests
that $MPI_HOME/bin/mpif90 -showme returned nothing because it was not
actually executed. This suggests that your $MPI_HOME path is wrong. From
the output of the find command I asked you to run, the mpif90 --showme
command output and Benjamin's comments, I conclude that the MPI_HOME dir
should be "/usr/local".

Hence, I suggest trying:


  cd $AMBERHOME/src
  make clean

  export MPI_HOME=/usr/local
  ./configure -openmpi ifort_x86_64

  make parallel



I believe David's and Benjamin's advice is correct, but I think this
route should achieve the same goal, but avoiding any possible side
effects associated with hand hacking the config.h file. You can always
try this first since it's the easiest and if it does not work, move
other to the other excellent suggestions from the list.


regards,

Mark Williamson
-----------------------------------------------------------------------
The AMBER Mail Reflector
To post, send mail to amber.scripps.edu
To unsubscribe, send "unsubscribe amber" to majordomo.scripps.edu
Received on Sun Jul 29 2007 - 06:07:15 PDT
Custom Search