drosa@lbl_gov
Member
Using CAM3.5.32 ...
Does anyone know why the configure does not like gfortran?
Here is the netcdf-4.0.1 environment compiled with gfortran:
----
daniele@daniele-laptop:~/Code/cam$ ls local_netcdf/include/
ncvalues.h netcdfcpp.h netcdf.h netcdf.hh netcdf.inc netcdf.mod typesizes.mod
daniele@daniele-laptop:~/Code/cam$ ls local_netcdf/lib/
libnetcdf.a libnetcdf_c++.a libnetcdf_c++.la libnetcdf.la pkgconfig
---
Here is the configure with fc and linker set to gfortran:
---
./ccp-ucb_wcopy/models/atm/cam/bld/configure -test -cam_bld ./tmp -cam_exedir ./run -dyn fv -cc cc -nosmp -nospmd -nc_inc /usr/include -nc_lib /usr/lib -fc gfortran -linker gfortran -v
Setting CAM configuration script directory to /home/daniele/Code/cam/ccp-ucb_wcopy/models/atm/cam/bld
Using configuration defaults file config_defaults_fv.xml
Setting CAM root directory to /home/daniele/Code/cam/ccp-ucb_wcopy
Setting CAM build directory to /home/daniele/Code/cam/tmp
The CAM executable will be created in /home/daniele/Code/cam/run
Setting user source directories to
The configuration cache file will be created in /home/daniele/Code/cam/tmp/config_cache.xml
Using fv dynamics.
Using cam1 physics.
Using clm2 land package.
Using dom ocean package.
Using csim4 ice package.
Generating and writing SOM input fields to history tapes: OFF.
Perturbation growth testing: OFF.
Configure CAM for single column mode: OFF.
Configure CAM to produce IOP file for SCAM: OFF.
Horizontal grid specifier: 1.9x2.5.
Maximum number of columns in a chunk: 16.
Number of vertical levels: 26.
Total advected constituents: 3.
Target OS: linux.
Name of CAM executable: cam.
Override Makefile default Fortran compiler with: gfortran.
Override Makefile default C compiler with: cc.
Setting linker to gfortran.
Compiler debugging options: OFF.
SPMD parallelism: OFF
SMP parallelism: OFF
CPP definitions set by configure: ' -DFORTRANUNDERSCORE -DPLON=144 -DPLAT=96 -DPLEV=26 -DPCNST=3 -DPCOLS=16 -DPTRM=1 -DPTRN=1 -DPTRK=1 -DSTAGGERED -DDYN_STATE_INTERFACE'
Found netCDF include file in /usr/include
Found netCDF library in /usr/lib
Found netCDF module files in /usr/include
creating /home/daniele/Code/cam/tmp/Filepath
creating /home/daniele/Code/cam/tmp/misc.h
creating /home/daniele/Code/cam/tmp/preproc.h
creating /home/daniele/Code/cam/tmp/Makefile
creating /home/daniele/Code/cam/tmp/config_cache.xml
Looking for a valid GNU make... using make
Testing for Fortran 90 compatible compiler... **** PASS ****
Issued the command:
make -f /home/daniele/Code/cam/tmp/Makefile test_fc 2>&1
The output was:
/home/daniele/Code/cam/ccp-ucb_wcopy/models/atm/cam/bld/mkSrcfiles > /home/daniele/Code/cam/tmp/configure-tests/Srcfiles
/home/daniele/Code/cam/ccp-ucb_wcopy/models/atm/cam/bld/mkDepends Filepath Srcfiles > /home/daniele/Code/cam/tmp/configure-tests/Depends
gfortran -c -DHIDE_MPI test_fc.F90
gfortran -o test_fc test_fc.o
**** PASS ****
Issued the command:
./test_fc
The output was:
hello world
using gfortran
Test linking to NetCDF library...
---------------- /home/daniele/Code/cam/tmp/configure-tests
-----------------
**** FAILED ****
Issued the command:
make -f /home/daniele/Code/cam/tmp/Makefile test_nc 2>&1
The output was:
cat: Srcfiles: No such file or directory
/home/daniele/Code/cam/tmp/Makefile:916: /home/daniele/Code/cam/tmp/configure-tests/Depends: No such file or directory
/home/daniele/Code/cam/ccp-ucb_wcopy/models/atm/cam/bld/mkSrcfiles > /home/daniele/Code/cam/tmp/configure-tests/Srcfiles
/home/daniele/Code/cam/ccp-ucb_wcopy/models/atm/cam/bld/mkDepends Filepath Srcfiles > /home/daniele/Code/cam/tmp/configure-tests/Depends
gfortran -c -DHIDE_MPI test_nc.F90
test_nc.F90:2.13:
use netcdf
1
Fatal Error: Can't open module file 'netcdf.mod' for reading at (1): No such file or directory
make: *** [test_nc.o] Error 1
exit 1
---
If I go to /home/daniele/Code/cam/tmp/configure-tests and run:
daniele@daniele-laptop:~/Code/cam/tmp/configure-tests$ gfortran -c -DHIDE_MPI test_nc.F90
use netcdf
1
Fatal Error: Can't open module file 'netcdf.mod' for reading at (1): No such file or directory
I get an error, but if I add -I/usr/include (where netcdf.mod is), I get no error:
daniele@daniele-laptop:~/Code/cam/tmp/configure-tests$ gfortran -c -DHIDE_MPI -I/usr/include test_nc.F90
Does anyone know why the configure does not like gfortran?
Here is the netcdf-4.0.1 environment compiled with gfortran:
----
daniele@daniele-laptop:~/Code/cam$ ls local_netcdf/include/
ncvalues.h netcdfcpp.h netcdf.h netcdf.hh netcdf.inc netcdf.mod typesizes.mod
daniele@daniele-laptop:~/Code/cam$ ls local_netcdf/lib/
libnetcdf.a libnetcdf_c++.a libnetcdf_c++.la libnetcdf.la pkgconfig
---
Here is the configure with fc and linker set to gfortran:
---
./ccp-ucb_wcopy/models/atm/cam/bld/configure -test -cam_bld ./tmp -cam_exedir ./run -dyn fv -cc cc -nosmp -nospmd -nc_inc /usr/include -nc_lib /usr/lib -fc gfortran -linker gfortran -v
Setting CAM configuration script directory to /home/daniele/Code/cam/ccp-ucb_wcopy/models/atm/cam/bld
Using configuration defaults file config_defaults_fv.xml
Setting CAM root directory to /home/daniele/Code/cam/ccp-ucb_wcopy
Setting CAM build directory to /home/daniele/Code/cam/tmp
The CAM executable will be created in /home/daniele/Code/cam/run
Setting user source directories to
The configuration cache file will be created in /home/daniele/Code/cam/tmp/config_cache.xml
Using fv dynamics.
Using cam1 physics.
Using clm2 land package.
Using dom ocean package.
Using csim4 ice package.
Generating and writing SOM input fields to history tapes: OFF.
Perturbation growth testing: OFF.
Configure CAM for single column mode: OFF.
Configure CAM to produce IOP file for SCAM: OFF.
Horizontal grid specifier: 1.9x2.5.
Maximum number of columns in a chunk: 16.
Number of vertical levels: 26.
Total advected constituents: 3.
Target OS: linux.
Name of CAM executable: cam.
Override Makefile default Fortran compiler with: gfortran.
Override Makefile default C compiler with: cc.
Setting linker to gfortran.
Compiler debugging options: OFF.
SPMD parallelism: OFF
SMP parallelism: OFF
CPP definitions set by configure: ' -DFORTRANUNDERSCORE -DPLON=144 -DPLAT=96 -DPLEV=26 -DPCNST=3 -DPCOLS=16 -DPTRM=1 -DPTRN=1 -DPTRK=1 -DSTAGGERED -DDYN_STATE_INTERFACE'
Found netCDF include file in /usr/include
Found netCDF library in /usr/lib
Found netCDF module files in /usr/include
creating /home/daniele/Code/cam/tmp/Filepath
creating /home/daniele/Code/cam/tmp/misc.h
creating /home/daniele/Code/cam/tmp/preproc.h
creating /home/daniele/Code/cam/tmp/Makefile
creating /home/daniele/Code/cam/tmp/config_cache.xml
Looking for a valid GNU make... using make
Testing for Fortran 90 compatible compiler... **** PASS ****
Issued the command:
make -f /home/daniele/Code/cam/tmp/Makefile test_fc 2>&1
The output was:
/home/daniele/Code/cam/ccp-ucb_wcopy/models/atm/cam/bld/mkSrcfiles > /home/daniele/Code/cam/tmp/configure-tests/Srcfiles
/home/daniele/Code/cam/ccp-ucb_wcopy/models/atm/cam/bld/mkDepends Filepath Srcfiles > /home/daniele/Code/cam/tmp/configure-tests/Depends
gfortran -c -DHIDE_MPI test_fc.F90
gfortran -o test_fc test_fc.o
**** PASS ****
Issued the command:
./test_fc
The output was:
hello world
using gfortran
Test linking to NetCDF library...
---------------- /home/daniele/Code/cam/tmp/configure-tests
-----------------
**** FAILED ****
Issued the command:
make -f /home/daniele/Code/cam/tmp/Makefile test_nc 2>&1
The output was:
cat: Srcfiles: No such file or directory
/home/daniele/Code/cam/tmp/Makefile:916: /home/daniele/Code/cam/tmp/configure-tests/Depends: No such file or directory
/home/daniele/Code/cam/ccp-ucb_wcopy/models/atm/cam/bld/mkSrcfiles > /home/daniele/Code/cam/tmp/configure-tests/Srcfiles
/home/daniele/Code/cam/ccp-ucb_wcopy/models/atm/cam/bld/mkDepends Filepath Srcfiles > /home/daniele/Code/cam/tmp/configure-tests/Depends
gfortran -c -DHIDE_MPI test_nc.F90
test_nc.F90:2.13:
use netcdf
1
Fatal Error: Can't open module file 'netcdf.mod' for reading at (1): No such file or directory
make: *** [test_nc.o] Error 1
exit 1
---
If I go to /home/daniele/Code/cam/tmp/configure-tests and run:
daniele@daniele-laptop:~/Code/cam/tmp/configure-tests$ gfortran -c -DHIDE_MPI test_nc.F90
use netcdf
1
Fatal Error: Can't open module file 'netcdf.mod' for reading at (1): No such file or directory
I get an error, but if I add -I/usr/include (where netcdf.mod is), I get no error:
daniele@daniele-laptop:~/Code/cam/tmp/configure-tests$ gfortran -c -DHIDE_MPI -I/usr/include test_nc.F90