Installation Error

617 views
Skip to first unread message

Dave Todd

unread,
Jul 19, 2011, 9:17:37 AM7/19/11
to GOTM-users
Afternoon All!!

I’m attempting to install GOTM and have run into an error during the
“make” command.

The error I’m getting is:

In function `ncdfout_init_ncdf_':
ncdfout.F90:(.text+0x57): undefined reference to `nf_create_'
ncdfout.F90:(.text+0xb2): undefined reference to `nf_def_dim_'
ncdfout.F90:(.text+0xe5): undefined reference to `nf_def_dim_'
ncdfout.F90:(.text+0x116): undefined reference to `nf_def_dim_'
ncdfout.F90:(.text+0x153): undefined reference to `nf_def_dim_'
ncdfout.F90:(.text+0x186): undefined reference to `nf_def_dim_'
ncdfout.F90:(.text+0x1d2): undefined reference to `nf_def_var_'
ncdfout.F90:(.text+0x21e): undefined reference to `nf_def_var_'
ncdfout.F90:(.text+0x26a): undefined reference to `nf_def_var_'
ncdfout.F90:(.text+0x2c2): undefined reference to `nf_def_var_'
ncdfout.F90:(.text+0x30e): undefined reference to `nf_def_var_'
/login/davdda/gotm/gotm-4.0.0/lib/PGF90/
liboutput_prod.a(ncdfout.o):ncdfout.F90:(.text+0x372): more undefined
references to `nf_def_var_' follow
/login/davdda/gotm/gotm-4.0.0/lib/PGF90/liboutput_prod.a(ncdfout.o):
In function `ncdfout_init_ncdf_':
ncdfout.F90:(.text+0x2ecd): undefined reference to `nf_put_att_text_'
ncdfout.F90:(.text+0x2f3d): undefined reference to `nf_put_att_text_'
ncdfout.F90:(.text+0x2f71): undefined reference to `nf_put_att_text_'
ncdfout.F90:(.text+0x2f8f): undefined reference to `nf_enddef_'
ncdfout.F90:(.text+0x3013): undefined reference to `nf_sync_'
/login/davdda/gotm/gotm-4.0.0/lib/PGF90/liboutput_prod.a(ncdfout.o):
In function `ncdfout_do_ncdf_out_':
ncdfout.F90:(.text+0x4a3b): undefined reference to `nf_sync_'
/login/davdda/gotm/gotm-4.0.0/lib/PGF90/liboutput_prod.a(ncdfout.o):
In function `ncdfout_close_ncdf_':
ncdfout.F90:(.text+0x6216): undefined reference to `nf_close_'
/login/davdda/gotm/gotm-4.0.0/lib/PGF90/liboutput_prod.a(ncdfout.o):
In function `ncdfout_define_mode_':
ncdfout.F90:(.text+0x6263): undefined reference to `nf_redef_'
ncdfout.F90:(.text+0x626d): undefined reference to `nf_enddef_'
/login/davdda/gotm/gotm-4.0.0/lib/PGF90/liboutput_prod.a(ncdfout.o):
In function `ncdfout_new_nc_variable_':
ncdfout.F90:(.text+0x62a9): undefined reference to `nf_def_var_'
/login/davdda/gotm/gotm-4.0.0/lib/PGF90/liboutput_prod.a(ncdfout.o):
In function `ncdfout_set_attributes_':
ncdfout.F90:(.text+0x6369): undefined reference to `nf_put_att_text_'
ncdfout.F90:(.text+0x63c1): undefined reference to `nf_put_att_text_'
ncdfout.F90:(.text+0x6416): undefined reference to `nf_put_att_text_'
ncdfout.F90:(.text+0x646b): undefined reference to `nf_put_att_text_'
ncdfout.F90:(.text+0x64b8): undefined reference to `nf_put_att_real_'
ncdfout.F90:(.text+0x6504): undefined reference to `nf_put_att_real_'
ncdfout.F90:(.text+0x655e): undefined reference to `nf_put_att_real_'
ncdfout.F90:(.text+0x65aa): undefined reference to `nf_put_att_real_'
ncdfout.F90:(.text+0x65fe): undefined reference to `nf_put_att_real_'
/login/davdda/gotm/gotm-4.0.0/lib/PGF90/
liboutput_prod.a(ncdfout.o):ncdfout.F90:(.text+0x6651): more undefined
references to `nf_put_att_real_' follow
/login/davdda/gotm/gotm-4.0.0/lib/PGF90/liboutput_prod.a(ncdfout.o):
In function `ncdfout_store_data_':
ncdfout.F90:(.text+0x694d): undefined reference to `nf_put_var_int_'
ncdfout.F90:(.text+0x69d4): undefined reference to `nf_put_var_real_'
ncdfout.F90:(.text+0x6a22): undefined reference to `nf_put_vara_int_'
ncdfout.F90:(.text+0x6b1d): undefined reference to `nf_put_vara_real_'
ncdfout.F90:(.text+0x6bf3): undefined reference to `nf_put_vara_real_'
ncdfout.F90:(.text+0x6ccb): undefined reference to `nf_put_vara_real_'
/login/davdda/gotm/gotm-4.0.0/lib/PGF90/liboutput_prod.a(ncdfout.o):
In function `check_err_':
ncdfout.F90:(.text+0x6e41): undefined reference to `nf_strerror_'
make: *** [gotm_prod_PGF90] Error 2


I’m new to Linux and FORTRAN but would very much appreciate any help
you can provide.

Thanks
Dave

Jon Hill

unread,
Jul 19, 2011, 9:25:06 AM7/19/11
to gotm-...@googlegroups.com
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.

--
Jon Hill
AMCG, Earth Science and Engineering,
Imperial College London, SW7 2AZ.
Phone: +44 (0)20 7594 9321
Mob: +44 (0)7748254812

osp...@bangor.ac.uk

unread,
Jul 19, 2011, 10:58:08 AM7/19/11
to gotm-...@googlegroups.com
Jon (and everyone else!!),

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.


saeed moghimi

unread,
Jul 19, 2011, 4:23:57 PM7/19/11
to gotm-...@googlegroups.com
Hi,
I just guess you may need to compile netcdf library with the same Fortran compiler that you are using for GOTM.
Did you care about it?
Regards,
Saeed.
--
*********************************************
Saeed Moghimi
Alexander von Humboldt fellowship at
Physical Oceanography and Instrumentation Section,
Leibniz Institute for Baltic Sea Research,
Seestraße 15,
D-18119 Warnemünde,
Germany.
Email: saeed....@io-warnemuende.de
Home page: http://www.io-warnemuende.de/saeed-moghimi.html
Telephone: +49 (381) 5197-204
Room: 216
*********************************************

Reply all
Reply to author
Forward
0 new messages