Re: [AMBER-Developers] constants in AMBER

From: Jason Swails <jason.swails.gmail.com>
Date: Sun, 1 Jan 2012 22:24:02 -0500

My mistake. That's an easy thing to forget to do when you're focused.

We are already using -I/include/path to find the netcdf.mod file, I suggest
we do the same for other Fortran modules that are common between codes. It
seems kind of silly to have 3 versions of constants.f floating around,
requiring them all to be the same, while having the ability to avoid it.

Thanks!
Jason

On Fri, Dec 30, 2011 at 9:43 PM, Scott Brozell <sbrozell.rci.rutgers.edu>wrote:

> Hi,
>
> This lurker got-us:
> a commit was made to src/sander/constants.f
> without sync-ing to AmberTools/src/sqm/constants.f or
> AmberTools/src/rism/constants.f
> The compilation of sander failed:
> pgf90 -c -O1 -Mfree -I../../AmberTools/src/pbsa
> -I../../AmberTools/src/sqm -I../../AmberTools/src/rism
> -I../../include -I/nfs/10/srb/12/include -o mdread.o _mdread.f
> PGF90-S-0084-Illegal use of symbol no_input_value_float - not public
> entity of module (_mdread.f: 86)
> 0 inform, 0 warnings, 1 severes, 0 fatal for mdread1
>
> because the -I option specifies module search paths and pgi
> apparently does not search the current directory first.
>
> scott
>
> On Thu, May 19, 2011 at 03:00:19AM -0400, Scott Brozell wrote:
> > 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.
>
> _______________________________________________
> AMBER-Developers mailing list
> AMBER-Developers.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber-developers
>



-- 
Jason M. Swails
Quantum Theory Project,
University of Florida
Ph.D. Candidate
352-392-4032
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Sun Jan 01 2012 - 19:30:03 PST
Custom Search