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.
>To: address@hidden >From: address@hidden >Subject: compilation options for NetCDF on AMD Opteron Linux systems >Organization: MIT >Keywords: 200403162251.i2GMpurV013103 netCDF 3.5.1 AMD Opteron Linux >environment variables Hi Dr. Evangelinos, > These compilations successfully completed the bundled test for NetCDF > 3.5.1 on an Opteron system with SuSE Enterprise Server 8, gcc 3.3.1 and > PGI compiler V. 5.1-3. > > * 64bit, PGI F77 & C++ compilers, GCC for C, pgf90 will not work for F90 > env CC=gcc CFLAGS="-O3 -funroll-loops -march=k8 -m64 -mfpmath=sse -msse2 > -ffast-math -mcmodel=medium" FC=pgf77 FFLAGS="-fastsse -tp k8-64 -Minline > -Mvect=recog,transform,assoc,cachesize:1048576 -mcmodel=medium" CXX=pgCC > CXXFLAGS="-fastsse -tp k8-64 -Minline > -Mvect=recog,transform,assoc,cachesize:1048576 -mcmodel=medium" > CPPFLAGS="-DNDEBUG -DpgiFortran -D_FILE_OFFSET_BITS=64 > -D_LARGEFILE_SOURCE" ./configure > > This one works but the tests complain: > ./nf_test: Symbol `exit' causes overflow in R_X86_64_PC32 relocation > ./nf_test: Symbol `exit' causes overflow in R_X86_64_PC32 relocation > ./ftest: Symbol `exit' causes overflow in R_X86_64_PC32 relocation > ./ftest: Symbol `exit' causes overflow in R_X86_64_PC32 relocation > ./nctst: Symbol `exit' causes overflow in R_X86_64_PC32 relocation > Compiling without -mcmodel=medium does away with these warnings (and > should provide a small speedup) at the expense of available address space. > > * 32bit, PGI F77 & C++ compilers, GCC for C, pgf90 will not work for F90 > env CC=gcc CFLAGS="-O2 -funroll-loops -march=k8 -m32 -mfpmath=sse -msse2 > -ffast-math" FC=pgf77 FFLAGS="-fastsse -tp k8-32 -Minline > -Mvect=recog,transform,assoc,cachesize:1048576" CXX=pgCC > CXXFLAGS="-fastsse -tp k8-32 -Minline > -Mvect=recog,transform,assoc,cachesize:1048576" CPPFLAGS="-DNDEBUG > -DpgiFortran -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" ./configure > > * 64bit, all GCC, no F90 > env CC=gcc CFLAGS="-O3 -funroll-loops -march=k8 -m64 -mfpmath=sse -msse2 > -ffast-math -mcmodel=medium" FC=g77 FFLAGS="-O3 -funroll-loops -march=k8 > -m64 -mfpmath=sse -msse2 -ffast-math -mcmodel=medium -Wno-globals" CXX=g++ > CXXFLAGS="-O3 -funroll-loops -march=k8 -m64 -mfpmath=sse -msse2 > -ffast-math -mcmodel=medium" CPPFLAGS="-DNDEBUG -Df2cFortran > -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" ./configure > > * 32bit, all GCC, no F90 > env CC=gcc CFLAGS="-O2 -funroll-loops -march=k8 -m32 -mfpmath=sse -msse2 > -ffast-math" FC=g77 FFLAGS="-O2 -funroll-loops -march=k8 -m32 -mfpmath=sse > -msse2 -ffast-math -Wno-globals" CXX=g++ CXXFLAGS="-O2 -funroll-loops > -march=k8 -m32 -mfpmath=sse -msse2 -ffast-math" CPPFLAGS="-DNDEBUG > -Df2cFortran -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" ./configure Thanks for contributing these. I've added them to http://www.unidata.ucar.edu/packages/netcdf/other-builds.html --Russ