Compiling MPAS 7.0 init_atmosphere

Discussions related to downloading and compiling MPAS-Atmosphere.
Post Reply
chris_riedel
Posts: 4
Joined: Thu Nov 08, 2018 10:50 pm

Compiling MPAS 7.0 init_atmosphere

Post by chris_riedel » Thu Aug 22, 2019 2:57 pm

Hello,

I am trying to compile the newest version of MPAS 7.0. When I try to compile the init_atmosphere (make gfortran CORE=init_atmosphere) I get the following errors....

mpas_init_atm_static.F:288.20:

rarray_ptr = c_loc(rarray)
1
Error: Argument 'rarray' to 'c_loc' at (1) must be an associated scalar POINTER
mpas_init_atm_static.F:402.20:

rarray_ptr = c_loc(rarray)
1
Error: Argument 'rarray' to 'c_loc' at (1) must be an associated scalar POINTER
mpas_init_atm_static.F:490.20:

rarray_ptr = c_loc(rarray)
1
Error: Argument 'rarray' to 'c_loc' at (1) must be an associated scalar POINTER
mpas_init_atm_static.F:605.20:

rarray_ptr = c_loc(rarray)
1
Error: Argument 'rarray' to 'c_loc' at (1) must be an associated scalar POINTER
mpas_init_atm_static.F:692.23:

rarray_ptr = c_loc(rarray)
1
Error: Argument 'rarray' to 'c_loc' at (1) must be an associated scalar POINTER
mpas_init_atm_static.F:789.23:

rarray_ptr = c_loc(rarray)
1
Error: Argument 'rarray' to 'c_loc' at (1) must be an associated scalar POINTER
mpas_init_atm_static.F:886.23:

rarray_ptr = c_loc(rarray)
1
Error: Argument 'rarray' to 'c_loc' at (1) must be an associated scalar POINTER
mpas_init_atm_static.F:985.23:

rarray_ptr = c_loc(rarray)
1
Error: Argument 'rarray' to 'c_loc' at (1) must be an associated scalar POINTER
mpas_init_atm_static.F:1082.23:

rarray_ptr = c_loc(rarray)
1
Error: Argument 'rarray' to 'c_loc' at (1) must be an associated scalar POINTER
mpas_init_atm_static.F:1185.23:

rarray_ptr = c_loc(rarray)

I have not updated any of my compilers or libs. I am trying to compile MPAS with the following compilers and libs...

gfortran/gcc 4.8
PIO 1.7
Any thoughts on what could be causing these errors??

Chris Riedel

mcurry
Posts: 47
Joined: Mon Oct 29, 2018 5:33 pm
Location: Boulder, Co

Re: Compiling MPAS 7.0 init_atmosphere

Post by mcurry » Thu Aug 22, 2019 6:27 pm

Hi Chris,

Its most likely do to your version of gcc. MPAS 7.0 updated some of the way we handled calling C code via the Fortran 2003 ISO_C_BINDING module and it appears that 4.8 contained a bug within the C_LOC function (see GCC Bug #50269). GCC 4.X looks like it contained most of Fortran 2003's standards, but it still looks like it contained a few bugs.

We recommend installing a newer version of GCC and using that. Any version of GCC 8 would work well. That's what we use here and its been thoroughly tested. We also know that GCC 5.3 works well.
NCAR|MMM

Post Reply

Return to “Compilation / installation”