Re: [netcdfgroup] JULES v3.3 make BUILD results in errors on my Ubuntu machine

I’ve recently built a simple reading app for NetCDF using the nf90 flags and it 
only worked once I used these flags to gfortran:
-I/usr/include -lnetcdff

I’ve installed NetCDF to my /usr/lib instead of /usr/local by purpose... Or did 
gentoo did it for me, I don’t quite remember.
But pointing the mod file search to that path and using netcdf[F] instead of 
plain netcdf did the trick for me.
Again, it was not for JULES compilation, but  you might try changing your 
LIB_PRE and MOD_INC to

LIB_PRE=-lnetcdff
MOD_INC=-I<path_to_your_413_include_dir>

Notice that LIB-PRE begins with a lowercase L while MOD_INC is a uppercase i. 
:) (if the font above is not on Courier New for you it would be hard to notice 
the difference)
You might change LIB_INC also to -L<path_to_netcdf_lib> if you installed it 
somewhere else not on /usr or /usr/local as --prefix. If you installed in your 
home directory under ‘netcdf’ for example, it would be:
LIB_INC=-L${HOME}/netcdf/lib
LIB_PRE=-lnetcdff
MOD_INC=-I${HOME}/netcdf/include

Remember I had to specify -I in order to find the correct .mod file despite it 
being installed under /usr/include. I was only relieved of the -L argument.

I hope that helps.

- fabrício

From: Nick Papior Andersen 
Sent: Monday, July 01, 2013 10:20 AM
To: Joost.Iwema@xxxxxxxxxxxxx 
Cc: netcdfgroup@xxxxxxxxxxxxxxxx 
Subject: Re: [netcdfgroup] JULES v3.3 make BUILD results in errors on my Ubuntu 
machine

I don't know about JULES, but:


The complaint refers to your netcdf 4.1.3 version not being compiled with 
NetCDF 4 support (you have to enable this via a configure flag). 
Second, I can't remember if NetCDF 4 automatically defines nf90_mpiio even if a 
non-mpi compilation has been performed, if so that should also disappear. 
Otherwise you need to compile netcdf with MPI enabled (you can ask your 
colleague whether (s)he used MPI or not. 

The flag for the configure script for enabling Netcdf 4 support is:
--enable-netcdf-4

If you compile with MPI it will automatically be detected.

I sure do hope you are not using gcc v.1.2.1
I do hope that is a typo! :)
If not, please use a more recent version of gcc/gfortran. 

Lastly, the newer NetCDF should be preferred. Possibly you have had errors 
which refers to the DAP support, if so, configure with the "--disable-dap" flag 
to disable DAP support.

Kind regards Nick

2013/7/1 J Iwema <Joost.Iwema@xxxxxxxxxxxxx>

  Dear,

  I compiled and installed NetCDF 4.1.3 succesfully on my Ubuntu machine (newer 
versions of NetCDF gave some errors). Then I tried to install the land surface 
model JULES 3.3. This failed at running:
  make BUILD=run COMPILER=gfortran

  I got the following errors:
  Error: Symbol 'nf90_netcdf4' referenced at (1) not found in module 'netcdf'
  Error: Symbol 'nf90_mpiio' referenced at (1) not found in module 'netcdf'


  I tried changing variables in the Makefile.comp.gfortran. With the settings 
shown here beneath, a colleague was able to successfully install JULES on a 
Mac, by I failed on my Ubuntu (3.5.0-32-generic #53~precise1-Ubuntu). I have 
got no idea anymore what to do.

  Thanks very much for any help!


  Joost

  University of Bristol


  #########################################################################
  ## Compiler specific variables for gfortran (from gcc v1.2.1)          ##
  ##                                                                     ##
  ## FC       = Fortran compiler command                                 ##
  ## CC       = C compiler command                                       ##
  ## CPP      = C++ compiler command                                     ##
  ## FPP      = Flag for enabling pre-processor                          ##
  ## FPP_FDEF = Flag for defining pre-processor variables                ##
  ## FPP_INC  = Flag for adding pre-processor include search paths       ##
  ## FF_RUN   = Compiler flags for normal operation.                     ##
  ## FF_DBG   = Compiler flags for debugging.                            ##
  ## FF_FAST  = Compiler flags for optimised performance.                ##
  ## FF_CON   = Compiler flags for Condor.                               ##
  ## LIB_INC  = Flag for adding library search paths.                    ##
  ## LIB_PRE  = Flag for linking a specific library.                     ##
  ## LIB_FPRE = Prefix common to all library archive filenames.          ##
  ## LIB_FSUF = Suffix/extension common to all library archive filenames.##
  ## LINKER   = Fortran compiler command for the linking (loader) stage  ##
  ## MOD_INC  = Flag for adding Fortran 90 module search paths.          ##
  ## MOD_FSUF = Suffix/extension common to all Fortran 90 modules        ##
  #########################################################################
  FC=gfortran -fno-underscoring
  CC=gcc
  CPP=g++
  FPP=
  FPP_FDEF=-D
  FPP_INC=-I
  FF_RUN=-fbounds-check
  FF_DBG=-g -pg -fbounds-check -Wall
  FF_FAST=-O3
  FF_CON=-O3
  LIB_INC=-L
  LIB_PRE=-l
  LIB_FPRE=lib
  LIB_FSUF=.a
  LINKER=$(FC)
  MOD_PUT=-J
  MOD_INC=-I
  MOD_FSUF=.mod




  _______________________________________________
  netcdfgroup mailing list
  netcdfgroup@xxxxxxxxxxxxxxxx
  For list information or to unsubscribe,  visit: 
http://www.unidata.ucar.edu/mailing_lists/ 





--------------------------------------------------------------------------------
_______________________________________________
netcdfgroup mailing list
netcdfgroup@xxxxxxxxxxxxxxxx
For list information or to unsubscribe,  visit: 
http://www.unidata.ucar.edu/mailing_lists/
  • 2013 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: