Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

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 :-)
 
Top