Score:0

Error in running the "make" command in installing RegCM

in flag

I am trying to install RegCM-4.7.1 on Ubuntu but I keep getting this error (screenshot attached) in an attempt to run the "make" command. Please help me. I am using "GNU Fortran (Ubuntu 10.3.0-1ubuntu1) 10.3.0" and I have tried installing packages such as binutils, zlib, hdf5, netcdf, etc .... thanks in advance. enter image description here

the output of the "make" command is as follows:

make  all-recursive
make[1]: Entering directory '/home/josh/Downloads/RegCM-4.7.1'
Making all in external
make[2]: Entering directory '/home/josh/Downloads/RegCM-4.7.1/external'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/josh/Downloads/RegCM-4.7.1/external'
Making all in Share
make[2]: Entering directory '/home/josh/Downloads/RegCM-4.7.1/Share'
gfortran -I/home/josh/Downloads/RegCM-4.7.1/external -I/usr/include -I/usr/include/hdf5/serial -I/usr/include -I/usr/include -I/usr/include -I/usr/include/hdf5/serial -I/usr/include -I/usr/include  -I/home/josh/Downloads/RegCM-4.7.1/Share -fopenmp -D'SVN_REV="tag-4.7.1"' -O3 -finline-functions -mtune=native -march=native -fconvert=big-endian -fno-range-check -fPIC -c mod_realkinds.F90
mod_realkinds.F90:63:31:

   63 |   real(rk8), parameter :: inf = O'0777600000000000000000'
      |                               1
Error: BOZ literal constant at (1) is neither a data-stmt-constant nor an actual argument to INT, REAL, DBLE, or CMPLX intrinsic function [see ‘-fno-allow-invalid-boz’]
mod_realkinds.F90:64:31:

   64 |   real(rk8), parameter :: nan = O'0777610000000000000000'
      |                               1
Error: BOZ literal constant at (1) is neither a data-stmt-constant nor an actual argument to INT, REAL, DBLE, or CMPLX intrinsic function [see ‘-fno-allow-invalid-boz’]
make[2]: *** [Makefile:613: mod_realkinds.o] Error 1
make[2]: Leaving directory '/home/josh/Downloads/RegCM-4.7.1/Share'
make[1]: *** [Makefile:433: all-recursive] Error 1
make[1]: Leaving directory '/home/josh/Downloads/RegCM-4.7.1'
make: *** [Makefile:365: all] Error 2
cn flag
Ray
Looks like a bug in the source code? Perhaps you can ask the developer?
Bodo avatar
pt flag
Please [edit] your question and copy&paste the output **as text** instead of showing a screenshot. Please also tell us what instructions you followed or even better add a link to the instructions. Maybe you have to use a specific fortran compiler? Which version of `gfortran` do you use? Try `gfortran --version`
Knud Larsen avatar
by flag
The required `{gfortran libnetcdff-dev libnetcdf-dev libopenmpi-dev}` matches RegCM -4.7.1 ... -4.9.5 with Ubuntu 18.04 and 20.04 . Your errors indicate Ubuntu 21.04 : The libraries don't match RegCM.
N0rbert avatar
zw flag
@Fafa what is your Ubuntu version?
Fafa avatar
in flag
I am using Ubuntu 21.04 please
Fafa avatar
in flag
@KnudLarsen would you please suggest that I change my Ubuntu version or are there other fortran versions that I can try with Ubuntu 21.04?
Score:1
by flag

Ubuntu 21.04, RegCM4

RegCM can be built with {gcc-9, g++-9, gfortran-9}.

sudo apt install gcc-9 g++-9 gfortran-9 libnetcdff-dev libnetcdf-dev libopenmpi-dev

cd RegCM-4.7.1/
bash bootstrap.sh
export CC=gcc-9 CXX=g++-9 FC=gfortran-9
./configure
 make                        ## no errors

        
Fafa avatar
in flag
Thank you very much @Knud and everyone else, the code was perfect. I have been able to install RegCM successfully. Thank you once again
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.