Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyAF Powerpc support (IBM S822xx) #160

Closed
antoinecarme opened this issue May 11, 2021 · 11 comments
Closed

PyAF Powerpc support (IBM S822xx) #160

antoinecarme opened this issue May 11, 2021 · 11 comments

Comments

@antoinecarme
Copy link
Owner

antoinecarme commented May 11, 2021

Someone asked for PyAF powerpc support (IBM S822xx). This can be seen as a software robustness/portability test for PyAF.

Need to run all PyAF tests on a Debian Linux PPC64 on at least IBM Power8 CPU.

  1. Check that all needed data packages are available (point missing packages).
  2. Run build tests (make -f tests/Makefilebuild-tests), travis-ci equivalent
  3. Run extended tests (make -f tests/Makefile all)
  4. Analyze numerical differences if any.
  5. Big Endian / Little Endian ?

The hardware is made available through the excellent Minicloud, The FREE OpenPower Cloud by Unicamp , Campinas, Sao Paulo, Brazil

https://openpower.ic.unicamp.br

Big Thank you, @Unicamp-OpenPower !!!

@antoinecarme
Copy link
Owner Author

antoinecarme commented May 11, 2021

Debian packages. Python 3.9 installed by default.

root@ppc64-le:/home/debian# uname -a
Linux ppc64-le 5.7.0-2-powerpc64le #1 SMP Debian 5.7.10-1 (2020-07-26) ppc64le GNU/Linux

apt-get install git

apt-get install -y graphviz python3-sklearn python3-pandas python3-sqlalchemy python3-matplotlib jupyter-notebook python3-ipython python3-scipy python3-numpy python3-dill python3-pydot

apt-get install -y python3-xgboost python3-pip python3-objgraph cmake

apt-get install python3-keras

@antoinecarme
Copy link
Owner Author

CPU info :

root@ppc64-le:/home/debian# lscpu 
Architecture:                    ppc64le
Byte Order:                      Little Endian
CPU(s):                          8
On-line CPU(s) list:             0-7
Thread(s) per core:              1
Core(s) per socket:              1
Socket(s):                       8
NUMA node(s):                    1
Model:                           2.1 (pvr 004b 0201)
Model name:                      POWER8 (architected), altivec supported
Hypervisor vendor:               KVM
Virtualization type:             para
L1d cache:                       512 KiB
L1i cache:                       256 KiB
NUMA node0 CPU(s):               0-7
Vulnerability Itlb multihit:     Not affected
Vulnerability L1tf:              Mitigation; RFI Flush, L1D private per thread
Vulnerability Mds:               Not affected
Vulnerability Meltdown:          Mitigation; RFI Flush, L1D private per thread
Vulnerability Spec store bypass: Mitigation; Kernel entry/exit barrier (hwsync)
Vulnerability Spectre v1:        Mitigation; __user pointer sanitization, ori31 speculation barrier enabled
Vulnerability Spectre v2:        Mitigation; Software count cache flush, Software link stack flush
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected

@antoinecarme
Copy link
Owner Author

Packages versions:

antoine@ppc64-le:~/dev/python/packages/timeseries/pyaf$ grep PYAF_SYSTEM_DEPENDENT_VERSION_INFO logs/basic_checks_platform_info.log
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('Cython_version', '0.29.21')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('dill_version', '0.3.3')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('keras_version', '2.3.1')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('lightgbm_version', '3.2.1')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('matplotlib_version', '3.3.4')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('numpy_version', '1.19.5')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('pandas_version', '1.1.5')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('pathos_version', 'NOT_INSTALLED')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('pip_version', '20.3.4')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('pyaf_version', '2.0')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('pydot_version', '1.4.2')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('python_implementation', 'CPython')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('python_version', '3.9.2')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('scipy_version', '1.6.0')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('setuptools_version', '52.0.0')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('sklearn_version', '0.23.2')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('sqlalchemy_version', '1.3.22')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('system_platform', 'Linux-5.7.0-2-powerpc64le-ppc64le-with-glibc2.31')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('system_processor', '')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('system_uname', uname_result(system='Linux', node='ppc64-le', release='5.7.0-2-powerpc64le', version='#1 SMP Debian 5.7.10-1 (2020-07-26)', machine='ppc64le'))
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('xgboost_version', '1.2.1')

@antoinecarme
Copy link
Owner Author

Environment variables :

