Re: [AMBER-Developers] constants in AMBER

From: Scott Brozell <sbrozell.rci.rutgers.edu>
Date: Thu, 19 May 2011 03:00:19 -0400

Hi,

On Wed, May 18, 2011 at 07:41:22PM -0700, Andreas Goetz wrote:
> On May 18, 2011, at 5:35 AM, case wrote:
> > On Tue, May 17, 2011, Andreas Goetz wrote:
> >>
> >> On a different note, we now have 3 copies of constants.f in AMBER:
> >> This (together with the way Fortran modules are handled at present in
> >> AMBER) is a recipe for disaster. All three files need to be in sync. I
> >> believe that anything which is shared among different programs or
> >> libraries should reside in one common place. Two questions:
> >>
> >> Is there any reason for copying Fortran module files around instead of
> >> adding the corresponding directory to the module search path (-J for
> >> gfortran and -module for ifort)?
> >
> > We used to support other compilers, and no one knew of a consistent way to
> > specify a module path. If we can make it work, paths should be bette than
> > copying.

> I went through some man pages: The flag -I adds a search path for module files with GNU gfortran, g95, Intel ifort and PGI pgf90.
>
> I tested this with
> gfortran 4.4.5 on OS X
> ifort 11.1.064 on openSuSE 11.2
> pgf90 10.5-0 on CentOS 5.5
>
> If it works then, instead of copying the module files, we can add a list of -IdirA -IdirB etc to the link command.
>

For ifort and pgf90,
even though the man pages indicate that -I is for include files
and -module is for module files, -I works.

In Columbus we went whole hog and made a special directory
called shared_modules and used -module and variants for moving
the .mod files. So far, after a couple of years, this works fine.
But this might be overkill for Amber.

scott


_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Thu May 19 2011 - 00:30:02 PDT
Custom Search