ERROR: buildlib.pio failed: configure: error: Fortran could not compile .F90 files

Hi,

I am using the CESM 1.1.2 version to build a B compset case. However, I am unable to build the model and get the following error:-

ERROR: buildlib.pio failed

On checking the log file, I get the following:-

configure: error: Fortran could not compile .F90 files
gmake: *** [/g/data/y99/sd2203/CESM/cases/test_lens/Tools/Makefile:339: /g/data/y99/sd2203/CESM/exe_files/test_lens/bld/pio/Makefile.conf] Error 1
cp: cannot stat 'Makefile.conf': No such file or directory
Makefile:25: Makefile.conf: No such file or directory
gmake: *** No rule to make target 'Makefile.conf'. Stop.

Does this mean I need to install netcdf-fortran? Or something else that is missing and is causing the model to not compile?
I have attached the pio error file, config_machines.xml, config_compilers.xml and env_mach_specific files for reference.

Thanks in advance...
 

Attachments

jedwards

CSEG and Liaisons
Staff member
You will need netcdf-fortran if you haven't already installed it but this error is related to the fortran compiler gfortran.
The actual error will be in /g/data/y99/sd2203/CESM/exe_files/test_lens/bld/pio/config.log near the end.
 
I downloaded netcdf-fortran-4.5.2. On running ./configure, I get the following error:-

checking whether the C compiler works... no
configure: error: in `/home/561/sd2203/netcdf-fortran-4.5.2':
configure: error: C compiler cannot create executables
See `config.log' for more details

I have attached the config.log file.

Also, on building the case, I get the following error:-

ERROR: buildlib.gptl failed, see /g/data/y99/sd2203/CESM/exe_files/test_le/bld/gptl/gptl.bldlog.200506-200907
ERROR: cat /g/data/y99/sd2203/CESM/exe_files/test_le/bld/gptl/gptl.bldlog.200506-200907

I have attached the gptl.bldlog file, with the following error:-

gmake: c: Command not found
 

Attachments

jedwards

CSEG and Liaisons
Staff member
It looks like you weren't able to build netcdf fortran because of a path issue and so you aren't going to be able to build cesm.
GPTL indicates that you didn't specify a compiler. Go back to the netcdf build and try again, there is no point in starting the cesm build until netcdf is complete.
 
I installed netcdf-fortran, and ran the following:-
./configure --prefix=$HOME/gcc --enable-language=c,fortran --disable-multilib
make check
make install

I could build netcdf-fortran succesfully.
Because I do not have administrator privileges, I also added:-

export PATH=$HOME/bin:$PATH
export LD_LIBRARY_PATH=$HOME/lib/:$LD_LIBRARY_PATH

to my ~/.bashrc file.

I now get the following error in the pio log file (pio.bldlog.200510-235735) on building the model:-

checking for Fortran flag to compile .F90 files... unknown
configure: error: Fortran could not compile .F90 files
gmake: *** [/g/data/y99/sd2203/CESM/cases/test_lens/Tools/Makefile:339: /g/data/y99/sd2203/CESM/exe_files/test_lens/bld/pio/Makefile.conf] Error 1
cp: cannot stat 'Makefile.conf': No such file or directory
Makefile:25: Makefile.conf: No such file or directory
gmake: *** No rule to make target 'Makefile.conf'. Stop.

I checked the config.log file. The last error is:-

gfortran: error: source: No such file or directory
gfortran: error: big_endian: No such file or directory
gfortran: error: byterecl: No such file or directory
gfortran: error: realloc_lhs: No such file or directory
gfortran: error: unrecognized command line option '-fp-model'
gfortran: error: unrecognized command line option '-convert'
gfortran: error: unrecognized command line option '-assume'; did you mean '-msse'?
gfortran: error: unrecognized command line option '-ftz'; did you mean '-flto'?
gfortran: error: unrecognized command line option '-traceback'
gfortran: error: unrecognized command line option '-assume'; did you mean '-msse'?
configure:4278: $? = 1
configure: failed program was:
| program main
|
| end
configure:4297: result: unknown
configure:4300: error: Fortran could not compile .F90 files


I checked with the other verision of the model on my system that builds successfully. It uses the fortran compiler located here: /apps/openmpi/4.0.2/bin/mpif90

Am I getting an error with this version because it cannot locate the fortran compiler?

I have attached the error files for reference.
 

Attachments

Back
Top