file editing
Hey all,
I want to do sonme testing of the nodes on a cluster I am using, testing to see if they run mpi. So I need to check every node by itself first.
which means that I need a machinefile that lists one node at a time:
node2
for example
I want to write a script to test each node in order: in pseudocode:
for i in 2:n
open machinefile
sed s/i-1/i/ #replace the previous number with the new one, will this work?
execute mpi call
do something with the return value
end
So: can someone show me how to do this? I am completely new to shell scripts, so the syntax is what is slowing me down rather than the logic. In the end, this should do something like:
Edit machinefile to contain
node2
run mpi on node 2, and tell me if it worked
Edit machinefile to contain
node3
run mpi on node 3, and tell me if it worked
etc
But I really only need help with the editing the file part of it
Last edited by KBriggs; 06-09-2010 at 08:35 AM.
|