I am porting CESM to a new machine and am having problems linking the netcdf libraries. The machine is running centos 7, and like OpenSUSE and I suspect Redhat, provides netcdf C and fortran support through separate modules with separate directory structures. For a long time this gave me the error "ERROR: CIME models require NETCDF in PIO build" until by trial and error I eventually found the binary, include and library files all had to be copied to a single directory structure.
At the present stage the netcdf files are under directory /home/djw/opt/intel/netcdf/lib and the pnetcdf files are under /home/opt/intel/lib - the libraries being kept separate to make things easier when the system is next updated.
This allows the build to get past the pio section to build the atmosphere, ocean etc, but it now fails while building cesm when it cannot find the netcdf libraries. The output describing the link command is:
mpif90 -o /dssgfs01/scratch/djw/NCAR/CIME/mycase/bld/cesm.exe cime_comp_mod.o cime_driver.o component_mod.o component_type_mod.o cplcomp_exchange_mod.o map_glc2lnd_mod.o map_lnd2glc_mod.o map_lnd2rof_irrig_mod.o mrg_mod.o prep_aoflux_mod.o prep_atm_mod.o prep_glc_mod.o prep_ice_mod.o prep_lnd_mod.o prep_ocn_mod.o prep_rof_mod.o prep_wav_mod.o seq_diag_mct.o seq_domain_mct.o seq_flux_mct.o seq_frac_mct.o seq_hist_mod.o seq_io_mod.o seq_map_mod.o seq_map_type_mod.o seq_rest_mod.o t_driver_timers_mod.o -L/dssgfs01/scratch/djw/NCAR/CIME/mycase/bld/lib/ -latm -L/dssgfs01/scratch/djw/NCAR/CIME/mycase/bld/lib/ -lice -L/dssgfs01/scratch/djw/NCAR/CIME/mycase/bld/lib/ -llnd -L/dssgfs01/scratch/djw/NCAR/CIME/mycase/bld/lib/ -locn -L/dssgfs01/scratch/djw/NCAR/CIME/mycase/bld/lib/ -lrof -L/dssgfs01/scratch/djw/NCAR/CIME/mycase/bld/lib/ -lglc -L/dssgfs01/scratch/djw/NCAR/CIME/mycase/bld/lib/ -lwav -L/dssgfs01/scratch/djw/NCAR/CIME/mycase/bld/lib/ -lesp -L../../intel/mpi/nodebug/nothreads/mct/noesmf/c1a1l1i1o1r1g1w1e1/lib -lcsm_share -L../../intel/mpi/nodebug/nothreads/lib -lpio -lgptl -lmct -lmpeu -L/home/djw/opt/intel/lib -lpnetcdf
Followed by a lot of messages about missing routines. I've cheked the files libnetcdff.a libnetcdf.a and found that they contain the 'missing' routines.
I am attaching the machines and compiler xml files from my latest try (gzipped to bypass the attach restrictions). I've tried various options, using <append> </append> tags around the separate combinations of "-Ldirname -llibname", removing the SLIBS section and and replacing the text there by that from the LDFLAGS line - but the link command line (shown above) stays the same - so the pnetcdf section appears to be added separately and the LDFLAGS and SLIBS sections of the compilers xml file appear to be ignored.
Anyway I'd welcome any help or suggestions.
At the moment it is a bit like a locked room puzzle in which I have to do the unknown right things in the unknown right order before I can unlock a door. But at the moment I suspect I don't even have the right key - or missed the right web page.
Regards, D.
At the present stage the netcdf files are under directory /home/djw/opt/intel/netcdf/lib and the pnetcdf files are under /home/opt/intel/lib - the libraries being kept separate to make things easier when the system is next updated.
This allows the build to get past the pio section to build the atmosphere, ocean etc, but it now fails while building cesm when it cannot find the netcdf libraries. The output describing the link command is:
mpif90 -o /dssgfs01/scratch/djw/NCAR/CIME/mycase/bld/cesm.exe cime_comp_mod.o cime_driver.o component_mod.o component_type_mod.o cplcomp_exchange_mod.o map_glc2lnd_mod.o map_lnd2glc_mod.o map_lnd2rof_irrig_mod.o mrg_mod.o prep_aoflux_mod.o prep_atm_mod.o prep_glc_mod.o prep_ice_mod.o prep_lnd_mod.o prep_ocn_mod.o prep_rof_mod.o prep_wav_mod.o seq_diag_mct.o seq_domain_mct.o seq_flux_mct.o seq_frac_mct.o seq_hist_mod.o seq_io_mod.o seq_map_mod.o seq_map_type_mod.o seq_rest_mod.o t_driver_timers_mod.o -L/dssgfs01/scratch/djw/NCAR/CIME/mycase/bld/lib/ -latm -L/dssgfs01/scratch/djw/NCAR/CIME/mycase/bld/lib/ -lice -L/dssgfs01/scratch/djw/NCAR/CIME/mycase/bld/lib/ -llnd -L/dssgfs01/scratch/djw/NCAR/CIME/mycase/bld/lib/ -locn -L/dssgfs01/scratch/djw/NCAR/CIME/mycase/bld/lib/ -lrof -L/dssgfs01/scratch/djw/NCAR/CIME/mycase/bld/lib/ -lglc -L/dssgfs01/scratch/djw/NCAR/CIME/mycase/bld/lib/ -lwav -L/dssgfs01/scratch/djw/NCAR/CIME/mycase/bld/lib/ -lesp -L../../intel/mpi/nodebug/nothreads/mct/noesmf/c1a1l1i1o1r1g1w1e1/lib -lcsm_share -L../../intel/mpi/nodebug/nothreads/lib -lpio -lgptl -lmct -lmpeu -L/home/djw/opt/intel/lib -lpnetcdf
Followed by a lot of messages about missing routines. I've cheked the files libnetcdff.a libnetcdf.a and found that they contain the 'missing' routines.
I am attaching the machines and compiler xml files from my latest try (gzipped to bypass the attach restrictions). I've tried various options, using <append> </append> tags around the separate combinations of "-Ldirname -llibname", removing the SLIBS section and and replacing the text there by that from the LDFLAGS line - but the link command line (shown above) stays the same - so the pnetcdf section appears to be added separately and the LDFLAGS and SLIBS sections of the compilers xml file appear to be ignored.
Anyway I'd welcome any help or suggestions.
At the moment it is a bit like a locked room puzzle in which I have to do the unknown right things in the unknown right order before I can unlock a door. But at the moment I suspect I don't even have the right key - or missed the right web page.
Regards, D.