work around compiler issues with empty OMP continuation lines
Roland Haas
Branch: rhaas/fpreprocess
rhaas/fpreprocess
Branch: master
master
Merged
#121 · Created  · Last updated
Merged pull request
Cactus: put back comments in string handling
810cf00·Author: Roland Haas·Closed by: Roland Haas·2021-04-01
Description
This pull request implements code to work around issues with the ifort and gfortran compilers handling empty (or space only) omp continuation lines in an incompatible manner.
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.
Cactus: do not adjust whitespace or comments for regular Fortran code
Cactus: significantly simplify Fortran line continuation
make Perl use a simple algorithm of splitting and editing the line rather than just parsing it
Cactus: work around compiler issues with empty OMP continuation lines
This pull request implements code to work around issues with the ifort and gfortran compilers handling empty (or space only) omp continuation lines in an incompatible manner.
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.
Cactus: do not adjust whitespace or comments for regular Fortran code
Cactus: significantly simplify Fortran line continuation
make Perl use a simple algorithm of splitting and editing the line rather than just parsing it
Cactus: work around compiler issues with empty OMP continuation lines
Cactus: put back comments in string handling
Â