Hi Long Chen, > Excuse me, I need your help.I use GNU fortran compiler to compile > CMAQv5.0.When installing netCDF-4.1.3, I set environment variables as follows, > > setenv CC gcc > setenv FC gfortran > setenv CXX g++ > setenv CPPFLAGS '-DNDEBUG -DgFortran' > setenv CFLAGS -O > setenv FFLAGS '-O -w' > > ./configure --prefix=/usr/local/netcdf --disable-netcdf-4 --disable-dap > The steps above were successful.However, when I typed "make check",the error > occurred as follows, > > *** Testing netCDF-3 Fortran 90 API. > Invalid argument > STOP 2 > FAIL: tst_f90 > ================================================ > 1 of 5 tests failed > Please report to address@hidden > ================================================ > make: *** [check-TESTS] error 1 > make: Leaving directory `/usr/local/netcdf/netcdf-4.1.3/nf_test' > make: *** [check-am] error 2 > make: Leaving directory `/usr/local/netcdf/netcdf-4.1.3/nf_test' > make: *** [check-recursive] error 1 > > How can I resolve the problem? Thank you very much! From the information you provided, I was at first able to reproduce the problem, so thanks for reporting it. But then as soon as I tried to set some debugging options, "make check" worked fine and the problem didn't occur. Then I did a "make clean" and tried again with the options and environment variables you used, and everything worked fine. Then I tried again from a new copy of the 4.1.3 release with your settings, and once again eveything worked fine. From this, all I can conclude is that the problem seems to go away if you run "make clean" first, then configure and "make check" as you have done. Could you try that and see if it works? Just for completeness, here's the versions of the GNU compilers I used, although I doubt that it matters: $ gcc --version gcc (GCC) 4.5.1 20100924 (Red Hat 4.5.1-4) $ gfortran --version GNU Fortran (GCC) 4.5.1 20100924 (Red Hat 4.5.1-4) and the latest command I ran on a new 4.1.3 distribution, in ksh, when everything worked fine: CFLAGS='-O' FFLAGS='-O' CC=gcc FC=gfortran CXX=g++ CPPFLAGS='-DNDEBUG -DgFortran' ./configure --prefix=/tmp/bye --disable-netcdf-4 --disable-dap && make check --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: BYE-972022 Department: Support netCDF Priority: Normal Status: Closed
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.