Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)

False negative in subroutine allocation

Mattos__Alexandre
375 Views

Why Inspector does not indicate an error when not deallocate a matrix in a subroutine?

   PROGRAM main_tst
      IMPLICIT NONE
      INTEGER, PARAMETER          :: n1 = 5000
      INTEGER, PARAMETER          :: n2 = 1000
      REAL   , ALLOCATABLE        :: mat(:,:)

      ALLOCATE(mat(n1, n2))
      mat = 5.
      CALL sbrt_tst(n1, n2, mat)
      WRITE(*,*) mat(1:5,1)
      DEALLOCATE(mat)
   END PROGRAM main_tst

   SUBROUTINE sbrt_tst(n1, n2, mat__in)
      INTEGER, INTENT(IN   ) :: n1
      INTEGER, INTENT(IN   ) :: n2
      REAL   , INTENT(INOUT) :: mat__in(n1, n2)

      REAL, ALLOCATABLE           :: mat_aux(:,:)

      ALLOCATE(mat_aux(n1, n2))
      mat_aux = n1*n2
      mat__in = mat__in + mat_aux
   END SUBROUTINE sbrt_tst

I compiled and ran this way:

$ ifort -o ./main_tst ./main_tst.f90 -shared-intel -shared-libgcc -O0 -g
$ inspxe-cl -collect mi3 -r r000mi3 ./main_tst

The output was:

5000005.       5000005.       5000005.       5000005.       5000005.

0 new problem(s) found

 

 

0 Kudos
3 Replies
Kevin_O_Intel1
Employee
375 Views

 

Seems like an issue. I'm going to file a bug report

Thank you for reporting..

 

0 Kudos
Mattos__Alexandre
375 Views

Do you have any news about this issue?

Btw, my company has a paid license. Is there any other way to get more information about this bug report via the Online Service Center?

Thank you!

0 Kudos
Kevin_O_Intel1
Employee
375 Views

 

Yes. If you can file a support request for the Inspector product. Here is a link to an article that will assist you.

https://software.intel.com/en-us/articles/how-to-create-a-support-request-at-online-service-center

Let them know you and about your forum post and also let them know that I had filed a bug report.

Regards,

Kevin

0 Kudos
Reply