AMBER Archive (2006)Subject: Re: AMBER: gfortran/gcc versus ifort/icc
From: Luis Gracia (lug2002_at_med.cornell.edu)
Date: Wed Nov 15 2006 - 12:34:36 CST
We had a lot of problems with netcdf on x86_64 using gfortran. What I
ended up doing is:
- getting a binary distribution of netcdf from the homepage
- deleting the netcdf directory provided by amber and creating a
symbolic link to the binary distribution directory
- changing the amber Makefiles to not compile netcdf
The following should do it.
cd $AMBERHOME/src
mv netcdf netcdf-dist
ln -s /path/to/netcdf netcdf
patch -p0 -N -r patch_netcdf_rejects < netcdf.patch
This is the patch:
---------------------- start ---------------
--- configure.dist 2006-10-09 18:50:57.000000000 -0400
+++ configure 2006-10-09 18:51:12.000000000 -0400
@@ -1239,9 +1239,6 @@
echo " ------ Configuring the netCDF libraries: --------"
echo ""
- cd netcdf/src;env FC="$fc" FFLAGS="$fncflags" F90FLAGS="$f90ncflags" \
- CXX="" CC="$cc" CFLAGS="$cflags" CPPFLAGS="-DNDEBUG" \
- ./configure;cd ../..
fppflags="$fppflags -DBINTRAJ"
cppflags="$cppflags -DBINTRAJ -I../netcdf/include"
else
--- Makefile.dist 2006-10-09 18:51:19.000000000 -0400
+++ Makefile 2006-10-09 18:51:33.000000000 -0400
@@ -93,7 +93,4 @@
cd leap; make clean
-cd pmemd; make clean
cd build_amoeba; make clean
- -cd netcdf/src; make clean
- -cd netcdf/lib && rm -f libnetcdf.a
- -cd netcdf/include && rm -f *.mod
# rm -f $(CONFIG_FILE)
--- sander/Makefile.dist 2006-10-09 18:51:37.000000000 -0400
+++ sander/Makefile 2006-10-09 18:51:50.000000000 -0400
@@ -249,7 +249,6 @@
cd ../dcqtp; make libdivcon.a
netcdf.mod:
- cd ../netcdf/src; make install
cp ../netcdf/include/*.mod .
clean:
--- ptraj/Makefile.dist 2006-10-09 18:51:56.000000000 -0400
+++ ptraj/Makefile 2006-10-09 18:52:05.000000000 -0400
@@ -85,4 +85,3 @@
cd ../lib ; make sys.a
netcdf.mod::
- cd ../netcdf/src; make install
---------------------- end ---------------
Best
Luis
Jordi Camps said the following on 11/15/06 12:50:
> Hello,
>
> I'm trying to compile Amber 9 with NetCDF support, but I'm stuck with a
> linking problem. I get Amber working without NetCDF support in the serial
> flavour, but when I add the NetCDF flag, I get a bunch of unresolved
> symbols.
> Here is a snip of the first error lines:
> ../netcdf/lib/libnetcdf.a(netcdf.o): In function
> `__netcdf__nf90_inq_libvers':
> netcdf.f90:(.text+0x13): undefined reference to `nf_inq_libvers_'
> ../netcdf/lib/libnetcdf.a(netcdf.o): In function
> `__netcdf__nf90_strerror':
> netcdf.f90:(.text+0x47): undefined reference to `nf_strerror_'
> ../netcdf/lib/libnetcdf.a(netcdf.o): In function
> `__netcdf__nf90_create':
> netcdf.f90:(.text+0xaf): undefined reference to `nf__create_'
> netcdf.f90:(.text+0xeb): undefined reference to `nf__create_'
> netcdf.f90:(.text+0xf7): undefined reference to `nf_create_'
> ../netcdf/lib/libnetcdf.a(netcdf.o): In function
> `__netcdf__nf90_enddef':
> netcdf.f90:(.text+0x188): undefined reference to `nf_enddef_'
> netcdf.f90:(.text+0x1f6): undefined reference to `nf__enddef_'
> It is a linking problem, but I'm being unable to resolve the cause. I'm on a
> x86_64 (Opteron) system running Linux and GCC (gfortran) compilers version
> 4.1.0.
> Did you get this error before? Could you tell me how you will try to resolve
> this issue?
>
> Thanks in advance!
>
> --
> Jordi Camps Puchades
> jcamps_at_lsi.upc.edu
> Supercomputing research, support and development
>
> Barcelona Supercomputing Center | Instituto Nacional de Bioinformática
> | GNHC-2 UPC-CIRI
> (http://inb.lsi.upc.edu)
> http://www.bsc.es | http://www.inab.org
> Tel. : 934 137 602 | Tel. : 934 037 155
> Fax : 934 137 721 | Fax : 934 037 157
> c/ Jordi Girona, 29 | c/ Josep Samitier, 1-5
> Edifici Nexus II, despatx 1B | PCB, Edifici Modular, PBC32
> E-08034 Barcelona | E-08028 Barcelona
> Catalunya (Spain) | Catalunya (Spain)
>
> -----------------------------------------------------------------------
> The AMBER Mail Reflector
> To post, send mail to amber_at_scripps.edu
> To unsubscribe, send "unsubscribe amber" to majordomo_at_scripps.edu
-----------------------------------------------------------------------
The AMBER Mail Reflector
To post, send mail to amber_at_scripps.edu
To unsubscribe, send "unsubscribe amber" to majordomo_at_scripps.edu
|