# ERROR while runing MEGAN v3.1 TXT2IOAPI

**URL:** <https://forum.cmascenter.org/t/error-while-runing-megan-v3-1-txt2ioapi/1887>\
**Category:** MEGAN\
**Created:** [November 5, 2020, 1:07pm UTC](https://forum.cmascenter.org/t/error-while-runing-megan-v3-1-txt2ioapi/1887 "2020-11-05T13:07:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ionnie](https://avatars.discourse-cdn.com/v4/letter/i/779978/32.png) [@ionnie](https://forum.cmascenter.org/u/ionnie)\
**Post date:** [November 5, 2020, 1:07pm UTC](https://forum.cmascenter.org/t/error-while-runing-megan-v3-1-txt2ioapi/1887/1 "2020-11-05T13:07:25Z")

</div>

Dear all,

I failed running the TXT2IOAPI in MEGAN v3.1. Some garbled characters showed up while it reading the CT3.tceq\_12km.csv file like:

#####################################################  
ERROR: Overflow prevented while parsing line PARSLINE  
First 200 characters of line contents are:  
84420,452,165,0,垱@࿮\>HP󂴨ԁmĖ@M?429,461,165,0,0,0,0,0,0  
##########################################################

But I found nothing special while opening the csv file using EXCEL or Notepad++ or any editor else.  
 ![捕获](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/1X/eee2d8cd8809d0f3af29af63b145642affa3f243.png)

I need your help, sincerely!

(PS: If anyone wondering why there isn’t a cantype.f90 file in the preprocessor code, note that the prepmegan4cmaq.cantype.f90 file isn’t in the preprocessor code published on the MEGAN official site, I sent an email to the software author and he gave me one.)

ERROR message below:  
#############################################  
File “CTTXTF” opened for input on unit: 99  
/lustre/home/acct-esehazenet/hazenet-ug1/MEGAN31/MEGAN31\_Calc\_Code\_191022/Input/MAP/CT3.tceq\_12km.csv

READ Needleaf tree  
READ Tropical tree  
READ Broadleaf tree  
READ Shrub  
READ Herbaceous  
READ Crop

```
 >>--->> WARNING in subroutine STR2REAL
 Error reading REAL from "2.51躙?J{~7"; IOSTAT= 64
 
 
 >>--->> WARNING in subroutine STR2INT
 No digits in "񺵲7 "
 
 
 >>--->> WARNING in subroutine STR2REAL
 Error reading REAL from "9.2166"; IOSTAT= 64
 
 ERROR: Overflow prevented while parsing line PARSLINE
 First 200 characters of line contents are:
 84420,452,165,0,垱@࿮>HP󂴨ԁmĖ@M?429,461,165,0,0,0,0,0,0
 
 *** ERROR ABORT in subroutine PARSLINE
 Formatting problem.

```

\*\*\* Error in `/lustre/home/acct-esehazenet/hazenet-ug1/MEGAN31/MEGAN31\_Calc\_Code\_191022/src/TXT2IOAPI/txt2ioapi’: double free or corruption (out): 0x0000000001bc5080 \*\*\*  
======= Backtrace: =========  
/lib64/libc.so.6(+0x81679)[0x2ae903a24679]  
/lustre/home/acct-esehazenet/hazenet-ug1/MEGAN31/MEGAN31\_Calc\_Code\_191022/src/TXT2IOAPI/txt2ioapi(for\_\_free\_vm+0x2f)[0x490a1f]  
/lustre/home/acct-esehazenet/hazenet-ug1/MEGAN31/MEGAN31\_Calc\_Code\_191022/src/TXT2IOAPI/txt2ioapi(for\_\_close\_proc+0x4ae)[0x45290e]  
/lustre/home/acct-esehazenet/hazenet-ug1/MEGAN31/MEGAN31\_Calc\_Code\_191022/src/TXT2IOAPI/txt2ioapi(for\_close+0x2a4)[0x451e84]  
/lustre/home/acct-esehazenet/hazenet-ug1/MEGAN31/MEGAN31\_Calc\_Code\_191022/src/TXT2IOAPI/txt2ioapi[0x41d0c7]  
/lustre/home/acct-esehazenet/hazenet-ug1/MEGAN31/MEGAN31\_Calc\_Code\_191022/src/TXT2IOAPI/txt2ioapi[0x40b8be]  
/lustre/home/acct-esehazenet/hazenet-ug1/MEGAN31/MEGAN31\_Calc\_Code\_191022/src/TXT2IOAPI/txt2ioapi[0x40d343]  
/lustre/home/acct-esehazenet/hazenet-ug1/MEGAN31/MEGAN31\_Calc\_Code\_191022/src/TXT2IOAPI/txt2ioapi[0x417bf5]  
/lustre/home/acct-esehazenet/hazenet-ug1/MEGAN31/MEGAN31\_Calc\_Code\_191022/src/TXT2IOAPI/txt2ioapi[0x40b1a2]  
/lib64/libc.so.6(\_\_libc\_start\_main+0xf5)[0x2ae9039c5505]  
/lustre/home/acct-esehazenet/hazenet-ug1/MEGAN31/MEGAN31\_Calc\_Code\_191022/src/TXT2IOAPI/txt2ioapi[0x40b0a9]  
======= Memory map: ========  
00400000-00557000 r-xp 00000000 f68:c34b6 144117188641441759 /lustre/home/acct-esehazenet/hazenet-ug1/MEGAN31/MEGAN31\_Calc\_Code\_191022/src/TXT2IOAPI/txt2ioapi  
00757000-00758000 r–p 00157000 f68:c34b6 144117188641441759 /lustre/home/acct-esehazenet/hazenet-ug1/MEGAN31/MEGAN31\_Calc\_Code\_191022/src/TXT2IOAPI/txt2ioapi  
00758000-00ae9000 rw-p 00158000 f68:c34b6 144117188641441759 /lustre/home/acct-esehazenet/hazenet-ug1/MEGAN31/MEGAN31\_Calc\_Code\_191022/src/TXT2IOAPI/txt2ioapi  
00ae9000-0115e000 rw-p 00000000 00:00 0  
01aa4000-01be6000 rw-p 00000000 00:00 0 [heap]  
2ae90271a000-2ae90273c000 r-xp 00000000 08:06 1455 /usr/lib64/ld-2.17.so  
2ae90273c000-2ae902740000 rw-p 00000000 00:00 0  
2ae902750000-2ae9027c7000 rw-p 00000000 00:00 0  
2ae90293b000-2ae90293c000 r–p 00021000 08:06 1455 /usr/lib64/ld-2.17.so  
2ae90293c000-2ae90293d000 rw-p 00022000 08:06 1455 /usr/lib64/ld-2.17.so  
2ae90293d000-2ae90293e000 rw-p 00000000 00:00 0  
2ae90293e000-2ae902aad000 r-xp 00000000 f68:c34b6 144116920457681448 /lustre/home/acct-esehazenet/hazenet-ug1/lib-icc/netcdf/lib/libnetcdf.so.15.2.1  
2ae902aad000-2ae902cac000 —p 0016f000 f68:c34b6 144116920457681448 /lustre/home/acct-esehazenet/hazenet-ug1/lib-icc/netcdf/lib/libnetcdf.so.15.2.1  
2ae902cac000-2ae902cae000 r–p 0016e000 f68:c34b6 144116920457681448 /lustre/home/acct-esehazenet/hazenet-ug1/lib-icc/netcdf/lib/libnetcdf.so.15.2.1  
2ae902cae000-2ae902cb5000 rw-p 00170000 f68:c34b6 144116920457681448 /lustre/home/acct-esehazenet/hazenet-ug1/lib-icc/netcdf/lib/libnetcdf.so.15.2.1  
2ae902cb5000-2ae902cb8000 rw-p 00000000 00:00 0  
2ae902cb8000-2ae902ea4000 r-xp 00000000 f68:c34b6 144116920457684328 /lustre/home/acct-esehazenet/hazenet-ug1/lib-icc/netcdf/lib/libnetcdff.so.7.0.0  
2ae902ea4000-2ae9030a3000 —p 001ec000 f68:c34b6 144116920457684328 /lustre/home/acct-esehazenet/hazenet-ug1/lib-icc/netcdf/lib/libnetcdff.so.7.0.0  
2ae9030a3000-2ae9030a4000 r–p 001eb000 f68:c34b6 144116920457684328 /lustre/home/acct-esehazenet/hazenet-ug1/lib-icc/netcdf/lib/libnetcdff.so.7.0.0  
2ae9030a4000-2ae9030a8000 rw-p 001ec000 f68:c34b6 144116920457684328 /lustre/home/acct-esehazenet/hazenet-ug1/lib-icc/netcdf/lib/libnetcdff.so.7.0.0  
2ae9030a8000-2ae903281000 rw-p 00000000 00:00 0  
2ae903281000-2ae903382000 r-xp 00000000 08:06 1470 /usr/lib64/libm-2.17.so  
2ae903382000-2ae903581000 —p 00101000 08:06 1470 /usr/lib64/libm-2.17.so  
2ae903581000-2ae903582000 r–p 00100000 08:06 1470 /usr/lib64/libm-2.17.so  
2ae903582000-2ae903583000 rw-p 00101000 08:06 1470 /usr/lib64/libm-2.17.so  
2ae903583000-2ae90359a000 r-xp 00000000 08:06 1488 /usr/lib64/libpthread-2.17.so  
2ae90359a000-2ae903799000 —p 00017000 08:06 1488 /usr/lib64/libpthread-2.17.so  
2ae903799000-2ae90379a000 r–p 00016000 08:06 1488 /usr/lib64/libpthread-2.17.so  
2ae90379a000-2ae90379b000 rw-p 00017000 08:06 1488 /usr/lib64/libpthread-2.17.so  
2ae90379b000-2ae90379f000 rw-p 00000000 00:00 0  
2ae90379f000-2ae9037a1000 r-xp 00000000 08:06 1468 /usr/lib64/libdl-2.17.so  
2ae9037a1000-2ae9039a1000 —p 00002000 08:06 1468 /usr/lib64/libdl-2.17.so  
2ae9039a1000-2ae9039a2000 r–p 00002000 08:06 1468 /usr/lib64/libdl-2.17.so  
2ae9039a2000-2ae9039a3000 rw-p 00003000 08:06 1468 /usr/lib64/libdl-2.17.so  
2ae9039a3000-2ae903b66000 r-xp 00000000 08:06 1462 /usr/lib64/libc-2.17.so  
2ae903b66000-2ae903d66000 —p 001c3000 08:06 1462 /usr/lib64/libc-2.17.so  
2ae903d66000-2ae903d6a000 r–p 001c3000 08:06 1462 /usr/lib64/libc-2.17.so  
2ae903d6a000-2ae903d6c000 rw-p 001c7000 08:06 1462 /usr/lib64/libc-2.17.so  
2ae903d6c000-2ae903d71000 rw-p 00000000 00:00 0  
2ae903d71000-2ae903d86000 r-xp 00000000 08:06 86 /usr/lib64/libgcc\_s-4.8.5-20150702.so.1  
2ae903d86000-2ae903f85000 —p 00015000 08:06 86 /usr/lib64/libgcc\_s-4.8.5-20150702.so.1  
2ae903f85000-2ae903f86000 r–p 00014000 08:06 86 /usr/lib64/libgcc\_s-4.8.5-20150702.so.1  
2ae903f86000-2ae903f87000 rw-p 00015000 08:06 86 /usr/lib64/libgcc\_s-4.8.5-20150702.so.1  
2ae903f87000-2ae903fa8000 r-xp 00000000 f68:c34b6 144116920457679719 /lustre/home/acct-esehazenet/hazenet-ug1/lib-icc/hdf5-1.10.4/lib/libhdf5\_hl.so.100.1.1Abort  
########################################

---

<div class="post-metadata">

**Author:** ![mazzeoa](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@mazzeoa](https://forum.cmascenter.org/u/mazzeoa)\
**Post date:** [November 18, 2020, 5:37pm UTC](https://forum.cmascenter.org/t/error-while-runing-megan-v3-1-txt2ioapi/1887/2 "2020-11-18T17:37:11Z")

</div>

Dear Ionne I’m encountering the same problem relative to prepmegan4cmaq\_cantype not present in the download codes. I sent a message to the contact found on the website (shengting.cui@wsu.edu) but I haven’t received any answer. Could you please share the script or give me another mail address?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![ionnie](https://avatars.discourse-cdn.com/v4/letter/i/779978/32.png) [@ionnie](https://forum.cmascenter.org/u/ionnie)\
**Post date:** [December 4, 2020, 2:02am UTC](https://forum.cmascenter.org/t/error-while-runing-megan-v3-1-txt2ioapi/1887/3 "2020-12-04T02:02:24Z")

</div>

Dear mazzeoa, sorry for my replying so late, here is the cantype file received from Prof. Alex (the author). Don’t forget to modify the suffix from .txt to .f90  
[prepmegan4cmaq\_cantype.txt](https://forum.cmascenter.org/uploads/short-url/sXsrsBaoNEwQMIAhzidOBzNcDfr.txt) (37.7 KB)

---

<div class="post-metadata">

**Author:** ![Starry](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@Starry](https://forum.cmascenter.org/u/Starry)\
**Post date:** [November 16, 2023, 9:13am UTC](https://forum.cmascenter.org/t/error-while-runing-megan-v3-1-txt2ioapi/1887/4 "2023-11-16T09:13:37Z")

</div>

Dear ionnie  
Do you have input files for MEGAN3.1 preprocessor? I don’t have access to these file but I really need them. Thank you.

---

<div class="post-metadata">

**Author:** ![Zhu](https://avatars.discourse-cdn.com/v4/letter/z/8dc957/32.png) [@Zhu](https://forum.cmascenter.org/u/Zhu)\
**Post date:** [June 26, 2024, 3:03am UTC](https://forum.cmascenter.org/t/error-while-runing-megan-v3-1-txt2ioapi/1887/5 "2024-06-26T03:03:38Z")

</div>

Hi ionnie, I have the same problem, have you solved it?
