- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Hi,
I'm having trouble getting parallel processing working on Windows platforms. My software package is written in Fortran 95 and uses OpenMP directives for parallelization on SMP architectures. Compiling static binaries for deployment on Linux platforms works correctly in parallel, however on Windows it does not.
I can successfully compile a static binary without OpenMP directives, which works on other machines correctly (in serial, of course). A static binary with OpenMP runs fine in parallel on the machine where I compiled it, moving to other machines requires the runtime libraries (static OpenMP compilation has been removed from the 2013 version of the compiler http://software.intel.
Does anyone have experience with such circumstances that could help me with this one? All my Googling results in suggestions relating to old versions where static OpenMP compilation was possible....
Cheers,
Nick
- Etiquetas:
- Intel® Fortran Compiler
Enlace copiado
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
It sounds like you are doing everything right. What is OMP_NUM_THREADS set to? By default it should be the number of processors visible to the operating system. If it's not, set it as such.
Roland
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Regarding static builds, even if you ask for the static libraries ("Multithreaded"), the OpenMP library is DLL-only.
As Roland says, the default of OpenMP is to use the number of processors as viewed by the OS. The environment variable he mentions isn't set by default, but you can set it if you want to override the default. It might be useful to see the value returned from a call to OMP_GET_NUM_THREADS. What are all the build options being used? In particular, you aren't using the OpenMP "stubs" library perhaps?
How do you know that the program isn't using all the cores? What did you use to determine that?
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Thanks for the replies, Roland and Steve.
I've had another crack, using a another fresh VM with the redist packages and now it seems to be working. Perhaps it was an incorrect environment variable, I'm not sure. It's so odd, given that I'd been trying for months with fresh VM's and using the redist and merge modules...
I wasn't using the "stubs" library. The OMP_GET_NUM_THREADS call was telling me the correct number of cores were in use, however when looking at the task manager it was clear that only one core was in use (i.e. 25% processor usage on a quad-core system, etc.).
Any way, problem solved. Cheers, Nick
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
It could simply be that the program was not entering parallel regions. Intel VTune Amplifier XE can show you how the program executes across the cores over time.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Dear all,
This problem is most definitely not solved. Abruptly, parallel processing has now stopped on both the compile machine and other machines with the redist packages installed. Linux and MacOS platforms seem to be unaffected. The parallel part of the code has not changed and the code still thinks it is using multiple threads.
I don't remember linking 'cycles of the moon' into my code, but this is Windows, so I might be wrong....
Anyone have any answers? I will start playing with VTune to see if this sheds any light on the situation, although I shouldn't need to as everything works fine on Linux.
Nick
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Nick,
Why don't you try a simple example in the windows environment to confirm that OpenMP is being successfully implemented.
I am attaching two simple examples I have that (hopefully) confirm multiple threads are being used.
This should check if OpenMP is working in your windows environment.
John
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Hi John,
Thanks for the test code - my code also does something similar, but I've run it regardless. See attached file. The VM has 8 cores and there are 8 threads used in this example...
Next step?
Cheers, Nick
EDIT: I just saw the second example and I can confirm that it works. I also realized I was doing something daft with the input to my own code and now I can see that it works again. This time was simply a case of user folly. Thanks for the help and sorry for crying wolf.
- 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