Re: [AMBER] compiling amber10 with mac intel, ifort/icc and mpi

From: Alan <alanwilter.gmail.com>
Date: Sat, 13 Jun 2009 19:37:54 +0100

Thanks dear David, I could manage following your hints and here is my recipe:

# To install Intel C/C++ and Fortran compilers
# https://registrationcenter.intel.com/RegCenter/AutoGen.aspx?ProductID=1070&AccountID=&ProgramID=&RequestDt=&rm=EVAL&lang=
# https://registrationcenter.intel.com/RegCenter/AutoGen.aspx?ProductID=1009&AccountID=&ProgramID=&RequestDt=&rm=EVAL&lang=
# install them, they will work for one month but your binaries will
work forever.
# To renew license after a month, go to links above and copy e-mailed
*.lic files in /Users/Shared/Library/Application\
Support/Intel/Licenses/

# OPEN MPI with INTEL COMPILERS
# Mac Osx has openmpi but not with support for Fortran77/Fortran90
# openmpi 1.3.x didn’t work
wget -c http://www.open-mpi.org/software/ompi/v1.2/downloads/openmpi-1.2.9.tar.bz2
tar xvfj openmpi-1.2.9.tar.bz2
cd openmpi-1.2.9
./configure --prefix=/usr/local CC=icc CXX=icpc F77=ifort FC=ifort
make -j 2 all
sudo make -j 2 install

export PATH=/usr/local/bin:$PATH # IMPORTANT: /usr/local/bin has to
come first to avoid conflict with MPI in /usr/bin and /sw/bin

# Installing AmberTools
# set AMBERHOME
cd $AMBERHOME/..
tar xvfj AmberTools-1.2.tar.bz2
cd $AMBERHOME
wget -c http://ambermd.org/bugfixes/AmberTools/1.2/bugfix.all
mv -f bugfix.all bugfixAmberTools.all
patch -p0 -N < bugfixAmberTools.all
cd src/
./configure_at icc
make -j 2 -f Makefile_at
cd $AMBERHOME/test; make -f Makefile_at test

# Installing AMBER 10 SERIAL
cd $AMBERHOME/..
tar xvfj Amber10.tar.bz2
cd $AMBERHOME
wget -c http://ambermd.org/bugfixes/10.0/bugfix.all
mv -f bugfix.all bugfixAmber.all
patch -p0 -N < bugfixAmber.all
cd src/
./configure_amber -nosanderidc ifort_macosx # ‘-nosanderidc’ is
because ‘divcon’ doesn’t work with ifort
make -j 2 serial
cd $AMBERHOME/test; make test

# AMBER PARALLEL
cd $AMBERHOME/src
make clean
#export DYLD_LIBRARY_PATH=/usr/local/lib:${DYLD_LIBRARY_PATH}
export MPI_HOME=/usr/local
./configure_amber -nosanderidc -openmpi ifort_macosx
make -j 2 parallel
cd $AMBERHOME/test
export DO_PARALLEL="mpirun -np 2"
make test.parallel.MM
make test.parallel.QMMM
make test.parallel.EVB

All went fine!

Just some questions more. Divcon is still not ready for inter
compilers? Is is possible to compile divcon alone only with gnu
compilers? Did anyone get PMEMD compiled with Mac intel? From the
README, it seems to be not supported.

Many thanks,

Alan


On Thu, Jun 11, 2009 at 13:43, David Watson <dewatson.olemiss.edu> wrote:
>
> On Jun 11, 2009, at 6:14 AM, Alan wrote:
>
>> So I did (as following the basic approach as in the manual, with gfortran
>> instead of g95):make clean
>> ./configure_amber -lamsource gfortran
>> ./configure_lam
>> make parallel
>>
>> And got:
>>
>> [snip]
>> /Users/alan/Programmes/amber10/bin/mpif77   -ffree-form  -o sander.MPI
>> constants.o nose_hoover.o [snip] ncsu-smd-hooks.o ncsu-umbrella.o
>> ncsu-utils.o ncsu-value.o ../netcdf/lib/libnetcdf.a
>> ld warning: duplicate dylib /sw/lib/gcc4.4/lib/libgcc_s.1.dylib
>
> It appears that you have Fink installed.
> Are you sure that you want to use the gcc provided with Fink?
> If you simply need gfortran, try installing R, as they have gone through the trouble of compiling it and providing it with their installation package.
> Then try compiling with the system gcc/gfortran by commenting out the appropriate line in your bash init scripts (the one that sources the file in /sw) and logging into a new Terminal.
>
> As far as mpi goes, Apple does provide openmpi, but unfortunately this is not compiled with support for fortran routines, which means you will need to get the source for gfortran and the base gcc collection, then compile your own version if you need mpi.
> Then you have to specify the full path to your version of mpirun to override the one in /usr/bin.
>
>> Undefined symbols:
>> "_lam_f77init", referenced from:
>>    _lam_f77init$non_lazy_ptr in liblamf77mpi.a(init_f.o)
>> "_lam_mpi_comm_world", referenced from:
>> [snip]
>>    _mpi_recv_ in liblamf77mpi.a(recv_f.o)
>>    _mpi_wait_ in liblamf77mpi.a(wait_f.o)
>> ld: symbol(s) not found
>> collect2: ld returned 1 exit status
>> make[1]: *** [sander.MPI] Error 1
>> make: *** [parallel] Error 2
>>
>>
>> On Wed, Jun 10, 2009 at 17:54, David A. Case <case.biomaps.rutgers.edu>wrote:
>>
>>> On Wed, Jun 10, 2009, Alan wrote:
>>>
>>>> ./configure_amber -nosanderidc -mpi -p4 gfortran
>>>
>>>> Undefined symbols:
>>>>
>>>> "_mpi_reduce_", referenced from:
>>>
>>> Your build is not finding the MPI libraries.  I have no idea where they are
>>> on
>>> your computer.  When you use the "-mpi" flag, the configure script assumes
>>> that the required MPI libraries will be found.  If not, you have to edit
>>> config_amber.h to add the correct paths to the LOADLIB variable.
>>>
>>> As a start, run configure_amber with the -lamsource option instead of -mpi.
>>> This should(!) compile with gfortran (does on other platforms) and will
>>> automatically put all the correct paths into the build scripts.  (Be sure
>>> to
>>> run configure_lam as the script instructs you to do; also, I'd still
>>> suggest
>>> leaving off the "-j 2" flag to make..parallel makes have not been tested
>>> much.
>>>
>>> ...hope this helps....dac
>
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber



--
Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.
>>http://www.bio.cam.ac.uk/~awd28<<

_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon Jul 06 2009 - 08:59:43 PDT
Custom Search