[Ocfs2-tools-devel] [PATCH 3/5] Ocfs2-test: Port all existing mpi launchers to openmpi version
Marcos E. Matsunaga
Marcos.Matsunaga at oracle.com
Wed Sep 17 10:39:33 PDT 2008
Signed-off-by: Marcos Matsunaga <Marcos.Matsunaga at oracle.com>
Regards,
Marcos Eduardo Matsunaga
Oracle USA
Linux Engineering
“The statements and opinions expressed here are my own and do not
necessarily represent those of Oracle Corporation.”
Tristan Ye wrote:
> Includes remote_mount.py,remote_umount.py,open_delete,run_lvb_torture.py
> and run_create_racer.py
>
> Signed-off-by: Tristan Ye <tristan.ye at oracle.com>
> ---
> programs/create_racer/run_create_racer.py | 8 +++++---
> programs/lvb_torture/run_lvb_torture.py | 8 +++++---
> programs/open_delete/open_delete.py | 8 +++++---
> programs/python_common/remote_mount.py | 18 +++++++++---------
> programs/python_common/remote_umount.py | 18 +++++++++---------
> 5 files changed, 33 insertions(+), 27 deletions(-)
>
> diff --git a/programs/create_racer/run_create_racer.py b/programs/create_racer/run_create_racer.py
> index 84f26d0..0e790e6 100644
> --- a/programs/create_racer/run_create_racer.py
> +++ b/programs/create_racer/run_create_racer.py
> @@ -143,15 +143,17 @@ if DEBUGON:
> #
> if options.cleanup:
> Cleanup()
> -o2tf.StartMPI(DEBUGON, options.nodelist, logfile)
> +o2tf.OpenMPIInit(DEBUGON, options.nodelist, logfile, 'ssh')
> #
> -ret = o2tf.mpi_run(DEBUGON, procs,
> +ret = o2tf.openmpi_run(DEBUGON, procs,
> str('%s -i %s %s 2>&1 | tee -a %s' % (cmd,
> options.iteractions,
> options.path,
> options.logfile)),
> options.nodelist,
> - options.logfile)
> + 'ssh',
> + options.logfile,
> + 'NOWAIT')
> #
> if not ret:
> o2tf.printlog('run_create_racer: main - execution successful.',
> diff --git a/programs/lvb_torture/run_lvb_torture.py b/programs/lvb_torture/run_lvb_torture.py
> index ffdd5b0..001d6d4 100755
> --- a/programs/lvb_torture/run_lvb_torture.py
> +++ b/programs/lvb_torture/run_lvb_torture.py
> @@ -155,9 +155,9 @@ if DEBUGON:
> 0,
> '')
> #
> -o2tf.StartMPI(DEBUGON, options.nodelist, logfile)
> +o2tf.OpenMPIInit(DEBUGON, options.nodelist, logfile, 'ssh')
> #
> -o2tf.mpi_run(DEBUGON, procs,
> +o2tf.openmpi_run(DEBUGON, procs,
> str('%s -d %s %s -i %s %s %s 2>&1 | tee -a %s' % (cmd,
> dlmfs,
> hbdev,
> @@ -166,4 +166,6 @@ o2tf.mpi_run(DEBUGON, procs,
> lockname,
> options.logfile)),
> options.nodelist,
> - options.logfile)
> + 'ssh',
> + options.logfile,
> + 'NOWAIT')
> diff --git a/programs/open_delete/open_delete.py b/programs/open_delete/open_delete.py
> index e49f9bd..a3e865b 100755
> --- a/programs/open_delete/open_delete.py
> +++ b/programs/open_delete/open_delete.py
> @@ -102,18 +102,20 @@ if numnodes < 2:
> parser.print_help()
> sys.exit(1)
> #
> -o2tf.StartMPI(DEBUGON, options.nodelist, logfile)
> +o2tf.OpenMPIInit(DEBUGON, options.nodelist, logfile, 'ssh')
> command=os.path.join(config.BINDIR, EXECPGM)
> if DEBUGON:
> o2tf.printlog('command = %s' % command,
> logfile, 0, '')
> -o2tf.mpi_run(DEBUGON,
> +o2tf.openmpi_run(DEBUGON,
> 'C',
> str('%s -i %s %s' %
> (command,
> options.count,
> filename) ),
> options.nodelist,
> - options.logfile)
> + 'ssh',
> + options.logfile,
> + 'NOWAIT')
>
> sys.exit()
> diff --git a/programs/python_common/remote_mount.py b/programs/python_common/remote_mount.py
> index f0ee6b6..9df45a4 100755
> --- a/programs/python_common/remote_mount.py
> +++ b/programs/python_common/remote_mount.py
> @@ -40,7 +40,7 @@ Usage = 'Usage: %prog [-l|-label label] \
> [-n|--nodes nodelist]'
> #
> if userid == 'root':
> - o2tf.printlog('This program uses LAM/MPI. Should not run as root',
> + o2tf.printlog('This program uses Openmpi. Should not run as root',
> logfile, 0, '')
> sys.exit(1)
> if __name__=='__main__':
> @@ -76,14 +76,10 @@ if __name__=='__main__':
> #
> nodelist = options.nodelist.split(',')
> nodelen = len(nodelist)
> - print('nodelist %s' % nodelist)
> - print('nodelen %s' % nodelen)
> if nodelen == 1:
> nodelist = nodelist.append(options.nodelist)
> else:
> nodelist = options.nodelist.split(',')
> - print('nodelist %s' % nodelist)
> - print('nodelen %s' % nodelen)
>
> nproc = nodelen
> #
> @@ -96,10 +92,14 @@ command = str('%s -l %s -m %s' % (buildcmd,
> options.label,
> options.mountpoint))
> #
> -o2tf.StartMPI(DEBUGON, options.nodelist, logfile)
> +o2tf.OpenMPIInit(DEBUGON, options.nodelist, logfile, 'ssh')
> #
> #
> -o2tf.lamexec(DEBUGON, nproc, config.WAIT, str('%s' % command),
> - options.nodelist,
> - logfile )
> +o2tf.openmpi_run(DEBUGON,
> + nproc,
> + str('%s' % command),
> + options.nodelist,
> + 'ssh',
> + logfile,
> + 'WAIT')
>
> diff --git a/programs/python_common/remote_umount.py b/programs/python_common/remote_umount.py
> index 1fd36e7..d4124cc 100755
> --- a/programs/python_common/remote_umount.py
> +++ b/programs/python_common/remote_umount.py
> @@ -39,7 +39,7 @@ Usage = 'Usage: %prog [-m|--mountpoint mountpoint] \
> [-n|--nodes nodelist]'
> #
> if userid == 'root':
> - o2tf.printlog('This program uses LAM/MPI. Should not run as root',
> + o2tf.printlog('This program uses Openmpi. Should not run as root',
> logfile, 0, '')
> sys.exit(1)
> if __name__=='__main__':
> @@ -67,14 +67,10 @@ if __name__=='__main__':
> #
> nodelist = options.nodelist.split(',')
> nodelen = len(nodelist)
> - print('nodelist %s' % nodelist)
> - print('nodelen %s' % nodelen)
> if nodelen == 1:
> nodelist = nodelist.append(options.nodelist)
> else:
> nodelist = options.nodelist.split(',')
> - print('nodelist %s' % nodelist)
> - print('nodelen %s' % nodelen)
>
> nproc = nodelen
> #
> @@ -86,10 +82,14 @@ else:
> command = str('%s -m %s' % (buildcmd,
> options.mountpoint))
> #
> -o2tf.StartMPI(DEBUGON, options.nodelist, logfile)
> +o2tf.OpenMPIInit(DEBUGON, options.nodelist, logfile, 'ssh')
> #
> #
> -o2tf.lamexec(DEBUGON, nproc, config.WAIT, str('%s' % command),
> - options.nodelist,
> - logfile )
> +o2tf.openmpi_run(DEBUGON,
> + nproc,
> + str('%s' % command),
> + options.nodelist,
> + 'ssh', logfile,
> + 'WAIT')
> +
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/ocfs2-tools-devel/attachments/20080917/299fa4d5/attachment-0001.html
More information about the Ocfs2-tools-devel
mailing list