Apologies for posting this here rather than at Premier Support, but:
1) I won't be around for the next week.
2) I haven't managed to produce a small reproducer yet and won't have time to do so today.
While trying to build our main engine project with Intel Fortran Composer XE2017 (188.8.131.52), I get several compilation errors on OpenMP directives:
subroutine perf_faceflux_lp(current_model, retval) ! The following statement is only compiled when OpenMP directives are processed !$ use omp_lib logical :: do_in_parallel ! Declarations and code elided !$OMP parallel & !$OMP & if(do_in_parallel) & !$OMP & shared(current_model) & !$OMP & private(update_face) & !$OMP & private(dt_l) & !$OMP & private(list_of_new_updated_elem) & !$OMP & private(num_new_update_elem) & !$OMP & private(istat) & !$OMP & reduction(.or.: activate_bed_load) ! More code!
generates the following compilation errors:
F:\Source\bluezone.xe2017\engines\infoworks_2d\iw_2d_sim\Lib1\face_flux.F90(120): error #5192: Lead underscore not allowed
F:\Source\bluezone.xe2017\engines\infoworks_2d\iw_2d_sim\Lib1\face_flux.F90(120): error #5082: Syntax error, found 'DO' when expecting one of: TASK TASKLOOP TARGET PARALLEL <REAL_KIND_CON> <REAL_CONSTANT> <DBLPRC_CONSTANT> ...
F:\Source\bluezone.xe2017\engines\infoworks_2d\iw_2d_sim\Lib1\face_flux.F90(169): error #7622: Misplaced part of an OpenMP* parallel directive.
This code has compiled successfully on older versions of the compiler including XE 2016 and XE 2015 update with no problems.
Fails on all platforms and configurations for XE 2017.
Sample command line options:
/nologo /debug:full /Od /I"..\lib2\Debug.x64" /I"..\..\..\cs\simlib\Debug.x64" /I"F:\Source\bluezone.xe2017\engines\cs\simlib\Debug.x64" /Qopenmp /stand:f03 /Qdiag-disable:7025,7363 /warn:declarations /warn:unused /warn:truncated_source /Qauto /module:"Debug.x64/" /object:"Debug.x64/" /Fd"Debug.x64\vc120.pdb" /traceback /check:bounds /libs:dll /threads /dbglibs /Qmkl:parallel /libdir:noauto /c
I can work around this by renaming do_in_parallel to exec_in_parallel!
Hmm ... this seems vaguely familiar.
The parser is getting confused by this line:
If you change the name of that logical to something else, maybe "goo_in_parallel", then it should compile.
You will note that in my original post, I also found that renaming the scalar-logical-expression (as the OpenMP spec names it) in the if clause allowed the code to compile. I wonder if the issue is that the original variable name starts with an OpenMP (or Fortran) keyword?
The presence of the reduction clause is also significant - if it's not there then no problem. Thanks for filing the IPS issue.