antoine@ppc64-le:~/dev/python/packages/timeseries/pyaf$ grep PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE logs/basic_checks_platform_info.log
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('HOME', '/home/antoine')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('KMP_DUPLICATE_LIB_OK', 'True')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('KMP_INIT_AT_FORK', 'FALSE')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('LANG', 'en_US.UTF-8')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('LC_ALL', 'en_US.UTF-8')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('LOGNAME', 'antoine')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('LS_COLORS', 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('MAKEFLAGS', '')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('MAKELEVEL', '1')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('MFLAGS', '')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('MKL_NUM_THREADS', '1')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('MOTD_SHOWN', 'pam')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('NUMEXPR_MAX_THREADS', '8')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('NUMEXPR_NUM_THREADS', '1')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('OLDPWD', '/home/antoine')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('OMP_NUM_THREADS', '1')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('PATH', '/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('PWD', '/home/antoine/dev/python/packages/timeseries/pyaf')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('PYTHONPATH', '/home/antoine/dev/python/packages/timeseries/pyaf')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('SHELL', '/bin/bash')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('SHLVL', '0')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('SSH_CLIENT', '::1 47470 22')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('SSH_CONNECTION', '::1 47470 ::1 22')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('SSH_TTY', '/dev/pts/2')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('TERM', 'xterm')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('USER', 'antoine')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('XDG_RUNTIME_DIR', '/run/user/1002')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('XDG_SESSION_CLASS', 'user')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('XDG_SESSION_ID', '27')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('XDG_SESSION_TYPE', 'tty')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('_', '/usr/bin/make')

@antoinecarme
Copy link
Owner Author

Web Service is not usable. Probably a network issue (firewall ?)

antoine@ppc64-le:~/dev/python/packages/timeseries/pyaf$ wget https://pyaf.herokuapp.com
--2021-05-11 20:58:53--  https://pyaf.herokuapp.com/
Resolving pyaf.herokuapp.com (pyaf.herokuapp.com)... 34.240.104.255, 34.247.249.3, 34.251.140.205, ...
Connecting to pyaf.herokuapp.com (pyaf.herokuapp.com)|34.240.104.255|:443... connected.
HTTP request sent, awaiting response... ^C
antoine@ppc64-le:~/dev/python/packages/timeseries/pyaf$ 

@antoinecarme
Copy link
Owner Author

antoinecarme commented May 11, 2021

Keras package is available, but not usable as tensorflow does not support powerpc platform.

antoine@ppc64-le:~/dev/python/packages/timeseries/pyaf$ python3 tests/neuralnet/test_ozone_tensorflow.py 
Traceback (most recent call last):
  File "/home/antoine/dev/python/packages/timeseries/pyaf/tests/neuralnet/test_ozone_tensorflow.py", line 11, in <module>
    import tensorflow as tf
ModuleNotFoundError: No module named 'tensorflow'

antoine@ppc64-le:~/dev/python/packages/timeseries/pyaf$ pip install tensorflow
ERROR: Could not find a version that satisfies the requirement tensorflow
ERROR: No matching distribution found for tensorflow


tensorflow/tensorflow#13587
tensorflow/tensorflow#13587 (comment)

https://openpower.ic.unicamp.br/post/installing-tensorflow-on-power/

@antoinecarme
Copy link
Owner Author

Better use PyTorch !!!

@antoinecarme
Copy link
Owner Author

  1. Run build tests (make -f tests/Makefilebuild-tests), travis-ci equivalent

Perfect !!!

@antoinecarme
Copy link
Owner Author

A few very small numerical differences , this is normal. The reference numbers (_ORIG) come from an x86 platform run.

tail -10  logs/func_test_air_passengers.log.diff 
FIRST_DIFFERENCE_ORIG INFO:pyaf.std:LINEAR_RIDGE_TREND LinearTrend (114.90523344816313, array([197.60619977]))

FIRST_DIFFERENCE_NEW INFO:pyaf.std:LINEAR_RIDGE_TREND LinearTrend (114.90523344816275, array([197.60619977]))

LAST_DIFFERENCE_ORIG INFO:pyaf.std:LINEAR_RIDGE_TREND LinearTrend (114.90523344816313, array([197.60619977]))

LAST_DIFFERENCE_NEW INFO:pyaf.std:LINEAR_RIDGE_TREND LinearTrend (114.90523344816275, array([197.60619977]))

@antoinecarme
Copy link
Owner Author

Many thanks to the minicloud team !!!

image

@antoinecarme
Copy link
Owner Author

Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant