Freitag, 25. November 2011 10:17
I am getting a crash in my application under certain scenarios giving following message:
OMP: Error #134: Cannot set thread affinity mask.
The application in question is developed using Visual Studio 2008 and Intel Visual Fortran 11.x versions. There are some projects which are using OpenMP. If I disable OpenMP through Visual Studio project settings then everything works fine.
I haven't been able to find a solution to the problem. However, referring to different documents, I have gathered that Visual Studio implements OpenMP 2.0 specifications whereas IVF 11.x versions implement OpenMP 3.0 specifications. So, I was wondering if this clash is happening because of OpenMP version incompatibility between Visual Studio 2008 and IVF 11.x versions.
Any help or feedback on this problem is greatly appreciated.
Samstag, 3. Dezember 2011 00:07Besitzer
Theoritically, openmp in VS will not interfere with openmp in intel's fortran - they will run separately. We are not aware of any issue around this. Also, can you check your VS toolset configuration - it is probably using Intel's toolset for both C++ and Fortran and not Microsoft toolset.
This error code sounds like it comes from the Intel implementation. Try searching for this on the intel forums (example: http://software.intel.com/en-us/forums/showthread.php?t=76294&p=2)
Rahul V. Patil
Montag, 5. Dezember 2011 11:43
Thanks Rahul for your response.
Can you please elaborate a bit more on the Toolset Configuration? I looked at MSDN to get some info but it appeared to me that it is only relevant for C# projects. How do we set teh Toolset Configuration for C++ and Fortran projects.
I have already done quite a bit of search on the Intel Forums on this problem but did not find anything directly relevant for my problem.
Dienstag, 6. Dezember 2011 18:28Besitzer
Assuming on you are using Visual Studio 2010, and Intel Studio. In the solution explorer, you would right click on the project, and in the context menu you would expand "Intel C++ Composer 2011". If you see the option to "Use Visual C++", then you are using Intel's toolsets. This can be further verified if right click the project -> properties -> C/C++. If you see Intel specific options, then your project uses Intel's toolsets.
Hope this helps!
Rahul V. Patil
Freitag, 9. Dezember 2011 06:10
I am using Visual Studio 2008 with IVF 11.1 integrated with it. Some projects consist of C++ code and some projects consist of Fortran code. The C++ code is built using the Microsoft compiler whereas Fortran code is built using IVF 11.1 compiler. Some of the C++ projects are using OpenMP. The Fortran code is not using OpenMP. However, the application is making use of IMSL libraries which in turn are probably using OpenMP.
Based on this, can you confirm how to check toolset configuration in Visual Studio 2008.
Freitag, 9. Dezember 2011 18:45Besitzer
The two reasons that make me believe that it is not related to Microsoft Openmp are:
1. Our implementation of openmp does not use affinity APIs
2. The error code format is unfamiliar.
I checked briefly on Rogue Wave (makers of IMSL) website - they do confirm using openmp.
That said, your earlier comment about disabling openmp via Visual Studio makes the crash go away makes me want to explore more. Can you explain how you are doing this?
Also, can you provide a crash call stack?
Rahul V. Patil
Dienstag, 13. Dezember 2011 10:56
The way I disable OpenMP in Visual Studio 2008 is by right-clicking on a project and then going to Properties\Configuration Properties\C/C++\Language\OpenMP Support and selecting 'No' from the dropdown. I understand this will only disable OpenMP on the specific library. However, if this library links against any third party library like IMSL then that will still use OpenMP if configured to do so. Hence I believe this option can be used to disable OpenMP on the Visual Studio projects but not on the third party libraries that an application may link with.
I could not dump the call stack today as I had some trouble running the application. I will try to do so ASAP.