METGRID.EXE **glibc detected**

Having problems running the WRF Preprocessing Sysmte (WPS)?

METGRID.EXE **glibc detected**

Postby gerafisic » Tue Feb 28, 2012 6:28 pm

Hello all,
I have a problem with running metgrid.exe, On the terminal, I get:

Processing domain 1 of 2
Processing 2009-10-01_00
FILE
*** glibc detected *** ./metgrid.exe: double free or corruption (out): 0x00007fffd9841990 ***
======= Backtrace: =========
/lib64/libc.so.6[0x3bb4c750c6]
./metgrid.exe[0x5dd65c]
./metgrid.exe[0x482438]
./metgrid.exe[0x45860f]
./metgrid.exe[0x454192]
./metgrid.exe[0x40c51d]
./metgrid.exe[0x404aec]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x3bb4c1ecdd]
./metgrid.exe[0x4049e9]
======= Memory map: ========
00400000-007a4000 r-xp 00000000 fd:02 115084352 /home/gjacome/WPS/metgrid/src/metgrid.exe
009a3000-009ae000 rw-p 003a3000 fd:02 115084352 /home/gjacome/WPS/metgrid/src/metgrid.exe
009ae000-01ffe000 rw-p 00000000 00:00 0
03405000-04a57000 rw-p 00000000 00:00 0 [heap]
3bb4400000-3bb4420000 r-xp 00000000 fd:00 923620 /lib64/ld-2.12.so
3bb461f000-3bb4620000 r--p 0001f000 fd:00 923620 /lib64/ld-2.12.so
3bb4620000-3bb4621000 rw-p 00020000 fd:00 923620 /lib64/ld-2.12.so
3bb4621000-3bb4622000 rw-p 00000000 00:00 0
3bb4c00000-3bb4d97000 r-xp 00000000 fd:00 923621 /lib64/libc-2.12.so
3bb4d97000-3bb4f97000 ---p 00197000 fd:00 923621 /lib64/libc-2.12.so
3bb4f97000-3bb4f9b000 r--p 00197000 fd:00 923621 /lib64/libc-2.12.so
3bb4f9b000-3bb4f9c000 rw-p 0019b000 fd:00 923621 /lib64/libc-2.12.so
3bb4f9c000-3bb4fa1000 rw-p 00000000 00:00 0
3bb5000000-3bb5083000 r-xp 00000000 fd:00 923625 /lib64/libm-2.12.so
3bb5083000-3bb5282000 ---p 00083000 fd:00 923625 /lib64/libm-2.12.so
3bb5282000-3bb5283000 r--p 00082000 fd:00 923625 /lib64/libm-2.12.so
3bb5283000-3bb5284000 rw-p 00083000 fd:00 923625 /lib64/libm-2.12.so
3bb5400000-3bb5417000 r-xp 00000000 fd:00 923623 /lib64/libpthread-2.12.so
3bb5417000-3bb5616000 ---p 00017000 fd:00 923623 /lib64/libpthread-2.12.so
3bb5616000-3bb5617000 r--p 00016000 fd:00 923623 /lib64/libpthread-2.12.so
3bb5617000-3bb5618000 rw-p 00017000 fd:00 923623 /lib64/libpthread-2.12.so
3bb5618000-3bb561c000 rw-p 00000000 00:00 0
3bb5800000-3bb5802000 r-xp 00000000 fd:00 923624 /lib64/libdl-2.12.so
3bb5802000-3bb5a02000 ---p 00002000 fd:00 923624 /lib64/libdl-2.12.so
3bb5a02000-3bb5a03000 r--p 00002000 fd:00 923624 /lib64/libdl-2.12.so
3bb5a03000-3bb5a04000 rw-p 00003000 fd:00 923624 /lib64/libdl-2.12.so
3bb6000000-3bb6007000 r-xp 00000000 fd:00 923637 /lib64/librt-2.12.so
3bb6007000-3bb6206000 ---p 00007000 fd:00 923637 /lib64/librt-2.12.so
3bb6206000-3bb6207000 r--p 00006000 fd:00 923637 /lib64/librt-2.12.so
3bb6207000-3bb6208000 rw-p 00007000 fd:00 923637 /lib64/librt-2.12.so
3bbf400000-3bbf416000 r-xp 00000000 fd:00 923657 /lib64/libgcc_s-4.4.6-20110824.so.1
3bbf416000-3bbf615000 ---p 00016000 fd:00 923657 /lib64/libgcc_s-4.4.6-20110824.so.1
3bbf615000-3bbf616000 rw-p 00015000 fd:00 923657 /lib64/libgcc_s-4.4.6-20110824.so.1
2b04f9398000-2b04f939a000 rw-p 00000000 00:00 0
2b04f93af000-2b04f93b3000 rw-p 00000000 00:00 0
2b04f93b3000-2b04f93bf000 r-xp 00000000 fd:00 917534 /lib64/libnss_files-2.12.so
2b04f93bf000-2b04f95bf000 ---p 0000c000 fd:00 917534 /lib64/libnss_files-2.12.so
2b04f95bf000-2b04f95c0000 r--p 0000c000 fd:00 917534 /lib64/libnss_files-2.12.so
2b04f95c0000-2b04f95c1000 rw-p 0000d000 fd:00 917534 /lib64/libnss_files-2.12.so
2b04f95c1000-2b04f95c2000 rw-p 00000000 00:00 0
2b04fa64b000-2b04fa777000 rw-p 00000000 00:00 0
7fffd9801000-7fffd9845000 rw-p 00000000 00:00 0 [stack]
7fffd993e000-7fffd993f000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
Aborted (core dumped)

