Wednesday, 20 September 2017

Deep Learning HOWTO with IBM Minsky Power8 server, Ubuntu 16.04, Caffe-NV and Kitti (Part 3)

Now, lets start installing the real stuff :-)

Download and Install the Nvidia software & drivers

CUDA8


root@minsky:/sw/dw# wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/ppc64el/cuda-repo-ubuntu1604_8.0.61-1_ppc64el.deb
--2017-05-17 11:34:13-- http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/ppc64el/cuda-repo-ubuntu1604_8.0.61-1_ppc64el.deb
Resolving developer.download.nvidia.com (developer.download.nvidia.com)... 192.229.221.58, 2606:2800:233:ef6:15dd:1ece:1d50:1e1
Connecting to developer.download.nvidia.com (developer.download.nvidia.com)|192.229.221.58|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2700 (2.6K) [application/x-deb]
Saving to: ‘cuda-repo-ubuntu1604_8.0.61-1_ppc64el.deb’
cuda-repo-ubuntu1604_8.0.61-1_ppc64el.deb 100%[=====================================================================================================>] 2.64K --.-KB/s in 0s
2017-05-17 11:34:13 (287 MB/s) - ‘cuda-repo-ubuntu1604_8.0.61-1_ppc64el.deb’ saved [2700/2700]
root@minsky:/sw/dw# apt install ./cuda-repo-ubuntu1604_8.0.61-1_ppc64el.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'cuda-repo-ubuntu1604' instead of './cuda-repo-ubuntu1604_8.0.61-1_ppc64el.deb'
The following NEW packages will be installed:
cuda-repo-ubuntu1604
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/2,700 B of archives.
After this operation, 37.9 kB of additional disk space will be used.
Get:1 /sw/dw/cuda-repo-ubuntu1604_8.0.61-1_ppc64el.deb cuda-repo-ubuntu1604 ppc64el 8.0.61-1 [2,700 B]
Selecting previously unselected package cuda-repo-ubuntu1604.
(Reading database ... 57454 files and directories currently installed.)
Preparing to unpack .../cuda-repo-ubuntu1604_8.0.61-1_ppc64el.deb ...
Unpacking cuda-repo-ubuntu1604 (8.0.61-1) ...
Setting up cuda-repo-ubuntu1604 (8.0.61-1) ...
OK
root@minsky:/sw/dw# apt update
Get:1 http://se.ports.ubuntu.com/ubuntu-ports xenial InRelease [247 kB]
Get:2 http://se.ports.ubuntu.com/ubuntu-ports xenial-updates InRelease [102 kB]
Get:3 http://se.ports.ubuntu.com/ubuntu-ports xenial-backports InRelease [102 kB]
Get:4 http://se.ports.ubuntu.com/ubuntu-ports xenial/main ppc64el Packages [1,134 kB]
.
.
.
Get:31 http://se.ports.ubuntu.com/ubuntu-ports xenial-backports/universe ppc64el Packages [1,656 B]
Get:32 http://se.ports.ubuntu.com/ubuntu-ports xenial-backports/universe Translation-en [1,216 B]
Fetched 15.9 MB in 8s (1,807 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
80 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@minsky:/sw/dw#
root@minsky:/sw/dw# apt install cuda
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
adwaita-icon-theme at-spi2-core bbswitch-dkms binutils build-essential bumblebee ca-certificates-java colord colord-data cpp cpp-5 cuda-8-0 cuda-command-line-tools-8-0 cuda-core-8-0
cuda-cublas-8-0
.
.
.
Processing triggers for dbus (1.10.6-1ubuntu3.3) ...
Processing triggers for ca-certificates (20160104ubuntu1) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
done.


REBOOT


Install de cuDNN libs

Download NVIDIA cuDNN 5.1 / 6.0 (select only one version) for CUDA 8.0 Power8 Deb packages from https://developer.nvidia.com/cudnn (Registration in NVIDIA's Accelerated Computing Developer Program is required)

root@minsky:/sw/dw# ll
total 198652
drwxrwxrwx 2 root root 4096 May 17 12:05 ./
drwxr-xr-x 3 root root 4096 May 17 11:34 ../
-rwxrwxrwx 1 root root 2700 Apr 8 06:45 cuda-repo-ubuntu1604_8.0.61-1_ppc64el.deb*
-rw-rw-r-- 1 ibm ibm 41212732 May 17 12:05 libcudnn5_5.1.10-1+cuda8.0_ppc64el.deb
-rw-rw-r-- 1 ibm ibm 33919496 May 17 12:02 libcudnn5-dev_5.1.10-1+cuda8.0_ppc64el.deb
-rw-rw-r-- 1 ibm ibm 68444212 May 17 12:04 libcudnn6_6.0.21-1+cuda8.0_ppc64el.deb
-rw-rw-r-- 1 ibm ibm 59820704 May 17 12:01 libcudnn6-dev_6.0.21-1+cuda8.0_ppc64el.deb

root@minsky:/sw/dw# apt install ./libcudnn6_6.0.21-1+cuda8.0_ppc64el.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libcudnn6' instead of './libcudnn6_6.0.21-1+cuda8.0_ppc64el.deb'
The following NEW packages will be installed:
libcudnn6
0 upgraded, 1 newly installed, 0 to remove and 79 not upgraded.
Need to get 0 B/68.4 MB of archives.
After this operation, 154 MB of additional disk space will be used.
Get:1 /sw/dw/libcudnn6_6.0.21-1+cuda8.0_ppc64el.deb libcudnn6 ppc64el 6.0.21-1+cuda8.0 [68.4 MB]
Selecting previously unselected package libcudnn6.
(Reading database ... 87755 files and directories currently installed.)
Preparing to unpack .../libcudnn6_6.0.21-1+cuda8.0_ppc64el.deb ...
Unpacking libcudnn6 (6.0.21-1+cuda8.0) ...
Processing triggers for libc-bin (2.23-0ubuntu5) ...
Setting up libcudnn6 (6.0.21-1+cuda8.0) ...
Processing triggers for libc-bin (2.23-0ubuntu5) …


root@minsky:/sw/dw# apt install ./libcudnn6-dev_6.0.21-1+cuda8.0_ppc64el.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libcudnn6-dev' instead of './libcudnn6-dev_6.0.21-1+cuda8.0_ppc64el.deb'
The following NEW packages will be installed:
libcudnn6-dev
0 upgraded, 1 newly installed, 0 to remove and 79 not upgraded.
Need to get 0 B/59.8 MB of archives.
After this operation, 145 MB of additional disk space will be used.
Get:1 /sw/dw/libcudnn6-dev_6.0.21-1+cuda8.0_ppc64el.deb libcudnn6-dev ppc64el 6.0.21-1+cuda8.0 [59.8 MB]
Selecting previously unselected package libcudnn6-dev.
(Reading database ... 87761 files and directories currently installed.)
Preparing to unpack .../libcudnn6-dev_6.0.21-1+cuda8.0_ppc64el.deb ...
Unpacking libcudnn6-dev (6.0.21-1+cuda8.0) ...
Setting up libcudnn6-dev (6.0.21-1+cuda8.0) ...
update-alternatives: using /usr/include/powerpc64le-linux-gnu/cudnn_v6.h to provide /usr/include/cudnn.h (libcudnn) in auto mode
root@minsky:/sw/dw#

Install de NCCL libraries

(necessary to run in more than 1 GPU)


root@minsky:/sw/dw# wget https://public.dhe.ibm.com/software/server/POWER/Linux/mldl/ubuntu/mldl-repo-network_3.4.0_ppc64el.deb
--2017-05-17 12:45:01-- https://public.dhe.ibm.com/software/server/POWER/Linux/mldl/ubuntu/mldl-repo-network_3.4.0_ppc64el.deb
Resolving public.dhe.ibm.com (public.dhe.ibm.com)... 9.17.248.112
Connecting to public.dhe.ibm.com (public.dhe.ibm.com)|9.17.248.112|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 144760 (141K) [text/plain]
Saving to: ‘mldl-repo-network_3.4.0_ppc64el.deb’

mldl-repo-network_3.4.0_ppc64el.deb 100%[=====================================================================================================>] 141.37K 181KB/s in 0.8s

2017-05-17 12:45:08 (181 KB/s) - ‘mldl-repo-network_3.4.0_ppc64el.deb’ saved [144760/144760]

root@minsky:/sw/dw# apt install ./mldl-repo-network_3.4.0_ppc64el.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'mldl-repo-network' instead of './mldl-repo-network_3.4.0_ppc64el.deb'
The following NEW packages will be installed:
mldl-repo-network
0 upgraded, 1 newly installed, 0 to remove and 76 not upgraded.
Need to get 0 B/145 kB of archives.
After this operation, 170 kB of additional disk space will be used.
Get:1 /sw/dw/mldl-repo-network_3.4.0_ppc64el.deb mldl-repo-network ppc64el 3.4.0 [145 kB]
Selecting previously unselected package mldl-repo-network.
(Reading database ... 111286 files and directories currently installed.)
Preparing to unpack .../mldl-repo-network_3.4.0_ppc64el.deb ...
Unpacking mldl-repo-network (3.4.0) ...
Setting up mldl-repo-network (3.4.0) ...
OK

root@minsky:/sw/dw# apt update
Hit:1 http://ports.ubuntu.com/ubuntu-ports xenial-security InRelease
Ign:2 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/ppc64el InRelease
Hit:3 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/ppc64el Release
Hit:5 http://se.ports.ubuntu.com/ubuntu-ports xenial InRelease
Hit:6 http://se.ports.ubuntu.com/ubuntu-ports xenial-updates InRelease
Hit:7 http://se.ports.ubuntu.com/ubuntu-ports xenial-backports InRelease
Get:8 http://public.dhe.ibm.com/software/server/POWER/Linux/mldl/ubuntu xenial InRelease [1,830 B]
Get:9 http://public.dhe.ibm.com/software/server/POWER/Linux/mldl/ubuntu xenial/main ppc64el Packages [33.8 kB]
Fetched 35.6 kB in 6s (5,700 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
76 packages can be upgraded. Run 'apt list --upgradable' to see them.

root@minsky:/sw/dw# apt search nccl
Sorting... Done
Full Text Search... Done
.

libnccl-dev/unknown 1.3.2-1.cuda8.0 ppc64el
NVIDIA Collectives Communication Library (NCCL) Development Files

libnccl1/unknown 1.3.2-1.cuda8.0 ppc64el
NVIDIA Collectives Communication Library (NCCL) Runtime


root@minsky:/sw/dw# apt install libnccl1 libnccl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
.
.
.
Unpacking libnccl-dev (1.3.2-1.cuda8.0) ...
Setting up libnccl-dev (1.3.2-1.cuda8.0) ...
root@minsky:/sw/dw#


export NCCL_ROOT_DIR=/opt/DL/nccl

# You can add this export line in the .profile of your root user.




Tuesday, 19 September 2017

Deep Learning HOWTO with IBM Minsky Power8 server, Ubuntu 16.04, Caffe-NV and Kitti (Part 2)

Minsky server has some differences when you compare with a regular one. By large the most time consuming one (if you do not know it) is the BMC port and how to connect to it.
Here is the explanation.

Interfaces in Minsky

IBM Minsky server (model 8335-GTB) has 3 NICs (Ethernet interfaces), however it only has two physical ports.

Watching the back of the server you will find both Ports (Port0 and Port1)



Port 1 is a common port that can be configured as a regular NIC in the OS.
Port 0 is a physical port that has two internal NICs, it shows 2 different MAC addresses to the network.
  1. The first MAC address is from a NIC that can be used in the OS as another regular eth adapters.
  2. The second MAC is from the BMC interface. It is configured as DHCP by default.

Implementing the connection

You can use whatever solution you prefer to connect, just checking the interface (see the first commands of our solution) for the acquired IP address but as we do not have DHCP server we will configure a static IP address in the same range as the NIC1, forgetting about the NIC0 interface.

From Ubuntu CLI

  1. Install the necessary packages in the host OS.

root@minsky:/etc/network# apt install ipmitool

  1. Then we have to install the ipmi driver

root@minsky:/etc/network# modprobe ipmi_devintf

  1. Now we will check the actual configuration
root@minsky:/etc/network# ipmitool lan print 1
Set in Progress         : Set Complete
Auth Type Support       : MD5 
Auth Type Enable        : Callback : MD5 
                        : User     : MD5 
                        : Operator : MD5 
                        : Admin    : MD5 
                        : OEM      : MD5 
IP Address Source       : DHCP Address
IP Address              : 0.0.0.0
Subnet Mask             : 0.0.0.0
MAC Address             : 70:e2:84:14:25:fd
SNMP Community String   : AMI
IP Header               : TTL=0x40 Flags=0x40 Precedence=0x00 TOS=0x10
BMC ARP Control         : ARP Responses Enabled, Gratuitous ARP Disabled
Gratituous ARP Intrvl   : 0.0 seconds
Default Gateway IP      : 0.0.0.0
Default Gateway MAC     : 00:00:00:00:00:00
Backup Gateway IP       : 0.0.0.0
Backup Gateway MAC      : 00:00:00:00:00:00
802.1q VLAN ID          : Disabled
802.1q VLAN Priority    : 0
RMCP+ Cipher Suites     : 0,1,2,3,6,7,8,11,12,15,16,17
Cipher Suite Priv Max   : caaaaaaaaaaaXXX
                        :     X=Cipher Suite Unused
                        :     c=CALLBACK
                        :     u=USER
                        :     o=OPERATOR
                        :     a=ADMIN
                        :     O=OEM
Bad Password Threshold  : 0
Invalid password disable: no
Attempt Count Reset Int.: 0
User Lockout Interval   : 0
root@minsky:/etc/network# 


  1. Check the current IP address configuration
root@minsky:/etc/network# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enP9p7s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 70:e2:84:14:25:fe brd ff:ff:ff:ff:ff:ff
    inet6 fe80::72e2:84ff:fe14:25fe/64 scope link 
       valid_lft forever preferred_lft forever
3: enP9p7s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 70:e2:84:14:25:ff brd ff:ff:ff:ff:ff:ff
    inet 10.250.45.2/24 brd 10.250.45.255 scope global enP9p7s0f1
       valid_lft forever preferred_lft forever
    inet6 fe80::72e2:84ff:fe14:25ff/64 scope link 
       valid_lft forever preferred_lft forever

  1. Configuration of the BMC interface with a static IP
root@minsky:/etc/network# ipmitool lan set 1 ipsrc static
root@minsky:/etc/network# ipmitool lan set 1 ipaddr 10.250.45.3
Setting LAN IP Address to 10.250.45.3
root@minsky:/etc/network# ipmitool lan set 1 netmask 255.255.255.0
Setting LAN Subnet Mask to 255.255.255.0
root@minsky:/etc/network# ipmitool lan set 1 defgw ipaddr 10.250.45.1
Setting LAN Default Gateway IP to 10.250.45.1
root@minsky:/etc/network# ipmitool lan set 1 arp respond on
Enabling BMC-generated ARP responses
root@minsky:/etc/network# ipmitool lan set 1 auth ADMIN MD5
root@minsky:/etc/network# ipmitool lan set 1 access on
Set Channel Access for channel 1 was successful.
root@minsky:/etc/network# 

  1. Check the outcome
root@minsky:~# ipmitool lan print 1
Set in Progress         : Set Complete
Auth Type Support       : MD5 
Auth Type Enable        : Callback : MD5 
                        : User     : MD5 
                        : Operator : MD5 
                        : Admin    : MD5 
                        : OEM      : MD5 
IP Address Source       : Static Address
IP Address              : 10.250.45.3
Subnet Mask             : 255.255.255.0
MAC Address             : 70:e2:84:14:25:fd
SNMP Community String   : AMI
IP Header               : TTL=0x40 Flags=0x40 Precedence=0x00 TOS=0x10
BMC ARP Control         : ARP Responses Enabled, Gratuitous ARP Disabled
Gratituous ARP Intrvl   : 0.0 seconds
Default Gateway IP      : 10.250.45.1
Default Gateway MAC     : 02:e0:52:8c:1f:01
Backup Gateway IP       : 0.0.0.0
Backup Gateway MAC      : 00:00:00:00:00:00
802.1q VLAN ID          : Disabled
802.1q VLAN Priority    : 0
RMCP+ Cipher Suites     : 0,1,2,3,6,7,8,11,12,15,16,17
Cipher Suite Priv Max   : caaaaaaaaaaaXXX
                        :     X=Cipher Suite Unused
                        :     c=CALLBACK
                        :     u=USER
                        :     o=OPERATOR
                        :     a=ADMIN
                        :     O=OEM
Bad Password Threshold  : 0
Invalid password disable: no
Attempt Count Reset Int.: 0
User Lockout Interval   : 0

  1. Now we can connect using a web browser


Credentials: username ADMIN password admin

You are in!!!




Deep Learning HOWTO with IBM Minsky Power8 server, Ubuntu 16.04, Caffe-NV and Kitti (Part 1)

Who should be reading this

This document is suited to anyone who wants to start testing deep learning in a supercomputer scale with an IBM Minsky server.
It will help installing all the latest and greatest components of this solution and then will help to run an example of deep learning as KITTI test is.

Justification of the document

You can follow IBM official doc (located here →https://www-01.ibm.com/common/ssi/cgi-bin/ssialias?htmlfid=POO03514WWEN ) to install the components necessary run this test.

However if you want the latest and greatest versions of all SW components you will find here a quick guide to install all of them with examples included

Ubuntu 16.04.02 OS installation


# Download Ubuntu 16.04.02 LTS from this URL (check if there is something newer)

# Burn the ISO into a USB drive and boot the system.

# Select the 4.4 kernel as in the photo (be aware that you may be presented with the option of installing HWE (shipped with kernel version 4.8. This is not supported at the time of writing this doc).

# Install only ssh and base packages.

# After first boot check the output is kernel 4.4 (not 4.8)

root@minsky:~# uname -a
Linux minsky 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:09:19 UTC 2017 ppc64le ppc64le ppc64le GNU/Linux
root@minsky:~#


# Keep the IP address/es to access later via ssh.

root@minsky:/sw/dw# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enP9p7s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 70:e2:84:14:25:fe brd ff:ff:ff:ff:ff:ff
    inet 9.6.112.113/25 brd 9.6.112.127 scope global enP9p7s0f0
       valid_lft forever preferred_lft forever
    inet6 fe80::72e2:84ff:fe14:25fe/64 scope link 
       valid_lft forever preferred_lft forever
3: enP9p7s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 70:e2:84:14:25:ff brd ff:ff:ff:ff:ff:ff
    inet 9.6.112.89/25 brd 9.6.112.127 scope global enP9p7s0f1
       valid_lft forever preferred_lft forever
    inet6 fe80::72e2:84ff:fe14:25ff/64 scope link 
       valid_lft forever preferred_lft forever
root@minsky:/sw/dw# 



Friday, 16 June 2017

Small Ethereum mining rig (44ish Mh/s)

44ish Mh/s, still running without firmware optimizations though.
Can donate here if you want :-) --> Link

Tuesday, 16 May 2017

Deep Learning using 2 Power8 CPUs (16 cores) @4Ghz and 2 Nvidia P100 GPUs (7186 cores)

Today we are breaking the time to complete a Kitti benchmark using 100 epochs with an IBM Minsky server.
Reference machine: Supermicro Intel based server with 2xP100 Nvidia cards. Test time: 300 minutes.
Our server: IBM Minsky Power8 based server with 2xP100 Nvidia cards. Predicted Test time: 131 minutes. (currently running) Final time 2h20mins (140 mins)

More details to come in next days...




Holidays are for the summer