Skip to content

Commit

Permalink
Merge pull request ofiwg#5966 from nikhilnanal/feat_mpichsuite
Browse files Browse the repository at this point in the history
Jenkins-CI: enabled spawn tests
  • Loading branch information
shefty authored May 25, 2020
2 parents a712f4c + 4a1f319 commit 6ec0bae
Show file tree
Hide file tree
Showing 5 changed files with 135 additions and 32 deletions.
51 changes: 25 additions & 26 deletions contrib/intel/jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,48 +44,47 @@ pipeline {

stage ('build-shmem') {
steps {
withEnv(['PATH+EXTRA=/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bin']) {
withEnv(['PATH+EXTRA=/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bin']){
sh """
python3.7 contrib/intel/jenkins/build.py 'shmem' --ofi_build_mode='dbg'
echo 'shmem benchmarks built successfully'
"""
}
}
}

stage ('build OMPI_bm') {
steps {
withEnv(['PATH+EXTRA=/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bin']) {
sh """
python3.7 contrib/intel/jenkins/build.py 'ompi_benchmarks' --ofi_build_mode='dbg'
echo 'mpi benchmarks with ompi - built successfully'
"""
}
}
}
stage('build MPICH_bm') {
steps {
withEnv(['PATH+EXTRA=/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bin']){
sh """
python3.7 contrib/intel/jenkins/build.py 'mpich_benchmarks' --ofi_build_mode='dbg'
echo "mpi benchmarks with mpich - built successfully"
"""
}
}

stage('build IMPI_bm') {
steps {
withEnv(['PATH+EXTRA=/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bin']) {
}
}
stage('build IMPI_bm') {
steps {
withEnv(['PATH+EXTRA=/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bin']){
sh """
python3.7 contrib/intel/jenkins/build.py 'impi_benchmarks' --ofi_build_mode='dbg'
echo 'mpi benchmarks with impi - built successfully'
"""
}
}
}
}

stage('build MPICH_bm') {
steps {
withEnv(['PATH+EXTRA=/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bin']) {
}

stage ('build OMPI_bm') {
steps {
withEnv(['PATH+EXTRA=/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bin']){
sh """
python3.7 contrib/intel/jenkins/build.py 'mpich_benchmarks' --ofi_build_mode='dbg'
echo "mpi benchmarks with mpich - built successfully"
python3.7 contrib/intel/jenkins/build.py 'ompi_benchmarks' --ofi_build_mode='dbg'
echo 'mpi benchmarks with ompi - built successfully'
"""
}
}
}
stage('parallel-tests') {

stage('parallel-tests') {
parallel {
stage('eth-tcp-dbg') {
agent {node {label 'eth'}}
Expand Down
24 changes: 22 additions & 2 deletions contrib/intel/jenkins/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import shlex
import common
import re
import shutil

def build_libfabric(libfab_install_path, mode):

Expand Down Expand Up @@ -138,13 +139,30 @@ def build_mpi(mpi, mpisrc, mpi_install_path, libfab_install_path, ofi_build_mod
cmd.append("--enable-fortran=no")
cmd.append("--with-device=ch4:ofi")
cmd.append("--enable-ch4-direct=netmod")


configure_cmd = shlex.split(" ".join(cmd))
common.run_command(configure_cmd)
common.run_command(["make", "clean"])
common.run_command(["make", "install", "-j32"])

def build_mpich_suite(mpi, mpi_install_path, libfab_install_path):

mpich_suite_path = '{}/test/'.format(ci_site_config.mpich_src)
mpichsuite_installpath= "{}/mpichsuite/test".format(mpi_install_path)
pwd = os.getcwd()
if (mpi == 'impi'):
os.chdir("{}/mpi".format(mpich_suite_path))
cmd = ["./configure", "--with-mpi={}/intel64" \
.format(ci_site_config.impi_root)]

configure_cmd = shlex.split(" ".join(cmd))
common.run_command(configure_cmd)
common.run_command(["make", "all","-j32"])
shutil.copytree(mpich_suite_path, mpichsuite_installpath)
common.run_command(["make", "distclean"])
os.chdir(pwd)



def build_stress_bm(mpi, mpi_install_path, libfab_install_path):

Expand Down Expand Up @@ -247,7 +265,9 @@ def build_osu_bm(mpi, mpi_install_path, libfab_install_path):
else ci_site_config.ompi_src
# only need to build ompi or mpich, impi is available as binary
build_mpi(mpi, mpisrc, mpi_install_path, install_path, ofi_build_mode)


# build mpich_test_suite
build_mpich_suite(mpi, mpi_install_path, install_path)
# run stress and osu benchmarks for all mpitypes
build_stress_bm(mpi, mpi_install_path, install_path)
build_osu_bm(mpi, mpi_install_path, install_path)
Expand Down
14 changes: 13 additions & 1 deletion contrib/intel/jenkins/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,19 @@ def intel_mpi_benchmark(core, hosts, mpi, mode, util=None):
print("skipping {} as execute condition fails"\
.format(imb_test.testname))
print("----------------------------------------------------------------------------------------\n")


#mpich_test_suite
def mpich_test_suite(core, hosts, mpi, mode, util=None):
mpich_tests = tests.MpichTestSuite(jobname=jbname,buildno=bno,\
testname="MpichTestSuite",core_prov=core, fabric=fab,\
mpitype=mpi, hosts=hosts, ofi_build_mode=mode, \
util_prov=util)
if (mpich_tests.execute_condn == True and \
mpich_tests.mpi_gen_execute_condn == True):
print("Running mpich test suite: Spawn coll, comm, dt Tests for {}-{}-{}-{}".format(core, util, fab, mpi))
os.environ["MPITEST_RETURN_WITH_CODE"] = "1"
mpich_tests.execute_cmd("spawn")

#mpi_stress benchmark tests
def mpistress_benchmark(core, hosts, mpi, mode, util=None):

Expand Down
8 changes: 6 additions & 2 deletions contrib/intel/jenkins/runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
run.fabtests(args_core, hosts, ofi_build_mode)
run.shmemtest(args_core, hosts, ofi_build_mode)
for mpi in mpilist:
run.mpich_test_suite(args_core, hosts, mpi, ofi_build_mode)
run.intel_mpi_benchmark(args_core, hosts, mpi, ofi_build_mode)
run.mpistress_benchmark(args_core, hosts, mpi, ofi_build_mode)
run.osu_benchmark(args_core, hosts, mpi, ofi_build_mode)
Expand All @@ -58,10 +59,13 @@
run.fabtests(args_core, hosts, ofi_build_mode, util=args_util)
run.shmemtest(args_core, hosts, ofi_build_mode, util=args_util)
for mpi in mpilist:
run.mpich_test_suite(args_core, hosts, mpi, ofi_build_mode, \
util=args_util)

run.intel_mpi_benchmark(args_core, hosts, mpi, ofi_build_mode, \
util=args_util,)
util=args_util)
run.mpistress_benchmark(args_core, hosts, mpi, ofi_build_mode, \
util=args_util)
util=args_util)
run.osu_benchmark(args_core, hosts, mpi, ofi_build_mode, \
util=args_util)
else:
Expand Down
70 changes: 69 additions & 1 deletion contrib/intel/jenkins/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ def __init__(self, jobname, buildno, testname, core_prov, fabric,
fabric, hosts, ofi_build_mode, util_prov)
self.mpi = mpitype


@property
def cmd(self):
if (self.mpi == "impi" or self.mpi == "mpich"):
Expand Down Expand Up @@ -358,7 +357,76 @@ def execute_cmd(self):
outputcmd = shlex.split(command + self.rma.imb_cmd)
common.run_command(outputcmd)

class MpichTestSuite(MpiTests):

def __init__(self, jobname, buildno, testname, core_prov, fabric,
mpitype, hosts, ofi_build_mode, util_prov=None):
super().__init__(jobname, buildno, testname, core_prov, fabric,
mpitype, hosts, ofi_build_mode, util_prov)
self.mpichsuitepath = "{}/{}/mpichsuite/test/mpi/" \
.format(self.libfab_installpath, self.mpi)
self.pwd = os.getcwd()

def testgroup(self, testgroupname):

testpath = "{}/{}".format(self.mpichsuitepath, testgroupname)
tests = []
with open("{}/testlist".format(testpath)) as file:
for line in file:
if(line[0] != '#' and line[0] != '\n'):
tests.append((line.rstrip('\n')).split(' '))

return tests

def options(self, nprocs, timeout=None):
if (self.mpi == "impi" or self.mpi == "mpich"):
if (self.mpi == "impi"):
mpiroot = ci_site_config.impi_root
else:
mpiroot = "{}/mpich".format(self.libfab_installpath)
if (self.util_prov):
prov = "\"{};{}\"".format(self.core_prov, self.util_prov)
else:
prov = self.core_prov

if (timeout != None):
os.environ['MPIEXEC_TIMEOUT']=timeout

opts = "-n {np} -hosts {s},{c} -mpi_root={mpiroot} \
-libfabric_path={installpath}/lib -prov {provider} " \
.format(np=nprocs, s=self.server, c=self.client, \
provider=prov, mpiroot=mpiroot, \
installpath=self.libfab_installpath)

elif (self.mpi == "ompi"):
print(self.mpi)

return opts

@property
def execute_condn(self):
return True if (self.mpi == 'impi' and self.core_prov != 'psm2') else False

def execute_cmd(self, testgroupname):
print("Running Tests: " + testgroupname)
tests = []
time = None
os.chdir("{}/{}".format(self.mpichsuitepath,testgroupname))
tests = self.testgroup(testgroupname)
for test in tests:
testname = test[0]
nprocs = test[1]
args = test[2:]
for item in args:
itemlist = item.split('=')
if (itemlist[0] == 'timelimit'):
time = itemlist[1]
opts = self.options(nprocs, timeout=time)
testcmd = self.cmd + opts +"./{}".format(testname)
outputcmd = shlex.split(testcmd)
common.run_command(outputcmd)
os.chdir(self.pwd)

class MpiTestStress(MpiTests):

def __init__(self, jobname, buildno, testname, core_prov, fabric,
Expand Down

0 comments on commit 6ec0bae

Please sign in to comment.