Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intel ifort 18 compiler replaces -openmp with -qopenmp #694

Closed
6 tasks done
davegill opened this issue Nov 12, 2018 · 1 comment
Closed
6 tasks done

Intel ifort 18 compiler replaces -openmp with -qopenmp #694

davegill opened this issue Nov 12, 2018 · 1 comment
Labels

Comments

@davegill
Copy link
Contributor

davegill commented Nov 12, 2018

Here is a simple Fortran program that exhibits different behavior when the OpenMP compile-time option is activated:

       program mat_mult
#ifdef _OPENMP
       print *,'yep, this is OpenMP parallel'
#else
       print *,'nope, this is NOT OpenMP parallel'
#endif       
       end program

Here is an older Intel ifort compiler:

> ml | grep intel

Currently Loaded Modules:
  1) ncarenv/1.2     3) numpy/1.13.3           5) scipy/0.19.1       7) intel/17.0.1          9) mpt/2.15f
  2) python/2.7.13   4) netcdf4-python/1.2.7   6) matplotlib/2.0.2   8) ncarcompilers/0.4.1  10) netcdf/4.6.1

> ifort -openmp -o mat_mult mat_mult.F

We get a warning message about deprecated options:

ifort: command line remark #10411: option '-openmp' is deprecated and will be removed in a future release. Please use the replacement option '-qopenmp'

However, the executable is built and can run.

> mat_mult
 yep, this is OpenMP parallel

When switching to the newer Intel ifort compiler, the -openmp option has now been removed.

> ml intel/18.0.1
> ifort -openmp -o mat_mult mat_mult.F

Which gives us this output

ifort: command line error: option '-openmp' is not supported. Please use the replacement option '-qopenmp'

As expected, the new -qopenmp option is OK

> ifort -qopenmp -o mat_mult mat_mult.F
> mat_mult
 yep, this is OpenMP parallel

I tested this on WRF. The -qopenmp option seems safe at least going back to ifort 16.0.1:

  1. New compiler (tested on WRF and test program)
  • The intel/18.0.1 builds with OpenMP when the -qopenmp option replaces the deprecated -openmp.
  • The intel/18.0.1 does not build with OpenMP with the -openmp option.
  1. Older compiler (tested on WRF and test program)
  • The intel/17.0.1 builds with OpenMP when the -qopenmp option replaces the deprecated -openmp.
  • The intel/17.0.1 builds with OpenMP with the -openmp option.
  1. Even older compiler (tested only on test program)
  • The intel/16.0.1 builds with OpenMP when the -qopenmp option replaces the deprecated -openmp.
  • The intel/16.0.1 builds with OpenMP with the -openmp option.
@davegill
Copy link
Contributor Author

@mgduda @kkeene44
Michael and Kelly,
I found this -openmp issue with intel 18 and greater doing regression testing both on my Mac and on cheyenne. We should make sure that if WPS, MPAS, or any WRF post-procs use OpenMP, the new -qopenmp option is substituted.

davegill added a commit to davegill/WRF that referenced this issue Nov 12, 2018
TYPE: bug fix

KEYWORDS: Intel, ifort, OpenMP, deprecated

SOURCE: internal

DESCRIPTION OF CHANGES:
Problem:
Starting with ifort/18.0.1 on cheyenne, the -openmp option is no longer available.
The WRF code cannot be built with OpenMP with a compiler that is v18.0 or newer.

Solution:
The Intel compiler has mentioned for years that the -openmp flag was deprecated
and that users should seelct -qopenmp instread. The older existing cheyenne Intel
compilers (16.0.1 and 17.0.1) both work with -openmp and -qopenmp. The new Intel
compiler requires -qopenmp

ISSUE:
Fixes wrf-model#694 "Intel ifort 18 compiler replaces -openmp with -qopenmp"

LIST OF MODIFIED FILES:
M	configure.defaults

TESTS CONDUCTED:
1. New compiler - WRF and test OpenMP code
 - [x] The intel/18.0.1 builds with OpenMP when the -qopenmp option replaces the deprecated -openmp.
 - [x] The intel/18.0.1 _does not_ build with OpenMP with the -openmp option.

2. Older compiler - WRF and test OpenMP code
 - [x] The intel/17.0.1 builds with OpenMP when the -qopenmp option replaces the deprecated -openmp.
 - [x] The intel/17.0.1 builds with OpenMP with the -openmp option.

3. Even older compiler  - test OpenMP code
 - [x] The intel/16.0.1 builds with OpenMP when the -qopenmp option replaces the deprecated -openmp.
 - [x] The intel/16.0.1 builds with OpenMP with the -openmp option.

RELEASE NOTE:
WRF supports correct compiler flag for OpenMP builds with newer Intel compilers, v18.0 and later.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant