Error while preparing emission files for CMAQ

Dear @tlspero , @lizadams, @bbaek, @hogrefe.christian, @cgnolte, @wong.david-c @gc13141112

I got this error while preparing emission files for CMAQ. I am using gfortran and openmpi with netdcf-4.1.3. Below is this error message:

“SFILE” opened as OLD:READ-ONLY
File name “/home/catalyst/Desktop/Build_WRF/LIBRARIES/meic12/projected/combined_anth2/egts_meic_anthropogenic.20160131.ncf”
File type GRDDED3
Execution ID “???”
Grid name “36km”
Dimensions: 79 rows, 95 cols, 7 lays, 45 vbles
NetCDF ID: 65536 opened as READONLY
Starting date and time 2016031:000000 (0:00:00 Jan. 31, 2016)
Timestep 010000 (1:00:00 hh:mm:ss)
Maximum current record number 25
new species find from file 2
nvars is 57
variables name isPMFINE PMFINE
new species find from file 2
nvars is 58
variables name isSULF SULF
Record 1 of file 2
free(): invalid next size (normal)
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source

Stack trace terminated abnormally.

Kindly help me out please.

Catalyst

What program are you running? Is this SMOKE? If so, which subprogram?

Dear @cgnolte

It is not SMOKE. I am trying to combine my emission files using a script and a combine subprogram.

Thanks for your response. Hope you can assist me in resolving this error.

Catalyst

What script? And are you using the COMBINE program created by EPA, or did you write your own? You will need to post more details.
What version of gfortran are you using? If it is old, get a newer version.
Assuming you are using the EPA COMBINE program, recompile the COMBINE program in debug mode. (Uncomment set MakeFileOnly in bldit_combine.csh, execute that script, then cd to the BLD directory and type “make DEBUG=TRUE”).
Rerun. What is the error message then?

@fliu @cjcoats @lizadams @gc13141112 @wong.david-c Can you help me on this error, please?

new species find from file 2
nvars is 57
variables name isPMFINE PMFINE
new species find from file 2
nvars is 58
variables name isSULF SULF
Record 1 of file 2
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
combine_all 0000000000454E99 Unknown Unknown Unknown
combine_all 0000000000457F66 Unknown Unknown Unknown
combine_all 000000000045FB40 Unknown Unknown Unknown
combine_all 0000000000461C75 Unknown Unknown Unknown
combine_all 00000000004627B0 Unknown Unknown Unknown
combine_all 000000000045109F Unknown Unknown Unknown
combine_all 0000000000451430 Unknown Unknown Unknown
combine_all 0000000000446DAA Unknown Unknown Unknown
combine_all 000000000043F9BD rdvars_ 215 rdvars.F
combine_all 0000000000432FE3 rdgrdded_ 107 rdgrdded.f
combine_all 00000000004105AC read3_ 305 read3.F
combine_all 000000000040403B Unknown Unknown Unknown
combine_all 00000000004034DC Unknown Unknown Unknown
libc.so.6 000014D7AF52FB97 Unknown Unknown Unknown
combine_all 00000000004033D9 Unknown Unknown Unknown
free(): invalid next size (normal)
./aero6.36km.meic.combine_all_ola.sh: line 18: 18404 Done cat <<EOF
${DIR}/eastasia.gridded.country_2016.36km.ncf
2
DIR1/egts_reas2_anthropogenic.{sdate}.ncf
DIR2/egts_meic_anthropogenic.{sdate}.ncf
DIR3/egts_meic16_reas2.36km.aero6.anth.{sdate}.ncf
EOF

 18405 Aborted                 (core dumped) | ./combine_all

Thanks in anticipation.

Catalyst
log_ola.txt (182.0 KB)

Dear @wong.david-c, @gc13141112

Kindly check your inbox, I have sent you a message.

Thanks and best regards,

Catalyst

Hi Catalyst,

I did not see any email from you.

Dear @wong.david-c,

Can you share your email with me? Kindly send it as a message.

Thanks

Catalyst

Hi Catalyst,

My email is wong.david-c@epa.gov

Dear @wong.david-c,

I’ve sent you an email. Kindly check it.

Thanks and regards,

Catalyst

According to the log file you posted, the segmentation fault occurred while reading (READ3) in data from one of the two input files. Probably it was due to the inconsistency of the array size intended to be read and data size available in the file. Please take a look at your combine_all program and make sure there is no array size issue.

When you combine (or merge) emission files, the same variable in various files should have the same unit. For example, if NO unit is mol/s in one file and Mgmol/grid in another file, you need to pre-process the second file to get mol/s emissions before combining.

Dear @dazhong.yin,
Thanks so much for your response.
Truly, the units of the variables in REAS2 files are mol/s (gas) and g/s (PMs) while that of the MEIC file is Mgmol/grid. I don’t know how to process the MEIC files to get the same units with REAS2 files.

Secondly, MEIC file has 7 layers while REAS2 file has only 1 layer. Could this also cause problem?

Furthermore, I don’t know how to check combine_all program as it’s a code and I am not the one that wrote it.

Thanks and best regards,

Catalyst

Dear @cjcoats, @wong.david-c, @dazhong.yin, @lizadams, @hogrefe.christian, @cgnolte

I got this error while running a combine program to process emission files.

./combine_all: symbol lookup error: ./combine_all: undefined symbol: for__pthread_mutex_unlock_ptr
./combine_all: symbol lookup error: ./combine_all: undefined symbol: for__pthread_mutex_unlock_ptr
./combine_all: symbol lookup error: ./combine_all: undefined symbol: for__pthread_mutex_unlock_ptr
./combine_all: symbol lookup error: ./combine_all: undefined symbol: for__pthread_mutex_unlock_ptr
./combine_all: symbol lookup error: ./combine_all: undefined symbol: for__pthread_mutex_unlock_ptr
./combine_all: symbol lookup error: ./combine_all: undefined symbol: for__pthread_mutex_unlock_ptr
./combine_all: symbol lookup error: ./combine_all: undefined symbol: for__pthread_mutex_unlock_ptr
./combine_all: symbol lookup error: ./combine_all: undefined symbol: for__pthread_mutex_unlock_ptr
./combine_all: symbol lookup error: ./combine_all: undefined symbol: for__pthread_mutex_unlock_ptr
./combine_all: symbol lookup error: ./combine_all: undefined symbol: for__pthread_mutex_unlock_ptr
./combine_all: symbol lookup error: ./combine_all: undefined symbol: for__pthread_mutex_unlock_ptr
./combine_all: symbol lookup error: ./combine_all: undefined symbol: for__pthread_mutex_unlock_ptr
./combine_all: symbol lookup error: ./combine_all: undefined symbol: for__pthread_mutex_unlock_ptr
./combine_all: symbol lookup error: ./combine_all: undefined symbol: for__pthread_mutex_unlock_ptr
./combine_all: symbol lookup error: ./combine_all: undefined symbol: for__pthread_mutex_unlock_ptr
./combine_all: symbol lookup error: ./combine_all: undefined symbol: for__pthread_mutex_unlock_ptr
./combine_all: symbol lookup error: ./combine_all: undefined symbol: for__pthread_mutex_unlock_ptr
./combine_all: symbol lookup error: ./combine_all: undefined symbol: for__pthread_mutex_unlock_ptr
./combine_all: symbol lookup error: ./combine_all: undefined symbol: for__pthread_mutex_unlock_ptr
./combine_all: symbol lookup error: ./combine_all: undefined symbol: for__pthread_mutex_unlock_ptr
./combine_all: symbol lookup error: ./combine_all: undefined symbol: for__pthread_mutex_unlock_ptr
./combine_all: symbol lookup error: ./combine_all: undefined symbol: for__pthread_mutex_unlock_ptr
./combine_all: symbol lookup error: ./combine_all: undefined symbol: for__pthread_mutex_unlock_ptr
./combine_all: symbol lookup error: ./combine_all: undefined symbol: for__pthread_mutex_unlock_ptr
./combine_all: symbol lookup error: ./combine_all: undefined symbol: for__pthread_mutex_unlock_ptr
./combine_all: symbol lookup error: ./combine_all: undefined symbol: for__pthread_mutex_unlock_ptr
./combine_all: symbol lookup error: ./combine_all: undefined symbol: for__pthread_mutex_unlock_ptr
./combine_all: symbol lookup error: ./combine_all: undefined symbol: for__pthread_mutex_unlock_ptr
./combine_all: symbol lookup error: ./combine_all: undefined symbol: for__pthread_mutex_unlock_ptr
./combine_all: symbol lookup error: ./combine_all: undefined symbol: for__pthread_mutex_unlock_ptr
./combine_all: symbol lookup error: ./combine_all: undefined symbol: for__pthread_mutex_unlock_ptr

Kindly help me out.
Thanks

Catalyst

Hi Catalyst,

It is missing pthread library. Combining data is kind of a light job so you don’t need to take advantage of threads. Hence I suggest to remove anything related to thread in your built process.

Dear @wong.david-c, @dazhong.yin, @cgnolte, @cjcoats,

I have resolved this error and the combine program has worked perfectly.

I sincerely appreciate your suggestions so far.

Thanks and kind regards.

Catalyst