[Ocfs2-test-devel] [PATCH 6/9] ocfs2-test: python_common - Converted from LAM/MPI to OpenMPI.

tristan.ye tristan.ye at oracle.com
Tue Feb 17 20:04:19 PST 2009


Signed-off-by: Tristan Ye <tristan.ye at oracle.com>

On Tue, 2009-02-17 at 18:59 -0800, Marcos Matsunaga wrote:
> Removed the following functions that were used by LAM/MPI:
> 	StartMPI
> 	mpi_runparts
> 	mpi_run
> 	lamexec
> 
> Signed-off-by: Marcos Matsunaga <Marcos.Matsunaga at oracle.com>
> ---
>  programs/python_common/o2tf.py |  134 ----------------------------------------
>  1 files changed, 0 insertions(+), 134 deletions(-)
> 
> diff --git a/programs/python_common/o2tf.py b/programs/python_common/o2tf.py
> index 53d7865..6df8ebf 100644
> --- a/programs/python_common/o2tf.py
> +++ b/programs/python_common/o2tf.py
> @@ -236,73 +236,6 @@ so just do a sanity check here to test if all nodes are available.
>  		printlog(str(inst), logfile, 0, '')
>  		pass
>  #
> -# StartMPI is used by :
> -#   - o2tf.py
> -def StartMPI(DEBUGON, nodes, logfile):
> -	'Start LAM/MPI on all nodes, doing a sanity check before.'
> -	from os import access,F_OK
> -	if os.access(config.LAMBOOT, F_OK) == 0:
> -		printlog('o2tf.StartMPI: Lamboot not found', 
> -			logfile, 0, '')
> -		sys.exit(1)
> -	if os.access(config.LAMHOSTS, F_OK) == 1:
> -		os.system('rm -f ' + config.LAMHOSTS)
> -	nodelist = string.split(nodes,',')
> -	nodelen = len(nodelist)
> -	fd = open(config.LAMHOSTS,'w',0)
> -	for i in range(nodelen):
> -		fd.write(nodelist[i] + '\n')
> -	fd.close()
> -# Check if all hosts are accessible
> -	try:
> -		if DEBUGON:
> -			printlog('o2tf.StartMPI: Trying to run %s with %s \
> -				file.' % (config.RECON, config.LAMHOSTS), 
> -				logfile, 0, '')
> -		os.system('%s -v %s' % (config.RECON, config.LAMHOSTS))
> -	except os.error:
> -		pass
> -# Looks like everything is ok. So, run lamboot.
> -	try:
> -		if DEBUGON:
> -			printlog('o2tf.StartMPI: Trying to run %s with %s \
> -				file.' % (config.LAMBOOT, config.LAMHOSTS),
> -				logfile, 0, '')
> -		os.system('%s -v %s' % (config.LAMBOOT, config.LAMHOSTS))
> -	except os.error:
> -		pass
> -#
> -# calls mpi-run-parts
> -# mpi_runparts is used by :
> -#   - o2tf.py
> -#   - run_buildkernel.py
> -def mpi_runparts(DEBUGON, nproc, cmd, nodes, logfile):
> -	'Execute commands in parallel using LAM/MPI.'
> -	from os import access,F_OK
> -	found = 0
> -	uname = os.uname()
> -	nodelen = len(string.split(nodes,','))
> -	try:
> -		if DEBUGON:
> -			printlog('o2tf.mpi_runparts: MPIRUN = %s' % \
> -				config.MPIRUN, logfile, 0, '')
> -			printlog('o2tf.mpi_runparts: nproc = %s' % nproc,
> -				logfile, 0, '')
> -			printlog('o2tf.mpi_runparts: nodelen = %d' % nodelen,
> -				logfile, 0, '')
> -			printlog('o2tf.mpi_runparts: MPIRUNPARTS = %s' % \
> -				config.MPIRUNPARTS, logfile, 0, '')
> -			printlog('o2tf.mpi_runparts: cmd = %s' % cmd,
> -				logfile, 0, '')
> -		pid = os.spawnv(os.P_NOWAIT,
> -			'/bin/bash', ['bash', '-xc',
> -			config.MPIRUN + ' -sigs -ger -w n0-%d %s %s' % \
> -			( nodelen - 1, config.MPIRUNPARTS, cmd)])
> -		os.waitpid(pid,0)
> -	except os.error:
> -		pass
> -
> -#
>  # Calls mpirun from openmpi
>  #
>  def openmpi_run(DEBUGON, nproc, cmd, nodes, remote_sh, logfile, w_flag):
> @@ -347,73 +280,6 @@ def openmpi_run(DEBUGON, nproc, cmd, nodes, remote_sh, logfile, w_flag):
>  		pass
>  
>  #
> -# lamexec is used by :
> -#   - 
> -
> -#
> -# Calls mpirun (Original from the LAM/MPI Package)
> -# mpi_run is used by :
> -#   - open_delete.py
> -def mpi_run(DEBUGON, nproc, cmd, nodes, logfile):
> -	'Execute commands in parallel using LAM/MPI.'
> -	from os import access,F_OK
> -	found = 0
> -	uname = os.uname()
> -	nodelen = len(string.split(nodes,','))
> -	if nproc == 'C':
> -		nprocopt='C'
> -	else:
> -		nprocopt='-np ' + str(nproc)
> -	try:
> -		if DEBUGON:
> -			printlog('o2tf.mpi_run: MPIRUN = %s' % config.MPIRUN,
> -				logfile, 0, '')
> -			printlog('o2tf.mpi_run: nproc = %s' % nproc,
> -				logfile, 0, '')
> -			printlog('o2tf.mpi_run: nodelen = %d' % nodelen,
> -				logfile, 0, '')
> -			printlog('o2tf.mpi_run: cmd = %s' % cmd,
> -				logfile, 0, '')
> -#		pid = os.spawnv(os.P_NOWAIT,
> -#			'/bin/bash', ['bash', '-xc',
> -#			config.MPIRUN + ' %s -sigs -ger -w n0-%d %s' % \
> -#			( nprocopt, nodelen - 1, cmd)])
> -		return os.spawnv(os.P_NOWAIT,
> -			'/bin/bash', ['bash', '-xc',
> -			config.MPIRUN + ' %s -sigs -ger -w n0-%d %s' % \
> -			( nprocopt, nodelen - 1, cmd)])
> -#		os.waitpid(pid,0)
> -	except os.error:
> -		pass
> -#
> -# lamexec is used by :
> -#   - 
> -def lamexec(DEBUGON, nproc, wait, cmd, nodes, logfile):
> -	'Execute commands in parallel using LAM/MPI.'
> -	from os import access,F_OK
> -	found = 0
> -	uname = os.uname()
> -	nodelen = len(string.split(nodes,','))
> -	try:
> -		if DEBUGON:
> -			printlog('o2tf.lamexec: LAMEXEC = %s' % config.LAMEXEC,
> -				logfile, 0, '')
> -			printlog('o2tf.lamexec: nproc = %s' % nproc,
> -				logfile, 0, '')
> -			printlog('o2tf.lamexec: cmd = %s' % cmd,
> -				logfile, 0, '')
> -			printlog('o2tf.lamexec: nodelen = %d' % nodelen,
> -				logfile, 0, '')
> -			printlog('o2tf.lamexec: nodes = %s' % nodes,
> -				logfile, 0, '')
> -		pid = os.spawnv(os.P_NOWAIT,
> -			'/bin/bash', ['bash', '-xc',
> -			config.LAMEXEC + ' -pty -np %s %s n0-%d %s' % \
> -			( nproc, wait, nodelen - 1, cmd)])
> -		os.waitpid(pid,0)
> -	except os.error:
> -		pass
> -#
>  # lrand is used by :
>  #   - 
>  def lrand(DEBUGON, max):




More information about the Ocfs2-test-devel mailing list