AMBER Archive (2007)Subject: Re: AMBER: Fwd: Amber9 parallel compilation openmpi issues
From: Mark Williamson (Mark.Williamson_at_imperial.ac.uk) 
Date: Wed Jul 25 2007 - 17:20:37 CDT
 
 
 
 
David A. Case wrote:
 
 > It was after Amber9 was released that the openMPI folks changed their header
 
> file, to use the fortran90 include mechanism to get mpif-common.h.
 
> Previously, $MPI_HOME/include/mpif.h had been a simple file that could just
 
> be included at the cpp pre-processing step.  So, the configure script above
 
> worked at release time, but stopped working later on (at least for me!).
 
> 
 
> The simple question for Mark is this: what version of openMPI are you using?
 
 Hi David,
 
 In this case, I'm using openmpi-1.2.3 . I don't generally use openmpi; I 
 
just downloaded and played a bit with it to see if I could reproduce 
 
Francesco's issues. I used a RPM built from the SRPM from the openmpi site:
 
 http://www.open-mpi.org/software/ompi/v1.2/downloads/openmpi-1.2.3-1.src.rpm
 
 My base system is FC5 with all updates applied and AMBER 9 with patches 
 
up to 17 applied.
 
  > Can you check on what is inside your $MPI_HOME/include/mpif.h file?
 
 /usr/include/mpif.h does have an
 
   include 'mpif-common.h'
 
 If I execute the following:
 
   cd $AMBERHOME/src
 
  export MPI_HOME=/usr
 
  ./configure -openmpi ifort_ia32
 
  make clean ; make parallel
 
 In the case of the sander compile, evb_init.f does have the region:
 
   #if defined(MPI)
 
  #  include "parallel.h"
 
  #  include "mpif.h"
 
  #endif /* MPI */
 
 correctly expanded after passing it via cpp, but _evb_init.f does have 
 
an (unexpanded) include 'mpif-common.h'
 
 Interestingly my version of Ifort:
 
   Intel(R) Fortran Compiler for 32-bit applications, Version 9.0 
 
Build   20060222Z Package ID: l_fc_c_9.0.033
 
 seems to somehow "automagically" resolve this:
 
 cpp -traditional -I/usr/include -P -DMPI  evb_vars.f > _evb_vars.f
 
ifort -c -w95   -mp1 -O0 -FR  -o evb_vars.o _evb_vars.f
 
cpp -traditional -I/usr/include -P -DMPI  evb_input.f > _evb_input.f
 
ifort -c -w95   -mp1 -O0 -FR  -o evb_input.o _evb_input.f
 
 If this is repeated with gfortran (gcc-gfortran-4.1.1-51.fc5), there is 
 
an issue:
 
   cd $AMBERHOME/src
 
  export MPI_HOME=/usr
 
  ./configure -openmpi gfortran
 
  make clean ; make parallel
 
 cpp -traditional -I/usr/include -P -DMPI -xassembler-with-cpp 
 
-Dsecond=ambsecond  evb_init.f > _evb_init.f
 
gfortran -c -O0 -fno-second-underscore -ffree-form  -o evb_init.o 
 
_evb_init.f
 
Error: Can't open included file 'mpif-common.h'
 
  In file _evb_init.f:366
 
  <more errors>
 
 As an aside, this can be resolved by setting
 
   FC= gfortran -I/usr/include
 
 in config.h
 
 So, I agree with everything you've said. It seems like ifort has some 
 
form of magic that makes it work with respect to includes when maybe it 
 
should not. I do not know the reason why this is.
 
 regards,
 
 Mark
 
 -----------------------------------------------------------------------
 
The AMBER Mail Reflector
 
To post, send mail to amber_at_scripps.edu
 
To unsubscribe, send "unsubscribe amber" to majordomo_at_scripps.edu
 
 
  
 |