work around compiler issues with empty OMP continuation lines

Issue #2515 resolved
Roland Haas created an issue

When splitting long Fortran input lines created eg by the various CCTK_ macros there is a chance to create lines that the Intel and or GNU compilers will not accept.

In particular ifort and gfortran handle OMP continuations with only space differently. ifort will not accept something like "!$OMP& &" ie only spaces between the & while gfortran will not accept "!$OMP " ie only spaces.
This triggers when breaking up constructs like:

$!OMP parallel private(i)

that need to be rendered as (gfortran):

$!OMP parallell&
$!OMP& &
$!OMP&private(i)

and (ifort)

$!OMP parallell&
$!OMP
$!OMP&private(i)

neither of which the other one accepts.

This prevents compiling of the current ET code for TestLoopFortran.F90 git hash aa49005b "Cactus: make HTML docs work for thorns not using cactus style file" of cactus on eg Comet with the intel compiler in use there.

Comments (6)

  1. Roland Haas reporter

    Thank you. @Steven R. Brandt also tried the patch and it worked for him, making this 2 approvals.

    Applied as git hash 810cf002 "Cactus: put back comments in string handling" of cactus

  2. Log in to comment