Hey there,
I have a very long list of shared variables in OpenMP so I have to split lines in fortran and use the "&"-syntax to make sure the lines stick together!
Something like that:
!$OMP PARALLEL DEFAULT(private) SHARED(vars....,
& more_vars...,
& more_vars...
& )
That gives me errors when compiling without OpenMP, since only the first like is recognized as a comment! The problem now is that I can't add a "!" in front of those lines with a "&" in front to support compiling without OpenMP:
!$OMP PARALLEL DEFAULT(private) SHARED(vars....,
! & more_vars...,
! & more_vars...
! & )
because than it doesn't compile with OpenMP anymore... But I want to support both sorts of compiling in just one code... Any advices on how to do it?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…