mirror of
https://github.com/nwchemgit/nwchem.git
synced 2026-07-28 22:25:48 -04:00
new info for Maui
This commit is contained in:
parent
001c7270b4
commit
237c48bb64
3 changed files with 156 additions and 0 deletions
48
contrib/ibm_sp@mhpcc/LLnwchem
Normal file
48
contrib/ibm_sp@mhpcc/LLnwchem
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
#!/bin/csh
|
||||
# @ job_type = parallel
|
||||
# @ notification = always
|
||||
# @ notify_user = ja_nichols@pnl.gov
|
||||
# @ class = tiny
|
||||
# @ requirements = (Adapter == "hps_user")
|
||||
# @ environment = COPY_ALL
|
||||
# @ min_processors = 2
|
||||
# @ max_processors = 4
|
||||
# @ cpu_limit = 00:01:00
|
||||
# @ queue
|
||||
|
||||
# mydir = directory where input/output files reside
|
||||
set mydir = "/u/nichols/nwchem/examples/"
|
||||
# nwchem = nwchem exec directory
|
||||
set nwchem = "/u/nichols/nwchem/bin/SP1/nwchem"
|
||||
# ldir = local directory where calculation will occur
|
||||
set ldir = "/localscratch/"
|
||||
# string file_prefix default e.g., for db and movecs files
|
||||
set prefix = "h2o"
|
||||
# infile = name of nwchem input file
|
||||
set infile = "dft_h2o.nw"
|
||||
# outfile = name of nwchem output file
|
||||
set outfile = "dft_h2o.out"
|
||||
# nodes = nodes assigned at runtime by loadleveler
|
||||
set nodes = `echo $LOADL_PROCESSOR_LIST`
|
||||
|
||||
# Pre-execution setup
|
||||
rcp ${mydir}${infile} ${nodes[1]}:${ldir}
|
||||
|
||||
# Execution steps
|
||||
cd ${ldir}
|
||||
${nwchem} ${infile} >& ${outfile} -infolevel 2
|
||||
|
||||
# Post-execution cleanup
|
||||
|
||||
# get output file
|
||||
rcp ${nodes[1]}:${ldir}${outfile} ${mydir}
|
||||
|
||||
# get data files
|
||||
rcp ${nodes[1]}:${ldir}movecs ${mydir}
|
||||
rcp ${nodes[1]}:${ldir}${prefix}.db ${mydir}
|
||||
rcp ${nodes[1]}:${ldir}fort.7 ${mydir}
|
||||
rcp ${nodes[1]}:${ldir}cdfit.dat ${mydir}
|
||||
|
||||
# delete files from ${ldir}
|
||||
rsh $nodes[1] "cd ${ldir}; rm -f ${infile} ${outfile} fort.7 *.dat *.db movecs"
|
||||
|
||||
37
contrib/ibm_sp@mhpcc/intnwchem
Normal file
37
contrib/ibm_sp@mhpcc/intnwchem
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
#!/bin/ksh
|
||||
#POE MP_PROCS=2
|
||||
#POE SP_NAME=cws1.mhpcc.edu
|
||||
##POE MP_HOSTFILE="host.list"
|
||||
#POE MP_HOSTFILE=""
|
||||
##POE MP_EUILIB=ip
|
||||
#POE MP_EUILIB=us
|
||||
#POE MP_EUIDEVICE=css0
|
||||
#POE MP_PGMMODEL=spmd
|
||||
#POE MP_RMPOOL=0
|
||||
#POE MP_SAVEHOSTFILE=hosts.used
|
||||
#POE MP_INFOLEVEL=1
|
||||
#POE MP_LABELIO=no
|
||||
#POE MP_PULSE=0
|
||||
|
||||
infile=input.file
|
||||
outfile=output.file
|
||||
|
||||
# pre-execution set up
|
||||
#POE MASTER
|
||||
for node in $POE_PROCESSOR_LIST
|
||||
do
|
||||
rcp $infile $node:/localscratch
|
||||
done
|
||||
#POE END_MASTER
|
||||
|
||||
# poe job goes here
|
||||
poejob
|
||||
|
||||
# post-execution cleanup
|
||||
#POE MASTER
|
||||
for node in $POE_PROCESSOR_LIST
|
||||
do
|
||||
rsh $node rm /localscratch/$infile
|
||||
rsh $node mv /localscratch/$outfile /u/lwaters/mpi/timing/$outfile.$node
|
||||
done
|
||||
#POE END_MASTER
|
||||
71
contrib/ibm_sp@mhpcc/poesubmit
Normal file
71
contrib/ibm_sp@mhpcc/poesubmit
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
#!/bin/perl
|
||||
|
||||
# parse input script to get POE vars, place into temp file
|
||||
# echo to temp job file, adding POE_PROCESSOR_LIST setup commands
|
||||
open(VARFILE, ">varfile.tmp");
|
||||
open(JOBFILE, ">jobfile.tmp");
|
||||
|
||||
$first = 1;
|
||||
while (<>) {
|
||||
printf JOBFILE $_;
|
||||
if (/^#POE/) {
|
||||
if (/ MASTER/) {
|
||||
printf JOBFILE "if [ \$MASTER = \"true\" ]; then\n";
|
||||
} elsif (/END_MASTER/) {
|
||||
printf JOBFILE "fi\n";
|
||||
} else {
|
||||
printf VARFILE $';
|
||||
$_ = $';
|
||||
/=/;
|
||||
printf VARFILE " export%s\n", $`;
|
||||
}
|
||||
}
|
||||
|
||||
# include commands to set up POE_PROCESSOR_LIST in job file
|
||||
if (/ksh/ || /\/sh/ && $first) {
|
||||
printf JOBFILE "if [ -z \$MP_SAVEHOSTFILE ]; then\n";
|
||||
printf JOBFILE "echo the MP_SAVEHOSTFILE variable must be set\n";
|
||||
printf JOBFILE "exit -1\n";
|
||||
printf JOBFILE "fi\n";
|
||||
printf JOBFILE "POE_PROCESSOR_LIST=`cat \$MP_SAVEHOSTFILE | sed -e /\^!/d |
|
||||
awk '{print \$1}'`\n";
|
||||
printf JOBFILE "iam=`hostname`\n";
|
||||
printf JOBFILE "master=`echo \$POE_PROCESSOR_LIST | awk '{print \$1}'`\n";
|
||||
printf JOBFILE "if [ \$iam = \$master ]; then\n";
|
||||
printf JOBFILE "MASTER=true\n";
|
||||
printf JOBFILE "else\n";
|
||||
printf JOBFILE "MASTER=false\n";
|
||||
printf JOBFILE "fi\n";
|
||||
} elsif (/csh/ && $first) {
|
||||
printf JOBFILE "if (! \$?MP_SAVEHOSTFILE) then\n";
|
||||
printf JOBFILE "echo the MP_SAVEHOSTFILE variable must be set\n";
|
||||
printf JOBFILE "exit -1\n";
|
||||
printf JOBFILE "endif\n";
|
||||
printf JOBFILE "cat \$MP_SAVEHOSTFILE | sed -e /^\\!/d > hosts.tmp\n";
|
||||
printf JOBFILE "set POE_PROCESSOR_LIST = `cat hosts.tmp | awk '{print
|
||||
\$1}'`
|
||||
\n";
|
||||
printf JOBFILE "/bin/rm hosts.tmp\n";
|
||||
printf JOBFILE "set iam = `hostname`\n";
|
||||
printf JOBFILE "set master = `echo \$POE_PROCESSOR_LIST | awk '{print
|
||||
\$1}'`
|
||||
\n";
|
||||
printf JOBFILE "if ( \$iam == \$master ) then\n";
|
||||
printf JOBFILE "set MASTER = true\n";
|
||||
printf JOBFILE "else\n";
|
||||
printf JOBFILE "set MASTER = false\n";
|
||||
printf JOBFILE "endif\n";
|
||||
}
|
||||
$first = 0;
|
||||
}
|
||||
close(VARFILE);
|
||||
close(JOBFILE);
|
||||
|
||||
# source POE vars and run the input script
|
||||
system("chmod +x jobfile.tmp");
|
||||
system(". varfile.tmp; /usr/bin/poe jobfile.tmp");
|
||||
|
||||
# remove the temp files
|
||||
unlink("varfile.tmp");
|
||||
unlink("jobfile.tmp");
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue