Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

segmentation error when running 3km resolution but success in 10-km


New member
Hi ,everyone, I'm having a little trouble running init_atmosphere
I am running MPAS-A 7.3 using single precision with era5 data to generate INIT file , but faile because segmentation fault。Like this:
So, we print variable A in mpas_atm_advection.F, and found NAN and INFINITY, like this:
Our guess is that the data exceeded the upper limit of single precision
Then, we tried to use double precision to compile MPAS, and the error is also segmentation fault, like this:
the difference is that there is no NAN nor INFINITY。
And then we realized that the program was still stuck in here:
In the do loop, the if condition was not implemented even once, and the variable K is ilegal,
Every time this happens,PI=0. Like this:
By the way , Could we use lapack ,if there is only a "Ax=b"?
We made some changes in Makefile and mpas_atm_advection.F,Like this:
$ diff Makefile Makefile~


< "FFLAGS_OPT = -O3 -g3 -traceback -convert big_endian -free -align array64byte" \

< "CFLAGS_OPT = -O3 -g3 -traceback" \

< "CXXFLAGS_OPT = -O3 -g3 -traceback" \

< "LDFLAGS_OPT = -O3 -g3 -traceback -mkl=sequential" \


> "FFLAGS_OPT = -O3 -convert big_endian -free -align array64byte" \

> "CFLAGS_OPT = -O3" \

> "CXXFLAGS_OPT = -O3" \

> "LDFLAGS_OPT = -O3" \


< AUTOCLEAN="true" \



diff mpas_atm_advection.F mpas_atm_advection.F~


< integer :: info



< ! call migs(atha,n,atha_inv,indx)


> call migs(atha,n,atha_inv,indx)


> b = matmul(atha_inv,ath)


< ! b = matmul(atha_inv,ath)

< call dgesv(n, m, atha, n, indx, ath, n, info)

< b = ath

< if (info /= 0) then

< write(*,*) "dgesv info=",info

< endif

the segmentation fault was gone, but another error came: insufficient virtual memory
Everything worked fine for my previous 10km running

Here are my questions:
1. What should I to successfully run a 3km case test?
2. Is single-precision overflow unavoidable and can only be used in double precision?
3. Whether the way we modify the code and use the lapack solver is appropriate and will affect the final results?
4. What are the virtual memory requirements for the 3km case?

Thanks in advance for your help!!


  • namelist.init_atmosphere.txt
    1.3 KB · Views: 1
  • streams.init_atmosphere.txt
    969 bytes · Views: 0
  • log.init_atmosphere.0000.out.txt
    244.9 KB · Views: 2
Last edited: