Re: AMBER: pmemd. - OOPS!!!

From: Robert Duke <rduke.email.unc.edu>
Date: Mon, 16 Aug 2004 10:45:03 -0400

Folks -
I accidentally included config.h files for the athlon, NOT the pentium, in
the previous mail. I had recently answered a question about the athlons, so
had that stuck in my head. The config.h files for the pentium are available
on the amber.scripps.edu website, behind a link about Running amber 8 on
linux using ifc 8 (with my name behind it). I embedded the info from this
page below. Sorry for the confusion! - Bob

The web page:
Using Intel compilers (ifc8) with PMEMD
(from Bob Duke)

Folks -

For those of you interested in being able to use the Intel Fortran Compiler,
version 8, on Linux IA32 machines, Intel has finally, after 3 months or
thereabouts, released a fix. The file to pick up from
https://premier.intel.com is l_fc_pc_8.0.046.tar.gz. Any releases in the
version 8 lineage earlier than this won't work. I of course can't predict
what will happen with versions after this one, so if you update later,
beware!

This version of the compiler produces a PMEMD that is roughly 5-10% faster
than the PMEMD produced by ifc 7.1, and I have run regressions (21 tests) on
a dual xeon, 1 and 2 processors and all tests pass. However, when Intel
giveth, Intel tends to also take away. There are new issues on getting pmemd
to build and run with mpich. These are not insurmountable; it is just
disappointing that you have to do the workarounds. So here are the details
for pmemd 8 on redhat 9 or rhel 3. This probably also applies to redhat 8,
but I don't have a test system.

First of all a sample config.h for a uniprocess build, followed by a sample
config.h for an mpich build, both for the pentium and redhat 9 or rhel 3:



----------------------------------------------------------------------------
----
1 processor config.h:
#!/bin/csh -f
setenv PREPROCFLAGS "-DDIRFRC_VECT_OPT"
setenv CPP "/lib/cpp -traditional "
setenv OPT_LO  "ifort -c -auto -tpp7 -mp1 -O0"
setenv OPT_MED "ifort -c -auto -tpp7 -mp1 -O2"
setenv OPT_HI  "ifort -c -auto -tpp7 -xW -mp1 -ip -O3"
setenv LOAD "ifort"
setenv LOADLIB " -limf -lsvml "
----------------------------------------------------------------------------
----
mpich config.h:
#!/bin/csh -f
setenv MPICH_HOME /opt/pkg/mpi
setenv MPICH_INCLUDE $MPICH_HOME/include
setenv MPICH_LIBDIR $MPICH_HOME/lib
setenv MPILIB "-L$MPICH_LIBDIR -lmpich"
setenv PREPROCFLAGS "-DMPI -DSLOW_NONBLOCKING_MPI -DDIRFRC_VECT_OPT"
setenv CPP "/lib/cpp -traditional  -I$MPICH_INCLUDE"
setenv OPT_LO  "ifort -c -auto -tpp7 -mp1 -O0"
setenv OPT_MED "ifort -c -auto -tpp7 -mp1 -O2"
setenv OPT_HI  "ifort -c -auto -tpp7 -xW -mp1 -ip -O3"
setenv LOAD "ifort"
setenv LOADLIB " -limf -lsvml $MPILIB"
----------------------------------------------------------------------------
----
Now for the additional caveats. With ifort 8, either on an IA32 chip or on
the itanium, a lot more stack is used by the executables produced if you
actually use some of the more modern f90 capabilities (like pmemd does).
Thus it is important to (on the csh or tcsh) do a "limit stacksize
unlimited" in your .login script (for sh and it's variants I think you have
to use a ulimit, and different syntax). In all past experience, this is only
required in .login. I don't know what has happened in ifort 8, but now for
mpich runs it is necessary to put the "limit stacksize unlimited" in .cshrc
(which all invocations of csh execute). This is very strange because limits
are supposed to be inherited without any such action (kind of like
environment variables - next topic). Also, in the past you needed to source
the appropriate intel fortran environment variable script in your .login (or
..profile for sh-ish shells). Well, for mpi executables built by ifort 8, you
also need to source the fortran environment variable script in .cshrc (or
..bashrc or whatever). It is probably sufficient to just set LD_LIBRARY_PATH.
An alternative to this is to put the intel libraries path in
/etc/ld.so.conf, but you must then remember to run /sbin/ldconfig as root.
Thanks to David Konerding for help on all this; we were both testing stuff
yesterday. If you are still running pmemd 3.1, by the way, and want to use
it on these later redhat releases, please be sure to remove the -static
option from whatever MACHINE file you use (due to a static threads library
stack overflow issue, I believe - now threads code is used in all builds,
due to intel library stuff).
One additional note on building mpich 1.2.5.2 under ifort 8. It DOES work,
but it is fairly common to build it as root, and then it is important to
remember to set up the intel fortran compiler environment (source the script
in the root account). If you forget to do this, you get the errors in
construction of mpif.h that have been reported on the ifc developer's forum
(MPI_ADDRESS_KIND and MPI_OFFSET_KIND are set to 0; they should be 4 and 8,
contrary to what it says on the forum).
Sorry for the mess. It's not my fault! What you save in cash on Linux
systems, you pay back in other ways...
Regards - Bob Duke
----- Original Message ----- 
From: "Robert Duke" <rduke.email.unc.edu>
To: <amber.scripps.edu>
Sent: Monday, August 16, 2004 10:33 AM
Subject: Re: AMBER: pmemd.
> Osman -
> There are at least two things going on here:
> 1) You are using an intel fortran version 7 configure script with intel
> fortran 8.  This is understandable, since I did not release an intel
fortran
> 8 script with amber 8 -  the ifort 8 compiler did not work in the
timeframe
> of the amber 8 release for pmemd on ia32.  Please find embedded below a
> couple of config.h files that SHOULD work with ifort 8 if you plug in the
> right value for the location of mpich.
> 2) The specific release of the intel fortran compiler, version 8, is
> probably bad (the internal error listed below leads to this conclusion).
> Prior to compiler release 8.0.046, intel apparently had problems
allocating
> space for long module names, or some other such nonsense.  Be sure you
have
> downloaded version 8.0.046 from the intel site; later versions may or may
> not also work - the intel version 8 compiler, while producing faster code,
> has not been particularly stable (ie., the intel developers seem to
> introduce new bugs when they take out the old ones).
> 3) A possible third thing going on is that stacksize should be set to
> unlimited in your .login file, definitely for running pmemd, and it is
> probably not a bad idea to do this when using the compiler also (but I
think
> your real problem is 2) above).  This is done by placing a line
> 'limit stacksize unlimited' in your .login file if you use the csh or
tcsh.
> For bash, I think you would want to put 'ulimit -s unlimited' in
> .bash_profile, but I don't use bash so I have not checked it out.
>
> Here are the config.h samples:
>
> Try using this as config.h for uniprocessor
>
> Begin -->
> #!/bin/csh -f
> setenv PREPROCFLAGS
> setenv CPP "/lib/cpp -traditional "
> setenv OPT_LO "ifort -c -auto -tpp6 -mp1 -O0 "
> setenv OPT_MED "ifort -c -auto -tpp6 -mp1 -O2 "
> setenv OPT_HI "ifort -c -auto -tpp6 -mp1 -ip -O3 "
> setenv LOAD "ifort"
> setenv LOADLIB
> <-- End
>
> Or this for mpich:
> Begin -->
> #!/bin/csh -f
> setenv MPICH_HOME <whereever your mpich installation is>
> setenv MPICH_INCLUDE $MPICH_HOME/include
> setenv MPICH_LIBDIR $MPICH_HOME/lib
> setenv MPILIB "-L$MPICH_LIBDIR -lmpich"
> setenv PREPROCFLAGS "-DMPI -DSLOW_NONBLOCKING_MPI"
> setenv CPP "/lib/cpp -traditional -I$MPICH_INCLUDE"
> setenv OPT_LO "ifort -c -auto -tpp6 -mp1 -O0"
> setenv OPT_MED "ifort -c -auto -tpp6 -mp1 -O2"
> setenv OPT_HI "ifort -c -auto -tpp6 -mp1 -ip -O3"
> setenv LOAD "ifort"
> setenv LOADLIB "$MPILIB"
> <-- End
>
>
> Other possible issues:
>
> Be sure that mpich has been built with the same fortran compiler as you
use
> to compile pmemd.  This is a recurring headache with using mpich; the
> library interface names have to match the conventions used by the
compiler.
>
> The fortran compiler libraries will have to be accessible for dynamic
> loading from all machines in a cluster.  In an ideal world, we could
> statically link all this stuff without problems.  In the real world, the
> static threads library that gets linked in if you link static causes
> segmentation violations (a vague, but hopefully correct, recollection).
>
> If you are using mpich over gigabit ethernet, you will want to increase
the
> tcp/ip buffer sizes.  I have not done a rigorous study of what a good size
> is, but I will check this out later today and post a separate message to
the
> list (this is something I have been intending to do, and not getting
around
> to doing).  This is not an issue if you are just using a dual processor
> pentium and the mpich shared memory device.
>
> Regards - Bob
>
> ----- Original Message ----- 
> From: "Osman Gani" <osman.gani.fagmed.uit.no>
> To: <amber.scripps.edu>
> Sent: Monday, August 16, 2004 9:03 AM
> Subject: RE: AMBER: pmemd.
>
>
> > Dear Bob,
> > Following is my administrator's message pasted-
> >
> > Here is the messages I receive from my machine(Redhat Linux 8,0 on Dell
> Xeon 2,8 G preocessor) when trying to install pmemd:
> >
> >  ./configure linux_p4 ifc7 mpich
> > Please enter name of directory where MPICH files are installed:
> > /usr/local/mpich-1.2.5
> > PMEMD Configurate successfully completed.
> >
> >  make install
> > cd src; make install
> > make[1]: Entering directory `/usr/local/amber8/src/pmemd/src'
> > ../Compile OPT_HI -P  ew_direct_cit_dat.f90
> > cat ew_direct_cit_dat.f90 |
>
lib/cpp -traditional  -I/usr/local/mpich-1.2.5/include -P   -DMPI -DSLOW_NON
> BLOCKING_MPI -DDIRFRC_VECT_OPT  > _ew_direct_cit_dat_.f90
> > ifc -c -auto -tpp7 -xW -mp1 -ip -O3 _ew_direct_cit_dat_.f90
> > ifc: warning: The Intel Fortran driver is now named ifort.  You can
> suppress
> > this message with '-quiet'
> > fortcom: Severe: _ew_direct_cit_dat_.f90, line 82: **Internal compiler
> error: segmentation violation signal raised** Please report this error
along
> with the circumstances in which it occurred in a Software Problem Report.
> Note: File and line given may not be explicit cause of this error.
> > contains
> > ^
> > compilation aborted for _ew_direct_cit_dat_.f90 (code 3)
> > make[1]: *** [ew_direct_cit_dat.o] Error 1
> > make[1]: Leaving directory `/usr/local/amber8/src/pmemd/src'
> > make: *** [install] Error 2
> >
> > And here is teh result when compiling without mpich:
> >
> >
> > [root.mia pmemd]# ./configure linux_p4 ifc7 nopar
> > PMEMD Configurate successfully completed.
> >
> > [root.mia pmemd]# make install
> > cd src; make install
> > make[1]: Entering directory `/usr/local/amber8/src/pmemd/src'
> > ../Compile OPT_HI -P  ew_direct_cit_dat.f90
> > cat ew_direct_cit_dat.f90 |
ib/cpp -traditional  -P   -DDIRFRC_VECT_OPT
> > _ew_direct_cit_dat_.f90
> > ifc -c -auto -tpp7 -xW -mp1 -ip -O3 _ew_direct_cit_dat_.f90
> > ifc: warning: The Intel Fortran driver is now named ifort.  You can
> suppress this message with '-quiet'
> > fortcom: Severe: _ew_direct_cit_dat_.f90, line 80: **Internal compiler
> error: segmentation violation signal raised** Please report this error
along
> with the circumstances in which it occurred in a Software Problem Report.
> Note: File and line given may not be explicit cause of this error.
> > contains
> > ^
> > compilation aborted for _ew_direct_cit_dat_.f90 (code 3)
> > make[1]: *** [ew_direct_cit_dat.o] Error 1
> > make[1]: Leaving directory `/usr/local/amber8/src/pmemd/src'
> > make: *** [install] Error 2
> >
> > I am not sure what are the error messages indicate. I am enthusiastic to
> work with pmemd.
> >
> > Regards,
> > Osman
> >
> > -----Original Message-----
> > From: owner-amber.scripps.edu [mailto:owner-amber.scripps.edu]On Behalf
> > Of Robert Duke
> > Sent: 23. juli 2004 19:47
> > To: amber.scripps.edu
> > Subject: Re: AMBER: pmemd.
> >
> >
> > Osman -
> > Two issues:
> > 1) pmemd is basically a fast version of sander, that does a subset of
the
> > total sander functionality.  The command line to use is the same as
> sander,
> > and is thus documented in the sander section of the manual.  The pmemd
> > section of the manual is more involved in specifying the differences
> between
> > pmemd and sander, if I remember correctly.
> > 2) pmemd is built in a separate step from the rest of amber in amber 8.
> > This is a consequence mostly of pmemd being available for a different
set
> of
> > platforms and optimizing a bit differently.  Dave Case would have liked
to
> > unify the build (and rightly so), but I was more concerned about messing
> > things up.  SO to have pmemd available, you have to go to the
> > amber8/src/pmemd directory, read the README, invoke the configure script
> > that is there with arguments (given if you do a ./configure -help), and
> then
> > do a 'make install' in the pmemd directory (you will also need to do a
> > 'rehash' afterward for the csh to pick up the new executable, and have
> > $AMBERHOME/exe in your path (hardwired, or with $AMBERHOME defined prior
> to
> > PATH def)).  There is a little installation info in the amber 8 manual
> > (pmemd section), and more info in the amber8/src/pmemd/README file (some
> of
> > this is more than you need to know unless you are porting pmemd to a
> > currently unsupported platform).
> > Regards - Bob Duke
> >
> > ----- Original Message ----- 
> > From: "Osman Gani" <osman.gani.fagmed.uit.no>
> > To: <amber.scripps.edu>
> > Sent: Friday, July 23, 2004 1:09 PM
> > Subject: AMBER: pmemd.
> >
> >
> > > I want to run pmemd in AMBER8 on Redhat Linux.I don't see any command
> line
> > usage for that in the manual.When I invoke "pmemd" it doesn't get the
> > command.What could be the problem?May be I am asking a naive
question.But
> I
> > have to do hurry to go.
> > > Thanks in advance.
> > >
> > -----------------------------------------------------------------------
> > The AMBER Mail Reflector
> > To post, send mail to amber.scripps.edu
> > To unsubscribe, send "unsubscribe amber" to majordomo.scripps.edu
> >
>
>
> -----------------------------------------------------------------------
> The AMBER Mail Reflector
> To post, send mail to amber.scripps.edu
> To unsubscribe, send "unsubscribe amber" to majordomo.scripps.edu
>
-----------------------------------------------------------------------
The AMBER Mail Reflector
To post, send mail to amber.scripps.edu
To unsubscribe, send "unsubscribe amber" to majordomo.scripps.edu
Received on Mon Aug 16 2004 - 15:53:00 PDT
Custom Search