netcdf build in CYGWIN using g95 and ROMS

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
sankaras
Posts: 33
Joined: Mon Nov 27, 2006 6:02 pm
Location: Stanford University.

netcdf build in CYGWIN using g95 and ROMS

#1 Unread post by sankaras »

Hello,

Many thanks to m.hadfield, jcwarner, and arango for their responses to my earlier email on CYGWIN in ROMS

Now, another question from this novice.

(1) I am trying to build netcdf in cygwin using g95 compiler. When I tried to configure it using ./configure I got the following error message

configure: error: FORTRAN could not compile .f90 file

Then I configured using ./configure -disable -f90

It worked fine. Then I did (i) make, (ii) make check and (iii) make install
The build seems to fine, at least to me. nctest and ncdumps worked fine. The libnetcdf.a file is also seen.

(2) The I went ahead and changed the CYGWIN-g95.mk to include the netcdf paths like

NETCDF_INCDIR ?= /cygdrive/c/Programs/ROMS/ROMS/lib
NETCDF_LIBDI?= /cygdrive/c/Programs/ROMS/ROM/netcdf-3.6.2/fortran

Then when I typed Make I get the following error message

****************************************************
In file mod_netcdf.f90:596

integer, parameter :: NF_FOUT = nf_double
1
Error: Symbol 'nf_double' at (1) has no IMPLICIT type
In file mod_netcdf.f90:603

integer, parameter :: NF_FRST = nf_double
1
Error: Symbol 'nf_double' at (1) has no IMPLICIT type
In file mod_netcdf.f90:606

integer, parameter :: NF_TYPE = nf_double
1
Error: Symbol 'nf_double' at (1) has no IMPLICIT type
Make: *** [Build/mod_netcdf.o] Error 1
********************************************
Help would be appreciated.


Thanks,

Sankar

jcwarner
Posts: 1200
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

#2 Unread post by jcwarner »

some things to try

1) correct spelling of
NETCDF_LIBDI?= /cygdrive/c/Programs/ROMS/ROM/netcdf-3.6.2/fortran
to
NETCDF_LIBDIR?= /cygdrive/c/Programs/ROMS/ROM/netcdf-3.6.2/fortran

2) It seems like the netcdf.inc file is not being found.
look at the information during the build to see if the path is correct to that file.

sankaras
Posts: 33
Joined: Mon Nov 27, 2006 6:02 pm
Location: Stanford University.

netcdf build in CYGWIN using g95 and ROMS

#3 Unread post by sankaras »

John, many thanks for your respone.

You are correct, it could not find netcdf.inc file.

I fixed the problem the I get the following error, it looks like it has again something to do with netcdf.

ar: creating Build/libADM.a
ar: creating Build/libRPM.a
ar: creating Build/libTLM.a
ar: creating Build/libNLM.a
ar: creating Build/libANA.a
ar: creating Build/libICE.a
ar: creating Build/libUTIL.a
ar: creating Build/libMODS.a
Build/libNLM.a(output.o):output.f90:(.text+0x47d): undefined reference to `nf_close_'
Build/libUTIL.a(wrt_rst.o):wrt_rst.f90:(.text+0x1bd): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_rst.o):wrt_rst.f90:(.text+0x1fb): undefined reference to `nf_put_var1_int_'
Build/libUTIL.a(wrt_rst.o):wrt_rst.f90:(.text+0x22c): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_rst.o):wrt_rst.f90:(.text+0x25d): undefined reference to `nf_put_var1_int_'
Build/libUTIL.a(wrt_rst.o):wrt_rst.f90:(.text+0x28e): undefined reference to `nf_inq_varid_'


********************************
********************************

Build/libUTIL.a(get_varcoords.o):get_varcoords.f90:(.text+0x49d): undefined reference to `nf_inq_varndims_'
Build/libUTIL.a(get_varcoords.o):get_varcoords.f90:(.text+0x53c): undefined reference to `nf_get_vara_double_'
Build/libUTIL.a(get_varcoords.o):get_varcoords.f90:(.text+0x8be): undefined reference to `nf_inq_varname_'
Build/libUTIL.a(get_varcoords.o):get_varcoords.f90:(.text+0xe88): undefined reference to `nf_get_vara_double_'
make: *** [/cygdrive/c/Programs/ROMS/ROMS/Test/Upwelling/OceanS/oceanS.exe] Error 1

Any clue on this?

Thanks,

Sankar

jcwarner
Posts: 1200
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

#4 Unread post by jcwarner »

there was a long thread of discussion on the netcdf installs.
First read thru this thread (roms installation):
viewforum.php?f=31
"a problem in compiling roms" from isopycnal (01 april 2007).
There are several pages, with extremely helpful info from sasha and hadfield about "nm" on your lib to see if it has single or doiuble underscores, etc, etc.

User avatar
m.hadfield
Posts: 521
Joined: Tue Jul 01, 2003 4:12 am
Location: NIWA

#5 Unread post by m.hadfield »

And this might be of interest too:

http://www.unidata.ucar.edu/support/hel ... 01116.html

Bottom line: the current ROMS g95 make files (*-g95.mk) assume that the netCDF library has been built with g95 using the -fno-second-underscore flag. You can do this by running the netCDF configure program as follows:

CC=gcc FC=g95 CPPFLAGS=-DpgiFortran FFLAGS=-fno-second-underscore FCFLAGS=-fno-second-underscore ./configure

sankaras
Posts: 33
Joined: Mon Nov 27, 2006 6:02 pm
Location: Stanford University.

#6 Unread post by sankaras »

thanks to m.hadfield and John for their response.

I tried:

CC=gcc FC=g95 CPPFLAGS=-DpgiFortran FFLAGS=-fno-second-underscore FCFLAGS=-fno-second-underscore ./configure --disable-f90 --disable--cxx

Now, I also see another file libnetcdff.a in addition to libnetcdf.a.

Still, I do not seem to be getting beyond the initial error.

Sankar

