[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #GNP-293876]: module file problem



> Thanks for the suggestion but unfortunately I get the same error message. Any 
> help would be appreciated.

Are you using whatever pgfortran flag is needed to tell the compiler where to 
find the
module file for the Fortran-90 netCDF API?  From your configure invocation, 
this is probably
/home/fake/netcdf/netcdf_install/include, so check to make sure that directory 
has an .mod
file created by the pgi Fortran-90 compiler when you ran "make install", that 
your
compile flags include -I/home/fake/netcdf/netcdf_install/include and that your 
load flags
include "-L/home/fake/netcdf/netcdf_install/include -lnetcdff -lnetcdf".

If that doesn't help, here's someone who had a very similar problem and the 
solution that
worked for him/her having to do with order of compile options for pg compilers:

  
http://www.pgroup.com/userforum/viewtopic.php?p=4050&sid=d2906362883701113f92640b85989804

--Russ


> -----Original Message-----
> From: Unidata netCDF Support [mailto:address@hidden
> Sent: Friday, March 23, 2012 1:03 PM
> To: Fake, Todd
> Cc: address@hidden
> Subject: [netCDF #GNP-293876]: module file problem
> 
> > I get the same error with version 4.2. I can compile and install with the 
> > following option.
> >
> > env CC=pgcc CXX=pgcpp FC=pgfortran F90=pgfortran LD=pgfortran 
> > CPPFLAGS="-DpgiFortrani " ./configure 
> > --prefix=/home/fake/netcdf/netcdf_install --disable-netcdf-4
> >
> > But when I try to compile the code I want to use netcdf with I get the 
> > error messages in the attached file. Any idea why?
> 
> ...
> 
> 
> > $ make
> > /opt/platform_mpi/bin/mpif90     mod_prec.o mod_types.o mod_main.o 
> > mod_utils.o mod_par.o mod_inp.o mod_wd.o mod_probe.o mod_clock.o 
> > mod_spherical.o mod_obcs.o mod_wqm.o mod_gotm.o mod_equitide.o 
> > mod_atmotide.o mod_heatflux.o mod_northpole.o mod_balance_2d.o mod_tsobc.o 
> > mod_meanflow.o mod_obcs2.o mod_obcs3.o mod_dye.o mod_newinp.o mod_tridiag.o 
> > mod_scal.o mod_sed.o particle.o linklist.o mod_enkf.o mod_etkf.o mod_rrk.o 
> > mod_rrkassim.o mod_optimal_interpolation.o mod_assim.o mod_ncdio.o 
> > mod_ncdave.o mod_lag.o mod_visit.o mod_petsc.o mod_semi_implicit.o 
> > utilities.o adjust2d3d.o advave_edge_gcn.o adv_q.o advection_edge_gcn.o 
> > adv_s.o adv_t.o adv_uv_edge_gcn.o alloc_vars.o archive.o arcrst.o atg.o 
> > fct_s.o fct_t.o baropg.o bcmap.o bcond_bfw.o bcond_gcn.o bcond_ts.o 
> > bcs_force.o brough.o brough_ud.o bracket.o cell_area.o conv_over.o 
> > data_run.o dens.o dens2.o depth_grad.o domdec.o extel_edge.o extuv_edge.o 
> > genmap.o getdim.o initial_qql.o hot_start_data.o initial_ts.o 
> > initial_uvel.o i
 of
> 
> iles.o out_avge.o out_binary.o out_sms_one.o pdomdec.o phy_baropg.o report.o 
> sectinf.o set_bndry.o set_sigma.o shape_coef_gcn.o sinter.o startup.o svan.o 
> theta.o us_fvcom.o tge.o vdif_q.o vdif_ts.o vdif_uv.o vertvl_edge.o 
> water_depth.o wreal.o ghostuv.o dens3.o init_sed.o advave_edge_gcy.o 
> advection_edge_gcy.o closefiles.o adv_uv_edge_gcy.o bcond_gcy.o 
> shape_coef_gcy.o depth_check.o vdif_ts_gom.o adjust_ts.o shutdown_check.o 
> extelpf_edge.o fct_q2.o fct_q2l.o viscofh.o print_vals.o visitsim.o 
> rho_mean.o adcor.o viz.o mod_bio_3D.o mod_onedtide.o     -L../METIS_source 
> -lmetis  -L/usr/lib64 -lnetcdf        -o fvcom
> > mod_ncdio.o: In function `mod_ncdio_handle_ncerr_':
> > /c1/fake/FVCOM/FVCOM2.7.1/FVCOM_source/./mod_ncdio.f90:156: undefined 
> > reference to `netcdf_nf90_strerror_'
> > mod_ncdio.o: In function `mod_ncdio_write_netcdf_setup_':
> > /c1/fake/FVCOM/FVCOM2.7.1/FVCOM_source/./mod_ncdio.f90:342: undefined 
> > reference to `netcdf_nf90_create_'
> 
> ...
> 
> It looks like you're not telling the compiler where to find the netCDF 
> Fortran library, which is separate
> from the netCDF C library.  It may be enough to just replace "-lnetcdf" with 
> "-lnetcdff -lnetcdf".
> 
> --Russ
> 
> 
> 
> Russ Rew                                         UCAR Unidata Program
> address@hidden                      http://www.unidata.ucar.edu
> 
> 
> 
> Ticket Details
> ===================
> Ticket ID: GNP-293876
> Department: Support netCDF
> Priority: Normal
> Status: Closed
> 
> 
Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: GNP-293876
Department: Support netCDF
Priority: Normal
Status: Closed


NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.