| 7 | |
| 8 | * Ubuntu 有 [http://packages.ubuntu.com/source/hardy/torque torque] 相關的 package |
| 9 | * 跑 MPICH 工作的 pbs script - MPICH Multi-machine job |
| 10 | {{{ |
| 11 | #!sh |
| 12 | # example3.pbs |
| 13 | # invoke with |
| 14 | # qsub -l nodes=2:ppn=1,pmem=1800mb,mem=1800mb,ncpus=2,cput=5:00:00 example3.pbs |
| 15 | # note that we are using one cpu per node. That :ppn=1 is critical. |
| 16 | |
| 17 | # comment these out if you wish |
| 18 | echo "qsub host is" |
| 19 | echo $PBS_O_HOST |
| 20 | echo "original queue is" |
| 21 | echo $PBS_O_QUEUE |
| 22 | echo "qsub working directory absolute is" |
| 23 | echo $PBS_O_WORKDIR |
| 24 | echo "pbs environment is" |
| 25 | echo $PBS_ENVIRONMENT |
| 26 | echo "pbs batch id" |
| 27 | echo $PBS_JOBID |
| 28 | echo "pbs job name from me is" |
| 29 | echo $PBS_JOBNAME |
| 30 | echo "Name of file containing nodes is" |
| 31 | echo $PBS_NODEFILE |
| 32 | echo "contents of nodefile is" |
| 33 | cat $PBS_NODEFILE |
| 34 | echo "Name of queue to which job went is" |
| 35 | echo $PBS_QUEUE |
| 36 | |
| 37 | # make sure we are in the right directory in case writing files |
| 38 | cd $PBS_O_WORKDIR |
| 39 | |
| 40 | # Run the mpi job |
| 41 | # Note: the MPICH mpirun command is in /usr/local/bin |
| 42 | # use the full path |
| 43 | /usr/local/bin/mpirun -np 2 -machinefile $PBS_NODEFILE ./dft_mpi |
| 44 | }}} |