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:
>> $AMBERHOME/AmberTools/src/sqm/constants.f
>> $AMBERHOME/AmberTools/src/rism/constants.f
>> $AMBERHOME/src/sander/constants.f
>>
>> 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:
>>
>> 1)
>> Is this what $AMBERHOME/AmberTools/src/lib was intended for?
>
> Why not use $AMBERHOME/AmberTools/include? This seems to have a bunch of odd
> stuff already. ($AMBERHOME/AmberTools/src/include is currently just used by
> NAB.)
I don't think /include directories are a good place to put source files for F90 modules.
>> 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
I am attaching a code for testing this. Can someone try this on the other platforms we are supporting? Thanks. Just do
$> tar xvzf modtest.tar.gz
$> cd modtest
edit config.h to reflect the compiler to be used
$> make
$> ./test
and let me know whether this works. Thanks.
If it works then, instead of copying the module files, we can add a list of -IdirA -IdirB etc to the link command.
All the best,
Andy
> ....dac
>
>
> _______________________________________________
> AMBER-Developers mailing list
> AMBER-Developers.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber-developers
--
Dr. Andreas W. Goetz
San Diego Supercomputer Center
Tel : +1-858-822-4771
Email: agoetz.sdsc.edu
Web : www.awgoetz.de
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Wed May 18 2011 - 20:00:04 PDT