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

zhangtq

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:
1686724029247.png
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
1686724182150.png
1686724207004.png
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。
1686724476624.png
And then we realized that the program was still stuck in here:
1686724635035.png
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:
1686724829253.png
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~

147,150c147,150

< "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" \

803c803

< AUTOCLEAN="true" \

---

> AUTOCLEAN="$(AUTOCLEAN)" \

diff mpas_atm_advection.F mpas_atm_advection.F~

585,586d584

< integer :: info

<

607c605,607

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

---

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

>

> b = matmul(atha_inv,ath)

609,614d608

< ! 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
1686725206769.png
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!!
 

Attachments

  • 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:
Top