SCore-D テスト手順


clusterの動作が正しいか確認するために、 以下のテスト手順にトライしてみてください。
例ではbash(1)シェルが使われています。
  1. 環境変数SCBDSERVおよびPATHを設定します。

    もし手動でインストールしたのでしたら、環境変数 SCBDSERV を設定してください。 そうでなければ login しなおしてください。 それでもまだこの変数が見えなければ、サーバホストの設定にしたがって /etc/profile.d のしたにあるあなたのログインシェルのための設定ファイルを 確認してください。

  2. コンピュータホストロッククライアントの起動
    $ msgb -group pcc &
    pccscoreboard databaseで決定したグループ名です。

  3. MPC++ MTTLプログラムのコンパイルと実行

    いかのプログラムを作成してください。hello.ccとします。 このプログラムのコピーは /opt/score/example/mttl/hello.ccにあります:
    #include <stdio.h>
    #include <mpcxx.h>
    main(int argc, char **argv) {
        mpcxx_spmd_initialize(argc, argv);
        printf("hello, world (from node %d)\n", myNode);
        exit(0);
    }
    mpc++でこれをコンパイルします:
    $ mpc++ -o hello hello.cc
    一つの CPU でプログラムを実行します:
    $ scrun -nodes=1 ./hello
    SCore-D 5.0.0 connected.
    <0:0> SCORE: One node ready.
    hello, world (from node 0)
    $ 
    4ノードのcluster上で実行します:
    $ scrun -nodes=4 ./hello
    SCore-D 5.0.0 connected.
    <0:0> SCORE: 4 nodes (4x1) ready.
    hello, world (from node 2)
    hello, world (from node 1)
    hello, world (from node 3)
    hello, world (from node 0)
    $ 
  4. MPICH-SCoreプログラムのコンパイルと実行

    /opt/score/example/mpi/cpi.cのプログラムをワークディレクトリにコピーし、mpiccでコンパイルします:
    $ mpicc -o cpi cpi.c -lm
    scrunmpirunの両方を用いて一つの CPU で実行します:
    $ scrun ./cpi
    SCore-D 5.0.0 connected.
    <0:0> SCORE: One node ready.
    Process 0 of 1 on comp3.pccluster.org
    pi is approximately 3.1416009869231254, Error is 0.0000083333333323
    wall clock time = 0.000621
    $ mpirun ./cpi
    SCore-D 5.0.0 connected.
    <0:0> SCORE: One node ready.
    Process 0 of 1 on comp3.pccluster.org
    pi is approximately 3.1416009869231254, Error is 0.0000083333333323
    wall clock time = 0.000645
    $ 
    scrunmpirunの両方を用いて4ノードのcluster環境下で実行します:
    $ scrun -nodes=4 ./cpi
    SCore-D 5.0.0 connected.
    <0:0> SCORE: 4 nodes (4x1) ready.
    Process 1 of 4 on comp1.pccluster.org
    Process 3 of 4 on comp3.pccluster.org
    Process 2 of 4 on comp2.pccluster.org
    Process 0 of 4 on comp0.pccluster.org
    pi is approximately 3.1416009869231245, Error is 0.0000083333333314
    wall clock time = 0.000945
    $ mpirun -np 4 ./cpi
    SCore-D 5.0.0 connected.
    <0:0> SCORE: 4 nodes (4x1) ready.
    Process 2 of 4 on comp2.pccluster.org
    Process 1 of 4 on comp1.pccluster.org
    Process 0 of 4 on comp0.pccluster.org
    Process 3 of 4 on comp3.pccluster.org
    pi is approximately 3.1416009869231245, Error is 0.0000083333333314
    wall clock time = 0.003627
    $ 
  5. Single-User環境の終了
    $ exit
    SCOUT: session done
    $ 
  6. Multi-User環境のためにSCore-D operating systemを起動

    rootからscoutとSCore-D operating systemを実行します。 scoredの起動が完了するには数秒かかります:
    $ /bin/su -
    # export SCBDSERV=`hostname`
    # export PATH=$PATH:/opt/score/bin:/opt/score/sbin:/opt/score/deploy
    # scout -g pcc
    SCOUT: Spawn done.
    SCOUT: session started
    # scored
    SYSLOG: /opt/score5.0.0/deploy/scored
    SYSLOG: SCore-D 5.0.0  $Id: init.cc,v 1.66 2002/02/13 04:18:40 hori Exp $
    SYSLOG: Compile option(s): 
    SYSLOG: SCore-D network: myrinet/myrinet
    SYSLOG: Cluster[0]: (0..3)x1.i386-redhat7-linux2_4.i686.500
    SYSLOG:   Memory: 249[MB], Swap: 259[MB], Disk: 3035[MB]
    SYSLOG:   Network[0]: myrinet/myrinet
    SYSLOG:   Network[1]: ethernet/ethernet
    SYSLOG: Scheduler initiated: Timeslice = 500 [msec]
    SYSLOG:   Queue[0] activated, exclusive scheduling
    SYSLOG:   Queue[1] activated, time-sharing scheduling
    SYSLOG:   Queue[2] activated, time-sharing scheduling
    SYSLOG: Session ID: 0
    SYSLOG: Server Host: comp3.pccluster.org
    SYSLOG: Backup Host: comp1.pccluster.org
    SYSLOG: Backup file is lost and create it.
    SYSLOG: Server file is lost and create it.
    SYSLOG: Operated by: root
    SYSLOG: ========= SCore-D (5.0.0) bootup in SECURE MODE ========
    
    msgbウィンドウでノードブロックが青から赤に変化するのが見えるでしょう。

  7. Multi-User環境下でMPC++ MTTLプログラムを実行

    異なるシェルの下では、プログラムはローカルに実行されます。 scoredserverが実行されているhostを特定しなければなりません。 デフォルトではclusterグループの最後のhostが該当します:
    $ scrun -scored=comp3 ./hello
    SCore-D 5.0.0 connected (jid=1).
    <0:0> SCORE: One node ready.
    hello, world (from node 0)
    $ 
    メッセージ出力はscoredが実行されているサーバで行なわれます。メッセージは以下に示すのと同じようなものです:
    SYSLOG: Login request: user1@server.pccluster.org:32878
    SYSLOG: Login accepted: user1@server.pccluster.org:32878, JID: 1, Hosts: 1(1x1)@0, Priority: 1, Command: ./hello 
    SYSLOG: Logout: user1@server.pccluster.org:32878, JOB-ID: 1, CPU Time: 134.0[m]
    
    4ノードのclusterグループでプログラムを実行します:
    $ scrun -scored=comp3,nodes=4 ./hello
    SCore-D 5.0.0 connected (jid=2).
    <0:0> SCORE: 4 hosts, single process/host ready.
    hello, world (from node 2)
    hello, world (from node 1)
    hello, world (from node 3)
    hello, world (from node 0)
    $ 
  8. Multi-User環境でMPICH-SCoreプログラムを実行

    scrunmpirunの両方を使用して一つの CPU で実行します:
    $ export SCORE_OPTIONS=scored=comp3
    $ scrun ./cpi
    SCore-D 5.0.0 connected (jid=3).
    <0:0> SCORE: One node ready.
    Process 0 of 1 on comp3.pccluster.org
    pi is approximately 3.1416009869231254, Error is 0.0000083333333323
    wall clock time = 0.000621
    $ mpirun ./cpi
    SCore-D 5.0.0 connected (jid=4).
    <0:0> SCORE: One node ready.
    Process 0 of 1 on comp3.pccluster.org
    pi is approximately 3.1416009869231254, Error is 0.0000083333333323
    wall clock time = 0.000645
    $ 
    scrunmpirunの両方を使用して4ノードのcluster環境で実行します:
    $ scrun -nodes=4 ./cpi
    SCore-D 5.0.0 connected (jid=5).
    <0:0> SCORE: 4 nodes (4x1) ready.
    Process 1 of 4 on comp1.pccluster.org
    Process 3 of 4 on comp3.pccluster.org
    Process 2 of 4 on comp2.pccluster.org
    Process 0 of 4 on comp0.pccluster.org
    pi is approximately 3.1416009869231245, Error is 0.0000083333333314
    wall clock time = 0.000945
    $ mpirun -np 4 ./cpi
    SCore-D 5.0.0 connected (jid=6).
    <0:0> SCORE: 4 nodes (4x1) ready.
    Process 2 of 4 on comp2.pccluster.org
    Process 1 of 4 on comp1.pccluster.org
    Process 0 of 4 on comp0.pccluster.org
    Process 3 of 4 on comp3.pccluster.org
    pi is approximately 3.1416009869231245, Error is 0.0000083333333314
    wall clock time = 0.003627
    $ 
    もっと他のプログラムでテストしてい場合は /opt/score/example ディレクトリの下を見てみてください。

  9. Multi-User環境の停止

    別のウィンドウで次のコマンドを入力することでscoredを停止できます。:
    # sc_console comp3 -c shutdown
    SCore-D Console: shutdown
    # 
    次のようなメッセージがscoredを実行したマシンから出力されます:
    SYSLOG: CONSOLE connected from server.pccluster.org
    CONSOLE: >> shutdown 
    SYSLOG: SCore-D shutting down in 0 seconds.
    SYSLOG: Login disabled.
    SYSLOG: Waiting for all job terminates.
    SYSLOG: CONSOLE disconnected.
    SYSLOG: SCore-D shutdown.
    # 
    msgbウィンドウ中でノードブロックが赤から青に変化するのが見えることでしょう。

    この段階でscoutセッションを終了できます:
    # exit
    SCOUT: session done
    # 


PCCC logo PCクラスタコンソーシアム

CREDIT
This document is a part of the SCore cluster system software developed at PC Cluster Consortium, Japan. Copyright (C) 2003 PC Cluster Consortium.