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.
Unidata Support <address@hidden> writes: > ------- Forwarded Message > >>To: address@hidden >>From: address@hidden >>Subject: Compiling the NetCDF for SonOS with parallelization option >>Organization: Fisheries and Oceans Canada >>Keywords: 200503232200.j2NM0wv2025351 netCDF Fortran parallel computer > > This message is in MIME format. Since your mail reader does not understand > this format, some or all of this message may not be legible. > > ------_=_NextPart_001_01C52FF3.C4278590 > Content-Type: text/plain > > Dear support: > > I need to compile the NetCDF with a real*8 option on a parallel computer > (MPI). > The machine is a SunOS with the fortran compiler which comes with it. > All my libraries are compiled using mpi90 while NetCDF was compiled with > just f90. NetCDF tries to select a fortran compiler, but can be overridden. If you want to compile with mpi90, set FC and maybe FFLAGS. See: http://my.unidata.ucar.edu/content/software/netcdf/docs/netcdf-install/Specifying-the-Environment-for-Building.html > > I obtained the following error: > > /apps/mpich-1.2.6/bin/mpif90 -o ../../../bin/opa modele.o > ../../../lib/libopa.a ../../../lib/libioipsl.a > -L/home101/aratsima/netcdf-3.6.0-p1/lib -lnetcdf > ld: warning: file > /home101/aratsima/netcdf-3.6.0-p1/lib/libnetcdf.a(fort-attio.o): wrong ELF > class: ELFCLASS32 > Undefined first referenced > symbol in file > nf_copy_att_ ../../../lib/libioipsl.a(restcom.o) > nf_inq_varid_ ../../../lib/libioipsl.a(flincom.o) > ... ... > ... ... > > I also tested compiling the NetCDF library using the mpif90 but I obtained > the same error. I believe this means that you are trying to link a 64-bit program with a 32-bit program. For SunOS specific notes, see: http://my.unidata.ucar.edu/content/software/netcdf/docs/netcdf-install/Building-on-64-Bit-Platforms.html If you want to compile a 64-bit version of netCDF on the Sun, take a look at: http://my.unidata.ucar.edu/content/software/netcdf/builds/SunOS_64_3_6_0.txt In summary, go to the directory you unpacked netCDF into and: make distclean then set the environment flags for you desired fortran compiler (FC), and then set FFLAGS and CFLAGS to -xarch=v9. In csh, something like this: setenv FC mpi90 setenv CFLAGS -xarch=v9 setenv FFLAGS -xarch=v9 setenv CXXFLAGS -xarch=v9 Then rerun the configure and make test ./configure && make extra_test -- Ed Hartnett -- address@hidden