- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a program which runs fine in single thread mode. But when I run in multithread mode, using TBB, I got the following error:
On entry to ZLASCL parameter number 4 had an illegal value
Any suggestion?
I am running MKL method in single thread mode, the multithreading is done at upper level around the znaupd method.
This is from function call to znaupd. Which parameter from znaupd will map to the 4th parameter of zlascl ?
It will take some effort to get example code from my real project. If that is necessary, please let me know.
On entry to ZLASCL parameter number 4 had an illegal value
Any suggestion?
I am running MKL method in single thread mode, the multithreading is done at upper level around the znaupd method.
This is from function call to znaupd. Which parameter from znaupd will map to the 4th parameter of zlascl ?
It will take some effort to get example code from my real project. If that is necessary, please let me know.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
zhulaurawang,
please give us the reproducer of this problem.
--Gennady
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
ZLASCL reports that parameter number 4 has an illegal value in case if CFROM is equal to zero and has a NaN value inside.
znaupd is an ARPACK function. Call toZLASCL appears at call tree znaupd->znaup2->-znaitr->zlascl. 4th parameter to ZLASCL is rnorm which is defined and calculated insideby call fromznaup2 to zgetv0.
I could assume that you are trying to run the ARPACK code in parallel from several threads at a moment. UnfortunatelyARPACK is not designed in thread safe way. It is written in Fortran andhas variables with SAVE attribute inside (equivalent to static in C), which keeps theirvalues between function calls.Several threads couldn't operate on such variables at the same time in a safe way because such threads will share the same memory location.
If this is the case, then to avoid the problem you need force in your code that only one thread at a moment calls ARPACK (you could use several threads only for different functions calls and if trees of subcall of such functions do not intersect on functions which contains variables with SAVE attribute). You could also try to modify ARPACK to be thread safe (or find one). MKL is thread safe already.
Good luck,
Alexander
ZLASCL reports that parameter number 4 has an illegal value in case if CFROM is equal to zero and has a NaN value inside.
znaupd is an ARPACK function. Call toZLASCL appears at call tree znaupd->znaup2->-znaitr->zlascl. 4th parameter to ZLASCL is rnorm which is defined and calculated insideby call fromznaup2 to zgetv0.
I could assume that you are trying to run the ARPACK code in parallel from several threads at a moment. UnfortunatelyARPACK is not designed in thread safe way. It is written in Fortran andhas variables with SAVE attribute inside (equivalent to static in C), which keeps theirvalues between function calls.Several threads couldn't operate on such variables at the same time in a safe way because such threads will share the same memory location.
If this is the case, then to avoid the problem you need force in your code that only one thread at a moment calls ARPACK (you could use several threads only for different functions calls and if trees of subcall of such functions do not intersect on functions which contains variables with SAVE attribute). You could also try to modify ARPACK to be thread safe (or find one). MKL is thread safe already.
Good luck,
Alexander
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page