Looks like your netcdf library is missing the fortran bits or you're not
linking netcdff library (note the double ff). I suspect the latter.
I use the following environment variables when compiling GOTM:
export NETCDFLIBNAME="-lnetcdff -lnetcdf"
export GOTMDIR=/data/jhill1/Projects/gotm-4.0.0
export NETCDFLIBDIR=/usr/lib/
export FORTRAN_COMPILER=GFORTRAN
export NETCDFINC=/usr/include
Edit for your set up (although that should really be the GOTMDIR and
your Fortran compiler)
I use Ubuntu (10.04, 10.10 and 11.04) with the gcc compiler.
Hope that helps.
J.
--
Jon Hill
AMCG, Earth Science and Engineering,
Imperial College London, SW7 2AZ.
Phone: +44 (0)20 7594 9321
Mob: +44 (0)7748254812
Many thanks for your prompt reply :)
The environment variables I am setting are as follows:
export NETCDFHOME=/packages/netcdf_test/4.1.2/
export NETCDFINC=$NETCDFHOME/include
export NETCDFLIBNAME=$NETCDFHOME/lib/libnetcdf.a
export NETCDFLIBDIR=$NETCDFHOME/lib/
export GOTMDIR=~/gotm/gotm-4.0.0
export FORTRAN_COMPILER=PGF90
I've checked all of the folders, and all the places I'm pointing to
exist. They've been advised by the IT department...although that
doesn't guarantee they're right!
I tried using export NETCDFLIBNAME="-lnetcdff -lnetcdf" and was
returned with: /usr/bin/ld: cannot find -lnetcdff
Using these variables I'm now receiving:
/login/davdda/gotm/gotm-4.0.0/lib/PGF90/libutil_prod.a(ode_solvers.o):
In functi on `emp_2_':
ode_solvers.F90:(.text+0x1ac72): undefined reference to `pgf90_auto_alloc'
ode_solvers.F90:(.text+0x1ac8b): undefined reference to `pgf90_auto_alloc'
ode_solvers.F90:(.text+0x1aca4): undefined reference to `pgf90_auto_alloc'
ode_solvers.F90:(.text+0x1acbd): undefined reference to `pgf90_auto_alloc'
ode_solvers.F90:(.text+0x1f54e): undefined reference to `pgf90_auto_dealloc'
ode_solvers.F90:(.text+0x1f55d): undefined reference to `pgf90_auto_dealloc'
ode_solvers.F90:(.text+0x1f56c): undefined reference to `pgf90_auto_dealloc'
ode_solvers.F90:(.text+0x1f57b): undefined reference to `pgf90_auto_dealloc'
/login/davdda/gotm/gotm-4.0.0/lib/PGF90/libutil_prod.a(ode_solvers.o):
In functi on `findp_bisection_':
ode_solvers.F90:(.text+0x1f5fb): undefined reference to `pgf90_auto_alloc'
ode_solvers.F90:(.text+0x1f991): undefined reference to `pgf90_auto_dealloc'
/login/davdda/gotm/gotm-4.0.0/lib/PGF90/libutil_prod.a(adv_center.o):
In functio n `adv_center_':
adv_center.F90:(.text+0x59): undefined reference to `pgf90_auto_alloc'
adv_center.F90:(.text+0x1b5d): undefined reference to `pgf90_auto_dealloc'
make: *** [gotm_prod_PGF90] Error 2
...and a lot more references to "pgf90_auto_alloc" and "pgf90_auto_dealloc."
Thanks
Dave
Quoting Jon Hill <jon....@imperial.ac.uk>:
> Hi Dave,
>
> Looks like your netcdf library is missing the fortran bits or you're not
> linking netcdff library (note the double ff). I suspect the latter.
>
> I use the following environment variables when compiling GOTM:
>
> export NETCDFLIBNAME="-lnetcdff -lnetcdf"
> export GOTMDIR=/data/jhill1/Projects/gotm-4.0.0
> export NETCDFLIBDIR=/usr/lib/
> export FORTRAN_COMPILER=GFORTRAN
> export NETCDFINC=/usr/include
>
> Edit for your set up (although that should really be the GOTMDIR and
> your Fortran compiler)
>
> I use Ubuntu (10.04, 10.10 and 11.04) with the gcc compiler.
>
> Hope that helps.
>
> J.
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.