- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Steve,
I use /Qopenmp_stubs for my debug compiles and /Qopenmp for my release compiles. I have thought that this would allow me to leave the source otherwise unmodified. But my OpenMP parallel loop declaration(s) usually span several lines and I use ampersands to indicate source line continuations. The compiler throws a syntax error for /Qopenmp_stubs but doe NOT for /Qopenmp.
Example bit of code:
CALL OMP_SET_NUM_THREADS(4) MemForEachStack = 16000000 call kmp_set_stacksize_s(MemForEachStack) NumChunk = NumX/100 !$omp parallel do & default(private), & firstprivate( NumX, NumY, NumSurf, NumLum), & shared( DeltaX, DeltaY, Xmin, Ymin, A, B, C, Alum, Blum, Clum, normals, LumNormals, V, Vlum, Vmax, VmaxLum, Vmin, VminLum, & LumQuadrantBlockerList, NumSurfLum, ConfigFactor, pi, EmitterExitance, EmitterBlockerDividerPlanes, NumEmitterBlockerDividerPlanes, & SeparationDimsToUse), & schedule(dynamic, NumChunk)
The syntax error is:
error #5082: Syntax error, found 'DEFAULT' when expecting one of: <LABEL> <END-OF-STATEMENT> ; BLOCK PROGRAM BLOCKDATA MODULE INTEGER REAL COMPLEX ...
This syntax error is not generated when I compiler /Qopenmp. The only way I can avoid this difference in behavior is to abuse free-format Fortran and place the entire parallel loop declaration on a single line, however long. Nothing fatal, but certainly annoying. Can you put this in the queue for things to fix?
David
- Balises:
- Intel® Fortran Compiler
Lien copié
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
You aren't continuing the directives correctly. The manual says (emphasis mine):
In free form, the initial line of the directive ends with an ampersand followed by an optional comment beginning with an exclamation point. Each continued line of the directive has the directive prefix optionally preceded by blanks or tabs, followed by an ampersand optionally preceded by blanks or tabs.
So what you want is this (I removed many tabs):
!$omp parallel do & !$omp & default(private), & !$omp & firstprivate( NumX, NumY, NumSurf, NumLum), & !$omp & shared( DeltaX, DeltaY, Xmin, Ymin, A, B, C, Alum, Blum, Clum, normals, LumNormals, V, Vlum, Vmax, VmaxLum, Vmin, VminLum, & !$omp & LumQuadrantBlockerList, NumSurfLum, ConfigFactor, pi, EmitterExitance, EmitterBlockerDividerPlanes, NumEmitterBlockerDividerPlanes, & !$omp & SeparationDimsToUse), & !$omp & schedule(dynamic, NumChunk)
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
. . . well I'll be!
D
- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Page imprimable