***********************************************************
Build/libNLM.a(output.o):output.f90:(.text+0x47d): undefined reference to `nf_close_'
Build/libUTIL.a(wrt_rst.o):wrt_rst.f90:(.text+0x1bd): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_rst.o):wrt_rst.f90:(.text+0x1fb): undefined reference to `nf_put_var1_int_'
Build/libUTIL.a(wrt_rst.o):wrt_rst.f90:(.text+0x22c): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_rst.o):wrt_rst.f90:(.text+0x25d): undefined reference to `nf_put_var1_int_'
Build/libUTIL.a(wrt_rst.o):wrt_rst.f90:(.text+0x28e): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_rst.o):wrt_rst.f90:(.text+0x2d7): undefined reference to `nf_put_var1_int_'
Build/libUTIL.a(wrt_rst.o):wrt_rst.f90:(.text+0x308): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_rst.o):wrt_rst.f90:(.text+0x33f): undefined reference to `nf_put_var1_int_'
Build/libUTIL.a(wrt_rst.o):wrt_rst.f90:(.text+0x370): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_rst.o):wrt_rst.f90:(.text+0x3a7): undefined reference to `nf_put_var1_int_'
Build/libUTIL.a(wrt_rst.o):wrt_rst.f90:(.text+0x3d8): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_rst.o):wrt_rst.f90:(.text+0x40f): undefined reference to `nf_put_var1_int_'
Build/libUTIL.a(wrt_rst.o):wrt_rst.f90:(.text+0x47a): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_rst.o):wrt_rst.f90:(.text+0x2829): undefined reference to `nf_sync_'
Build/libUTIL.a(close_io.o):close_io.f90:(.text+0x66): undefined reference to `nf_close_'
Build/libUTIL.a(close_io.o):close_io.f90:(.text+0xc3): undefined reference to `nf_close_'
Build/libUTIL.a(close_io.o):close_io.f90:(.text+0x7a6): undefined reference to `nf_strerror_'
Build/libUTIL.a(get_state.o):get_state.f90:(.text+0xec3): undefined reference to `nf_open_'
Build/libUTIL.a(get_state.o):get_state.f90:(.text+0xf18): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(get_state.o):get_state.f90:(.text+0xfe0): undefined reference to `nf_inq_var_'
Build/libUTIL.a(get_state.o):get_state.f90:(.text+0x1076): undefined reference to `nf_close_'
Build/libUTIL.a(get_state.o):get_state.f90:(.text+0x179c): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(get_state.o):get_state.f90:(.text+0x17cb): undefined reference to `nf_get_var1_int_'
Build/libUTIL.a(get_state.o):get_state.f90:(.text+0x23e5): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(get_state.o):get_state.f90:(.text+0x241a): undefined reference to `nf_get_var1_int_'
Build/libUTIL.a(get_state.o):get_state.f90:(.text+0x2469): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(get_state.o):get_state.f90:(.text+0x249e): undefined reference to `nf_get_var1_int_'
Build/libUTIL.a(get_state.o):get_state.f90:(.text+0x2622): undefined reference to `nf_get_var1_double_'
Build/libUTIL.a(get_state.o):get_state.f90:(.text+0x2780): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(get_state.o):get_state.f90:(.text+0x2e06): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(get_state.o):get_state.f90:(.text+0x2f93): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(get_state.o):get_state.f90:(.text+0x301b): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(get_state.o):get_state.f90:(.text+0x350f): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(get_state.o):get_state.f90:(.text+0x3594): undefined reference to `nf_get_var1_double_'
Build/libUTIL.a(get_state.o):get_state.f90:(.text+0x36f8): undefined reference to `nf_inq_attname_'
Build/libUTIL.a(get_state.o):get_state.f90:(.text+0x3784): undefined reference to `nf_get_att_text_'
Build/libUTIL.a(get_state.o):get_state.f90:(.text+0x3e10): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(get_state.o):get_state.f90:(.text+0x3e3f): undefined reference to `nf_get_var1_int_'
Build/libUTIL.a(get_state.o):get_state.f90:(.text+0x413e): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(get_state.o):get_state.f90:(.text+0x43b5): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(get_state.o):get_state.f90:(.text+0x4418): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(get_state.o):get_state.f90:(.text+0x4441): undefined reference to `nf_get_var1_int_'
Build/libUTIL.a(get_state.o):get_state.f90:(.text+0x4586): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(get_state.o):get_state.f90:(.text+0x4947): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(get_state.o):get_state.f90:(.text+0x4b67): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(get_state.o):get_state.f90:(.text+0x4bc4): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(get_state.o):get_state.f90:(.text+0x4bf9): undefined reference to `nf_get_var1_int_'
Build/libUTIL.a(get_state.o):get_state.f90:(.text+0x4e9a): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(def_his.o):def_his.f90:(.text+0x27b): undefined reference to `nf_open_'
Build/libUTIL.a(def_his.o):def_his.f90:(.text+0x938): undefined reference to `nf_create_'
Build/libUTIL.a(def_his.o):def_his.f90:(.text+0x9ad): undefined reference to `nf_def_dim_'
Build/libUTIL.a(def_his.o):def_his.f90:(.text+0x9f9): undefined reference to `nf_def_dim_'
Build/libUTIL.a(def_his.o):def_his.f90:(.text+0xa44): undefined reference to `nf_def_dim_'
Build/libUTIL.a(def_his.o):def_his.f90:(.text+0xa8d): undefined reference to `nf_def_dim_'
Build/libUTIL.a(def_his.o):def_his.f90:(.text+0xad8): undefined reference to `nf_def_dim_'
Build/libUTIL.a(def_his.o):def_his.f90:(.text+0xb23): more undefined references to `nf_def_dim_' follow
Build/libUTIL.a(def_his.o):def_his.f90:(.text+0x1702): undefined reference to `nf_enddef_'
Build/libUTIL.a(def_his.o):def_his.f90:(.text+0x4986): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(def_his.o):def_his.f90:(.text+0x4a7f): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(def_his.o):def_his.f90:(.text+0x4b78): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(def_his.o):def_his.f90:(.text+0x4c71): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(def_his.o):def_his.f90:(.text+0x4db9): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(def_his.o):def_his.f90:(.text+0x4f01): more undefined references to `nf_inq_varid_' follow
Build/libUTIL.a(wrt_his.o):wrt_his.f90:(.text+0x7e3): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_his.o):wrt_his.f90:(.text+0xdee): undefined reference to `nf_sync_'
Build/libUTIL.a(def_rst.o):def_rst.f90:(.text+0x2b2): undefined reference to `nf_open_'
Build/libUTIL.a(def_rst.o):def_rst.f90:(.text+0x5ff): undefined reference to `nf_create_'
Build/libUTIL.a(def_rst.o):def_rst.f90:(.text+0x66e): undefined reference to `nf_def_dim_'
Build/libUTIL.a(def_rst.o):def_rst.f90:(.text+0x6b7): undefined reference to `nf_def_dim_'
Build/libUTIL.a(def_rst.o):def_rst.f90:(.text+0x702): undefined reference to `nf_def_dim_'
Build/libUTIL.a(def_rst.o):def_rst.f90:(.text+0x74b): undefined reference to `nf_def_dim_'
Build/libUTIL.a(def_rst.o):def_rst.f90:(.text+0x796): undefined reference to `nf_def_dim_'
Build/libUTIL.a(def_rst.o):def_rst.f90:(.text+0x7e1): more undefined references to `nf_def_dim_' follow
Build/libUTIL.a(def_rst.o):def_rst.f90:(.text+0x2a7d): undefined reference to `nf_enddef_'
Build/libUTIL.a(def_rst.o):def_rst.f90:(.text+0x3b4e): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(def_rst.o):def_rst.f90:(.text+0x3c47): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(def_rst.o):def_rst.f90:(.text+0x3d40): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(def_rst.o):def_rst.f90:(.text+0x3e39): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(def_rst.o):def_rst.f90:(.text+0x3f45): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(def_rst.o):def_rst.f90:(.text+0x403e): more undefined references to `nf_inq_varid_' follow
Build/libUTIL.a(nf_fwrite3d.o):nf_fwrite3d.f90:(.text+0x398): undefined reference to `nf_put_vara_double_'
Build/libUTIL.a(nf_fwrite4d.o):nf_fwrite4d.f90:(.text+0x450): undefined reference to `nf_put_vara_double_'
Build/libUTIL.a(nf_fread3d.o):nf_fread3d.f90:(.text+0x4a4): undefined reference to `nf_get_vara_double_'
Build/libUTIL.a(nf_fread2d.o):nf_fread2d.f90:(.text+0x4e5): undefined reference to `nf_get_vara_double_'
Build/libUTIL.a(nf_fread4d.o):nf_fread4d.f90:(.text+0x51c): undefined reference to `nf_get_vara_double_'
Build/libUTIL.a(def_info.o):def_info.f90:(.text+0x188): undefined reference to `nf_def_dim_'
Build/libUTIL.a(def_info.o):def_info.f90:(.text+0x59d): undefined reference to `nf_put_att_text_'
Build/libUTIL.a(def_info.o):def_info.f90:(.text+0x620): undefined reference to `nf_put_att_text_'
Build/libUTIL.a(def_info.o):def_info.f90:(.text+0x67a): undefined reference to `nf_put_att_text_'
Build/libUTIL.a(def_info.o):def_info.f90:(.text+0x6d4): undefined reference to `nf_put_att_text_'
Build/libUTIL.a(def_info.o):def_info.f90:(.text+0x746): undefined reference to `nf_put_att_text_'
Build/libUTIL.a(def_info.o):def_info.f90:(.text+0x7f4): more undefined references to `nf_put_att_text_' follow
Build/libUTIL.a(def_var.o):def_var.f90:(.text+0x94): undefined reference to `nf_def_var_'
Build/libUTIL.a(def_var.o):def_var.f90:(.text+0x12b): undefined reference to `nf_put_att_text_'
Build/libUTIL.a(def_var.o):def_var.f90:(.text+0x1eb): undefined reference to `nf_put_att_text_'
Build/libUTIL.a(def_var.o):def_var.f90:(.text+0x345): undefined reference to `nf_put_att_text_'
Build/libUTIL.a(def_var.o):def_var.f90:(.text+0x6c0): undefined reference to `nf_put_att_text_'
Build/libUTIL.a(def_var.o):def_var.f90:(.text+0x86c): undefined reference to `nf_put_att_double_'
Build/libUTIL.a(def_var.o):def_var.f90:(.text+0xa29): undefined reference to `nf_put_att_double_'
Build/libUTIL.a(def_var.o):def_var.f90:(.text+0xafe): undefined reference to `nf_put_att_text_'
Build/libUTIL.a(def_var.o):def_var.f90:(.text+0xd00): undefined reference to `nf_put_att_int_'
Build/libUTIL.a(def_var.o):def_var.f90:(.text+0xdb2): undefined reference to `nf_put_att_text_'
Build/libUTIL.a(def_var.o):def_var.f90:(.text+0xef2): undefined reference to `nf_put_att_int_'
Build/libUTIL.a(def_var.o):def_var.f90:(.text+0xf9c): undefined reference to `nf_put_att_text_'
Build/libUTIL.a(def_var.o):def_var.f90:(.text+0x1117): undefined reference to `nf_put_att_text_'
Build/libUTIL.a(def_var.o):def_var.f90:(.text+0x1293): undefined reference to `nf_put_att_text_'
Build/libUTIL.a(def_var.o):def_var.f90:(.text+0x1411): undefined reference to `nf_put_att_text_'
Build/libUTIL.a(def_var.o):def_var.f90:(.text+0x158d): undefined reference to `nf_put_att_text_'
Build/libUTIL.a(def_var.o):def_var.f90:(.text+0x1711): more undefined references to `nf_put_att_text_' follow
Build/libUTIL.a(def_var.o):def_var.f90:(.text+0x1a33): undefined reference to `nf_put_att_double_'
Build/libUTIL.a(def_var.o):def_var.f90:(.text+0x1bea): undefined reference to `nf_put_att_double_'
Build/libUTIL.a(def_var.o):def_var.f90:(.text+0x1d28): undefined reference to `nf_put_att_int_'
Build/libUTIL.a(def_var.o):def_var.f90:(.text+0x1e10): undefined reference to `nf_put_att_double_'
Build/libUTIL.a(def_var.o):def_var.f90:(.text+0x1f4d): undefined reference to `nf_put_att_int_'
Build/libUTIL.a(def_var.o):def_var.f90:(.text+0x200d): undefined reference to `nf_put_att_text_'
Build/libUTIL.a(def_var.o):def_var.f90:(.text+0x2147): undefined reference to `nf_put_att_int_'
Build/libUTIL.a(def_var.o):def_var.f90:(.text+0x21f4): undefined reference to `nf_put_att_text_'
Build/libUTIL.a(def_var.o):def_var.f90:(.text+0x24b5): undefined reference to `nf_put_att_text_'
Build/libUTIL.a(def_var.o):def_var.f90:(.text+0x265e): undefined reference to `nf_put_att_text_'
Build/libUTIL.a(def_var.o):def_var.f90:(.text+0x2816): undefined reference to `nf_put_att_text_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x18c): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x32c): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x4ca): undefined reference to `nf_sync_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x5a4): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x5e2): undefined reference to `nf_put_var1_int_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x62d): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x66e): undefined reference to `nf_put_var1_int_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x864): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0xad9): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0xc49): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0xe61): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0xea2): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0xeed): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0xf28): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x102f): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x119c): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x1356): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x17db): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x1960): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x1999): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x1abf): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x1c6d): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x1e32): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x1fe4): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x2151): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x218c): undefined reference to `nf_put_var1_int_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x21f5): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x2236): undefined reference to `nf_put_var1_int_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x2281): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x22c2): undefined reference to `nf_put_var1_int_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x23e7): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x263b): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x27f4): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x2994): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x2b34): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x2d60): more undefined references to `nf_inq_varid_' follow
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x3149): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x33ec): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x3425): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x3722): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x375b): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x3b42): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x3b95): undefined reference to `nf_put_vara_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x3c88): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x3cc3): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x3db6): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x3e0f): undefined reference to `nf_put_vara_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x3f02): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x3f3d): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x4030): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x406b): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x415e): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x419f): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x4292): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x42cd): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x43c0): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x43fb): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x44ee): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x4541): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x4634): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x4681): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x4774): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x47c1): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x48b4): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x498c): undefined reference to `nf_put_vara_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x4a7f): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x4ab2): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x4ba5): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x4be6): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x4cd9): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x4d14): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x4e07): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x4e48): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x4f3b): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x4f76): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x5069): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x50a4): undefined reference to `nf_put_var1_int_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x5197): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x51d8): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x52cb): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x5306): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x53f9): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x5434): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x5527): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x5568): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x565b): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x5696): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x5789): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x57c4): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x58b7): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x58f8): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x59eb): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x5a26): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x5b19): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x5b54): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x5c47): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x5c88): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x5d7b): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x5db6): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x5ea9): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x5ee4): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x5fd7): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x6018): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x610b): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x6146): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x6239): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x6274): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x6367): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x63a8): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x649b): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x652e): undefined reference to `nf_put_var1_text_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x6621): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x665a): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x674d): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x6780): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x6873): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x68b4): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x69a7): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x69e2): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x6ad5): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x6b16): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x6c09): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x6c44): undefined reference to `nf_put_var1_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x6d37): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x6dcb): undefined reference to `nf_put_vara_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x6ece): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x6f70): undefined reference to `nf_put_vara_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x7073): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x7102): undefined reference to `nf_put_vara_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x7205): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x729f): undefined reference to `nf_put_vara_double_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x7311): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(wrt_info.o):wrt_info.f90:(.text+0x7351): undefined reference to `nf_put_vara_double_'
Build/libUTIL.a(opencdf.o):opencdf.f90:(.text+0x14e): undefined reference to `nf_open_'
Build/libUTIL.a(opencdf.o):opencdf.f90:(.text+0x1af): undefined reference to `nf_inq_att_'
Build/libUTIL.a(opencdf.o):opencdf.f90:(.text+0x215): undefined reference to `nf_inq_'
Build/libUTIL.a(opencdf.o):opencdf.f90:(.text+0x3ef): undefined reference to `nf_inq_dim_'
Build/libUTIL.a(opencdf.o):opencdf.f90:(.text+0x466): undefined reference to `nf_close_'
Build/libUTIL.a(opencdf.o):opencdf.f90:(.text+0x4c6): undefined reference to `nf_get_att_text_'
Build/libUTIL.a(opencdf.o):opencdf.f90:(.text+0x5c3): undefined reference to `nf_close_'
Build/libUTIL.a(opencdf.o):opencdf.f90:(.text+0x6f6): undefined reference to `nf_inq_var_'
Build/libUTIL.a(opencdf.o):opencdf.f90:(.text+0x86e): undefined reference to `nf_inq_dim_'
Build/libUTIL.a(opencdf.o):opencdf.f90:(.text+0xb73): undefined reference to `nf_inq_var_'
Build/libUTIL.a(opencdf.o):opencdf.f90:(.text+0xd1c): undefined reference to `nf_inq_attname_'
Build/libUTIL.a(opencdf.o):opencdf.f90:(.text+0xe0c): undefined reference to `nf_inq_attlen_'
Build/libUTIL.a(opencdf.o):opencdf.f90:(.text+0xe82): undefined reference to `nf_get_att_text_'
Build/libUTIL.a(opencdf.o):opencdf.f90:(.text+0xf65): undefined reference to `nf_inq_dim_'
Build/libUTIL.a(opencdf.o):opencdf.f90:(.text+0x128e): undefined reference to `nf_inq_dim_'
Build/libUTIL.a(nf_fwrite2d.o):nf_fwrite2d.f90:(.text+0x250): undefined reference to `nf_put_vara_double_'
Build/libUTIL.a(get_varcoords.o):get_varcoords.f90:(.text+0x119): undefined reference to `nf_inq_att_'
Build/libUTIL.a(get_varcoords.o):get_varcoords.f90:(.text+0x16a): undefined reference to `nf_get_att_text_'
Build/libUTIL.a(get_varcoords.o):get_varcoords.f90:(.text+0x246): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(get_varcoords.o):get_varcoords.f90:(.text+0x28c): undefined reference to `nf_inq_varndims_'
Build/libUTIL.a(get_varcoords.o):get_varcoords.f90:(.text+0x34a): undefined reference to `nf_get_vara_double_'
Build/libUTIL.a(get_varcoords.o):get_varcoords.f90:(.text+0x457): undefined reference to `nf_inq_varid_'
Build/libUTIL.a(get_varcoords.o):get_varcoords.f90:(.text+0x49d): undefined reference to `nf_inq_varndims_'
Build/libUTIL.a(get_varcoords.o):get_varcoords.f90:(.text+0x53c): undefined reference to `nf_get_vara_double_'
Build/libUTIL.a(get_varcoords.o):get_varcoords.f90:(.text+0x8be): undefined reference to `nf_inq_varname_'
Build/libUTIL.a(get_varcoords.o):get_varcoords.f90:(.text+0xe88): undefined reference to `nf_get_vara_double_'
make: *** [/cygdrive/c/Programs/ROMS/ROMS/Test/Upwelling/OceanS/oceanS.exe] Error 1

