make CORE=init_atmosphere ERROR

Discussions related to downloading and compiling MPAS-Atmosphere.
Post Reply
jzhyustc
Posts: 7
Joined: Tue Jul 02, 2019 6:30 pm

make CORE=init_atmosphere ERROR

Post by jzhyustc » Tue Jul 02, 2019 6:39 pm

When I try to compile init_atmosphere for MPAS, I got following error:
"
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
"

But compiling CORE=atmosphere is successful. Any help/thought/comment is appreciated! Thanks in advance.

mgduda
Posts: 362
Joined: Mon Feb 26, 2018 7:35 pm

Re: make CORE=init_atmosphere ERROR

Post by mgduda » Tue Jul 02, 2019 11:41 pm

Which compiler and compiler version are you using?
NCAR/MMM

jzhyustc
Posts: 7
Joined: Tue Jul 02, 2019 6:30 pm

Re: make CORE=init_atmosphere ERROR

Post by jzhyustc » Fri Aug 02, 2019 5:43 pm

Sorry for the late reply. I am using GCC v4. I just recently upgraded it to v6. Should I recompile everything including PIO, netCDF, etc, with the newer version of gfortran, or just the MPAS part? Thanks!

mgduda
Posts: 362
Joined: Mon Feb 26, 2018 7:35 pm

Re: make CORE=init_atmosphere ERROR

Post by mgduda » Fri Aug 02, 2019 6:00 pm

I think you'll need to recompile PIO, netCDF, etc. The MPAS Fortran code uses Fortran modules (*.mod files) from PIO, and the format of these .mod files is often specific to a particular compiler version. So, at a minimum you'll need to compile MPAS and PIO with the same compiler version, but the recompilation of PIO may require compiling parallel-netCDF and netCDF. The safe option would probably be to simply recompile all libraries.
NCAR/MMM

jzhyustc
Posts: 7
Joined: Tue Jul 02, 2019 6:30 pm

Re: make CORE=init_atmosphere ERROR

Post by jzhyustc » Wed Aug 07, 2019 7:52 pm

Thanks very much! Yes, you are right, I basically recompile every library, otherwise it will say *.mod is compiled from a different version of GNU Fortran. And finally I got the MPAS compiled successfully! Will see if I can run it successfully as well. Fingers crossed.

Post Reply

Return to “Compilation / installation”