[Ocfs2-test-devel] [PATCH 3/9] ocfs2-test: cross-delete - Converted from LAM/MPI to OpenMPI.
tristan.ye
tristan.ye at oracle.com
Tue Feb 17 17:56:57 PST 2009
Looks good to me.
On Tue, 2009-02-17 at 14:39 -0800, Marcos Matsunaga wrote:
> Signed-off-by: Marcos Matsunaga <Marcos.Matsunaga at oracle.com>
> ---
> programs/cross_delete/cross_delete.py | 42 +++++++++++++++++++++++---------
> 1 files changed, 30 insertions(+), 12 deletions(-)
>
> diff --git a/programs/cross_delete/cross_delete.py b/programs/cross_delete/cross_delete.py
> index 467e699..5092f2f 100755
> --- a/programs/cross_delete/cross_delete.py
> +++ b/programs/cross_delete/cross_delete.py
> @@ -143,7 +143,12 @@ def BuildDelList(nodelist, dirlist):
> logfile,
> 0,
> '')
> -
> +#
> +def Cleanup(ret):
> +#
> + os.system('rm -f '+stagedir+'/*.dat')
> + sys.exit(ret)
> +#=============================================================================
> #
> # MAIN
> #
> @@ -276,7 +281,7 @@ if DEBUGON:
> #
> stagedir = dirlist[0]
> #
> -o2tf.StartMPI(DEBUGON, ','.join(nodelist), logfile)
> +o2tf.OpenMPIInit(DEBUGON, ','.join(nodelist), logfile, 'ssh')
> for y in range(count):
> o2tf.printlog('cross-delete: RUN# %s of %s' % (y+1, count),
> logfile,
> @@ -289,23 +294,36 @@ for y in range(count):
> cmdline = os.path.join(config.BINDIR, 'crdel_gen_files.py -D')
> else:
> cmdline = os.path.join(config.BINDIR, 'crdel_gen_files.py')
> - o2tf.lamexec( DEBUGON, nproc, config.WAIT, str('%s -s %s -l %s -t %s' % \
> + ret = o2tf.openmpi_run( DEBUGON, nproc, str('%s -s %s -l %s -t %s' % \
> (cmdline, stagedir,
> options.logfile,
> tarfile) ),
> ','.join(nodelist),
> - logfile)
> + 'ssh',
> + logfile,
> + 'WAIT')
> + if not ret:
> + o2tf.printlog('cross_delete: RUN# %s extraction successful.'\
> + % (y+1), logfile, 0, '')
> + else:
> + o2tf.printlog('cross_delete: RUN# %s extraction failed.' \
> + % (y+1), logfile, 0, '')
> + Cleanup(ret)
> if DEBUGON:
> cmdline = os.path.join(config.BINDIR, 'crdel_del_files.py -D')
> else:
> cmdline = os.path.join(config.BINDIR, 'crdel_del_files.py')
> - o2tf.lamexec( DEBUGON, nproc, config.WAIT, str('%s -s %s -l %s ' % \
> + ret = o2tf.openmpi_run( DEBUGON, nproc, str('%s -s %s -l %s ' % \
> (cmdline, stagedir, options.logfile) ),
> ','.join(nodelist),
> - logfile)
> -os.system('rm -f '+stagedir+'/*.dat')
> -o2tf.printlog('cross-delete: Job completed successfully',
> - logfile,
> - 3,
> - '=')
> -sys.exit
> + 'ssh',
> + logfile,
> + 'WAIT')
> + if not ret:
> + o2tf.printlog(
> + 'cross_delete: RUN# %s delete successful.' % (y+1),
> + logfile, 0, '')
> + else:
> + o2tf.printlog('cross_delete: RUN# %s delete failed.' % (y+1),
> + logfile, 0, '')
> + Cleanup(ret)
More information about the Ocfs2-test-devel
mailing list