jcwarner
Posts: 1200
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

#7 Unread post by jcwarner »

- is the libnetcdf.a file at the correct location in your path?
- did the build say " could not find libnetcdf.a" ???
- did you do "nm" on your libnetcdf.a and see that it has the correct number of underscores?

sankaras
Posts: 33
Joined: Mon Nov 27, 2006 6:02 pm
Location: Stanford University.

#8 Unread post by sankaras »

John, Thanks for your patience.

If I do nm on the libnetcdf.a, I get the following.

000004b0 T _nf_abort__
000004d0 T _nf_close__
00000050 T _nf_create__
000004f0 T _nf_delete__

******more


Similarly, If I do a close_io.o, I get the following:

00000000 b .bss
00000000 d .data
00000000 r .rdata
00000000 t .text
U __g95_adjustl
U __g95_base
U __g95_filename
U __g95_get_ioparm
U __g95_ioparm
U __g95_len_trim_1
U __g95_line
U __g95_st_write
U __g95_st_write_done
U __g95_transfer_character
U __g95_transfer_integer
00000000 T _close_io_
00000000 d _first.453
U _get_date_
U _mod_iounits_MP_ioerror
U _mod_ncparam_MP_ananame.data
U _mod_ncparam_MP_date_str
U _mod_ncparam_MP_nchisid.data
U _mod_ncparam_MP_ncrstid.data
U _mod_parallel_MP_master
U _mod_scalars_MP_blowup
U _mod_scalars_MP_exit_flag
U _mod_scalars_MP_lcyclerst.data
U _mod_scalars_MP_noerror
U _mod_scalars_MP_nrechis.data
U _mod_scalars_MP_nrecrst.data
U _nf_close_
U _nf_strerror_

