AMBER Archive (2006)

Subject: Re: AMBER: amber9 parralel compiling

From: Scott Brozell (sbrozell_at_scripps.edu)
Date: Fri Dec 01 2006 - 13:40:54 CST


On Thu, 30 Nov 2006, David A. Case wrote:

> On Thu, Nov 30, 2006, Nikola Trbovic wrote:
>
> > g95 -ffree-form -o sander.MPI evb_vars.o evb_input.o evb_init.o
> ....
> > evb_init.o(.text+0x4f7): In function `evb_init_':
> > : undefined reference to `mpi_bcast_'
>
> Amber is expecting to see the entry "mpi_bcast_". Be sure you don't have
> something that looks like this, but with an extra "_" before or after the
> name. Note that amber compiles its fortran programs with the
> "-fno-second-underscore" flag set, and it may be that you need this same
> flag when building lam. (Or, leave it out from sander -- I can't remember why
> this is there....)

Regarding postpending a second underscore to external symbols
we cater to the most probable situation; namely, that there should
not be a second underscore. That is the default with intel and
portland group compilers (which have link compatability with gnu objects).

In addition we have the configure option -gnucompat which overrides
our default and adds a second underscore for compilers that can (g95
and pgf90).

In my opinion as a best practice -fno-second-underscore
should always be used. The situation with fortran external symbols
was already screwed up and from a current perspective gnu made it worse
by adding another convention; maybe there was some compelling reason ...

Scott

-----------------------------------------------------------------------
The AMBER Mail Reflector
To post, send mail to amber_at_scripps.edu
To unsubscribe, send "unsubscribe amber" to majordomo_at_scripps.edu