gfortran+libcpp: omp-pragmas

FX Coudert fxcoudert@gmail.com
Sat Apr 5 13:13:00 GMT 2008


> what should be done about C-style OMP-pragma directives?
>
> E.g.
> 	#pragma omp parallel num_threads(2) shared(x)
> instead of
> 	!$OMP PARALLEL NUM_THREADS(2) SHARED(X)
> ?

I think they should be rejected with a "Illegal preprocessor  
directive" message (which we currently do). And same thing with all  
other pragmas. (This is what other compilers do, except for g95 which  
silently ignores it.)

> IMO, one should either reject them completely with a proper  
> message, e.g. "'#pragma
> omp' not defined in Fortran, use '!$OMP' instead")

Not all pragmas have corresponding Fortran constructs. I'd go for a  
more generic error message, like the one we currently have.

>

FX

-- 
François-Xavier Coudert
http://www.homepages.ucl.ac.uk/~uccafco/



More information about the Fortran mailing list