So, I get double underscores in libnetcdf.a for nf_close__ and a single underscore for nf_close in close_io.o.

I even changed the Makefile in the netcdf directory to
FCFLAGS = -fno-second-underscore
FFLAGS = -g -O2 -fno-second-underscore

Still, I have still underscores for nf_close in libnetcdf.a.



Now, I also have another problem

when I do make clean,

I get, rm -f -r core Build

rm: cannot remove directory 'Build': Device or Resource Busy

Sankar

jcwarner
Posts: 1200
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

#9 Unread post by jcwarner »

1) for the /Build busy issue:
you will have to kill all occurrences of make. type ps to see the process numbers, and then kill (the pid)
or use task manager to kill it, etc.

2) for the netcdf stuff - well , it looks like you found the problem. It had to deal with the second underscores. You should make clean the netcdf directory, or even start a new folder for netcdf, and make it with the -no 2nd underscore flags and see how that one builds. When it is done, do an "nm" on the library to see what is in there.

-j

User avatar
m.hadfield
Posts: 521
Joined: Tue Jul 01, 2003 4:12 am
Location: NIWA

#10 Unread post by m.hadfield »

Sounds like there's some confusion about which netCDF files have been rebuilt and where they've ended up. You did re-run "make install" after reconfiguring? You may need to specify a --prefix option in your configure command to ensure the files go in the right place.

