Re: [AMBER] problem building Amber 16 with Intel compilers

From: Daniel Roe <>
Date: Tue, 20 Dec 2016 14:04:39 -0500


On Tue, Dec 20, 2016 at 1:45 PM, Susan Chacko <> wrote:
> % ./nf-config --all
> This netCDF-Fortran 4.2 has been built with the following features:
> --cc -> /usr/local/intel/composer_xe_2015.1.133/bin/intel64/icc
> --cflags -> -I/usr/local/apps/amber/amber16/include -I/usr/local/apps/amber/amber16/include
> --libs -> -L/usr/local/apps/amber/amber16/lib -L/usr/local/apps/amber/amber16/lib -shared-intel -lnetcdf -lnetcdff -lnetcdf

Not sure how you got here but this 'libs' line might be your problem.
For some reason you have a '-lnetcdff' flag in there, which shouldn't
be needed when linking a non-Fortran program. It's also in the wrong
place; '-lnetcdff' needs to come *before* '-lnetcdf' since the latter
contains the symbols the former needs. Note that your 'flibs' line
looks OK:

> --flibs -> -L/usr/local/apps/amber/amber16/lib -lnetcdff -L/usr/local/apps/amber/amber16/lib -shared-intel -lnetcdf -lnetcdff -lnetcdf

Contrast this output from nf-config with one of my Intel compiles:

--libs -> -L/v/apps/amber/amber16/intel_17.0.0-mvapich2_2.2/lib
-L/v/apps/amber/amber16/intel_17.0.0-mvapich2_2.2/lib -shared-intel
-lnetcdf -lnetcdf
--flibs -> -L/v/apps/amber/amber16/intel_17.0.0-mvapich2_2.2/lib
-lnetcdff -L/v/apps/amber/amber16/intel_17.0.0-mvapich2_2.2/lib
-shared-intel -lnetcdf -lnetcdf

The output of your configure message makes it look like you might have
some environment variables relating to the compiler name set, like
CC/FC etc, and what's more it looks like they may contain the full
path to the compiler binaries. Is that the case? If so, try unsetting
them (or just setting them to the compiler name, e.g. CC=icc etc) and
run configure again.


> --has-f90 -> yes
> --has-nc2 -> yes
> --has-nc4 -> no
> --prefix -> /usr/local/apps/amber/amber16
> --includedir-> /usr/local/apps/amber/amber16/include
> --version -> netCDF-Fortran 4.2
> But then, when I go back to the top level of amber16, and type
> ./configure --with-netcdf /usr/local/apps/amber/amber16/ intel
> I still get the same flurry of 'undefined reference' errors.
> Susan.
> _______________________________________________
> AMBER mailing list

Daniel R. Roe
Laboratory of Computational Biology
National Institutes of Health, NHLBI
5635 Fishers Ln, Rm T900
Rockville MD, 20852
AMBER mailing list
Received on Tue Dec 20 2016 - 11:30:02 PST
Custom Search