This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hi Kamal, > I Installed the C libraries of NetCDF along with zlib and HDF5 which was > successful. > Later I tried to Install Fortran libraries to get 'netcdf.mod' so I did > > make distclean > CXX="" > FC=/usr/local/bin/mpif90 > FFLAGS='-mcmodel=medium' > > export CXX FC FFLAGS > > > CPPFLAGS=-I/home/kamal/local_lib/include > LDFLAGS=-L/home/kamal/local_lib/lib ./configure > --prefix=/home/kamal/local_lib > > make > make check > > > but I get error saying ' undefined reference to `nf_create_' and many > more, I have attached OUT file to this mail. > > > when I run the same command with gfortran complier it gets installed > successfully. I think you must use mpicc to build the netCDF library if you are going to use mpif90 for the Fortran library. Also, if you are building with parallel I/O using wrappers such as mpicc and mpif90, you sometimes have to set CFLAGS to indicate which Fortran compiler is wrapped by mpif90. For example, if "mpicc --show" and "mpif90 --show" indicate gcc and gfortran are being used, then set CFLAGS=-DgFortran and similarly set CFLAGS=-DpgiFortran for Portland Group compilers. --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: ZAP-332278 Department: Support netCDF Priority: Normal Status: Closed