Syntax for openmp long directive list fortran77

后端 未结 1 1530
走了就别回头了
走了就别回头了 2020-12-21 05:58

PROBLEM : Long list of directives openmp fortran77

c$omp parallel default(shared) private(i,k,i1,i2,i3,i4,i5,
     $ i6,x0,y0,z0,vnx0,vny0,vnz0,qs0)
c$omp do         


        
相关标签:
1条回答
  • 2020-12-21 06:31

    Your problem simply boils down to that the OpenMP continuation syntax for fixed format sources Fortran code is like this:

    c$omp parallel blah
    c$omp+private( blah )
    c$omp+reduction( blah )
    

    Well, to be more precise, all the 3 following forms for directives are equivalent:

    c$omp
    !$omp
    *$omp
    

    But in any case, a directive spread across several lines must be split using an extra character in the 6th column, as already shown. This character can be anything but a space or a zero. (thanks to Hristo Iliev for having corrected me in that. Initially mistakenly stated that the continuation character was supposed to be a +)

    Adding the various necessary c$omp+ continuation lines should just solve your problem

    This should look like this:

    c$omp parallel default(shared) private(i,k,i1,i2,i3,i4,i5,
    c$omp+ i6,x0,y0,z0,vnx0,vny0,vnz0,qs0)
    c$omp do
          Task to be performed
    c$omp end do
    c$omp end parallel
    
    0 讨论(0)
提交回复
热议问题