Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Pierpaolo_M_
New Contributor I
67 Views

Open and Deallocate Problem Fortran

Hi,

i wrote a simple OpenMP code. In this code i use MKL VSL Library to generate Random Numbers. If I run it outside Intel Inspector i don't receive any error. If i run it under Intel Inspector making Threading error analysis (-ti3) i don't receive any errors, but i run it under Inspector making a Memory Error Analysis i receive an error and a warning also if i receive an exit code equal to 0. 

This is the error:

P1: Error: Uninitialized partial memory access: New
 P1.50: Error: Uninitialized partial memory access: New
  /home/pierpaolo/PIC/NIS/Hybrid/DOUBLEINT/PROVA/Prova3.F(46): Error X50: Read: Function prova: Module /home/pierpaolo/PIC/NIS/Hybrid/DOUBLEINT/PROVA/Prova
  Code snippet:
   44        file=200
   45        filename='prova.res'
  >46        OPEN(file,FILE=filename,STATUS='REPLACE')
   47
   48        DO i=1,npmax,1000

  Stack (1 of 1 instance(s))
  >libifcore.so.5!for__open_proc - /opt/intel/composer_xe_2015.2.164/compiler/lib/intel64/libifcore.so.5:0xd6d21
   libifcore.so.5!for_open - /opt/intel/composer_xe_2015.2.164/compiler/lib/intel64/libifcore.so.5:0x5b5be
   Prova!prova - /home/pierpaolo/PIC/NIS/Hybrid/DOUBLEINT/PROVA/Prova3.F:46
   Prova!main - /home/pierpaolo/PIC/NIS/Hybrid/DOUBLEINT/PROVA/Prova:0x12f9
   libc.so.6!__libc_start_main - /usr/src/debug/glibc-2.12-2-gc4ccff1/csu/libc-start.c:226
   Prova!_start - /home/pierpaolo/PIC/NIS/Hybrid/DOUBLEINT/PROVA/Prova:0x1204

 

Also if i receive it my file is opened correctly.

And this is the warning:

P2: Warning: Memory not deallocated: New
 P2.195: Warning: Memory not deallocated: 31104 Bytes: New
  /home/pierpaolo/PIC/NIS/Hybrid/DOUBLEINT/PROVA/MyRand4.F90(51): Warning X195: Allocation site: Function myrand_mp_initrand2_$omp$parallel@46: Module /home/pierpaolo/PIC/NIS/Hybrid/DOUBLEINT/PROVA/Prova
  Code snippet:
   49          TID=idp*nthreads+OMP_GET_THREAD_NUM()
   50          brng=brng0+TID  ! TID.ge.0
  >51          status=vslNewStream(stream,brng,TID)
   52          WRITE(100+OMP_GET_THREAD_NUM(),*)status
   53  !$OMP END CRITICAL

  Stack (1 of 1 instance(s))
  >libmkl_core.so!mkl_serv_allocate - /opt/intel/composer_xe_2015.2.164/mkl/lib/intel64/libmkl_core.so:0xe1013
   libmkl_vml_avx.so!__vslAllocateStream - /opt/intel/composer_xe_2015.2.164/mkl/lib/intel64/libmkl_vml_avx.so:0x30611e
   libmkl_vml_avx.so!__vslNewStreamEx - /opt/intel/composer_xe_2015.2.164/mkl/lib/intel64/libmkl_vml_avx.so:0x3060a7
   Prova!myrand_mp_initrand2_$omp$parallel@46 - /home/pierpaolo/PIC/NIS/Hybrid/DOUBLEINT/PROVA/MyRand4.F90:51
   libiomp5.so!__kmp_invoke_microtask - /opt/intel/composer_xe_2015.2.164/compiler/lib/intel64/libiomp5.so:0x9fbb1
   libiomp5.so!__kmp_invoke_task_func - /nfs/fx/proj/openmp/promo/20141201/tmp/lin_32e-rtl_5_nor_dyn.rel.40.r1.c0.s0-fxeolin15/../../src/kmp_runtime.c:7060
   libiomp5.so!__kmp_launch_thread - /nfs/fx/proj/openmp/promo/20141201/tmp/lin_32e-rtl_5_nor_dyn.rel.40.r1.c0.s0-fxeolin15/../../src/kmp_runtime.c:5616
   libiomp5.so!__kmp_launch_worker - /nfs/fx/proj/openmp/promo/20141201/tmp/lin_32e-rtl_5_nor_dyn.rel.40.r1.c0.s0-fxeolin15/../../src/z_Linux_util.c:772
   libpthread.so.0!start_thread - /usr/src/debug/glibc-2.12-2-gc4ccff1/nptl/pthread_create.c:301
   libc.so.6!clone - /usr/src/debug////////glibc-2.12-2-gc4ccff1/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:115

 

In this last case i receive it also if a successfully use (status=vslDeleteStream(stream) ) receiving status=0 for each thread.

Any suggestions on how to solve these two errors?

Thanks in advance

Pierpaolo

0 Kudos
0 Replies
Reply