1

I have a line of a Fortran code, e.g.,

    !$omp do private(aa, bb, cc) schedule(dynamic) reduction(+:alpha, beta, gamma) 

Suppose this line contains several arguments and the length exceeds 132 characters, gfortran will lead to error message. I tried to use & to break the line. But I am not sure how to start the next line. As other case, directly start the next line without ! leads to Error: Syntax error in OpenMP variable list at (1).

How to break the 132 characters limit for omp line?

AlphaF20
  • 583
  • 6
  • 14

1 Answers1

3

You can write multiline omp statements by ending with & and staring a newline with $omp.

Example

!$omp do private(aa, bb, cc) &
!$omp schedule(dynamic)      &
!$omp reduction(+:alpha, beta, gamma) 
...
!$omp end do
jack
  • 1,658
  • 1
  • 7
  • 18