sankaras
Posts: 33
Joined: Mon Nov 27, 2006 6:02 pm
Location: Stanford University.

#11 Unread post by sankaras »

I deleted everything. Then I typed m.hadfield's command as given by

CC=gcc FC=g95 CPPFLAGS=-DpgiFortran FFLAGS=-fno-second-underscore
FCFLAGS=-fno-second-underscore ./configure --disable-f90 --disable-cxx

Then the double underscore problem in libnetcdf.a went away. However the make test for the netcdf gave the following error.
*************************************************
trying again
Testing V2 API with 2 different netCDF formats.


Switching to netCDF classic format.
*** Testing nccreate ... ok ***
*** Testing ncopen ... ok ***
*** Testing ncredef ... ok ***
*** Testing ncendef ... ok ***
*** Testing ncclose ... ok ***
*** Testing ncinquire ... ok ***
*** Testing ncsync ... ok ***
*** Testing ncabort ... ok ***
*** Testing ncdimdef ... ok ***
*** Testing ncdimid ... ok ***
*** Testing ncdiminq ... ok ***
*** Testing ncdimrename ... ok ***
*** Testing ncvardef ... ok ***
*** Testing ncvarid ... ok ***
*** Testing ncvarinq ... ok ***
*** Testing ncvarput1 ... ok ***
*** Testing ncvarget1 ... ok ***
*** Testing ncvarput ... ok ***
*** Testing ncvarget ... ok ***
*** Testing ncvarputg ... ok ***
*** Testing ncvargetg ... ok ***
*** Testing ncrecinq ... ok ***
*** Testing ncrecput ... ok ***
*** Testing ncrecget ... ok ***
*** Testing ncvarrename ... ok ***
*** Testing ncattput ... ok ***
*** Testing ncattinq ... ok ***
*** Testing ncattget ... ok ***
*** Testing ncattcopy ... ok ***
*** Testing ncattname ... ok ***
*** Testing ncattrename ... ok ***
*** Testing ncattdel ... ok ***
*** Testing nctypelen ... ok ***


Switching to 64-bit offset format.
*** Testing nccreate ... ok ***
*** Testing ncopen ... ok ***
*** Testing ncredef ... ok ***
*** Testing ncendef ... ok ***
*** Testing ncclose ... ok ***
*** Testing ncinquire ... ok ***
*** Testing ncsync ... ok ***
*** Testing ncabort ... ok ***
*** Testing ncdimdef ... ok ***
*** Testing ncdimid ... ok ***
*** Testing ncdiminq ... ok ***
*** Testing ncdimrename ... ok ***
*** Testing ncvardef ... ok ***
*** Testing ncvarid ... ok ***
*** Testing ncvarinq ... ok ***
*** Testing ncvarput1 ... ok ***
*** Testing ncvarget1 ... ok ***
*** Testing ncvarput ... ok ***
*** Testing ncvarget ... ok ***
*** Testing ncvarputg ... ok ***
*** Testing ncvargetg ... ok ***
*** Testing ncrecinq ... ok ***
*** Testing ncrecput ... ok ***
*** Testing ncrecget ... ok ***
*** Testing ncvarrename ... ok ***
*** Testing ncattput ... ok ***
*** Testing ncattinq ... ok ***
*** Testing ncattget ... ok ***
*** Testing ncattcopy ... ok ***
*** Testing ncattname ... ok ***
*** Testing ncattrename ... ok ***
*** Testing ncattdel ... ok ***
*** Testing nctypelen ... ok ***

Total number of failures: 0
nctest SUCCESS!!!
test_get.o: In function `test_nf_get_var1_text__':
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/nf_test/test_get.F:25: undefined reference to `nf_open__'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/nf_test/test_get.F:34: undefined reference to `nf_get_var1_text__'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/nf_test/test_get.F:37: undefined reference to `nf_get_var1_text__'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/nf_test/test_get.F:43: undefined reference to `nf_get_var1_text__'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/nf_test/test_get.F:60: undefined reference to `nf_get_var1_text__'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/nf_test/test_get.F:93: undefined reference to `nf_close__'

continued

util.o: In function `att_name__':
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/nf_test/util.F:1206: undefined reference to `s_copy'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/nf_test/util.F:1206: undefined reference to `s_copy'
c:/programs/g95/g95/bin/../lib/gcc-lib/i686-pc-mingw32/4.0.1//libf95.a(main.o):(.text+0x32): undefined reference to `MAIN_'
make[2]: *** [nf_test.exe] Error 1
make[1]: *** [check-am] Error 2
make: *** [check-recursive] Error 1
***********************************************************

then I went ahead and type Make in ROMS, which gave the following error:

