- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Hi.
My problem is that the openmp routine, 'omp_get_thread_num()' yields wrong result.
I'm using ifl 7.1 on windows server 2003.
I set the enviroment variable, OMP_NUM_THREADS to 8, and then ran the following openmp program.
program hello
integer num
write(6, *) "hello parallel world from threads ! "
!$omp parallel
num=omp_get_thread_num()
write(6, *) 'omp_num: ',num
!$omp end parallel
end
Starting the program above, I saw the following.
hello parallel world from threads !
omp_num: -2147483648
omp_num: -2147483648
omp_num: -2147483648
omp_num: -2147483648
omp_num: -2147483648
omp_num: -2147483648
omp_num: -2147483648
omp_num: -2147483648
The routine, 'omp_get_thread_num()' yield wrong result. In other words, the integer variable, 'num' must lie between 0 and 7.
Any ideas what the problem can be?
Thanks
My problem is that the openmp routine, 'omp_get_thread_num()' yields wrong result.
I'm using ifl 7.1 on windows server 2003.
I set the enviroment variable, OMP_NUM_THREADS to 8, and then ran the following openmp program.
program hello
integer num
write(6, *) "hello parallel world from threads ! "
!$omp parallel
num=omp_get_thread_num()
write(6, *) 'omp_num: ',num
!$omp end parallel
end
Starting the program above, I saw the following.
hello parallel world from threads !
omp_num: -2147483648
omp_num: -2147483648
omp_num: -2147483648
omp_num: -2147483648
omp_num: -2147483648
omp_num: -2147483648
omp_num: -2147483648
omp_num: -2147483648
The routine, 'omp_get_thread_num()' yield wrong result. In other words, the integer variable, 'num' must lie between 0 and 7.
Any ideas what the problem can be?
Thanks
- Etiquetas:
- Intel® Fortran Compiler
Enlace copiado
2 Respuestas
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
You didn't INCLUDE the OpenMP definitions file, so the routine is implicitly REAL.
Steve
Steve
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Thanks steve.
You're right.
I've forgot typing 'use omp_lib' .
Changhee
You're right.
I've forgot typing 'use omp_lib' .
Changhee
Responder
Opciones de temas
- 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