-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmympirun.csh
executable file
·38 lines (37 loc) · 1.09 KB
/
mympirun.csh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/csh -f
#
# mympirun.csh
#
# script to run openmpi or mvapich1 in mgv
#
#
# usage: mympirun.csh np rackid "list of nodes" command and options
#
# example
#
# mympirun.csh 4 "01-01 02 06 07 " lu2_mpi_gdr -p 4 -n 16384
# mympirun.csh 4 "01-01 02 03-06 07 " lu2_mpi_gdr -p 2 -q 2 -n 16384
#
# JM 2009/11/3
#
#set mpitype = openmpi
set mpitype = mvapich1
set np = $1
shift
set machinefile = ".myhostfile."$$
ruby generate_hostfile.rb $1 > $machinefile
foreach hostname ( `cat $machinefile` )
# echo removing hugetlb file on host $hostname
# rsh $hostname 'rm /mnt/huge/a*'
# rsh $hostname singclock.csh 22
# rsh $hostname ~/src/linsol/l*2*tst/testdgemm2 -N2 -g
end
shift
if ( $mpitype == openmpi) then
echo "mpirun -np $np -hostfile ${cwd}/$machinefile $* "
mpirun -np $np -hostfile ${cwd}/$machinefile $*
endif
if ( $mpitype == mvapich1 ) then
#/usr/mpi/gcc/mvapich-1.2.0/bin/mpirun_rsh -rsh -hostfile ${cwd}/$machinefile -np $np VIADEV_USE_AFFINITY=0 $*
/usr/mpi/gcc/mvapich-1.2.0/bin/mpirun_rsh -legacy -hostfile ${cwd}/$machinefile -np $np VIADEV_USE_AFFINITY=0 $*
endif