- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
I get some weird behavior with OpenMP and the IPO flag. Running Mac OS 10.6.8 I can recreate the error with the following program compiled w/ Composer 2011 SP1 11.344 or 11.1 (046).
program omptest use omp_lib integer, parameter :: nits = 1 integer, parameter :: ldx = 10 integer :: it real :: xxen(ldx,nits), xx(ldx) xx = 1.0 #ifdef _OPENMP !$omp parallel !$omp single print *, 'Using OpenMP with ', omp_get_num_threads(), ' threads.' !$omp end single !$omp end parallel !$omp parallel do #endif do it = 1,nits print *, 'it = ',it xxen(:,it) = xx end do #ifdef _OPENMP !$omp end parallel do #endif print *, 'xxen = ',xxen end program
If I compile with -fast and -openmp, it will print the iteration number N times, where N is the number of threads. If I take out the -ipo option (but keep -O3 -xHost, etc.), then I get the printed line once, as I should. Also, if I compile with -fast and -openmp and nits greater than 1, I get correct behavior. Finally, if xx is a scalar instead of an array, everything works correctly.
Thanks,
Brad
- Etiquetas:
- Intel® Fortran Compiler
Enlace copiado
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
My impression of -fast was that it was used primarily for benchmarks like Specfp which don't allow a group of options (and would not have a omp parallel loop with fixed count 1).
I'm a little confused by your reference to compiler versions, not understanding if a recent version is among those you mean.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
I get the same result if I use -ipo instead of -fast. It was my impression that -fast was just an abbreviation for (on Mac OS X) -ipo -O3 -xHost -mdynamic-no-pic -no-prev-div. Interestingly, in 11.1 the man page said it included -xHost and now this is gone in 12.1.
I believe what is happening is that -ipo replaces the loop with
!$omp parallel print *, 'it = ',1 xxen(:,1) = xx !$omp end parallel
I made a mistake with the compiler versions, the correct ones are 12.1.5.344 build 20120612 and 11.1.046.
Thanks,
Brad
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Configure the test program such that it produces the error.
Then delete all the # preprocessor statements.
(IOW do not interceed !$omp parallel do and do it=... with a preprocessor statement.)
Does the IPP error still occur?
Jim Dempsey
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
i'll need to test this on our older OS/XC and compilers. The latest compiler on Lion/XC 4.3 does not exhibit the behavior you describe.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Jim - the error still occurs with the preprocessor directives removed.
Ronald - I don't use XCode. The version installed on my machine is 3.2.4. NB: I'm not running Lion, still at 10.6.8.
Thanks,
Brad
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
as an fyi: even from the command line we use Xcode components. The linker, librarian, and header files are needed by the compiler even if you don't use the IDE.
I should have more information and a bug report ID tomorrow.
ron
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
And I have good news and bad news
good news: there is a fix in an upcoming compiler release, coming out in roughly 1 month.
bad news: we'll be dropping support for Snow Leopard when this compiler comes out. Thus, this compiler will require Mountain Lion or Lion and Xcode 4.x. Are you willing to upgrade to get this fixed compiler OR can you just run without -ipo ?
I've asked the developers if we can backport this fix to a 12.1 compiler supported on Snow Leopard. I will let you know the results after their investigation into the risk of backporting the fix.
ron
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Hi Ron,
Thanks for looking into this bug.
I have to say, I've been disappointed with IPO and Snow Leopard in general. This bug was just a starting point, as I managed to narrow it down to something that was very simple to reproduce.
I have many more problems with IPO, and it is essentially unusable. As far as I know, Intel markets their (very expensive) compiler as supporting Snow Leopard and brags about its performance benefits. These benefits are only possible with features like IPO turned on. We will inevitably upgrade to Mountain Lion over here because we like working code. Still, I feel like the 12.1 compiler, which we purchased because of a bug in an earlier compiler, is a complete lemon.
Brad
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
This issue is fixed from compiler version 13 onwards, and I believe also in the final 12.1 (update 7). Sorry it took so long to post this.

- Suscribirse a un feed RSS
- Marcar tema como nuevo
- Marcar tema como leído
- Flotar este Tema para el usuario actual
- Favorito
- Suscribir
- Página de impresión sencilla