geoschem / geos-chem

GEOS-Chem "Science Codebase" repository. Contains GEOS-Chem science routines, run directory generation scripts, and interface code. This repository is used as a submodule within the GCClassic and GCHP wrappers, as well as in other modeling contexts (external ESMs).
http://geos-chem.org
Other
166 stars 157 forks source link

Question about: Program received signal SIGSEGV: Segmentation fault - invalid memory reference. #2418

Open chakarx opened 1 month ago

chakarx commented 1 month ago

Your name

Xia J

Your affiliation

Nanjing University of Information Science and Technology

Please provide a clear and concise description of your question or discussion topic.

I am conducting a simulation of mercury with a resolution of 2x2.5 degrees. After submitting the job to the server node, I encountered an error as shown in the image below. My GC.log, input.geos, HEMCO_Config.rc, and HISTORY.rc files are located in the directories below. Could you please help me identify where the problem might be?

a1617116a04f4cd5bab7e1baf7a9c25

GC.log

input.geos.txt

HISTORY.rc.txt

HEMCO_Config.rc.txt

yantosca commented 1 month ago

Thanks for writing @chakarx. We have some documentation about segmentation fault errors on ReadTheDocs:

It could be that you haven't specified enough memory for the job to run in your queue. It also looks like there is something going on in dictionary_m.F90, which is module used for quick lookups in the species database code.

Which version and compiler are you using?

chakarx commented 1 month ago

Thanks for writing @chakarx. We have some documentation about segmentation fault errors on ReadTheDocs:

It could be that you haven't specified enough memory for the job to run in your queue. It also looks like there is something going on in dictionary_m.F90, which is module used for quick lookups in the species database code.

Which version and compiler are you using?

Thank you for your response. I have checked, and my job does have enough memory. And I'm using GCC version 9.3.0.

yantosca commented 1 month ago

@chakarx: It looks like the run dumped a core file. You can try

$gdb gcclassic core.12345`

(replace 12345 with the numbers in the file name on your system), and then in gdb type:

(gdb) where

That should give you the line number where the code failed. You can then use e.g.

(gdb) print i, j, l

etc. to print out the values of variables in the routine that stopped. That might give you a clue as to where the code died.