- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
the subroutine dpbtrf in the MKL, it works well on Windows X84, when i compile my project on windows X64, these no wrong report. I run the proiect, but when run at "call dpbtrf " location, it gives a wrong report " severe(157): program exception- access violation."
why? dpbtrf can woks well on windowsX84, but not works on windows X64? tell me ! thank you !
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you mean "X86" or "IA32" or something else other than "X84"?
There are two default integer sizes available in X64 architectures, and you have to make sure that the arguments passed to any MKL routine are of the correct type, contain the correct information, that the appropriate MKL library is selected, and that the compiler options used are consistent with the MKL library.
Instead of jumping to false conclusions such as "dpbtrf can work well on windowsX84, but not on windows X64", please provide details of how you used the routine so that we can help you to correct your code.
There is an example code provided with MKL (dpbtrfx.f), and consulting it may be useful to you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I mean“X84”="IA32".
for example:
" call dpbtrf('U',NEQUA,MBAND-1,FACT,MBAND,info)
call dpbtrs('U',NEQUA,MBAND-1,KFIXA,FACT,MBAND,AKib,NEQUA,info)"
here, NEQUA=72, MBAND=15, KFIXA=48 FACT(15,72), ABib(72,48)
it works fine with Win32 configuration,when i compile my poriect with Win64 configuration. the project is passed. the project can run,but run at here,it stops and give a false conclusions "severe(157): program exception- access violation." at this time the "MBAND=0" in the "dpbtrf".
The compiler and linker settings for x64 is listed below:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You should show the declaration of the variables you list as that is most likely the cause e.g. you as passing type INTEGER (default kind 4) when a INTEGER(8) is required....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK
This is my subroutine
SUBROUTINE DEM_KBB_gaojie(NEQUA,KFIXA,AKb,MBAND
. ,FACT,AKib,AKbi,AKbb)
IMPLICIT DOUBLE PRECISION(A-H,O-Z)
DIMENSION AKb(KFIXA,KFIXA)
DIMENSION AKbb(KFIXA,KFIXA),AKib(NEQUA,KFIXA),AKbi(KFIXA,NEQUA)
. ,FACT(MBAND,NEQUA)
call dpbtrf('U',NEQUA,MBAND-1,FACT,MBAND,info)
call dpbtrs('U',NEQUA,MBAND-1,KFIXA,FACT,MBAND,AKib,NEQUA,info)
call MULTI(AKbi,AKib,KFIXA,NEQUA,KFIXA,AKb)
AKb=AKbb-AKb
RETURN
END
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The libraries listed in the linker options of #3 are ILP64 libraries, which are appropriate when integer arguments are 8-byte integers. Are integer variables declared in your source codes consistently with that choice? (Added after seeing #5: your subroutine uses 4-byte integers, unless you use the /integer-size:8 compiler option).
Do you really need to use 8-byte integers? If not, change the compiler options to suit, and select LP64 MKL libraries to go with 4-byte integer arguments.
Why did you use /iface:cvf in a 64 bit environment? This option has an effect on the way character type arguments are passed.
The two inconsistencies that I have raised suspicions about can certainly lead to access violations at run time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i want to allocate a long matrix a[*,*,*] , it's size is longer than 2G,so i must use Win64 configuration.
in the subroutine, if i declare like this
IMPLICIT none
INTEGER(8)KFIXA,NEQUA,MBAND
REAL(16) AKb,AKbb,AKbi,FACT
DIMENSION AKb(KFIXA,KFIXA)
DIMENSION AKbb(KFIXA,KFIXA),AKbb(NEQUA,KFIXA),AKbi(KFIXA,NEQUA)
. ,FACT(MBAND,NEQUA)
when run to here,it has a same false conclusions, why? and how to select LP64 MKL libraries to go with 4-byte integer arguments.
the "dpbtrf" has anther one can be used to Win64 configuration, i can not find.
thank you !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do not use REAL(16) without thinking about it! There is no provision in MKL (and most BLAS and Lapack libraries) for REAL(16). Please read Fortran and MKL documentation and gain an understanding of data type compatibility before proceeding.
In Win64, simply choosing /Qmkl will cause the LP64 libraries to be used when the default integer size is in effect. You do not need 8-byte integers just for the purpose of addressing multidimensional arrays larger than 2 GB.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
mecej4 wrote:
Do not use REAL(16) without thinking about it! There is no provision in MKL (and most BLAS and Lapack libraries) for REAL(16). Please read Fortran and MKL documentation and gain an understanding of data type compatibility before proceeding.
In Win64, simply choosing /Qmkl will cause the LP64 libraries to be used when the default integer size is in effect. You do not need 8-byte integers just for the purpose of addressing multidimensional arrays larger than 2 GB.
please look at this Win64 configuration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please post a complete example that fails in the manner that you described. Not much can be done other than to guess what could go wrong when only fragments of code and commands are shown.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
mecej4 wrote:
Please post a complete example that fails in the manner that you described. Not much can be done other than to guess what could go wrong when only fragments of code and commands are shown.
You are right, I have write a test program and passed, so the subrutine has no problem.
Put it into my project, it does not run as before.
so i think the problem is at the Win64 configuration

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page