Community
cancel
Showing results for 
Search instead for 
Did you mean: 
felipin85
Beginner
74 Views

Problems with execute my code

Hi everybody, I used Ubuntu 10.04 with 32 bit and I'm using Intel Fortran composer xe 2011. I don't understand a problem that I have with my code. When I compile my code with the command: ifort PRINCIPAL27112010.f90 -o PRINCIPAL27112010 and I don't problem, but when I complie using:

ifort -openmp -O3 -o PRINCIPAL27112010 -I$MKLINCLUDE -L$MKLPATH PRINCIPAL27112010.f90 -lmkl_lapack95 -Wl,--start-group $MKLPATH/libmkl_intel.a $MKLPATH/libmkl_intel_thread.a $MKLPATH/libmkl_core.a -Wl,--end-group -liomp5 -lpthread

I received the following error:


*** glibc detected *** ./PRINCIPAL27112010: munmap_chunk(): invalid pointer: 0x08f020c0 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(+0x6b591)[0x40188591]
/lib/tls/i686/cmov/libc.so.6(+0x6c80e)[0x4018980e]
./PRINCIPAL27112010[0x8068f6b]
./PRINCIPAL27112010[0x8064413]
./PRINCIPAL27112010[0x80594f3]
./PRINCIPAL27112010[0x805a380]
./PRINCIPAL27112010[0x804a28e]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)[0x40133bd6]
./PRINCIPAL27112010[0x804a191]
======= Memory map: ========
08048000-080c8000 r-xp 00000000 08:15 6947051 /home/felipe/Documentos/LOSA PROYECTO FINAL DE CARRERA/MIS CODIGOS OPERATIVOS/PRINCIPAL27112010
080c8000-080cd000 rwxp 00080000 08:15 6947051 /home/felipe/Documentos/LOSA PROYECTO FINAL DE CARRERA/MIS CODIGOS OPERATIVOS/PRINCIPAL27112010
080cd000-080f8000 rwxp 00000000 00:00 0
08ef9000-08f43000 rwxp 00000000 00:00 0 [heap]
40000000-4001b000 r-xp 00000000 08:11 1573361 /lib/ld-2.11.1.so
4001b000-4001c000 r-xp 0001a000 08:11 1573361 /lib/ld-2.11.1.so
4001c000-4001d000 rwxp 0001b000 08:11 1573361 /lib/ld-2.11.1.so
4001d000-4001e000 r-xp 00000000 00:00 0 [vdso]
4001e000-40020000 rwxp 00000000 00:00 0
40020000-400ae000 r-xp 00000000 08:11 2098307 /opt/intel/composerxe-2011.0.084/compiler/lib/ia32/libiomp5.so
400ae000-400b4000 rwxp 0008e000 08:11 2098307 /opt/intel/composerxe-2011.0.084/compiler/lib/ia32/libiomp5.so
400b4000-400bb000 rwxp 00000000 00:00 0
400dd000-400f2000 r-xp 00000000 08:11 1709790 /lib/tls/i686/cmov/libpthread-2.11.1.so
400f2000-400f3000 r-xp 00014000 08:11 1709790 /lib/tls/i686/cmov/libpthread-2.11.1.so
400f3000-400f4000 rwxp 00015000 08:11 1709790 /lib/tls/i686/cmov/libpthread-2.11.1.so
400f4000-400f7000 rwxp 00000000 00:00 0
400f7000-4011b000 r-xp 00000000 08:11 1704824 /lib/tls/i686/cmov/libm-2.11.1.so
4011b000-4011c000 r-xp 00023000 08:11 1704824 /lib/tls/i686/cmov/libm-2.11.1.so
4011c000-4011d000 rwxp 00024000 08:11 1704824 /lib/tls/i686/cmov/libm-2.11.1.so
4011d000-40270000 r-xp 00000000 08:11 1704815 /lib/tls/i686/cmov/libc-2.11.1.so
40270000-40271000 ---p 00153000 08:11 1704815 /lib/tls/i686/cmov/libc-2.11.1.so
40271000-40273000 r-xp 00153000 08:11 1704815 /lib/tls/i686/cmov/libc-2.11.1.so
40273000-40274000 rwxp 00155000 08:11 1704815 /lib/tls/i686/cmov/libc-2.11.1.so
40274000-40277000 rwxp 00000000 00:00 0
40277000-40294000 r-xp 00000000 08:11 1572947 /lib/libgcc_s.so.1
40294000-40295000 r-xp 0001c000 08:11 1572947 /lib/libgcc_s.so.1
40295000-40296000 rwxp 0001d000 08:11 1572947 /lib/libgcc_s.so.1
40296000-40298000 r-xp 00000000 08:11 1704822 /lib/tls/i686/cmov/libdl-2.11.1.so
40298000-40299000 r-xp 00001000 08:11 1704822 /lib/tls/i686/cmov/libdl-2.11.1.so
40299000-4029a000 rwxp 00002000 08:11 1704822 /lib/tls/i686/cmov/libdl-2.11.1.so
4029a000-4029c000 rwxp 00000000 00:00 0
bf8a0000-bf8b5000 rw-p 00000000 00:00 0 [stack]
Cancelado

