1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
|
import argparse
import os
import sys
sys.path.append(os.environ['CI_SITE_CONFIG'])
import ci_site_config
import run
import common
parser = argparse.ArgumentParser()
parser.add_argument('--prov', help="core provider", choices=['verbs', \
'tcp', 'udp', 'sockets', 'shm', 'psm3'])
parser.add_argument('--util', help="utility provider", choices=['rxd', 'rxm'])
parser.add_argument('--ofi_build_mode', help="specify the build configuration", \
choices = ['dbg', 'dl'], default='reg')
parser.add_argument('--test', help="specify test to execute", \
choices = ['all', 'shmem', 'IMB', 'osu', 'oneccl', \
'mpichtestsuite', 'fabtests', 'onecclgpu', \
'fi_info', 'daos', 'multinode'])
parser.add_argument('--imb_grp', help="IMB test group {1:[MPI1, P2P], \
2:[EXT, IO], 3:[NBC, RMA, MT]", choices=['1', '2', '3'])
parser.add_argument('--device', help="optional gpu device", choices=['ze'])
parser.add_argument('--user_env', help="Run with additional environment variables", \
default='{}')
args = parser.parse_args()
args_core = args.prov
args_util = args.util
args_device = args.device
user_env = args.user_env
if (args.ofi_build_mode):
ofi_build_mode = args.ofi_build_mode
else:
ofi_build_mode='reg'
if (args.test):
run_test = args.test
else:
run_test = 'all'
if (args.imb_grp):
imb_group = args.imb_grp
else:
imb_group = '1'
node = (os.environ['NODE_NAME']).split('_')[0]
hosts = [node]
mpilist = ['impi', 'mpich', 'ompi']
#this script is executed from /tmp
#this is done since some mpi tests
#look for a valid location before running
# the test on the secondary host(client)
# but jenkins only creates a valid path on
# the primary host (server/test node)
os.chdir('/tmp/')
if(args_core):
for host in ci_site_config.node_map[node]:
hosts.append(host)
if (args.device != 'ze'):
if (run_test == 'all' or run_test == 'fi_info'):
run.fi_info_test(args_core, hosts, ofi_build_mode, user_env, run_test,
util=args.util)
if (run_test == 'all' or run_test == 'fabtests'):
run.fabtests(args_core, hosts, ofi_build_mode, user_env, run_test, args_util)
if (run_test == 'all' or run_test == 'shmem'):
run.shmemtest(args_core, hosts, ofi_build_mode, user_env, run_test, args_util)
if (run_test == 'all' or run_test == 'oneccl'):
run.oneccltest(args_core, hosts, ofi_build_mode, user_env, run_test, args_util)
if (run_test == 'all' or run_test == 'onecclgpu'):
run.oneccltestgpu(args_core, hosts, ofi_build_mode, user_env, run_test, args_util)
if (run_test == 'all' or run_test == 'daos'):
run.daos_cart_tests(args_core, hosts, ofi_build_mode, user_env, run_test, args_util)
if (run_test == 'all' or run_test == 'multinode'):
run.multinodetest(args_core, hosts, ofi_build_mode, user_env, run_test, args_util)
for mpi in mpilist:
if (run_test == 'all' or run_test == 'mpichtestsuite'):
run.mpich_test_suite(args_core, hosts, mpi,
ofi_build_mode, user_env, run_test, args_util)
if (run_test == 'all' or run_test == 'IMB'):
run.intel_mpi_benchmark(args_core, hosts, mpi,
ofi_build_mode, imb_group,
user_env, run_test, args_util)
if (run_test == 'all' or run_test == 'osu'):
run.osu_benchmark(args_core, hosts, mpi,
ofi_build_mode, user_env, run_test, args_util)
else:
run.ze_fabtests(args_core, hosts, ofi_build_mode, user_env, run_test, args_util)
else:
print("Error : Specify a core provider to run tests")
|