I've been trying to build the CESM on a macbook pro for a week now and I keep running into different versions of what appears to be the same problem when linking the netcdf libraries.
here's some output I get when trying to configure with
sudo $camcfg/configure -dyn eul
-target_os linux
-fc gfortran
-fflags '-g -fno-range-check -ffree-line-length-none '
-ldflags '-lcurl '
-hgrid 64x128
-nlev 30 -scam
-nospmd -nosmp
-debug -v -test
-ice sice
-lnd slnd
-nc_lib $NC_DIR/lib
-nc_inc $NC_DIR/include
-nc_mod $NC_DIR/include
-mpi_lib $MP_DIR/lib
-mpi_inc $MP_DIR/include
I get similar issues when using mpif90 as the compiler. I also have tried using create_newcase and going through the steps described on this blog post
http://www.easterbrook.ca/steve/?p=1791
I can't find any general information about what these error messages are telling me. I've contacted someone at Unidata but they aren't quite sure how to fix this issue either.
any help or suggestions would be appreciated.
Thanks,
Walter
here's some output I get when trying to configure with
sudo $camcfg/configure -dyn eul
-target_os linux
-fc gfortran
-fflags '-g -fno-range-check -ffree-line-length-none '
-ldflags '-lcurl '
-hgrid 64x128
-nlev 30 -scam
-nospmd -nosmp
-debug -v -test
-ice sice
-lnd slnd
-nc_lib $NC_DIR/lib
-nc_inc $NC_DIR/include
-nc_mod $NC_DIR/include
-mpi_lib $MP_DIR/lib
-mpi_inc $MP_DIR/include
using gfortran
Test linking to NetCDF library... **** FAILED ****
Issued the command:
gmake -f /Users/whannah/CESM/scam_sim_2/Makefile test_nc 2>&1
The output was:
cat: Srcfiles: No such file or directory
/Users/whannah/CESM/scam_sim_2/Makefile:875: /Users/whannah/CESM/scam_sim_2/configure-tests/Depends: No such file or directory
/Users/whannah/CESM/cesm1_0_2/models/atm/cam/bld/mkSrcfiles > /Users/whannah/CESM/scam_sim_2/configure-tests/Srcfiles
/Users/whannah/CESM/cesm1_0_2/models/atm/cam/bld/mkDepends Filepath Srcfiles > /Users/whannah/CESM/scam_sim_2/configure-tests/Depends
gfortran -c -ffree-form -I. -I/Users/whannah/CESM/scam_sim_2/configure-tests -I/Users/whannah/netcdf4/include -I/Users/whannah/netcdf4/include -DNO_SHR_VMATH -DSEQ_MCT -DDUST -DPROGSSLT -DMODAL_AERO -DMODAL_AERO_3MODE -DFORTRANUNDERSCORE -DCO2A -DMAXPATCH_PFT=numpft+1 -DLSMLAT=1 -DLSMLON=1 -DPLON=1 -DPLAT=1 -DPLEV=30 -DPCNST=25 -DPCOLS=1 -DPTRM=1 -DPTRN=1 -DPTRK=1 -DTROPCHEM -D_USEBOX -D_NETCDF -DLINUX -DNO_R16 -fno-range-check -ff2c -g -frecursive -fbounds-check -DHIDE_MPI -D_MPISERIAL -g -fno-range-check -ffree-line-length-none test_nc.F90
gfortran -o test_nc test_nc.o -L/Users/whannah/netcdf4/lib -lnetcdf -lcurl
Undefined symbols for architecture x86_64:
"___netcdf_MOD_nf90_create", referenced from:
_MAIN__ in test_nc.o
"___netcdf_MOD_nf90_strerror", referenced from:
_MAIN__ in test_nc.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
gmake: *** [test_nc] Error 1
Test linking to NetCDF library... **** FAILED ****
Issued the command:
gmake -f /Users/whannah/CESM/scam_sim_2/Makefile test_nc 2>&1
The output was:
cat: Srcfiles: No such file or directory
/Users/whannah/CESM/scam_sim_2/Makefile:875: /Users/whannah/CESM/scam_sim_2/configure-tests/Depends: No such file or directory
/Users/whannah/CESM/cesm1_0_2/models/atm/cam/bld/mkSrcfiles > /Users/whannah/CESM/scam_sim_2/configure-tests/Srcfiles
/Users/whannah/CESM/cesm1_0_2/models/atm/cam/bld/mkDepends Filepath Srcfiles > /Users/whannah/CESM/scam_sim_2/configure-tests/Depends
gfortran -c -ffree-form -I. -I/Users/whannah/CESM/scam_sim_2/configure-tests -I/Users/whannah/netcdf4/include -I/Users/whannah/netcdf4/include -DNO_SHR_VMATH -DSEQ_MCT -DDUST -DPROGSSLT -DMODAL_AERO -DMODAL_AERO_3MODE -DFORTRANUNDERSCORE -DCO2A -DMAXPATCH_PFT=numpft+1 -DLSMLAT=1 -DLSMLON=1 -DPLON=1 -DPLAT=1 -DPLEV=30 -DPCNST=25 -DPCOLS=1 -DPTRM=1 -DPTRN=1 -DPTRK=1 -DTROPCHEM -D_USEBOX -D_NETCDF -DLINUX -DNO_R16 -fno-range-check -ff2c -g -frecursive -fbounds-check -DHIDE_MPI -D_MPISERIAL -g -fno-range-check -ffree-line-length-none test_nc.F90
gfortran -o test_nc test_nc.o -L/Users/whannah/netcdf4/lib -lnetcdf -lcurl
Undefined symbols for architecture x86_64:
"___netcdf_MOD_nf90_create", referenced from:
_MAIN__ in test_nc.o
"___netcdf_MOD_nf90_strerror", referenced from:
_MAIN__ in test_nc.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
gmake: *** [test_nc] Error 1
I get similar issues when using mpif90 as the compiler. I also have tried using create_newcase and going through the steps described on this blog post
http://www.easterbrook.ca/steve/?p=1791
I can't find any general information about what these error messages are telling me. I've contacted someone at Unidata but they aren't quite sure how to fix this issue either.
any help or suggestions would be appreciated.
Thanks,
Walter