Showing results for 
Search instead for 
Did you mean: 

Problem using OpenMP and IMSL. Need your help

I use Fortran v10.1 in conjuction with VS2008. To be more specific I use a specific function fromdll libraries of IMSL v6.0 which is called IVPAG in order to solve a largesystem of approximately 1200ordinary differential equations. As far as the following project propery: Fortran>Language>Process OpenMP Directives>Disabled is used, the Fortran code is executed correctly without any problem. As soon as I change this property to: Fortran>Language>Process OpenMP Directives>Generate Parallel Code (/Qopenmp), an error message from IVPAG appearsat the beginning of theexecution whichshowsunusual parameters of this function causing the program to crash. It must be pointed out that there are no error messages or warningsduring debugging and that the project property: Local Variable Storage is set to Default Local Storage.

Do you have a solution to this problem in order to be able to use the IVPAG function from the IMSL v6.0 libraries with OpenMP and parallel programming?

The command line is the following one: /nologo /Od /Qopenmp /names:uppercase /module:"Debug/" /object:"Debug/" /traceback /check:bounds /c

0 Kudos
2 Replies
Black Belt

Unless your IMSL functions are documented thread safe, it's likely they use local static data, so they can't work in a threaded region. Intel thread checker is supposed to be capable of confirming such problems. You may find more expertise on the subject on the vni forum. If you make the IMSL calls in a critical region, it should be OK, but of course it may defeat your goal of gaining performance. Otherwise, you may find it worth while to replace IMSL with your own code.

If the IMSL function uses working arrays which you supply, you would want to make those local to the thread.


I have the exact same problem and haven't been able to find a solution yet. It seems that for some reason the IVPAG parameters take some very high values. And let me say that it is not the IMSL subroutine (IVPAG) that i want to parallelize but the rest of the code.

PLus, the array of parameters that I supply cannot be local because it is required in the IVPAG calling statement: