Changes between Version 6 and Version 7 of jazz/mpdboot


Ignore:
Timestamp:
Jul 2, 2008, 11:50:04 AM (16 years ago)
Author:
jazz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • jazz/mpdboot

    v6 v7  
    101101jazz@bio-cluster-12:~$
    102102}}}
     103
     104== Test 2: Compile MPICH2 sample program and run in multiple compute nodes ==
     105
     106 * Sample program from Wade.
     107{{{
     108
     109jazz@bio-cluster-12:~$ cat > demo1.c << EOF
     110> /* Program:
     111>  *   每個 node 將自己的 id 印出,並且將所有的參與運動的 node 總數也印出
     112>  *   ,顯示出自己的主機名稱。
     113>  * History:
     114>  *   2008-04-09 BETA
     115>  *   2008-06-25 增加顯示主機名稱功能
     116> */
     117>
     118> #include <stdio.h>
     119> #include "mpi.h"
     120> int main (int argc, char **argv)
     121> {
     122>   int rank, size, len;
     123>   char name[MPI_MAX_PROCESSOR_NAME];
     124>   MPI_Init(&argc, &argv);
     125>   int myid, numprocs;
     126>
     127>   /* 取得 node 總數 */
     128>   MPI_Comm_size(MPI_COMM_WORLD,&numprocs);
     129>
     130>   /* 取得本身 node id / rank  */
     131>   MPI_Comm_rank(MPI_COMM_WORLD,&myid);
     132>
     133>   /* 取得本身 host name  */
     134>   MPI_Get_processor_name(name, &len);
     135>   printf("This is machine %d of %d  name = %s\n", myid, numprocs, name);
     136>   MPI_Finalize();
     137> }
     138> EOF
     139jazz@bio-cluster-12:~$ mpicc -I /usr/include/mpich2/ -lmpich demo1.c -o demo1
     140jazz@bio-cluster-12:~$ for i in 11 10 09 08 07 06
     141> do
     142> scp demo1 bio-cluster-$i:.
     143> done
     144demo1                                         100%  557KB 557.3KB/s   00:00
     145demo1                                         100%  557KB 557.3KB/s   00:00
     146demo1                                         100%  557KB 557.3KB/s   00:00
     147demo1                                         100%  557KB 557.3KB/s   00:00
     148demo1                                         100%  557KB 557.3KB/s   00:00
     149demo1                                         100%  557KB 557.3KB/s   00:00
     150jazz@bio-cluster-12:~$ mpdboot -n 7
     151jazz@bio-cluster-12:~$ mpdtrace -l
     152bio-cluster-12_41632 (10.220.202.219)
     153bio-cluster-08_33197 (10.220.202.223)
     154bio-cluster-09_40371 (10.220.202.222)
     155bio-cluster-10_54199 (10.220.202.221)
     156bio-cluster-06_54334 (10.220.202.225)
     157bio-cluster-07_42302 (10.220.202.224)
     158bio-cluster-11_36534 (10.220.202.220)
     159jazz@bio-cluster-12:~$ mpiexec -n 7 /home/jazz/demo1
     160This is machine 0 of 7  name = bio-cluster-12
     161This is machine 1 of 7  name = bio-cluster-08
     162This is machine 2 of 7  name = bio-cluster-09
     163This is machine 3 of 7  name = bio-cluster-10
     164This is machine 5 of 7  name = bio-cluster-07
     165This is machine 6 of 7  name = bio-cluster-11
     166This is machine 4 of 7  name = bio-cluster-06
     167}}}
     168
     169== Test 3: run multiple mpd and R-MPI in multiple compute nodes ==
     170
     171 * Note: mpdboot will use rsh as default communication channel, in debian 4.0 we can find that rsh is equal to ssh.
     172{{{
     173jazz@bio-cluster-12:~$ which rsh
     174/usr/bin/rsh
     175jazz@bio-cluster-12:~$ ls -al /usr/bin/rsh
     176lrwxrwxrwx 1 root root 21 2008-04-09 20:52 /usr/bin/rsh -> /etc/alternatives/rsh
     177jazz@bio-cluster-12:~$ ls -al /etc/alternatives/rsh
     178lrwxrwxrwx 1 root root 12 2008-05-29 19:04 /etc/alternatives/rsh -> /usr/bin/ssh
     179}}}
     180 *