Any ideas what might be wrong?
gerafisic
 
Posts: 3
Joined: Thu Feb 17, 2011 11:10 am

Re: METGRID.EXE **glibc detected**

Postby lnguyen » Thu Mar 29, 2012 10:06 am

Hello,

I met the same problem. The problem comes from metgrid Fortran in the file process_domain_module.F.
Two pointers are declared at line 645:

Code: Select all
      integer, pointer, dimension(:) :: u_levels, v_levels


and are using as argument for the subroutine storage_get_levels at line 992. In this subroutine, you have this line 733:

Code: Select all
if (associated(list)) deallocate(list)


The problem is the state of the pointer "list" or "u_levels" is is undefined. The function associated can return true or false (It is from Fortran90 specifications). With Intel Compilers 11.x, associated(list) returns true but with 12.x version, it returns false. Then, a double deallocation/free happens like your error message.

The solution is to nullify the pointers before calling the subroutine. I modified the line 645 from process_domain_module.F like that:

Code: Select all
 integer, pointer, dimension(:) :: u_levels => NULL(), v_levels => NULL()


And it is OK for me now.

Otherwise, you can use another compiler.
lnguyen
 
Posts: 7
Joined: Thu Jul 22, 2010 11:41 am

Re: METGRID.EXE **glibc detected**

Postby chandans » Mon Apr 02, 2012 9:36 am

i am also getting similar problem.
i also tried to use the solution mentioned here but didn't work for me.can anybody help.



-bash-3.2$ ./metgrid.exe
Processing domain 1 of 1
Processing 2005-08-28_00
FILE
*** glibc detected *** ./metgrid.exe: double free or corruption (!prev): 0x000000000a9e41f0 ***
======= Backtrace: =========
/lib64/libc.so.6[0x35e88722ef]
/lib64/libc.so.6(cfree+0x4b)[0x35e887273b]
./metgrid.exe[0x58d5dc]
./metgrid.exe[0x484aca]
./metgrid.exe[0x457650]
./metgrid.exe[0x453bd4]
./metgrid.exe[0x40bcc1]
./metgrid.exe[0x4042fc]
/lib64/libc.so.6(__libc_start_main+0xf4)[0x35e881d994]
./metgrid.exe[0x404209]
======= Memory map: ========
00400000-006b2000 r-xp 00000000 b5:84fa2 144380553704028298 /home/chandans/WPS/metgrid/src/metgrid.exe
008b1000-008bb000 rw-p 002b1000 b5:84fa2 144380553704028298 /home/chandans/WPS/metgrid/src/metgrid.exe
008bb000-01ee7000 rw-p 008bb000 00:00 0
0a12f000-0ad66000 rw-p 0a12f000 00:00 0 [heap]
35e7800000-35e781c000 r-xp 00000000 68:03 327658 /lib64/ld-2.5.so
35e7a1b000-35e7a1c000 r--p 0001b000 68:03 327658 /lib64/ld-2.5.so
35e7a1c000-35e7a1d000 rw-p 0001c000 68:03 327658 /lib64/ld-2.5.so
35e8000000-35e8007000 r-xp 00000000 68:03 327661 /lib64/librt-2.5.so
35e8007000-35e8207000 ---p 00007000 68:03 327661 /lib64/librt-2.5.so
35e8207000-35e8208000 r--p 00007000 68:03 327661 /lib64/librt-2.5.so
35e8208000-35e8209000 rw-p 00008000 68:03 327661 /lib64/librt-2.5.so
35e8800000-35e894d000 r-xp 00000000 68:03 327659 /lib64/libc-2.5.so
35e894d000-35e8b4d000 ---p 0014d000 68:03 327659 /lib64/libc-2.5.so
35e8b4d000-35e8b51000 r--p 0014d000 68:03 327659 /lib64/libc-2.5.so
35e8b51000-35e8b52000 rw-p 00151000 68:03 327659 /lib64/libc-2.5.so
35e8b52000-35e8b57000 rw-p 35e8b52000 00:00 0
35e8c00000-35e8c02000 r-xp 00000000 68:03 327665 /lib64/libdl-2.5.so
35e8c02000-35e8e02000 ---p 00002000 68:03 327665 /lib64/libdl-2.5.so
35e8e02000-35e8e03000 r--p 00002000 68:03 327665 /lib64/libdl-2.5.so
35e8e03000-35e8e04000 rw-p 00003000 68:03 327665 /lib64/libdl-2.5.so
35e9000000-35e9082000 r-xp 00000000 68:03 327667 /lib64/libm-2.5.so
35e9082000-35e9281000 ---p 00082000 68:03 327667 /lib64/libm-2.5.so
35e9281000-35e9282000 r--p 00081000 68:03 327667 /lib64/libm-2.5.so
35e9282000-35e9283000 rw-p 00082000 68:03 327667 /lib64/libm-2.5.so
35e9400000-35e9416000 r-xp 00000000 68:03 327660 /lib64/libpthread-2.5.so
35e9416000-35e9615000 ---p 00016000 68:03 327660 /lib64/libpthread-2.5.so
35e9615000-35e9616000 r--p 00015000 68:03 327660 /lib64/libpthread-2.5.so
35e9616000-35e9617000 rw-p 00016000 68:03 327660 /lib64/libpthread-2.5.so
35e9617000-35e961b000 rw-p 35e9617000 00:00 0
35f1e00000-35f1e0d000 r-xp 00000000 68:03 327672 /lib64/libgcc_s-4.1.2-20080825.so.1
35f1e0d000-35f200d000 ---p 0000d000 68:03 327672 /lib64/libgcc_s-4.1.2-20080825.so.1
35f200d000-35f200e000 rw-p 0000d000 68:03 327672 /lib64/libgcc_s-4.1.2-20080825.so.1
2b16211bd000-2b16211be000 rw-p 2b16211bd000 00:00 0
2b16211d7000-2b16211d8000 rw-p 2b16211d7000 00:00 0
2b16211d8000-2b16214c1000 r-xp 00000000 00:19 243174826 /opt/software/intel_2011.0.084/impi/4.0.1.007/intel64/lib/libmpi.so.4.0
2b16214c1000-2b16215c1000 ---p 002e9000 00:19 243174826 /opt/software/intel_2011.0.084/impi/4.0.1.007/intel64/lib/libmpi.so.4.0
2b16215c1000-2b16215d8000 rw-p 002e9000 00:19 243174826 /opt/software/intel_2011.0.084/impi/4.0.1.007/intel64/lib/libmpi.so.4.0
2b16215d8000-2b1621618000 rw-p 2b16215d8000 00:00 0
2b1621618000-2b1621645000 r-xp 00000000 00:19 243174836 /opt/software/intel_2011.0.084/impi/4.0.1.007/intel64/lib/libmpigf.so.4.0
2b1621645000-2b1621744000 ---p 0002d000 00:19 243174836 /opt/software/intel_2011.0.084/impi/4.0.1.007/intel64/lib/libmpigf.so.4.0
2b1621744000-2b1621745000 rw-p 0002c000 00:19 243174836 /opt/software/intel_2011.0.084/impi/4.0.1.007/intel64/lib/libmpigf.so.4.0
2b1621745000-2b162214a000 rw-p 2b1621745000 00:00 0
2b16235d5000-2b1623672000 rw-p 2b16235d5000 00:00Aborted
chandans
 
