AIX Open Source

AIX Open Source

Share your experiences and connect with fellow developers to discover how to build and manage open source software for the AIX operating system

 View Only
  • 1.  libblas-dev & liblapack-dev for AIX?

    Posted Thu October 04, 2018 04:30 PM

    Originally posted by: Teej42


    OpenBLAS continues to be a problem for me.  Is there any known RPM that works for AIX 7.1 for BLAS and LAPACK that we could install?



  • 2.  Re: libblas-dev & liblapack-dev for AIX?

    Posted Fri October 05, 2018 02:40 AM

    Originally posted by: AyappanP


    R package provides it's own BLAS and LAPACK library. Install R & R-devel package and check.

    The headers can be found at "/opt/freeware/lib/R/include" (lib64 for 64bit)



  • 3.  Re: libblas-dev & liblapack-dev for AIX?

    Posted Mon October 08, 2018 10:58 AM

    Originally posted by: Teej42


    That is helpful, however, a couple of caveats:

    1.  The shared object files are named with libR instead of lib.  Those files are also installed in /opt/freeware/lib/R/lib.  Symbolic links entitled liblapack.so and libblas.so needs to be created in /opt/freeware/lib to reference this.

    2.  The include files does not include cblas.h, only BLAS.h within /opt/freeware/lib/R/include/R_ext/.  Symbolic links entitled cblas.h and lapack.h needs to be created in /opt/freeware/include to reference both BLAS.h and Lapack.h.  

     

    With both modifications, SciPy (python -m pip install scipy) is still failing, but at a much further point.  If I am unable to resolve, I will open a new thread.  Thank you.



  • 4.  Re: libblas-dev & liblapack-dev for AIX?

    Posted Mon October 08, 2018 01:31 PM

    Originally posted by: Teej42


    Upon further investigation, it was wrong on my part to assume that R have Lapack/BLAS complete version.  What was provided is blas, not cblas.  SciPy requires cblas and its associated library files.  librblas.so does not contains these C-based dependencies.

     

    So once again, is there a package available that provide a GCC version of Lapack/BLAS, preferably by itself, NOT included in any other packages?  



  • 5.  Re: libblas-dev & liblapack-dev for AIX?

    Posted Wed October 10, 2018 11:04 AM

    Originally posted by: AyappanP


    It seems like your requirement is to install scipy. I tried it myself. 

    With some hacks i am able to install scipy.

    One can build this lapack source ( http://www.netlib.org/lapack/ ) easily in AIX. You just need gcc-gfortran rpm installed

    Extract source and copy make.inc.example as make.inc followed by "make"

    After build , copy three libraries (liblapack.a , librefblas.a, libtmglib.a ) to /opt/freeware/lib. Rename librefblas.a as libblas.a

    Apply this patch in scipy source 

     

    --- scipy/special/cephes/dd_real.h_orig 2018-10-10 19:53:10 +0000
    +++ scipy/special/cephes/dd_real.h      2018-10-10 11:41:59 +0000
    @@ -105,7 +105,7 @@
     extern const double2 DD_C_ZERO;
     extern const double2 DD_C_ONE;

    -#if defined(__STDC__) && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && defined(NAN)
    +#if defined(__STDC__) && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && defined(NAN) && !(defined(_AIX))
     #define DD_C_NAN_IS_CONST
     extern const double2 DD_C_NAN;
     extern const double2 DD_C_INF;

     

    Finally run

    LDFLAGS="-lpthread" python setup.py install



  • 6.  Re: libblas-dev & liblapack-dev for AIX?

    Posted Wed October 10, 2018 03:50 PM
      |   view attached

    Originally posted by: Teej42


    It threw:

    close failed in file object destructor:
    sys.excepthook is missing
    lost sys.stderr

     

     

    Attached is the log of this effort.  Please advise.

    Attachment(s)

    txt
    Install_SciPy.txt   304 KB 1 version


  • 7.  Re: libblas-dev & liblapack-dev for AIX?

    Posted Thu October 11, 2018 03:32 AM

    Originally posted by: AyappanP


    This issue is fixed in the latest python release. Please update your python to the latest ie., python-2.7.15-2



  • 8.  Re: libblas-dev & liblapack-dev for AIX?

    Posted Thu October 11, 2018 01:24 PM

    Originally posted by: Teej42


    That appears to resolve the issues.  We have not yet tried SciPy's functionalities, but the packages are now installed successfully.

     

    Thank you for the help you provided!  I will take some time today to report to the SciPy dev team to make this particular adjustment, unless you wish to do this?