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.
Mondher, > First of all thanks for your answer... > Sorry but I forgot to mention that I am compiling the test-debug using > the -mcmodel=medium option flag... Was the netCDF library you are linking against also compiled with the -mcmodel=medium option flag? If not, that might explain the problem. Also, the PGI Users Guide for version 8 compilers says this: 64-bit Linux Considerations On 64-bit Linux systems, 64-bit applications that use the -mcmodel=medium option sometimes cannot be successfully linked statically. Therefore, users with executables built with the -mcmodel=medium option may need to use shared libraries, linking dynamically. Also, runtime libraries built using the -fpic option use 32-bit offsets, so they sometimes need to reside near other runtime libs in a shared area of Linux program memory. so it looks like you need to build a shared netCDF library in order to use this flag. --Russ > Regarding the make check one test failed when using the -r8 option flag.. > > Any ideas? > > Thanks > > > Unidata netCDF Support wrote: > > Hi Mondher, > > > > > >> I am having some troubles running the following test program: It > >> works fine for the 3.6.1 version of netcdf but it fails for 3.6.2 > >> and 4.0 (compiled without the option --enable-netcdf-4 so I guess > >> it's 3.6.3..) Anyway, I attached the program(test-debug.f90) and > >> the netcdf file(simple.nc). I am compiling this with a PGI compiler > >> (version 8.0.5) Could you please tell me if I am making a mistake or > >> is it related to the version.. > >> > > > > I tried to reproduce the problem by compiling and linking your > > test-debug.f90 program against installed netCDF versions 3.6.1, 3.6.2, > > 3.6.3, 4.0 (without --enable-netcdf-4), and the current release 4.0.1. > > But in every case I got the same output: > > > > $ ./test-debug-361 > > VAR ID 1 > > VAR NUMBER OF DIM data 2 > > DIM data 2 1 > > $ ./test-debug-362 > > VAR ID 1 > > VAR NUMBER OF DIM data 2 > > DIM data 2 1 > > $ ./test-debug-363 > > VAR ID 1 > > VAR NUMBER OF DIM data 2 > > DIM data 2 1 > > $ ./test-debug-40 > > VAR ID 1 > > VAR NUMBER OF DIM data 2 > > DIM data 2 1 > > $ ./test-debug-401 > > VAR ID 1 > > VAR NUMBER OF DIM data 2 > > DIM data 2 1 > > > > Did you run "make check" successfully on your 3.6.2 or 4.0 > > installation? > > > > I was not using the PGI compiler, because I don't have version 8.0.5 > > to test with, but Portland Group has recommendations for building > > netCDF with their compilers here: > > > > http://www.pgroup.com/resources/netcdf/netcdf362_pgi71.htm > > > > In particular, note that they recommend setting > > > > CFLAGS="-O2 -Msignextend -V" > > CPPFLAGS="-DNDEBUG -DpgiFortran" > > FFLAGS="-O2 -w -V" > > > > before running the configure script. If you rebuild netCDF with those > > settings in the same directory, be sure to run "make distclean" first. > > > > I hope this helps. > > > > --Russ > > > > Russ Rew UCAR Unidata Program > > address@hidden http://www.unidata.ucar.edu > > > > > > > > Ticket Details > > =================== > > Ticket ID: NNT-822493 > > Department: Support netCDF > > Priority: Normal > > Status: Closed > > > > > > > > > -- > > > Mondher Chekki > HPC Analyst, Mercator > > Tel : 05 61 39 38 64 > E-Mail : address@hidden > www : http://www.mercator-ocean.fr > > MERCATOR-OCEAN > Parc Technologique du Canal > 8-10 rue Hermes > 31526 Ramonville Saint Agne, France > > Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: NNT-822493 Department: Support netCDF Priority: Normal Status: Closed