octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #45659] version function: options and return v


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #45659] version function: options and return values supported by Matlab
Date: Wed, 13 Apr 2016 17:42:49 +0000
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:46.0) Gecko/20100101 Firefox/46.0

Follow-up Comment #35, bug #45659 (project octave):

As suggested by Mike, the attached patch checks for functions specific to
OpenBLAS or ATLAS and prints that (but not the version numbers). If MKL is
loaded, it returns the string returned by mkl_get_version_string.

I put the new function "blas_version" into file "oct-shlib.cc" because it
already had some logic for including the correct headers for dlsym. If it
should be moved somewhere else please let me know (or feel free to move it).
When compiling with this patch, I get the following warning:

../liboctave/util/oct-shlib.cc: In function 'std::__cxx11::string
blas_version()':
../liboctave/util/oct-shlib.cc:534:41: warning: use of old-style cast
[-Wold-style-cast]
   *(void **) (&ptr_mkl_getversion_string) = dlsym (NULL,
"mkl_get_version_string"
                                         ^

Is this important? I do not know what the current-style cast would be in this
case. "dlsym" does not seem to be standard conformant anyway judging from what
I could find. Is there any other better way?
Neither can I test whether this works because I do not have access to the
MKL.

The output for me with this patch is:

>> version -blas
ans = OpenBLAS


Would a similar approach for LAPACK be OK? Check for ATLAS, give MKL version
string, default answer "unknown or reference LAPACK"? Are there any other
LAPACK implementations that should be checked? Are these supported at all? I
could not find any in ax-lapack.m4.


Another minor change in this patch: Matlab supports any mix of upper and
lowercase letters in the options to version. This fixes this difference.

(file #36918)
    _______________________________________________________

Additional Item Attachment:

File name: version_blas.patch             Size:3 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45659>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]