***********************************************************
ar: creating Build/libADM.a
ar: creating Build/libRPM.a
ar: creating Build/libTLM.a
ar: creating Build/libNLM.a
ar: creating Build/libANA.a
ar: creating Build/libICE.a
ar: creating Build/libUTIL.a
ar: creating Build/libMODS.a
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/.libs/libnetcdf.a(nc.o): In function `add_to_NCList':
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/nc.c:33: undefined reference to `__assert'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/.libs/libnetcdf.a(nc.o): In function `del_from_NCList':
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/nc.c:54: undefined reference to `__assert'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/nc.c:45: undefined reference to `__assert'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/nc.c:49: undefined reference to `__assert'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/.libs/libnetcdf.a(nc.o): In function `new_NC':
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/nc.c:119: undefined reference to `__assert'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/.libs/libnetcdf.a(nc.o):/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/nc.c:202: more undefined references to `__assert' follow
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/.libs/libnetcdf.a(posixio.o): In function `blksize':
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/posixio.c:93: undefined reference to `sysconf'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/.libs/libnetcdf.a(posixio.o): In function `px_pgout':
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/posixio.c:219: undefined reference to `__errno'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/posixio.c:207: undefined reference to `__assert'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/.libs/libnetcdf.a(posixio.o): In function `px_pgin':
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/posixio.c:260: undefined reference to `__errno'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/posixio.c:264: undefined reference to `__errno'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/posixio.c:248: undefined reference to `__assert'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/posixio.c:254: undefined reference to `__errno'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/.libs/libnetcdf.a(posixio.o): In function `px_rel':
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/posixio.c:324: undefined reference to `__assert'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/posixio.c:326: undefined reference to `__assert'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/.libs/libnetcdf.a(posixio.o): In function `px_get':
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/posixio.c:413: undefined reference to `__assert'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/posixio.c:414: undefined reference to `__assert'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/posixio.c:442: undefined reference to `__assert'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/.libs/libnetcdf.a(posixio.o):/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/posixio.c:474: more undefined references to `__assert' follow
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/.libs/libnetcdf.a(posixio.o): In function `ncio_create':
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/posixio.c:147: undefined reference to `__errno'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/posixio.c:1474: undefined reference to `__errno'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/.libs/libnetcdf.a(posixio.o): In function `ncio_open':
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/posixio.c:1598: undefined reference to `__errno'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/.libs/libnetcdf.a(posixio.o): In function `ncio_filesize':
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/posixio.c:1652: undefined reference to `__errno'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/posixio.c:1650: undefined reference to `__assert'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/.libs/libnetcdf.a(posixio.o): In function `ncio_pad_length':
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/posixio.c:178: undefined reference to `__errno'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/.libs/libnetcdf.a(v1hpg.o): In function `v1h_get_nc_type':
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/v1hpg.c:184: undefined reference to `__assert'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/.libs/libnetcdf.a(v1hpg.o): In function `ncx_len_NC_string':
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/v1hpg.c:245: undefined reference to `__assert'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/.libs/libnetcdf.a(v1hpg.o): In function `ncx_len_NC_attrarray':
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/v1hpg.c:543: undefined reference to `__assert'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/.libs/libnetcdf.a(v1hpg.o): In function `v1h_put_NC_attrarray':
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/v1hpg.c:723: undefined reference to `__assert'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/v1hpg.c:571: undefined reference to `__assert'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/.libs/libnetcdf.a(v1hpg.o):/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/v1hpg.c:779: more undefined references to `__assert' follow
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/.libs/libnetcdf.a(string.o): In function `NC_check_name':
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/string.c:44: undefined reference to `_imp___ctype_'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/string.c:42: undefined reference to `__assert'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/.libs/libnetcdf.a(string.o): In function `new_NC_string':
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/string.c:86: undefined reference to `__assert'
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/.libs/libnetcdf.a(string.o): In function `set_NC_string':
/cygdrive/c/Programs/ROMS/ROMS/netcdf-3.6.2/libsrc/string.c:111: undefined reference to `__assert'
make: *** [/cygdrive/c/Programs/ROMS/ROMS/Test/Upwelling/OceanS/oceanS.exe] Error 1
*************************************************************

User avatar
m.hadfield
Posts: 521
Joined: Tue Jul 01, 2003 4:12 am
Location: NIWA

#12 Unread post by m.hadfield »

It's hard to tell, but I suspect your problem is caused by old files lying around. Also I don't think /cygdrive/c/Programs/ROMS/ROMS is an appropriate place to build netCDF from source--you should do this in a temporary space as all the files can be deleted once you've finished.

Here are the commands I think you should run to build netCDF. The final command will install the library into /usr/local/lib, the include file into /usr/local/include and the utilities into /usr/local/bin. The only thing you should need to change is the location of the netCDF source file, here ${HOME}/software/netcdf/netcdf-3.6.2.tar.gz.

Code: Select all

mkdir -p /tmp/netcdf
cd /tmp/netcdf
tar -xvzf ${HOME}/software/netcdf/netcdf-3.6.2.tar.gz
cd netcdf-3.6.2
CC=gcc FC=g95 CPPFLAGS=-DpgiFortran FFLAGS=-fno-second-underscore FCFLAGS=-fno-second-underscore ./configure --prefix=/usr/local
make
make check
make install
The configure command (CC=gcc ... --prefix=/usr/local) is all one line.

