UCXを試す(7)
勉強がてら作成中の UCXのC++ラッパーをGithubに上げました。たぶんライブラリ関数の網羅率は5%くらいだしUCXの使い方をほとんどわかっていないので、あえてREADMEも何も書いていません。少しずつ機能を試して実装しながらライブラリとしての形を整えていきたいと思います。
ところで、下記のコマンドを使って上記のリポジトリに含まれているプログラム hello_world
を実行すると、以下のようなエラー(警告?)が表示されます。原因と対策を調査中。ソース読むしかないかなー。
$ cd ucxcpp $ cmake .. [~/ucxcpp/build] -- The C compiler identification is GNU 4.8.4 -- The CXX compiler identification is GNU 4.8.4 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Found MPI_C: /home/kfukuda/mpi/openmpi-2.1.2/lib/libmpi.so -- Found MPI_CXX: /home/kfukuda/mpi/openmpi-2.1.2/lib/libmpi.so -- Found Git: /usr/bin/git (found version "1.9.1") -- Configuring done -- Generating done -- Build files have been written to: /home/xxxxxxx/ucxcpp/build $ make ... [100%] Built target hello_world $ mpiexec -n 2 -mca btl tcp,self -host host1,host2 ./hello_world rc / mlx4_0:1 [1520851183.876675] [sakura171:12401:0] sys.c:555 UCX ERROR A new segment was to be created and size < SHMMIN or size > SHMMAX, or no new segment was to be created. A segment with given key existed, but size is greater than the size of that segment. Please check shared memory limits by 'ipcs -l'. ================================= List of resources: self / self / self tcp / tcp / ib0 tcp / tcp / eth0 tcp / tcp / eth1 ib / rc / mlx4_0:1 ib / ud / mlx4_0:1 cuda_cp / cuda_copy / cudacopy0 sysv / mm / sysv posix / mm / posix cma / cma / cma ================================= rc / mlx4_0:1 [1520851183.886542] [sakura173:16109:0] sys.c:555 UCX ERROR A new segment was to be created and size < SHMMIN or size > SHMMAX, or no new segment was to be created. A segment with given key existed, but size is greater than the size of that segment. Please check shared memory limits by 'ipcs -l'. sent string = IGUVOYG Rank 0 Done. Received: IGUVOYG Rank 1 Done.
MPIを使っているのは、デバイスのアドレス交換(ランデブー)のためです。UCXに含まれているオリジナルのhello_world
だと、ソケットを使っているのですが、それだとクライアントとサーバーの両方のプロセスを立ち上げるのが面倒なため、起動メカニズムとしてOpen MPIを使っています。MPIは通信には -mca btl tcp,self
を指定しているので、TCPのみが使われます。
共有メモリ(memory mapped file)関係のエラーぽいですが、よくわからん。(エラーと言われているが動くし)
UCXを試す(6)
https://gist.github.com/keisukefukuda/69e93074f6fc46a55267efeaca2ca093
AM_SHORT
というタイプのメッセージを、IBで送信する簡易プログラムがやっと動きました。他には、bcopy
と zcopy
があるので、次はこれを動かします。
AM
というのはActive messageというもので、受信した時にハンドラが起動されるようなメッセージのタイプです。
UCXを試す(5.5)
メモ書き。
うーん、examples/hello_world.c
を参考に、mlx4_0:1
デバイスで最小限の am_short
(short active message)を送信するプログラムを書いているのですが、これが動かない… hello_world
は同じ条件で動作しているので、自分のプログラムの何かがおかしいはず…
ということで絶賛デバッグ中