Posts: 2
Joined: Sun Jan 15, 2012 3:38 am

Re: METGRID.EXE **glibc detected**

Postby iercs » Mon Apr 02, 2012 12:31 pm

Lnguyen, your post was extremely helpful to me - I would've never figured that out by myself. Without your help, I would have struggled for some time and eventually would have been forced to switch to a different Fortran compiler.

You saved me a lot of time - Thanks for that.
iercs
 
Posts: 2
Joined: Mon Apr 02, 2012 12:22 pm

Re: METGRID.EXE **glibc detected**

Postby slswift » Thu May 17, 2012 2:12 pm

Thank you lnguyen! I had the same problem running WPS v3.3 with the Intel v12 compilers. Geogrid and Ungrib ran fine, but Metgrid did not. Your NULL initialization patch fixed the problem for me.

Has this been submitted as a bug?

Thanks again,
Spencer
slswift
 
Posts: 2
Joined: Thu Feb 16, 2012 1:49 pm

Re: METGRID.EXE **glibc detected**

Postby dbozhinova » Mon Jun 25, 2012 7:51 am

I am encountering the same problem, I am compiling with 12.1.2 Intel compiler (before it was 11.x) and unfortunately the solution doesn't seem to work for me :( It is WPS 3.2.1

Error before changing the code in metgrid/src/process_domain_module.F

forrtl: severe (173): A pointer passed to DEALLOCATE points to an array that cannot be deallocated

I change the line (for me it is 638) in process_domain_module.F from
Code: Select all
integer, pointer, dimension(:) :: u_levels, v_levels

to
Code: Select all
integer, pointer, dimension(:) :: u_levels => NULL(), v_levels => NULL()


Now the error reported is:
Code: Select all
metgrid.exe(35198) malloc: *** error for object 0x7fff847ce8e0: Non-aligned pointer being freed (2)
*** set a breakpoint in malloc_error_break to debug
forrtl: severe (173): A pointer passed to DEALLOCATE points to an array that cannot be deallocated


I appreciate any help on this issue.
Denica Bozhinova,
PhD student, Meteorology and Air Quality,
WUR, The Netherlands
dbozhinova
 
Posts: 17
Joined: Wed Apr 14, 2010 6:04 am
Location: Wageningen, The Netherlands


Return to Runtime Problems

Who is online

Users browsing this forum: No registered users and 4 guests