The only time you might want something more complicated than this is when you want to use multiple builds for different compilers (which I actually do, but I've simplified the process here).

If the above fails, then there's something weird going on and we'll need to consider whether g95 is properly installed, etc.

To persuade ROMS to use the files you've generated, you should set the environment variables:

Code: Select all

export NETCDF_LIBDIR=/usr/local/lib
export NETCDF_INCDIR=/usr/local/include

sankaras
Posts: 33
Joined: Mon Nov 27, 2006 6:02 pm
Location: Stanford University.

#13 Unread post by sankaras »

Thanks m.hadfield.

I implemented what you had suggested.

When I did the make test, I get the following error message given below.
I also get similar error messages in ROMS.

When I do a nm on libnetcdf I get U ___assert with three underscores instead of __assert in the error message.

I wrote a simple program in g95, compiled it and it worked fine. I used the two files g95-x86-cygwin.tgz and also g95-MinGW.exe for installing g95.

Sankar


Total number of failures: 0
nctest SUCCESS!!!
../libsrc/.libs/libnetcdf.a(nc.o): In function `add_to_NCList':
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/nc.c:33: undefined reference to `__assert'
../libsrc/.libs/libnetcdf.a(nc.o): In function `del_from_NCList':
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/nc.c:45: undefined reference to `__assert'
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/nc.c:49: undefined reference to `__assert'
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/nc.c:54: undefined reference to `__assert'
../libsrc/.libs/libnetcdf.a(nc.o): In function `new_NC':
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/nc.c:119: undefined reference to `__assert'
../libsrc/.libs/libnetcdf.a(nc.o):/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/nc.c:202: more undefined references to `__assert' follow
../libsrc/.libs/libnetcdf.a(posixio.o): In function `pagesize':
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/posixio.c:93: undefined reference to `sysconf'
../libsrc/.libs/libnetcdf.a(posixio.o): In function `fgrow':
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/posixio.c:133: undefined reference to `__errno'
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/posixio.c:142: undefined reference to `__errno'
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/posixio.c:144: undefined reference to `__errno'
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/posixio.c:146: undefined reference to `__errno'
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/posixio.c:148: undefined reference to `__errno'
../libsrc/.libs/libnetcdf.a(posixio.o):/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/posixio.c:164: more undefined references to `__errno' follow
../libsrc/.libs/libnetcdf.a(posixio.o): In function `px_pgout':
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/posixio.c:207: undefined reference to `__assert'
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/posixio.c:213: undefined reference to `__errno'
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/posixio.c:219: undefined reference to `__errno'
../libsrc/.libs/libnetcdf.a(posixio.o): In function `px_pgin':
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/posixio.c:248: undefined reference to `__assert'
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/posixio.c:254: undefined reference to `__errno'
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/posixio.c:260: undefined reference to `__errno'
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/posixio.c:264: undefined reference to `__errno'
../libsrc/.libs/libnetcdf.a(posixio.o): In function `px_rel':
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/posixio.c:324: undefined reference to `__assert'
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/posixio.c:326: undefined reference to `__assert'
../libsrc/.libs/libnetcdf.a(posixio.o): In function `px_get':
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/posixio.c:412: undefined reference to `__assert'
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/posixio.c:413: undefined reference to `__assert'
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/posixio.c:414: undefined reference to `__assert'
../libsrc/.libs/libnetcdf.a(posixio.o):/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/posixio.c:423: more undefined references to `__assert' follow
../libsrc/.libs/libnetcdf.a(posixio.o): In function `ncio_create':
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/posixio.c:1474: undefined reference to `__errno'
../libsrc/.libs/libnetcdf.a(posixio.o): In function `ncio_open':
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/posixio.c:1598: undefined reference to `__errno'
../libsrc/.libs/libnetcdf.a(posixio.o): In function `ncio_filesize':
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/posixio.c:1650: undefined reference to `__assert'
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/posixio.c:1652: undefined reference to `__errno'
../libsrc/.libs/libnetcdf.a(v1hpg.o): In function `v1h_get_nc_type':
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/v1hpg.c:184: undefined reference to `__assert'
../libsrc/.libs/libnetcdf.a(v1hpg.o): In function `ncx_len_NC_string':
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/v1hpg.c:245: undefined reference to `__assert'
../libsrc/.libs/libnetcdf.a(v1hpg.o): In function `ncx_len_NC_dim':
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/v1hpg.c:342: undefined reference to `__assert'
../libsrc/.libs/libnetcdf.a(v1hpg.o): In function `v1h_put_NC_dimarray':
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/v1hpg.c:431: undefined reference to `__assert'
../libsrc/.libs/libnetcdf.a(v1hpg.o): In function `v1h_get_NC_dimarray':
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/v1hpg.c:487: undefined reference to `__assert'
../libsrc/.libs/libnetcdf.a(v1hpg.o):/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/v1hpg.c:488: more undefined references to `__assert' follow
../libsrc/.libs/libnetcdf.a(string.o): In function `NC_check_name':
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/string.c:50: undefined reference to `_imp___ctype_'
../libsrc/.libs/libnetcdf.a(string.o): In function `new_NC_string':
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/string.c:86: undefined reference to `__assert'
../libsrc/.libs/libnetcdf.a(string.o): In function `set_NC_string':
/cygdrive/c/Programs/netcdf/netcdf-3.6.2/libsrc/string.c:111: undefined reference to `__assert'
make[2]: *** [nf_test.exe] Error 1
make[1]: *** [check-am] Error 2
make: *** [check-recursive] Error 1

User avatar
m.hadfield
Posts: 521
Joined: Tue Jul 01, 2003 4:12 am
Location: NIWA

#14 Unread post by m.hadfield »

Something's broken :(

It all sounds faintly familiar :roll:

Do you have Cygwin g77 installed on your system. (This is done via Cygwin setup.) I think this is needed for g95 to work properly (though I don't think this is documented anywhere).

sankaras
Posts: 33
Joined: Mon Nov 27, 2006 6:02 pm
Location: Stanford University.

#15 Unread post by sankaras »

Yes, something is broken.

I did install g77, in Cygwin setup. I tried g77 and man g77 and both worked fine.

Is there another easier route for running ROMS in pc than cygwin-g95 combination? I do have a visual fortran compiler for windows.

Thanks,
Sankar

User avatar
m.hadfield
Posts: 521
Joined: Tue Jul 01, 2003 4:12 am
Location: NIWA

#16 Unread post by m.hadfield »

s there another easier route for running ROMS in pc than cygwin-g95 combination? I do have a visual fortran compiler for windows.
Visual Fortran is a possibility but I certainly wouldn't describe it as easier. The problem is that Gnu make is happiest when dealing with Unix-style paths but Visual Fortran doesn't understand them. ROMS used to support Visual Fortran + Cygwin and maybe still does, but I wouldn't bet on it.

There's also the MSYS shell and the MINGW tools. I build ROMS with these successfully, but again I wouldn't describe this as easier.

I think for now you should persist with Cygwin. However I'm not 100% sure of the best path to take. (Where's the emoticon indicating deep thought?)

OK, looking back at your first message, I think on that occasion you managed to build and install netCDF with g77. I base that on 2 facts: 1) you didn't say you'd specified the FC variable, so I would expect ./configure to choose g77; 2) configure reported that a Fortran 90 program couldn't be compiled, which suggests it's using g77 rather than g95. You can confirm these suspicions by looking at the configure output.

Now g77, g95 and gfortran all produce compatible object code, so the library you built on that occasion should be usable. If you still have it lying around, point NETCDF_LIBDIR to it, and if you don't, recreate it as you did before.

That library will have the second-underscore name-mangling (because g95 and g77 do it by default, though gfortran doesn't). To compile ROMS in a compatible manner you need to remove -fno-second-underscore from FFLAGS. I suggest that for now the easiest way is to edit CYGWIN-g95.mk. Alternatively you could override FFLAGS from the make command line, eg, this

Code: Select all

make FFLAGS="-O3 -ffast-math"
or this to turn off optimisations and keep things simple for now

Code: Select all

make FFLAGS=""
Now if you can build ROMS this way, then you're up and running and you may or may not wish to determine the source of the earlier problems at your leisure. If it doesn't, then I strongly suspect that something's broken in your g95 installation. I suspect this in any case, as I can't see why you would have trouble building netCDF with the options I gave you. If this is so, there are various things that could be tried: install a g95 version that is known to work for me; try gfortran. But lets not think about that for now. (Where's the emoticon indicating cautious optimism?)

sankaras
Posts: 33
Joined: Mon Nov 27, 2006 6:02 pm
Location: Stanford University.

#17 Unread post by sankaras »

m.hadfield,

Thanks for your encouragement and support.

As you had suggested, I removed the -fno-second-underscore from FFLAGS and used the old libnetcdf.a. It worked and created the ROMS.exe. As I ran the ROMS.exe, it is running the default upwelling case. I get the standard ROMS/TOMS version 3.0
Tuesday - May 15 2007.

How do I know, it is running the case. Where does it create the output file?

Do I have to change anything in MY_HEADER_DIR ?=

Thanks,

Sankar

User avatar
m.hadfield
Posts: 521
Joined: Tue Jul 01, 2003 4:12 am
Location: NIWA

#18 Unread post by m.hadfield »

Call me Mark.

If you have compiled ROMS without changing anything in makefile, then you will have created an executable (oceanS.exe on a Cygwin system) configured to run the UPWELLING case.

If you now run

Code: Select all

./oceanS
then the executable will start up and patiently wait for input. I suspect that is the position you are now in. To tell the model what to do, you need to provide the appropriate input file. So kill the model with Ctrl-C and try again like this:

Code: Select all

./oceanS < ROMS/External/ocean_upwelling.in
That will produce screens of output and eventually create several netCDF files. You may well want to save the output in a file, so I suggest running it through the tee filter

Code: Select all

./oceanS < ROMS/External/ocean_upwelling.in | tee ocean.log
Have fun!

sankaras
Posts: 33
Joined: Mon Nov 27, 2006 6:02 pm
Location: Stanford University.

#19 Unread post by sankaras »

Mark,

Many thanks for the help.

I was able to run the upwelling case. Now I need to visualize the output. Is there any description of the test case and how the results look like? Do I have to compile each time for a new test case?.

Now, another netcdf question:

I copied the succesful libnetcdf.a and netcdf.inc into another computer and tried to compile ROMS, removing the no-underscore optiton, I get back the old error in the new computer. Here again, I notice that I get three underscores for ___assert, when I do a nm of libnetcdf.a against two underscores for assert in the ROMS compiler error message given below.

I am not sure how it worked in the first computer.

I have sent a message about this problem to the netcdf customer support also.

Sankar


****************************************************

C:\Programs\cygwin\usr\local\bin\ar.exe: creating Build/libADM.a
C:\Programs\cygwin\usr\local\bin\ar.exe: creating Build/libRPM.a
C:\Programs\cygwin\usr\local\bin\ar.exe: creating Build/libTLM.a
C:\Programs\cygwin\usr\local\bin\ar.exe: creating Build/libNLM.a
C:\Programs\cygwin\usr\local\bin\ar.exe: creating Build/libANA.a
C:\Programs\cygwin\usr\local\bin\ar.exe: creating Build/libICE.a
C:\Programs\cygwin\usr\local\bin\ar.exe: creating Build/libUTIL.a
C:\Programs\cygwin\usr\local\bin\ar.exe: creating Build/libMODS.a
C:/Programs/cygwin/usr/local/lib///libnetcdf.a(nc.o): In function `add_to_NCList':
/home/sankar/ROMS/netcdf-3.6.2/libsrc/nc.c:33: undefined reference to `__assert'
C:/Programs/cygwin/usr/local/lib///libnetcdf.a(nc.o): In function `del_from_NCList':
/home/sankar/ROMS/netcdf-3.6.2/libsrc/nc.c:54: undefined reference to `__assert'

continued.

sankaras
Posts: 33
Joined: Mon Nov 27, 2006 6:02 pm
Location: Stanford University.

#20 Unread post by sankaras »

Mark,

Many thanks for the help.

I was able to run the upwelling case. Now I need to visualize the output. Is there any description of the test case and how the results look like? Do I have to compile each time for a new test case?.

Now, another netcdf question:

I copied the succesful libnetcdf.a and netcdf.inc into another computer and tried to compile ROMS, removing the no-underscore optiton, I get back the old error in the new computer. Here again, I notice that I get three underscores for ___assert, when I do a nm of libnetcdf.a against two underscores for assert in the ROMS compiler error message given below.

I am not sure how it worked in the first computer.

I have sent a message about this problem to the netcdf customer support also.

Sankar


****************************************************

C:\Programs\cygwin\usr\local\bin\ar.exe: creating Build/libADM.a
C:\Programs\cygwin\usr\local\bin\ar.exe: creating Build/libRPM.a
C:\Programs\cygwin\usr\local\bin\ar.exe: creating Build/libTLM.a
C:\Programs\cygwin\usr\local\bin\ar.exe: creating Build/libNLM.a
C:\Programs\cygwin\usr\local\bin\ar.exe: creating Build/libANA.a
C:\Programs\cygwin\usr\local\bin\ar.exe: creating Build/libICE.a
C:\Programs\cygwin\usr\local\bin\ar.exe: creating Build/libUTIL.a
C:\Programs\cygwin\usr\local\bin\ar.exe: creating Build/libMODS.a
C:/Programs/cygwin/usr/local/lib///libnetcdf.a(nc.o): In function `add_to_NCList':
/home/sankar/ROMS/netcdf-3.6.2/libsrc/nc.c:33: undefined reference to `__assert'
C:/Programs/cygwin/usr/local/lib///libnetcdf.a(nc.o): In function `del_from_NCList':
/home/sankar/ROMS/netcdf-3.6.2/libsrc/nc.c:54: undefined reference to `__assert'

continued.

User avatar
m.hadfield
Posts: 521
Joined: Tue Jul 01, 2003 4:12 am
Location: NIWA

#21 Unread post by m.hadfield »

I was able to run the upwelling case. Now I need to visualize the output. Is there any description of the test case and how the results look like?
Not that I'm aware of for UPWELLING, but some of the other test problems are described here

http://marine.rutgers.edu/po/index.php? ... t-problems

UPWELLING is not a particularly interesting case. It's intended mainly as a test for your build system.

There are various tools for visualising output. Have a look around this forum and the ROMS pages. Perhaps someone else would like to make some suggestions.
I copied the succesful libnetcdf.a and netcdf.inc into another computer and tried to compile ROMS, removing the no-underscore optiton, I get back the old error in the new computer. Here again, I notice that I get three underscores for ___assert, when I do a nm of libnetcdf.a against two underscores for assert in the ROMS compiler error message given below.
This is getting very confusing! We never did work out why you couldn't build a usable netCDF library with g95 on the first computer. I'm inclined to suspect that either there is a problem with your specific version of g95 *or* you are making some mistake that you haven't noticed and haven't told us about.

I also suspect that the number of underscores in "___assert" is a red herring.

When dealing with problems like this you need to be methodical and you should work from the simple to the complicated.

sankaras
Posts: 33
Joined: Mon Nov 27, 2006 6:02 pm
Location: Stanford University.

Many thanks

#22 Unread post by sankaras »

Many thanks to Mark and John for your help with my netcdf build in cygwin.

I have finally figured out that my successful netcdf build was using g77 compiler. I used g95 for compiling ROMS, removing the no second underscore option. I was successfully able to reproduce this in my desktop also. Finally, I am getting started with ROMS.

Thanks for your patience and help.

Sankar

Post Reply