def Initialize(): global DEBUGON, logfile 'Initialize the directories (remove and extract)' # o2tf.printlog('Cleaning up directories.', logfile, 0, '') o2tf.OpenMPIInit(DEBUGON, options.nodelist, logfile, 'ssh') o2tf.openmpi_run(DEBUGON, nproc, str('%s -c -d %s -l %s' % \ (buildcmd, options.dirlist, options.logfile) ), options.nodelist, 'ssh', options.interface, options.logfile, 'WAIT') # o2tf.printlog('Extracting tar file into directories.', logfile, 0, '') o2tf.openmpi_run(DEBUGON, nproc, str('%s -e -d %s -l %s -t %s' % \ (buildcmd, options.dirlist, options.logfile, tarfile) ), options.nodelist, 'ssh', options.interface, options.logfile, 'WAIT') o2tf.printlog('Directories initialization completed.', logfile, 0, '')
else: nodelist = options.nodelist.split(',') procs = len(nodelist) else: parser.error('Please specify list of nodes to run the test.') # from os import access, W_OK if DEBUGON: o2tf.printlog('%s: main - dlmfs = %s' % (pgm, dlmfs), logfile, 0, '') o2tf.printlog('%s: main - count = %s' % (pgm, count), logfile, 0, '') o2tf.printlog('%s: main - hbdev = %s' % (pgm, hbdev), logfile, 0, '') o2tf.printlog('%s: main - interface = %s' % (pgm, interface), logfile, 0, '') o2tf.printlog('%s: main - logfile = %s' % (pgm, logfile), logfile, 0, '') o2tf.printlog('%s: main - nodelist = %s' % (pgm, nodelist), logfile, 0, '') # o2tf.OpenMPIInit(DEBUGON, options.nodelist, logfile, 'ssh') # ret = o2tf.openmpi_run( DEBUGON, procs, str('%s -d %s %s -i %s %s %s 2>&1 | tee -a %s' % (cmd, dlmfs, hbdev, count, domain, lockname, options.logfile)), options.nodelist, 'ssh', options.interface, options.logfile, 'WAIT') if not ret: o2tf.printlog('run_lvb_torture: execution successful.', logfile, 0, '') else: o2tf.printlog('run_lvb_torture: execution failed.', logfile, 0, '') sys.exit(1)
o2tf.printlog('recovery_load: logfile = (%s)' % logfile, logfile, 0, '') o2tf.printlog('recovery_load: tarfile = (%s)' % tarfile, logfile, 0, '') # NodeIndex = nodelist.index(lhostname) if DEBUGON: o2tf.printlog('recovery_load: NodeIndex = (%s)' % NodeIndex, logfile, 0, '') if NodeIndex == nodelen - 1: NodeIndex = 0 if DEBUGON: o2tf.printlog('recovery_load: Last entry, making it zero', logfile, 0, '') # # first. Start MPI if not Client: o2tf.OpenMPIInit(DEBUGON, ','.join(nodelist), logfile, 'ssh') if DEBUGON: cmdline = os.path.join(config.BINDIR, 'recovery_load.py -D') else: cmdline = os.path.join(config.BINDIR, 'recovery_load.py') # Extract the tar file ret = o2tf.openmpi_run( DEBUGON, nproc, str('%s -e -d %s -l %s -n %s -t %s' % \ (cmdline, options.directory, options.logfile, options.nodes, tarfile) ), ','.join(nodelist), 'ssh', options.interface, logfile,