You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AIX 7.1 with GCC/GFortran - Issue needing resolution #1803
I set up everything using the packages provided here. This includes the makefile, GCC and GFortran for AIX 7.1, Python 2.7, and so on. My objective is to get OpenBLAS set up to get SciPy module working (due to Lapack/BLAS dependency) for Python 2.7.
I updated Makefile.system to comment out the -m32/-m64 as noted in Issue 463:
Assembler:
/home/fp/OpenBLAS-0.2.20/tmp/cc7zjwrP.s: line 71: Error In Syntax
/home/fp/OpenBLAS-0.2.20/tmp/cc7zjwrP.s: line 72: invalid opcode or pseudo-op
/home/fp/OpenBLAS-0.2.20/tmp/cc7zjwrP.s: line 73: Error In Syntax
/home/fp/OpenBLAS-0.2.20/tmp/cc7zjwrP.s: line 100: Error In Syntax
/home/fp/OpenBLAS-0.2.20/tmp/cc7zjwrP.s: line 101: Error In Syntax
make[1]: *** [Makefile.L1:622: sasum_k.o] Error 1
make[1]: *** Waiting for unfinished jobs....
Assembler:
/home/fp/OpenBLAS-0.2.20/tmp/ccVmE6OQ.s: line 63: Error In Syntax
/home/fp/OpenBLAS-0.2.20/tmp/ccVmE6OQ.s: line 64: invalid opcode or pseudo-op
/home/fp/OpenBLAS-0.2.20/tmp/ccVmE6OQ.s: line 65: Error In Syntax
/home/fp/OpenBLAS-0.2.20/tmp/ccVmE6OQ.s: line 85: Error In Syntax
/home/fp/OpenBLAS-0.2.20/tmp/ccVmE6OQ.s: line 86: Error In Syntax
make[1]: *** [Makefile.L1:667: scopy_k.o] Error 1
make: *** [Makefile:139: libs] Error 1
How exactly should I address this?
As an aside, how exactly should $(OSNAME) get defined, so this would be correctly set:
Is there a specific reason why you would want to build 0.2.20 (which predates the fixes mentioned at the end of #463 ? Latest stable release is 0.3.3, you could also try a snapshot of the current "develop" branch.(And OSNAME gets defined by the c_check utility based on the output of gcc -E)
I got 0.2.20 from this page - http://www.openblas.net - which I now realize is clearly no longer being maintained. I will pull the latest version and try. Will update this accordingly.
Also, did try gcc -E just now, and it demands an input file. I will investigate the proper way to call gcc -E.
Sorry, gcc -E ctest.c is what c_check uses (and ctest.c is basically a bunch of ifdefs that prints out OS_AIX if the compiler defines _AIX). The situation with the openblas.net page is unfortunate indeed, I only have commit/release rights to the code repository.
Thank you. I confirmed that it recognize OS_AIX, and interestingly enough ARCH_POWER, not POWER8, even though prtconf indicates that Processor Type is PowerPC_POWER8. So I tried:
It went in a different direction, and produced the following message:
zblat3.f:1447:0: Warning: 'REALPART_EXPR ' may be used uninitialized in this function [-Wmaybe-uninitialized]
ld: 0711-317 ERROR: Undefined symbol: .get_num_procs
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: error: ld returned 8 exit status
ld: 0711-317 ERROR: Undefined symbol: .get_num_procs
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: error: ld returned 8 exit status
make[1]: *** [Makefile:137: dblat1] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:134: sblat1] Error 1
make: *** [Makefile:124: tests] Error 2
zblat ... undefined symbol
You need to run "make clean" between compilation runs.
0707-126 ...
From the error format it seems that xlc or aix ar is used where gcc expects GNU binutils ar
While the object format is compatible GNU ar manpage states:
-X32_64
ar ignores an initial option spelt -X32_64, for compatibility with AIX. The behaviour produced by this option is the default for GNU ar. ar does not support any of the other -X options; in particular, it does not support -X32 which is the default for AIX ar.
EDIT: it seems that gcc does not add -X32_64 option so AIX ar does not work.
There are no AIX-specific fixes between 0.3.3 and develop, you can stay with release until any fix is posted in relation with this issue.
At least in theory, identification of ARCH_POWER should lead to a call to cpuid_power that returns TARGET=POWER8, so specifying TARGET=POWER on the command line should not be necessary (and might even be detrimental). Unfortunately #463 was just lots of back and forth with the original poster leaving as soon as we got it to build "somehow", but the -X 64" argument to IBM ar should already be generated by Makefile.power.
From your logs it looks as if ar -X 64 does get called already, perhaps this actually needs to be "-X64" without the intervening blank (line 62 of Makefile.power).
(And building with TARGET=POWER apparently led to a build for POWER5, which may not be what you want)
I can confirm that with the 0.3.3 release, the -x 64 issue is all properly resolved, so I did not need to do any modification to the Makefile.system.
I installed binutils, and ran the following commands:
$ export PATH=/opt/freeware/bin:$PATH
This to trigger the use of GNU ar.
$ make clean
$ make
This threw an error for ar:
ar -X 32 -ru ../libopenblas_power5p-r0.3.3.a saxpy.o sswap.o scopy.o sscal.o [blahblahblah]
ar: invalid option -- X
Usage: ar [emulation options] [-]{dmpqrstx}[abcDfilMNoPsSTuvV] [--plugin ] [member-name] [count] archive-file file...
ar -M [<mri-script]
[information]
emulation options:
[-g] - 32 bit small archive
[-X32] - ignores 64 bit objects
[-X64] - ignores 32 bit objects
[-X32_64] - accepts 32 and 64 bit objects
So whitespace between -X and the digit are verboten for this particular AR install. Version:
$ ar -V
GNU ar (GNU Binutils) 2.25.1
Copyright (C) 2014 Free Software Foundation, Inc.
I am digging around to find out where the -X 32 is triggered, and see if I can fix the whitespace myself.
As I just wrote this, Martin responded with the fix which I addressed, and tried make again. Unfortunately, I still have to use FC=gfortran, as xlF is continued to be referenced to.
So in summary, things that AIX needs that I have identified so far:
GCC and its dependencies.
GFortran and its dependencies (xlF chokes unfortunately, even though we already have it installed).
GNU binlibs.
GNU make (AIX make chokes on the Makefile)
makefile.power to have the fix for -X 64 and -X 32 changed to -X64 and -X32.
What does file libopenblas_power5p-r0.3.3.a think what it is, if it is "not an archive file" ? Or does the numeric part of the error message suggest that ranlib managed to still invoke the AIX ar (which may not like the output that its gnu cousin prepared) ? Not sure if we saw anything like that in #463
I did a which ranlib which shows it's still referring to /usr/bin/ranlib, so you're on the button on this. I did try changing the symbolic link under /usr/bin/ar to the right version, but ranlib continues to error out with the wrong settings for ar:
$ ranlib libopenblas_power5p-r0.3.3.a
ar: invalid option -- X
Then I looked into /opt/freeware/bin/ and discovered there's several ranlib files:
$ ls -1 |grep ranlib
gcc-ranlib
granlib
powerpc-ibm-aix7.1.0.0-gcc-ranlib
granlib was set as read only, so I changed the permission to 755, and it rans:
So we need to update the makefiles to point to granlib, NOT ranlib, on AIX if using GNU programs (gcc/gfortran/gnu make, et cetera). I am currently investigating how to do this.
It could be that you just need to set RANLIB=/opt/freeware/bin/granlib (however things will get complicated if granlib does not have execute permissions by default).
On the other hand, the issue may just come from using GNU ar for generating the archive, I am not sure if there really is a reason to avoid the AIX ar (beyond brada4's initial interpretation of the error message from the misspelled option)
$ sudo make install
Password:
make -j 2 -f Makefile.install install
make[1]: Entering directory '/medstat/advantage/scratch/focal_point/download/OpenBLAS'
Generating openblas_config.h in /opt/OpenBLAS/include
Generating f77blas.h in /opt/OpenBLAS/include
Generating cblas.h in /opt/OpenBLAS/include
Copying LAPACKE header files to /opt/OpenBLAS/include
Copying the static library to /opt/OpenBLAS/lib
Copying the shared library to /opt/OpenBLAS/lib
installbsd: can't find libopenblas_power5p-r0.3.3.so.
make[1]: *** [Makefile.install:54: install] Error 1
make[1]: Leaving directory '/medstat/advantage/scratch/focal_point/download/OpenBLAS'
make: *** [Makefile:336: install] Error 2
This is because on AIX, all shared object files ends in .a, not .so. My quick and dirty fix:
Makefile.system:1202 - LIBSONAME = $(LIBNAME:.$(LIBSUFFIX)=.a)
instead of LIBSONAME = $(LIBNAME:.$(LIBSUFFIX)=.so)
Obviously, this is not the best way to do this. Will have to do an ifdef AIX in a sense. After clean and make, then:
$ sudo make install
Password:
make -j 2 -f Makefile.install install
make[1]: Entering directory '/medstat/advantage/scratch/focal_point/download/OpenBLAS'
Generating openblas_config.h in /opt/OpenBLAS/include
Generating f77blas.h in /opt/OpenBLAS/include
Generating cblas.h in /opt/OpenBLAS/include
Copying LAPACKE header files to /opt/OpenBLAS/include
Copying the static library to /opt/OpenBLAS/lib
Copying the shared library to /opt/OpenBLAS/lib
Generating openblas.pc in /opt/OpenBLAS/lib/pkgconfig
Generating OpenBLASConfig.cmake in /opt/OpenBLAS/lib/cmake/openblas
Generating OpenBLASConfigVersion.cmake in /opt/OpenBLAS/lib/cmake/openblas
Install OK!
make[1]: Leaving directory '/medstat/advantage/scratch/focal_point/download/OpenBLAS'
I need to test this to confirm everything is behaving correctly by installing NumPy and SciPy.
Okay, this may be getting out of bound in term of what this team could do to help me. However, I would like to give it a shot and see if anyone have an answer.
Installing Numpy 1.15.3 using the script - I tweaked the site.cfg file to enable OpenBLAS. Then I did a python_64 setup.py config and got a weird series of error messages, which is quite hard to interpret (did it succeed? Did it fail?). The output is attached here: config.txt
$ python_64 test.py
dotted two (1000,1000) matrices in 8933.6 ms
dotted two (4000) vectors in 38.62 us
SVD of (2000,1000) matrix in 15.931 s
Eigendecomp of (1500,1500) matrix in 37.237 s
In addition, when doing an install of Scipy using pip_64 install scipy, I get the following message:
numpy.distutils.system_info.NotFoundError: no lapack/blas resources found
So, I am confused, is OpenBLAS successfully installed? How can I verify this outside Numpy/Scipy?
In the numpy config.txt I think it found OpenBLAS initially, but then it apparently found an unrelated liblapack in /usr/lib64 (netlib reference implementation from your earlier build probably ?), and it did not find the OpenBLAS-provided cblas.h as it did not search /opt/OpenBLAS/include for headers.
Inside python/numpy, you can do python -c "import numpy; print(numpy.__config__.show())" as
shown in #1844 (comment) , outside you would need to compile/link some C or FORTRAN test code e.g. from the OpenBLAS benchmark directory.
Generally you will probably need to configure your system to search /opt/OpenBLAS/include
(and /opt/OpenBLAS/lib) in addition to the default search paths for headers (and libraries), or install to a commonly recognized PREFIX like /usr/local or /opt/freeware that is searched by default.
The clue on the /usr/lib64 actually solved a lot of the messy messages, and it narrowed down to ld not being able to spot certain references. Particularly:
I wonders if I need to just go ahead and install coreutils, et al that @ayappanec recommended even though I do not understand how it relates to this at this time. Updated output:
$ python -c "import numpy; print(numpy.__config__.show())"
lapack_info:
NOT AVAILABLE
lapack_opt_info:
NOT AVAILABLE
openblas_lapack_info:
NOT AVAILABLE
atlas_threads_info:
NOT AVAILABLE
openblas_clapack_info:
NOT AVAILABLE
atlas_3_10_threads_info:
NOT AVAILABLE
lapack_src_info:
NOT AVAILABLE
openblas_info:
libraries = ['openblas', 'openblas']
library_dirs = ['/opt/OpenBLAS/lib']
define_macros = [('HAVE_CBLAS', None)]
language = c
runtime_library_dirs = ['/opt/OpenBLAS/lib']
accelerate_info:
NOT AVAILABLE
blas_mkl_info:
NOT AVAILABLE
blas_opt_info:
libraries = ['openblas', 'openblas']
library_dirs = ['/opt/OpenBLAS/lib']
define_macros = [('HAVE_CBLAS', None)]
language = c
runtime_library_dirs = ['/opt/OpenBLAS/lib']
blis_info:
NOT AVAILABLE
atlas_info:
NOT AVAILABLE
atlas_3_10_info:
NOT AVAILABLE
lapack_mkl_info:
NOT AVAILABLE
None
logf and lroundf are probably in libgfortran (or its companion libquadmath), the various omp functions are in libgomp (GNU OpenMP) or whatever other implementation of OpenMP you have available.
Doing rpm -ql libgomp should display what (and where) is installed as part of this package, but it looks as if the python configure just needs to be told "somehow" that programs linking to openblas should also do -lopenmp -lgfortran to satisfy its dependencies.
Update: Found a way, just update CC env var to the proper settings (export CC='gcc -pthread -lm -lgcc -lgomp -lgfortran -maix64'), and it got everything. Had to manually build, instead of using pip_64, and everything looks good:
$ python_64 -c "import numpy; print(numpy.__config__.show())"
lapack_opt_info:
libraries = ['openblas', 'openblas']
library_dirs = ['/opt/OpenBLAS/lib']
define_macros = [('HAVE_CBLAS', None)]
language = c
runtime_library_dirs = ['/opt/OpenBLAS/lib']
blas_opt_info:
libraries = ['openblas', 'openblas']
library_dirs = ['/opt/OpenBLAS/lib']
define_macros = [('HAVE_CBLAS', None)]
language = c
runtime_library_dirs = ['/opt/OpenBLAS/lib']
openblas_info:
libraries = ['openblas', 'openblas']
library_dirs = ['/opt/OpenBLAS/lib']
define_macros = [('HAVE_CBLAS', None)]
language = c
runtime_library_dirs = ['/opt/OpenBLAS/lib']
blis_info:
NOT AVAILABLE
openblas_lapack_info:
libraries = ['openblas', 'openblas']
library_dirs = ['/opt/OpenBLAS/lib']
define_macros = [('HAVE_CBLAS', None)]
language = c
runtime_library_dirs = ['/opt/OpenBLAS/lib']
lapack_mkl_info:
NOT AVAILABLE
blas_mkl_info:
NOT AVAILABLE
None
Performance seems to be unchanged:
$ python_64 test.py
dotted two (1000,1000) matrices in 8905.2 ms
dotted two (4000) vectors in 38.45 us
SVD of (2000,1000) matrix in 15.946 s
Eigendecomp of (1500,1500) matrix in 37.419 s
Pip_64 installation of SciPy failed with same error as NumPy, so looks like I will have to do the same thing for SciPy too. Will do that tomorrow morning. Got a family to take care of.
Okay, with further tests and work (several issues were found with Numpy and Scipy and reported (or will be reported)) - I believe that OpenBLAS is mostly ready for AIX, except for the fix I noted in this update - #1803 (comment) - where Makefile.system needs to be modified to point to .a instead of .so for LIBSONAME when OS_AIX is true. Once a working defect is opened on this, I'll close this ticket.
Might also want to consider another ticket on pointing to the right Power CPU -- I am willing to be the guinea pig for this, if it help optimize the performance for OpenBLAS.
Thank you so much for the help you have given us on this!
Err, and in view of recent events (#1844) you may want to rebase your AIX binary on current "develop" and also set USE_SIMPLE_THREADED_LEVEL3=1 in Makefile.rule (#1851) unless a more elegant solution is found for the latter in the next couple of days.
Thank you for the head up. I will stand by for the time being before I need to remake this. I presume that we can go ahead and remake it without having to remake any dependents downstream, so this is a fairly simple task for us to do. BTW, if your timeline for 0.3.4 is by end of November, we can just absorb that then and rebuild with the Makefile.rule set (unless a fix is provided for that).
Activity
Teej42 commentedon Oct 9, 2018
Output/error/config.h/Makefile.conf as was requested in the other issue. Please let me know if you need anything else.
result.txt
error.txt
config.h.txt
Makefile.conf.txt
martin-frbg commentedon Oct 9, 2018
Is there a specific reason why you would want to build 0.2.20 (which predates the fixes mentioned at the end of #463 ? Latest stable release is 0.3.3, you could also try a snapshot of the current "develop" branch.(And OSNAME gets defined by the c_check utility based on the output of gcc -E)
Teej42 commentedon Oct 9, 2018
I got 0.2.20 from this page - http://www.openblas.net - which I now realize is clearly no longer being maintained. I will pull the latest version and try. Will update this accordingly.
Also, did try
gcc -Ejust now, and it demands an input file. I will investigate the proper way to callgcc -E.martin-frbg commentedon Oct 9, 2018
Sorry,
gcc -E ctest.cis what c_check uses (and ctest.c is basically a bunch of ifdefs that prints out OS_AIX if the compiler defines _AIX). The situation with the openblas.net page is unfortunate indeed, I only have commit/release rights to the code repository.Teej42 commentedon Oct 9, 2018
Thank you. I confirmed that it recognize OS_AIX, and interestingly enough ARCH_POWER, not POWER8, even though prtconf indicates that Processor Type is PowerPC_POWER8. So I tried:
/opt/freeware/bin/make FC=gfortran TARGET=POWER >result.txt 2>error.txtIt went in a different direction, and produced the following message:
zblat3.f:1447:0: Warning: 'REALPART_EXPR ' may be used uninitialized in this function [-Wmaybe-uninitialized]
ld: 0711-317 ERROR: Undefined symbol: .get_num_procs
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: error: ld returned 8 exit status
ld: 0711-317 ERROR: Undefined symbol: .get_num_procs
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: error: ld returned 8 exit status
make[1]: *** [Makefile:137: dblat1] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:134: sblat1] Error 1
make: *** [Makefile:124: tests] Error 2
Results: 32bitcompile.zip
I also tried:
/opt/freeware/bin/make BINARY=64 FC=gfortran TARGET=POWER >result.txt 2>error.txtGot thrown with a whole bunch of this:
ar: 0707-126 dlasd3.o is not valid with the current object file mode.
Use the -X option to specify the desired object mode.
Results: 64bitcompile.zip
I will grab the latest dev package after lunch, and will also investigate both results closely then to hopefully find a workaround.
Hopefully this is something that have already been seen somewhere else.
brada4 commentedon Oct 9, 2018
zblat ... undefined symbol
You need to run "make clean" between compilation runs.
0707-126 ...
From the error format it seems that xlc or aix ar is used where gcc expects GNU binutils ar
While the object format is compatible GNU ar manpage states:
EDIT: it seems that gcc does not add -X32_64 option so AIX ar does not work.
There are no AIX-specific fixes between 0.3.3 and develop, you can stay with release until any fix is posted in relation with this issue.
Teej42 commentedon Oct 9, 2018
Re: make clean:
364 vi error.txt
365 /opt/freeware/bin/make clean
366 /opt/freeware/bin/make FC=gfortran TARGET=POWER >result.txt 2>error.txt
367 vi error.txt
368 ls
369 ls -altr
370 /opt/freeware/bin/make clean
371 /opt/freeware/bin/make BINARY=64 FC=gfortran TARGET=POWER >result.txt 2>error.txt
372 vi error.txt
I will look into whether we're referencing the right ar or even if we have a copy installed, and update this accordingly.
brada4 commentedon Oct 9, 2018
I see one in AIX RPM collection. Probably you need to prepend that bin/ path so that GNU tools override AIX ones.
martin-frbg commentedon Oct 9, 2018
At least in theory, identification of ARCH_POWER should lead to a call to cpuid_power that returns TARGET=POWER8, so specifying TARGET=POWER on the command line should not be necessary (and might even be detrimental). Unfortunately #463 was just lots of back and forth with the original poster leaving as soon as we got it to build "somehow", but the -X 64" argument to IBM ar should already be generated by Makefile.power.
brada4 commentedon Oct 9, 2018
There is $CC invoked at the end twice, to link final shared library and to run linktest.
martin-frbg commentedon Oct 9, 2018
From your logs it looks as if
ar -X 64does get called already, perhaps this actually needs to be "-X64" without the intervening blank (line 62 of Makefile.power).(And building with TARGET=POWER apparently led to a build for POWER5, which may not be what you want)
Teej42 commentedon Oct 9, 2018
I can confirm that with the 0.3.3 release, the -x 64 issue is all properly resolved, so I did not need to do any modification to the Makefile.system.
I installed binutils, and ran the following commands:
$ export PATH=/opt/freeware/bin:$PATH
This to trigger the use of GNU ar.
$ make clean
$ make
This threw an error for ar:
ar -X 32 -ru ../libopenblas_power5p-r0.3.3.a saxpy.o sswap.o scopy.o sscal.o [blahblahblah]
ar: invalid option -- X
Usage: ar [emulation options] [-]{dmpqrstx}[abcDfilMNoPsSTuvV] [--plugin ] [member-name] [count] archive-file file...
ar -M [<mri-script]
[information]
emulation options:
[-g] - 32 bit small archive
[-X32] - ignores 64 bit objects
[-X64] - ignores 32 bit objects
[-X32_64] - accepts 32 and 64 bit objects
So whitespace between -X and the digit are verboten for this particular AR install. Version:
$ ar -V
GNU ar (GNU Binutils) 2.25.1
Copyright (C) 2014 Free Software Foundation, Inc.
I am digging around to find out where the -X 32 is triggered, and see if I can fix the whitespace myself.
As I just wrote this, Martin responded with the fix which I addressed, and tried make again. Unfortunately, I still have to use FC=gfortran, as xlF is continued to be referenced to.
So in summary, things that AIX needs that I have identified so far:
And it failed here:
ranlib ../../libopenblas_power5p-r0.3.3.a
ar: 0707-108 File ../../libopenblas_power5p-r0.3.3.a is not an archive file.
ranlib: 0654-601 Execution of ar failed
Usage: ranlib [-t] [-X {32|64|32_64}] [--] file ...
make[2]: *** [Makefile:557: ../../libopenblas_power5p-r0.3.3.a] Error 1
make[2]: Leaving directory '/medstat/fp/download/OpenBLAS/lapack-netlib/SRC'
make[1]: *** [Makefile:21: lapacklib] Error 2
make[1]: Leaving directory '/medstat/fp/download/OpenBLAS/lapack-netlib'
make: *** [Makefile:225: netlib] Error 2
Logs: 2-32bitcompile.zip
Running BINARY=64 option after cleaning.
martin-frbg commentedon Oct 9, 2018
What does
file libopenblas_power5p-r0.3.3.athink what it is, if it is "not an archive file" ? Or does the numeric part of the error message suggest that ranlib managed to still invoke the AIX ar (which may not like the output that its gnu cousin prepared) ? Not sure if we saw anything like that in #463Teej42 commentedon Oct 9, 2018
I did a which ranlib which shows it's still referring to
/usr/bin/ranlib, so you're on the button on this. I did try changing the symbolic link under /usr/bin/ar to the right version, but ranlib continues to error out with the wrong settings for ar:$ ranlib libopenblas_power5p-r0.3.3.a
ar: invalid option -- X
Then I looked into /opt/freeware/bin/ and discovered there's several ranlib files:
$ ls -1 |grep ranlib
gcc-ranlib
granlib
powerpc-ibm-aix7.1.0.0-gcc-ranlib
granlib was set as read only, so I changed the permission to 755, and it rans:
$ granlib libopenblas_power5p-r0.3.3.a
$ echo $?
0
$
So we need to update the makefiles to point to granlib, NOT ranlib, on AIX if using GNU programs (gcc/gfortran/gnu make, et cetera). I am currently investigating how to do this.
martin-frbg commentedon Oct 9, 2018
It could be that you just need to set RANLIB=/opt/freeware/bin/granlib (however things will get complicated if granlib does not have execute permissions by default).
On the other hand, the issue may just come from using GNU ar for generating the archive, I am not sure if there really is a reason to avoid the AIX ar (beyond brada4's initial interpretation of the error message from the misspelled option)
36 remaining items
Teej42 commentedon Nov 4, 2018
Okay, one more issue:
This is because on AIX, all shared object files ends in .a, not .so. My quick and dirty fix:
Makefile.system:1202-LIBSONAME = $(LIBNAME:.$(LIBSUFFIX)=.a)instead of
LIBSONAME = $(LIBNAME:.$(LIBSUFFIX)=.so)Obviously, this is not the best way to do this. Will have to do an
ifdef AIXin a sense. After clean and make, then:I need to test this to confirm everything is behaving correctly by installing NumPy and SciPy.
Teej42 commentedon Nov 4, 2018
Okay, this may be getting out of bound in term of what this team could do to help me. However, I would like to give it a shot and see if anyone have an answer.
Installing Numpy 1.15.3 using the script - I tweaked the site.cfg file to enable OpenBLAS. Then I did a
python_64 setup.py configand got a weird series of error messages, which is quite hard to interpret (did it succeed? Did it fail?). The output is attached here:config.txt
In addition, even after
python_64 setup.py buildandpip_64 install ., and a successful run of the test script I found elsewhere (https://hunseblog.wordpress.com/2014/09/15/installing-numpy-and-openblas/), the results is a bit slow:In addition, when doing an install of Scipy using
pip_64 install scipy, I get the following message:numpy.distutils.system_info.NotFoundError: no lapack/blas resources found
So, I am confused, is OpenBLAS successfully installed? How can I verify this outside Numpy/Scipy?
Thank you for all the help you've done for us.
martin-frbg commentedon Nov 4, 2018
In the numpy config.txt I think it found OpenBLAS initially, but then it apparently found an unrelated liblapack in /usr/lib64 (netlib reference implementation from your earlier build probably ?), and it did not find the OpenBLAS-provided cblas.h as it did not search /opt/OpenBLAS/include for headers.
Inside python/numpy, you can do
python -c "import numpy; print(numpy.__config__.show())"asshown in #1844 (comment) , outside you would need to compile/link some C or FORTRAN test code e.g. from the OpenBLAS benchmark directory.
Generally you will probably need to configure your system to search /opt/OpenBLAS/include
(and /opt/OpenBLAS/lib) in addition to the default search paths for headers (and libraries), or install to a commonly recognized PREFIX like /usr/local or /opt/freeware that is searched by default.
Teej42 commentedon Nov 5, 2018
The clue on the /usr/lib64 actually solved a lot of the messy messages, and it narrowed down to ld not being able to spot certain references. Particularly:
I wonders if I need to just go ahead and install coreutils, et al that @ayappanec recommended even though I do not understand how it relates to this at this time. Updated output:
config.txt
Edit: Output from the requested command:
Note: I changed
pythonto point topython_64.martin-frbg commentedon Nov 5, 2018
logf and lroundf are probably in libgfortran (or its companion libquadmath), the various omp functions are in libgomp (GNU OpenMP) or whatever other implementation of OpenMP you have available.
ayappanec commentedon Nov 5, 2018
libgomp is available in AIX Toolbox
Teej42 commentedon Nov 5, 2018
I can confirm that libgomp-6.3.0-1.aix7.1.ppc.rpm is already installed:
martin-frbg commentedon Nov 5, 2018
Doing
rpm -ql libgompshould display what (and where) is installed as part of this package, but it looks as if the python configure just needs to be told "somehow" that programs linking to openblas should also do-lopenmp -lgfortranto satisfy its dependencies.Teej42 commentedon Nov 5, 2018
Update: Found a way, just update CC env var to the proper settings (
export CC='gcc -pthread -lm -lgcc -lgomp -lgfortran -maix64'), and it got everything. Had to manually build, instead of usingpip_64, and everything looks good:Performance seems to be unchanged:
Pip_64 installation of SciPy failed with same error as NumPy, so looks like I will have to do the same thing for SciPy too. Will do that tomorrow morning. Got a family to take care of.
Teej42 commentedon Nov 8, 2018
Okay, with further tests and work (several issues were found with Numpy and Scipy and reported (or will be reported)) - I believe that OpenBLAS is mostly ready for AIX, except for the fix I noted in this update - #1803 (comment) - where
Makefile.systemneeds to be modified to point to.ainstead of.soforLIBSONAMEwhenOS_AIXis true. Once a working defect is opened on this, I'll close this ticket.Might also want to consider another ticket on pointing to the right Power CPU -- I am willing to be the guinea pig for this, if it help optimize the performance for OpenBLAS.
Thank you so much for the help you have given us on this!
martin-frbg commentedon Nov 12, 2018
The fix for Makefile.system is merged now; an untested solution for the cpu detection is now in #1868
martin-frbg commentedon Nov 12, 2018
Err, and in view of recent events (#1844) you may want to rebase your AIX binary on current "develop" and also set USE_SIMPLE_THREADED_LEVEL3=1 in Makefile.rule (#1851) unless a more elegant solution is found for the latter in the next couple of days.
Teej42 commentedon Nov 13, 2018
Thank you for the head up. I will stand by for the time being before I need to remake this. I presume that we can go ahead and remake it without having to remake any dependents downstream, so this is a fairly simple task for us to do. BTW, if your timeline for 0.3.4 is by end of November, we can just absorb that then and rebuild with the Makefile.rule set (unless a fix is provided for that).
martin-frbg commentedon Dec 2, 2018
Closing as all the fixes required for building are in 0.3.4, and any remaining issues with installation can be handled in #1896