I need using mkl_dss.f90 for using sparse arrays. This is reason for using ifort -openmp -O3 -o PRINCIPAL27112010 -I$MKLINCLUDE -L$MKLPATH PRINCIPAL27112010.f90 -lmkl_lapack95 -Wl,--start-group $MKLPATH/libmkl_intel.a $MKLPATH/libmkl_intel_thread.a $MKLPATH/libmkl_core.a -Wl,--end-group -liomp5 -lpthread,

Thanks
0 Kudos
10 Replies
mecej4
Black Belt
74 Views

Your program has many errors, including (i) mismatches between the types of actual and dummy arguments, and (ii) uninitialized variables. You can locating these errors by compiling the source code with the -warn interfaces option.

Until you correct those errors, it is pointless to try parallelizing the runs.
felipin85
Beginner
74 Views

Very thanks mecej4!

Ok, I have corrected. Now, I like use mkl_dss for solution mi system. Have I add something the compilation or the last line is valid for use lapack95 and in the same moment use mkl_dss solver. I know that in theory the line past run ok, for probe file, but I don't know especif the use mkl_dss in compilation, in the file, I know that I have write include mkl_dss.f90 before the program.

Thanks
mecej4
Black Belt
74 Views

Sorry, I cannot decipher your English to the point where I can give a proper reply. Perhaps, you can retry with shorter sentences.
barragan_villanueva_
Valued Contributor I
74 Views

Quoting felipin85
ifort -openmp -O3 -o miresolvedor -IKLINCLUDE -LKLPATH miresolvedor.f90 -lmkl_lapack95 -Wl,--start-group KLPATH/libmkl_intel.a KLPATH/libmkl_intel_thread.a KLPATH/libmkl_core.a -Wl,--end-group -liomp5 -lpthread
ifort: error #10236: File not found: 'KLPATH/libmkl_intel.a'
ifort: error #10236: File not found: 'KLPATH/libmkl_intel_thread.a'
ifort: error #10236: File not found: 'KLPATH/libmkl_core.a'
miresolvedor.f90(4): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [LAPACK95]


Please set MKLPATH env and use it correctly in makefile:

instead of $MKLPATH there should be $(MKLPATH)

Note that MKL Link Advisor suggests only command line notation.

felipin85
Beginner
74 Views

Ok, very thanks Victor Pasko. You were right, I forgot the parentheses. Thanks.

And, the other mistake? Do you know how to fix?

Thanks, Regards

Felipe
barragan_villanueva_
Valued Contributor I
74 Views

Could you please minimize your testcase (to not use also your local path/home/Placas/) in order to analyzeyour problem with memory corruption.
felipin85
Beginner
74 Views

Victor, thanks for your response. I changed the code linking, I erase -openmp or I don't know that I changed but, but the problem of corruption I have not. As if I were to happen, usually where the corruption?

Thanks, for your help
barragan_villanueva_
Valued Contributor I
74 Views

Memory corruption is very difficult to analyze in debugger. There exist some tools which can help.
Firstly, please try valgrind. But the most simple way is to read your program very carefully looking at arrays underindexing and overindexing
barragan_villanueva_
Valued Contributor I
74 Views

If you are using Intel Fortran compiler please trysource code analysis and check options:

-diag-enable [,,...]
enable the specified diagnostics or diagnostic groups
-diag-disable [,,...]
disable the specified diagnostics or diagnostic groups
where may be individual diagnostic numbers or group names.
where group names include:
sc - perform source code analysis: n=1 for critical
errors, n=2 for all errors and n=3 for all errors
and warnings
sc-include - perform source code analysis on include files
sc-parallel - perform analysis of parallelization in
source code: n=1 for critical errors,
n=2 for errors, n=3 for all errors and
warnings

-[no]check
check run-time conditions. Default is -nocheck
keywords: all (same as -C), none (same as -nocheck),
[no]arg_temp_created, [no]bounds (same as -CB),
[no]format, [no]output_conversion,
[no]pointer (same as -CA),
[no]uninit (same as -CU)

felipin85
Beginner
74 Views

Yes, I'm using Intel Fortan. Thanks for the information, This is very useful. But, in my make file,specify where these conditions?
Thanks
Reply