Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

dpbtrf does not work for me on Windows x64 ?

wang_z_
Beginner
1,696 Views

  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 !

0 Kudos
10 Replies
mecej4
Honored Contributor III
1,696 Views

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.

0 Kudos
wang_z_
Beginner
1,696 Views

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:

/OUT:"x64\Debug/lagamine.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\Program Files (x86)\Intel\Composer XE 2013\mkl\lib\intel64" /MANIFEST /MANIFESTFILE:"D:\lagamine by lyb\mixed\intel\lagamine\x64\Debug\lagamine.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"x64\Debug/lagamine.pdb" /SUBSYSTEM:WINDOWS /STACK:90485760,90485760 /ENTRY:"WinMainCRTStartup"  mkl_scalapack_ilp64.lib mkl_intel_ilp64.lib mkl_core.lib mkl_sequential.lib mkl_blacs_intelmpi_ilp64.lib
/nologo /debug:full /Od /Qparallel /I"C:\Program Files (x86)\Intel\Composer XE 2013\mkl\include" /Dyes /Qsave /iface:cvf /module:"x64\Debug/" /object:"x64\Debug/" /Fd"x64\Debug\vc110.pdb" /traceback /check:bounds /libs:qwin /dbglibs /Qmkl:sequential /c
 
thank you !

 

 

0 Kudos
andrew_4619
Honored Contributor III
1,696 Views

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....

0 Kudos
wang_z_
Beginner
1,696 Views

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

 

0 Kudos
mecej4
Honored Contributor III
1,696 Views

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.

0 Kudos
wang_z_
Beginner
1,696 Views

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 !

0 Kudos
mecej4
Honored Contributor III
1,696 Views

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.

0 Kudos
wang_z_
Beginner
1,696 Views

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

/OUT:"x64\Debug/lagamine.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\Program Files (x86)\Intel\Composer XE 2013\mkl\lib\intel64" /MANIFEST /MANIFESTFILE:"D:\lagamine by lyb\mixed\intel\lagamine\x64\Debug\lagamine.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"x64\Debug/lagamine.pdb" /SUBSYSTEM:WINDOWS /STACK:90485760,90485760 /ENTRY:"WinMainCRTStartup"  mkl_scalapack_lp64.lib mkl_intel_lp64.lib mkl_core.lib mkl_sequential.lib mkl_blacs_intelmpi_lp64.lib
 
the variables in the subroutine are not modified(#3), it has the same same false conclusions!
now i have no idea,The compiler and linker settings  accord to "https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor"
0 Kudos
mecej4
Honored Contributor III
1,696 Views

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.

0 Kudos
wang_z_
Beginner
1,696 Views

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

0 Kudos
Reply