Re: [AMBER-Developers] Adding fortran module into nab with some catches.

From: Mengjuei Hsieh <>
Date: Tue, 9 Feb 2010 18:57:06 -0800

On Tue, Feb 09, 2010 at 10:06:23AM -0500, case wrote:
> On Tue, Feb 09, 2010, MengJuei Hsieh wrote:
> > For nab, I have to use something like this:
> > $AMBERHOME/bin/nab -o test -lpbsa -lgfortran
> > This is due to the fact the linker doesn't know it's linking some Fortran
> > subroutines. I can imagine that it's going be a different library if I am
> > using Intel compiler. (like, -lifcore -lifport)
> > Any idea that could generalize this kind of thing in configure script or
> > just hack nab?
> The extra libraries that are needed should get put into the FLIBS variable
> in config.h; that way they will be automatically searched for. I think this
> is a better solution than trying to change nab itself.
> I've been travelling, and have not had a chance to look in any detail at what
> you have done with the sff interface. I'll try to get to that sometime this
> week.

I have been testing our pbsa integration in nab, and there is one
caveat: Icc/ifort are not very happy with
    "$AMBERHOME/bin/nab -o test -lpbsa -lifcore -lifport".
This is due to the order of linker command and it looks like:
    "-lnab -lpbsa".
Therefore it would be wise to archive libpbsa object files into
libnab.a, too. So it becomes a shorter command.
    "AMBERHOME/bin/nab -o test -lifcore -lifport"

Instead of FLIB, my seggestion for solving the C linker on Fortran
routines is to use additional setting for linker like:
    CFLINKER=$(CC) -lifcore -lifport # for intel
    CFLINKER=$(CC) -lgfortran # for gfortran
In the same fashion, I can also solve my toy pbsa caller problem
with the setting:
    FCLINKER=$(FC) -nofor_main # for intel
    FCLINKER=$(FC) -Mnomain # for PGI
Just my $0.02 .

Yet another issues for pbsa integration is that I am still doing
single point calculation for every step of the nab minimization.
I.e. redundant initialization and deallocation will definitely
slow down the performance.

Mengjuei Hsieh, Luo Research Group, Molecular Biology & Biochemistry,
University of California Irvine.
AMBER-Developers mailing list
Received on Tue Feb 09 2010 - 19:00:03 PST
Custom Search