Building on Ubuntu - compiling fails

I'm trying to build cesm_1.2.2 on my Ubuntu home system.
Im following the porting procedure from the documentation. When calling ./test1.build after

CESM BUILDEXE SCRIPT STARTING
rm: No match.
COMPILER is gnu
- Build Libraries: mct gptl pio csm_share
the error
ERROR: buildlib.csm_share failed, see [...]

occurs. In the log-file I find the error:
/home/florian/uni/clm/cesm/models/drv/shr/seq_io_mod.F90:1170.58:

rcode = pio_def_dim(cpl_io_file,'time',PIO_UNLIMITED,dimid(1))
1
Error: Symbol 'pio_unlimited' at (1) has no IMPLICIT type

For the gnu-compiler I have the option --fno-range-check enabled.

Thank you for your help :-)
 

jedwards

CSEG and Liaisons
Staff member
I've seen this error when the model couldn't find either netcdf or pnetcdf prior to building PIO - look in the pio bldlog to see if this is the case and correct it if so.
 
I checked all the log files, there are no other warnings/errors. Nothing about netcdf either. The NETCDF_PATH, PNETCDF_PATH and LIB_PNETCDF are correctly set in the Macros file.
 

jedwards

CSEG and Liaisons
Staff member
Please attach the pio bldlog which you will find in the bld directory.   PIO_UNLIMITED is defined in PIO and should be in the pio.mod module.
 

jedwards

CSEG and Liaisons
Staff member
Hi, The pio bldlog you provided was produced when pio was already built and so contains no output.    Do a *.clean_build all then build again and send that one.  But I see a couple of things that need to be changed first.   In the Macros file you have CONFIG_ARGS:=PNETCDF_PIO   this is wrong - probably came from config_compilers.xml You also have SLIBS+=# USERDEFINED $(shell $(NETCDF_PATH)/bin/nc-config --flibs)  you need to remove the # USERDEFINED and depending on your netcdf version you may need to modify this further.  The end result should be a list of libraries needed to link netcdf.   
 
Hi,thank you, that was the right idea.
I had to download/compile the fortran-libraries for netcdf too. And add setenv LD_LIBRARY_PATH [...]  in the mkbatch file.

Thanks and best regards :-)
 
Back
Top