Community
cancel
Showing results for 
Search instead for 
Did you mean: 
acar
Beginner
175 Views

DGELSS Issue

I am attempting to use this routine but am getting an exception:

Exception thrown at 0x01FA5428 (mkl_core.dll) in Console1.exe: 0xC0000005: Access violation reading location 0x00000000.

I wonder if anyone knows how I might fix this.

Thanks, Angus. 

 

 

0 Kudos
7 Replies
Gennady_F_Intel
Moderator
175 Views

we not aware about such issue. could you give us more details.

acar
Beginner
175 Views

The attached zip file contains my small application that causes the issue...

acar
Beginner
175 Views

The application sets up an underdetermined and rank deficient set of equations and I wish to obtain a least squares solution to the problem.  The routine runs fine until I call dgelss when I get the error shown in the image uploaded previously.  Any assistance, and you can take a look at the complete application uploaded previously, would be gratefully received.  Thanks,  Angus. 

mecej4
Black Belt
175 Views

The routine DGELSS has a Fortran-77 interface, with 13 arguments. You have called it with just 4 arguments, and such a call is bound to fail badly. If you want to call the Lapack95 version, instead, the routine name is GELSS, and that routine takes 2 required arguments + 4 optional arguments.

The routine GELSS is a driver routine; with a single call to it, you can obtain the least-norm solution to a rank-deficient undetermined set of equations. Therefore, I do not understand why you have calls to GETRF and GETRI and further matrix operations.

The MKL distribution includes the source code for an example that calls GELSS.

acar
Beginner
175 Views

Okay to using gelss rather than dgelss.  However, according to the INTEL MKL documentation the call has four non-optional arguments:

https://software.intel.com/en-us/mkl-developer-reference-fortran-gelss

Nontheless, if I call it with just the first two essential arguments it seems to work - need to check out the results in more detail.

The calls to getrf and getri were an earlier attempt to solve the problem before I realised that could be rank-deficient.

Thanks for your assistance with this.

mecej4
Black Belt
175 Views

acar wrote:
... according to the INTEL MKL documentation the call has four non-optional arguments ... Nonetheless, if I call it with just the first two essential arguments it seems to work

The convention used in the documentation is that arguments shown within square brackets are optional keyword arguments. The comma preceding an optional argument is also shown inside the square brackets, and that should remove any ambiguity as to what is meant.

acar
Beginner
175 Views

Ah - it is a long while since I'd done any coding and when I look again I do indeed see the call syntax towards the top of the page and the LAPACK95 Interface notes at the bottom of the page where only some of the arguments are listed/defined and where the optional nature of some of these is not clear.  Might be better, for optimum clarity, to move the appropriate call syntax to be adjacent to the notes?

Thanks for your patience and help.

Reply