dbirch997 / cantera

Automatically exported from code.google.com/p/cantera
1 stars 0 forks source link

libAtlas and Suse-lapack cause cantera/matlab to crash #34

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Compile cantera with libatlas, or with the lapack that comes with openSuse
2. in matlab: gas=GRI30
3. equilibrate(gas, 'HP')

What is the expected output? What do you see instead?
Matlab crashes with the following message:
"on entry to dgetrf parameter number  4 had an illegal value" 

What version of the product are you using? On what operating system?
openSuse 11.3, x64
Cantera 1.8 (svn/cantera18/trunk/)
lapack 3.2.1-7.1 (openSuse)
libatlas 3.8.3-29.1 

Please provide any additional information below.
Everything works normal when I use the lapack from cantera

Original issue reported on code.google.com by spe.go...@gmail.com on 14 Jan 2011 at 2:49

GoogleCodeExporter commented 9 years ago
I can confirm the same problem, using Ubuntu 11.10 and Matlab 7.13 (x64). 
However, this problem occurs with any of these BLAS/LAPACK libraries: (1) 
Ubuntu's (Atlas-based), (2) Cantera's f2c versions, and (3) Matlab's libraries 
(libmwlapack and libmwblas).

Original comment by yarmond on 10 Apr 2012 at 10:36

GoogleCodeExporter commented 9 years ago
Modifications in r1397 make the case where Cantera uses its own LAPACK/BLAS 
implementation work again.

From what I can tell, what appears to be happening is that if Cantera is linked 
to a dynamic LAPACK or BLAS library, when the .mex file is loaded, Matlab's 
LAPACK and BLAS are used instead. The problem with this is that Matlab's BLAS 
and LAPACK use 8-byte fortran integer types, rather than the more-common 4-byte 
integer type that Cantera assumes.

Unfortunately, I'm not sure there's a way to detect the integer type given the 
library, and furthermore this requires making changes at compile time that 
depend on the link-time options, so we'd have to compile everything twice to 
create a normal library that uses 4-byte integer BLAS and a Matlab extension 
that uses 8-byte fortran integers.

Original comment by yarmond on 11 Apr 2012 at 5:57

GoogleCodeExporter commented 9 years ago

Original comment by yarmond on 14 Nov 2012 at 4:27

GoogleCodeExporter commented 9 years ago
Issue 169 has been merged into this issue.

Original comment by yarmond on 5 Aug 2013 at 4:41

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r2617.

Original comment by yarmond on 18 Dec 2013 at 5:45