Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
14 Views

Warning when -qopenmp is used

Dear,

I got the following warning when using ifort on a Linux computer, and I am wondering what it means, and how I can avoid it. I googled it, but I am not sure that I fully understood the problem.

The warning message I get is:

ifort: warning #10247: explicit static allocation of locals specified, overriding OpenMP*'s implicit auto allocation

The version of ifort is:

ifort (IFORT) 16.0.3 20160415
Copyright (C) 1985-2016 Intel Corporation.  All rights reserved.

The program that I compiled is:

program  essai
 implicit none
 integer::i,j,io,un

 print*,"Hello world"
contains

subroutine numlines(unfile,n)
 implicit none
 integer::io
 integer,intent(in)::unfile
 integer,intent(out)::n
 rewind(unfile)
 n=0
 do
  read(unfile,*,iostat=io)
  if (io.ne.0) exit
  n=n+1
 enddo
 rewind(unfile)
end subroutine

end program

and the command line is:

ifort -qopenmp essai.f90

I got the same warning message with more complex codes and command lines involving Openmp and MKL. I am compiling the same codes on other clusters with the same command lines without getting this warning. So, I am wondering why this warning appears on this specific computer, how I can avoid it, and what could be the consequences if I cannot avoid it.

In advance thank you.

Yours sincerely,

Jeremie

0 Kudos
2 Replies
Highlighted
Black Belt
14 Views

If the warning occurs only

If the warning occurs only when you have no omp parallel directive, it may be of no consequence.  Explicit local static allocation of a variable which is update inside an omp parallel region would be expected to create a race condition.

If this warning is specific to one installation of ifort, you should look for ifort.cfg in your ifort installation to see if there are settings there, or set -qopt-report and look for additional compiler flags on this installation.  You may wish to remove or over-ride any such flags.

0 Kudos
Highlighted
Beginner
14 Views

Thank you for your help. A

Thank you for your help. A file ifor,cfg contains some options (e.g. -save) and was mentioned through the environment variable IFORTCFG. Unsetting this environment variable solves the warning.

Jeremie

0 Kudos