Re: [AMBER-Developers] netcdff's configure options

From: Timothy J Giese <>
Date: Wed, 19 Mar 2014 19:27:20 -0400

Just an observational note regarding the compilation of

If someone has troubles compiling netcdff it may be due, as you surely
already know, to single vs double underscores in the symbols.

These are controlled in

See e.g., the section starting with

  * The following is for f2c-support only.
#if defined(f2cFortran) && !defined(pgiFortran) && !defined(gFortran)

If the user is compiling with the gcc toolchain, netcdf's configure may
properly determine the use of gcc, but if the name of compiler is funny
e.g., gfortran44,
(or maybe because the compiler is REALLY old - I'm not sure of the
exact reason for the problems I was seeing), problems can occur.

The "fix" (at least what worked for me) is to use
CPPFLAGS="-I$AMBERHOME/include -DgFortran"
when running

This presumably holds true if a funnily-named pgi compiler is used...
in which case, add "-DpgiFortran" to CPPFLAGS

Considering that AmberTools/src/configure2 requires one to specify
gnu/pgi/intel etc, this preprocessor could possibly even be added to


AMBER-Developers mailing list
Received on Wed Mar 19 2014 - 17:00:02 PDT
Custom Search