Update Kokkos library to r2.6.00

This commit is contained in:
Stan Moore
2018-03-08 10:57:08 -07:00
parent 0c4c002f34
commit 39786b1740
694 changed files with 12261 additions and 6745 deletions

291
lib/kokkos/scripts/snapshot.py Executable file
View File

@ -0,0 +1,291 @@
#! /usr/bin/env python
"""
Snapshot a project into another project and perform the necessary repo actions
to provide a commit message that can be used to trace back to the exact point
in the source repository.
"""
#todo:
# Support svn
# Allow renaming of the source dir in the destination path
# Check if a new snapshot is necessary?
#
import sys
#check the version number so that there is a good error message when argparse is not available.
#This checks for exactly 2.7 which is bad, but it is a python 2 script and argparse was introduced
#in 2.7 which is also the last version of python 2. If this script is updated for python 3 this
#will need to change, but for now it is not safe to allow 3.x to run this.
if sys.version_info[:2] != (2, 7):
print "Error snapshot requires python 2.7 detected version is %d.%d." % (sys.version_info[0], sys.version_info[1])
sys.exit(1)
import subprocess, argparse, re, doctest, os, datetime, traceback
def parse_cmdline(description):
parser = argparse.ArgumentParser(usage="snapshot.py [options] source destination", description=description)
parser.add_argument("-n", "--no-commit", action="store_false", dest="create_commit", default=True,
help="Do not perform a commit or create a commit message.")
parser.add_argument("-v", "--verbose", action="store_true", dest="verbose_mode", default=False,
help="Enable verbose mode.")
parser.add_argument("-d", "--debug", action="store_true", dest="debug_mode", default=False,
help="Enable debugging output.")
parser.add_argument("--no-validate-repo", action="store_true", dest="no_validate_repo", default=False,
help="Reduce the validation that the source and destination repos are clean to a warning.")
parser.add_argument("--source-repo", choices=["git","none"], default="",
help="Type of repository of the source, use none to skip all repository operations.")
parser.add_argument("--dest-repo", choices=["git","none"], default="",
help="Type of repository of the destination, use none to skip all repository operations.")
parser.add_argument("--small", action="store_true", dest="small_mode",
help="Don't include tests and other extra files when copying.")
parser.add_argument("source", help="Source project to snapshot from.")
parser.add_argument("destination", help="Destination to snapshot too.")
options = parser.parse_args()
options = validate_options(options)
return options
#end parseCmdline
def validate_options(options):
apparent_source_repo_type="none"
apparent_dest_repo_type="none"
#prevent user from accidentally giving us a path that rsync will treat differently than expected.
options.source = options.source.rstrip(os.sep)
options.destination = options.destination.rstrip(os.sep)
options.source = os.path.abspath(options.source)
options.destination = os.path.abspath(options.destination)
if os.path.exists(options.source):
apparent_source_repo_type, source_root = determine_repo_type(options.source)
else:
raise RuntimeError("Could not find source directory of %s." % options.source)
options.source_root = source_root
if not os.path.exists(options.destination):
print "Could not find destination directory of %s so it will be created." % options.destination
os.makedirs(options.destination)
apparent_dest_repo_type, dest_root = determine_repo_type(options.destination)
options.dest_root = dest_root
#error on svn repo types for now
if apparent_source_repo_type == "svn" or apparent_dest_repo_type == "svn":
raise RuntimeError("SVN repositories are not supported at this time.")
if options.source_repo == "":
#source repo type is not specified to just using the apparent type.
options.source_repo = apparent_source_repo_type
else:
if options.source_repo != "none" and options.source_repo != apparent_source_repo_type:
raise RuntimeError("Specified source repository type of %s conflicts with determined type of %s" % \
(options.source_repo, apparent_source_repo_type))
if options.dest_repo == "":
#destination repo type is not specified to just using the apparent type.
options.dest_repo = apparent_dest_repo_type
else:
if options.dest_repo != "none" and options.dest_repo != apparent_dest_repo_type:
raise RuntimeError("Specified destination repository type of %s conflicts with determined type of %s" % \
(options.dest_repo, apparent_dest_repo_type))
return options
#end validate_options
def run_cmd(cmd, options, working_dir="."):
cmd_str = " ".join(cmd)
if options.verbose_mode:
print "Running command '%s' in dir %s." % (cmd_str, working_dir)
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=working_dir)
proc_stdout, proc_stderr = proc.communicate()
ret_val = proc.wait()
if options.debug_mode:
print "==== %s stdout start ====" % cmd_str
print proc_stdout
print "==== %s stdout end ====" % cmd_str
print "==== %s stderr ====" % cmd_str
print proc_stderr
print "==== %s stderr ====" % cmd_str
if ret_val != 0:
raise RuntimeError("Command '%s' failed with error code %d. Error message:%s%s%sstdout:%s" % \
(cmd_str, ret_val, os.linesep, proc_stderr, os.linesep, proc_stdout))
return proc_stdout, proc_stderr
#end run_cmd
def determine_repo_type(location):
apparent_repo_type = "none"
while location != "":
if os.path.exists(os.path.join(location, ".git")):
apparent_repo_type = "git"
break
elif os.path.exists(os.path.join(location, ".svn")):
apparent_repo_type = "svn"
break
else:
location = location[:location.rfind(os.sep)]
return apparent_repo_type, location
#end determine_repo_type
def rsync(source, dest, options):
rsync_cmd = ["rsync", "-ar", "--delete"]
if options.debug_mode:
rsync_cmd.append("-v")
if options.small_mode or options.source_repo == "git":
rsync_cmd.append("--delete-excluded")
if options.small_mode:
rsync_cmd.append("--include=config/master_history.txt")
rsync_cmd.append("--include=cmake/tpls")
rsync_cmd.append("--exclude=benchmarks/")
rsync_cmd.append("--exclude=config/*")
rsync_cmd.append("--exclude=doc/")
rsync_cmd.append("--exclude=example/")
rsync_cmd.append("--exclude=tpls/")
rsync_cmd.append("--exclude=HOW_TO_SNAPSHOT")
rsync_cmd.append("--exclude=unit_test")
rsync_cmd.append("--exclude=unit_tests")
rsync_cmd.append("--exclude=perf_test")
rsync_cmd.append("--exclude=performance_tests")
if options.source_repo == "git":
rsync_cmd.append("--exclude=.git*")
rsync_cmd.append(options.source)
rsync_cmd.append(options.destination)
run_cmd(rsync_cmd, options)
#end rsync
def create_commit_message(commit_id, commit_log, project_name, project_location):
eol = os.linesep
message = "Snapshot of %s from commit %s" % (project_name, commit_id)
message += eol * 2
message += "From repository at %s" % project_location
message += eol * 2
message += "At commit:" + eol
message += commit_log
return message
#end create_commit_message
def find_git_commit_information(options):
r"""
>>> class fake_options:
... source="."
... verbose_mode=False
... debug_mode=False
>>> myoptions = fake_options()
>>> find_git_commit_information(myoptions)[2:]
('sems', 'software.sandia.gov:/git/sems')
"""
git_log_cmd = ["git", "log", "-1"]
output, error = run_cmd(git_log_cmd, options, options.source)
commit_match = re.match("commit ([0-9a-fA-F]+)", output)
commit_id = commit_match.group(1)
commit_log = output
git_remote_cmd = ["git", "remote", "-v"]
output, error = run_cmd(git_remote_cmd, options, options.source)
remote_match = re.search("origin\s([^ ]*/([^ ]+))", output, re.MULTILINE)
if not remote_match:
raise RuntimeError("Could not find origin of repo at %s. Consider using none for source repo type." % (options.source))
source_location = remote_match.group(1)
source_name = remote_match.group(2).strip()
if source_name[-1] == "/":
source_name = source_name[:-1]
return commit_id, commit_log, source_name, source_location
#end find_git_commit_information
def do_git_commit(message, options):
if options.verbose_mode:
print "Commiting to destination repository."
git_add_cmd = ["git", "add", "-A"]
run_cmd(git_add_cmd, options, options.destination)
git_commit_cmd = ["git", "commit", "-m%s" % message]
run_cmd(git_commit_cmd, options, options.destination)
git_log_cmd = ["git", "log", "--format=%h", "-1"]
commit_sha1, error = run_cmd(git_log_cmd, options, options.destination)
print "Commit %s was made to %s." % (commit_sha1.strip(), options.dest_root)
#end do_git_commit
def verify_git_repo_clean(location, options):
git_status_cmd = ["git", "status", "--porcelain"]
output, error = run_cmd(git_status_cmd, options, location)
if output != "":
if options.no_validate_repo == False:
raise RuntimeError("%s is not clean.%sPlease commit or stash all changes before running snapshot."
% (location, os.linesep))
else:
print "WARNING: %s is not clean. Proceeding anyway." % location
print "WARNING: This could lead to differences in the source and destination."
print "WARNING: It could also lead to extra files being included in the snapshot commit."
#end verify_git_repo_clean
def main(options):
if options.verbose_mode:
print "Snapshotting %s to %s." % (options.source, options.destination)
if options.source_repo == "git":
verify_git_repo_clean(options.source, options)
commit_id, commit_log, repo_name, repo_location = find_git_commit_information(options)
elif options.source_repo == "none":
commit_id = "N/A"
commit_log = "Unknown commit from %s snapshotted at: %s" % (options.source, datetime.datetime.now())
repo_name = options.source
repo_location = options.source
commit_message = create_commit_message(commit_id, commit_log, repo_name, repo_location) + os.linesep*2
if options.dest_repo == "git":
verify_git_repo_clean(options.destination, options)
rsync(options.source, options.destination, options)
if options.dest_repo == "git":
do_git_commit(commit_message, options)
elif options.dest_repo == "none":
file_name = "snapshot_message.txt"
message_file = open(file_name, "w")
message_file.write(commit_message)
message_file.close()
cwd = os.getcwd()
print "No commit done by request. Please use file at:"
print "%s%sif you wish to commit this to a repo later." % (cwd+"/"+file_name, os.linesep)
#end main
if (__name__ == "__main__"):
if ("--test" in sys.argv):
doctest.testmod()
sys.exit(0)
try:
options = parse_cmdline(__doc__)
main(options)
except RuntimeError, e:
print "Error occured:", e
if "--debug" in sys.argv:
traceback.print_exc()
sys.exit(1)
else:
sys.exit(0)

View File

@ -0,0 +1,5 @@
jenkins_test_driver is designed to be run through Jenkins as a
multiconfiguration job. It relies on a number of environment variables that will
only be set when run in that context. It is possible to override these if you
know the Jenkins job setup. It is not recommended that a non-expert try to run
this script directly.

View File

@ -0,0 +1,83 @@
#!/bin/bash -x
echo "Building for BUILD_TYPE = ${BUILD_TYPE}"
echo "Building with HOST_COMPILER = ${HOST_COMPILER}"
echo "Building in ${WORKSPACE}"
module use /home/projects/modulefiles
BUILD_TYPE=`echo $BUILD_TYPE | tr "~" " "`
build_options=""
for item in ${BUILD_TYPE}; do
build_options="$build_options --with-$item"
done
kokkos_path=${WORKSPACE}/kokkos
gtest_path=${WORKSPACE}/kokkos/tpls/gtest
echo ${WORKSPACE}
pwd
#extract information from the provided parameters.
host_compiler_brand=`echo $HOST_COMPILER | grep -o "^[a-zA-Z]*"`
cuda_compiler=`echo $BUILD_TYPE | grep -o "cuda_[^ ]*"`
host_compiler_module=`echo $HOST_COMPILER | tr "_" "/"`
cuda_compiler_module=`echo $cuda_compiler | tr "_" "/"`
build_path=`echo $BUILD_TYPE | tr " " "_"`
module load $host_compiler_module
module load $cuda_compiler_module
case $host_compiler_brand in
gcc)
module load nvcc-wrapper/gnu
compiler=g++
;;
intel)
module load nvcc-wrapper/intel
compiler=icpc
;;
*)
echo "Unrecognized compiler brand."
exit 1
;;
esac
#if cuda is on we need to set the host compiler for the
#nvcc wrapper and make the wrapper the compiler.
if [ $cuda_compiler != "" ]; then
export NVCC_WRAPPER_DEFAULT_COMPILER=$compiler
compiler=$kokkos_path/bin/nvcc_wrapper
fi
if [ $host_compiler_brand == "intel" -a $cuda_compiler != "" ]; then
echo "Intel compilers are not supported with cuda at this time."
exit 0
fi
rm -rf test-$build_path
mkdir test-$build_path
cd test-$build_path
/bin/bash $kokkos_path/generate_makefile.bash $build_options --kokkos-path="$kokkos_path" --with-gtest="$gtest_path" --compiler=$compiler 2>&1 |tee configure.out
if [ ${PIPESTATUS[0]} != 0 ]; then
echo "Configure failed."
exit 1
fi
make build-test 2>&1 | tee build.log
if [ ${PIPESTATUS[0]} != 0 ]; then
echo "Build failed."
exit 1
fi
make test 2>&1 | tee test.log
grep "FAIL" test.log
if [ $? == 0 ]; then
echo "Tests failed."
exit 1
fi

View File

@ -0,0 +1,287 @@
#! /usr/bin/env python
"""
Compute the size at which the current compiler will start to
significantly scale back optimization.
The CPP file being modified will need the following tags.
// JGF_DUPLICATE_BEGIN - Put before start of function to duplicate
// JGF_DUPLICATE_END - Put after end of function to duplcate
// JGF_DUPE function_name(args); - Put anywhere where it's legal to
put a function call but not in your timing section.
The program will need to output the string:
FOM: <number>
This will represent the program's performance
"""
import argparse, sys, os, doctest, subprocess, re, time
VERBOSE = False
###############################################################################
def parse_command_line(args, description):
###############################################################################
parser = argparse.ArgumentParser(
usage="""\n%s <cppfile> <build-command> <run-command> [--verbose]
OR
%s --help
OR
%s --test
\033[1mEXAMPLES:\033[0m
> %s foo.cpp 'make -j4' foo
""" % ((os.path.basename(args[0]), ) * 4),
description=description,
formatter_class=argparse.ArgumentDefaultsHelpFormatter
)
parser.add_argument("cppfile", help="Name of file to modify.")
parser.add_argument("buildcmd", help="Build command")
parser.add_argument("execmd", help="Run command")
parser.add_argument("-v", "--verbose", action="store_true",
help="Print extra information")
parser.add_argument("-s", "--start", type=int, default=1,
help="Starting number of dupes")
parser.add_argument("-e", "--end", type=int, default=1000,
help="Ending number of dupes")
parser.add_argument("-n", "--repeat", type=int, default=10,
help="Number of times to repeat an individial execution. Best value will be taken.")
parser.add_argument("-t", "--template", action="store_true",
help="Use templating instead of source copying to increase object size")
parser.add_argument("-c", "--csv", action="store_true",
help="Print results as CSV")
args = parser.parse_args(args[1:])
if (args.verbose):
global VERBOSE
VERBOSE = True
return args.cppfile, args.buildcmd, args.execmd, args.start, args.end, args.repeat, args.template, args.csv
###############################################################################
def verbose_print(msg, override=None):
###############################################################################
if ( (VERBOSE and not override is False) or override):
print msg
###############################################################################
def error_print(msg):
###############################################################################
print >> sys.stderr, msg
###############################################################################
def expect(condition, error_msg):
###############################################################################
"""
Similar to assert except doesn't generate an ugly stacktrace. Useful for
checking user error, not programming error.
"""
if (not condition):
raise SystemExit("FAIL: %s" % error_msg)
###############################################################################
def run_cmd(cmd, ok_to_fail=False, input_str=None, from_dir=None, verbose=None,
arg_stdout=subprocess.PIPE, arg_stderr=subprocess.PIPE):
###############################################################################
verbose_print("RUN: %s" % cmd, verbose)
if (input_str is not None):
stdin = subprocess.PIPE
else:
stdin = None
proc = subprocess.Popen(cmd,
shell=True,
stdout=arg_stdout,
stderr=arg_stderr,
stdin=stdin,
cwd=from_dir)
output, errput = proc.communicate(input_str)
output = output.strip() if output is not None else output
stat = proc.wait()
if (ok_to_fail):
return stat, output, errput
else:
if (arg_stderr is not None):
errput = errput if errput is not None else open(arg_stderr.name, "r").read()
expect(stat == 0, "Command: '%s' failed with error '%s'" % (cmd, errput))
else:
expect(stat == 0, "Command: '%s' failed. See terminal output" % cmd)
return output
###############################################################################
def build_and_run(source, cppfile, buildcmd, execmd, repeat):
###############################################################################
open(cppfile, 'w').writelines(source)
run_cmd(buildcmd)
best = None
for i in xrange(repeat):
wait_for_quiet_machine()
output = run_cmd(execmd)
current = None
fom_regex = re.compile(r'^FOM: ([0-9.]+)$')
for line in output.splitlines():
m = fom_regex.match(line)
if (m is not None):
current = float(m.groups()[0])
break
expect(current is not None, "No lines in output matched FOM regex")
if (best is None or best < current):
best = current
return best
###############################################################################
def wait_for_quiet_machine():
###############################################################################
while(True):
time.sleep(2)
# The first iteration of top gives garbage results
idle_pct_raw = run_cmd("top -bn2 | grep 'Cpu(s)' | tr ',' ' ' | tail -n 1 | awk '{print $5}'")
idle_pct_re = re.compile(r'^([0-9.]+)%id$')
m = idle_pct_re.match(idle_pct_raw)
expect(m is not None, "top not returning output in expected form")
idle_pct = float(m.groups()[0])
if (idle_pct < 95):
error_print("Machine is too busy, waiting for it to become free")
else:
break
###############################################################################
def add_n_dupes(curr_lines, num_dupes, template):
###############################################################################
function_name = None
function_invocation = None
function_lines = []
function_re = re.compile(r'^.* (\w+) *[(]')
function_inv_re = re.compile(r'^.*JGF_DUPE: +(.+)$')
# Get function lines
record = False
definition_insertion_point = None
invocation_insertion_point = None
for idx, line in enumerate(curr_lines):
if ("JGF_DUPLICATE_BEGIN" in line):
record = True
m = function_re.match(curr_lines[idx+1])
expect(m is not None, "Could not find function in line '%s'" % curr_lines[idx+1])
function_name = m.groups()[0]
elif ("JGF_DUPLICATE_END" in line):
record = False
definition_insertion_point = idx + 1
elif (record):
function_lines.append(line)
elif ("JGF_DUPE" in line):
m = function_inv_re.match(line)
expect(m is not None, "Could not find function invocation example in line '%s'" % line)
function_invocation = m.groups()[0]
invocation_insertion_point = idx + 1
expect(function_name is not None, "Could not find name of dupe function")
expect(function_invocation is not None, "Could not find function invocation point")
expect(definition_insertion_point < invocation_insertion_point, "fix me")
dupe_func_defs = []
dupe_invocations = ["int jgf_rand = std::rand();\n", "if (false) {}\n"]
for i in xrange(num_dupes):
if (not template):
dupe_func = list(function_lines)
dupe_func[0] = dupe_func[0].replace(function_name, "%s%d" % (function_name, i))
dupe_func_defs.extend(dupe_func)
dupe_invocations.append("else if (jgf_rand == %d) " % i)
if (template):
dupe_call = function_invocation.replace(function_name, "%s<%d>" % (function_name, i)) + "\n"
else:
dupe_call = function_invocation.replace(function_name, "%s%d" % (function_name, i)) + "\n"
dupe_invocations.append(dupe_call)
curr_lines[invocation_insertion_point:invocation_insertion_point] = dupe_invocations
curr_lines[definition_insertion_point:definition_insertion_point] = dupe_func_defs
###############################################################################
def report(num_dupes, curr_lines, object_file, orig_fom, curr_fom, csv=False, is_first_report=False):
###############################################################################
fom_change = (curr_fom - orig_fom) / orig_fom
if (csv):
if (is_first_report):
print "num_dupes, obj_byte_size, loc, fom, pct_diff"
print "%s, %s, %s, %s, %s" % (num_dupes, os.path.getsize(object_file), len(curr_lines), curr_fom, fom_change*100)
else:
print "========================================================"
print "For number of dupes:", num_dupes
print "Object file size (bytes):", os.path.getsize(object_file)
print "Lines of code:", len(curr_lines)
print "Field of merit:", curr_fom
print "Change pct:", fom_change*100
###############################################################################
def obj_size_opt_check(cppfile, buildcmd, execmd, start, end, repeat, template, csv=False):
###############################################################################
orig_source_lines = open(cppfile, 'r').readlines()
backup_file = "%s.orig" % cppfile
object_file = "%s.o" % os.path.splitext(cppfile)[0]
os.rename(cppfile, backup_file)
orig_fom = build_and_run(orig_source_lines, cppfile, buildcmd, execmd, repeat)
report(0, orig_source_lines, object_file, orig_fom, orig_fom, csv=csv, is_first_report=True)
i = start
while (i < end):
curr_lines = list(orig_source_lines)
add_n_dupes(curr_lines, i, template)
curr_fom = build_and_run(curr_lines, cppfile, buildcmd, execmd, repeat)
report(i, curr_lines, object_file, orig_fom, curr_fom, csv=csv)
i *= 2 # make growth function configurable?
os.remove(cppfile)
os.rename(backup_file, cppfile)
###############################################################################
def _main_func(description):
###############################################################################
if ("--test" in sys.argv):
test_results = doctest.testmod(verbose=True)
sys.exit(1 if test_results.failed > 0 else 0)
cppfile, buildcmd, execmd, start, end, repeat, template, csv = parse_command_line(sys.argv, description)
obj_size_opt_check(cppfile, buildcmd, execmd, start, end, repeat, template, csv)
###############################################################################
if (__name__ == "__main__"):
_main_func(__doc__)

View File

@ -0,0 +1,66 @@
#!/bin/bash
. /etc/profile.d/modules.sh
echo "build-dir $1"
echo "backend $2"
echo "module $3"
echo "compiler $4"
echo "cxxflags $5"
echo "architecrure $6"
echo "debug $7"
echo "kokkos-options $8"
echo "kokkos-cuda-options $9"
echo "hwloc $9"
NOW=`date "+%Y%m%d%H%M%S"`
BASEDIR="$1-$NOW"
mkdir $BASEDIR
cd $BASEDIR
module load $2
if [ $9 == "yes" ]; then
if [ $7 == "debug" ]; then
../generate_makefile.sh --with-devices=$2 \
--compiler=$4 \
--cxxflags=$5 \
--arch=$6 \
--debug \
--with-options=$8 \
--with-cuda-options=$9
--with-hwloc=${HWLOC_ROOT}
else
../generate_makefile.sh --with-devices=$2 \
--compiler=$4 \
--cxxflags=$5 \
--arch=$6 \
--debug \
--with-options=$8 \
--with-cuda-options=$9
--with-hwloc=${HWLOC_ROOT}
fi
else
if [ $7 == "debug" ]; then
../generate_makefile.sh --with-devices=$2 \
--compiler=$4 \
--cxxflags=$5 \
--arch=$6 \
--debug \
--with-options=$8 \
--with-cuda-options=$9
else
../generate_makefile.sh --with-devices=$2 \
--compiler=$4 \
--cxxflags=$5 \
--arch=$6 \
--debug \
--with-options=$8 \
--with-cuda-options=$9
fi
fi
make test
return $?

View File

@ -0,0 +1,4 @@
module purge
module load sems-env sems-gcc/4.9.3 sems-openmpi/1.10.1 sems-hdf5/1.8.12/parallel sems-netcdf/4.3.2/parallel sems-python/2.7.9 sems-zlib/1.2.8/base sems-cmake/3.5.2 sems-parmetis/4.0.3/64bit_parallel sems-scotch/6.0.3/nopthread_64bit_parallel sems-boost/1.63.0/base sems-yaml_cpp sems-superlu
#Run Trilinos CheckinTest

View File

@ -0,0 +1,59 @@
#!/bin/bash -le
TRILINOS_UPDATE_BRANCH=$1
TRILINOS_PRISTINE_BRANCH=$2
if [ -z $TRILINOS_UPDATE_BRANCH ]
then
TRILINOS_UPDATE_BRANCH=develop
fi
if [ -z $TRILINOS_PRISTINE_BRANCH ]
then
TRILINOS_PRISTINE_BRANCH=develop
fi
export TRILINOS_UPDATED_PATH=${PWD}/trilinos-update
export TRILINOS_PRISTINE_PATH=${PWD}/trilinos-pristine
#rm -rf ${KOKKOS_PATH}
#rm -rf ${TRILINOS_UPDATED_PATH}
#rm -rf ${TRILINOS_PRISTINE_PATH}
#Already done:
if [ ! -d "${TRILINOS_UPDATED_PATH}" ]; then
git clone https://github.com/trilinos/trilinos ${TRILINOS_UPDATED_PATH}
fi
if [ ! -d "${TRILINOS_PRISTINE_PATH}" ]; then
git clone https://github.com/trilinos/trilinos ${TRILINOS_PRISTINE_PATH}
fi
cd ${TRILINOS_UPDATED_PATH}
git checkout $TRILINOS_UPDATE_BRANCH
git reset --hard origin/$TRILINOS_UPDATE_BRANCH
git pull
cd ..
python kokkos/scripts/snapshot.py ${KOKKOS_PATH} ${TRILINOS_UPDATED_PATH}/packages
cd ${TRILINOS_UPDATED_PATH}
echo ""
echo ""
echo "Trilinos State:"
git log --pretty=oneline --since=7.days
cd ..
cd ${TRILINOS_PRISTINE_PATH}
git status
echo "Checkout $TRILINOS_PRISTINE_BRANCH"
git checkout $TRILINOS_PRISTINE_BRANCH
echo "Pull"
git pull
cd ..
cd ${TRILINOS_PRISTINE_PATH}
echo ""
echo ""
echo "Trilinos Pristine State:"
git log --pretty=oneline --since=7.days
cd ..

View File

@ -0,0 +1,60 @@
#!/bin/bash -el
ulimit -c 0
module load devpack/openmpi/2.1.1/intel/17.4.196/cuda/none
KOKKOS_BRANCH=$1
TRILINOS_UPDATE_BRANCH=$2
TRILINOS_PRISTINE_BRANCH=$3
if [ -z $KOKKOS_BRANCH ]
then
KOKKOS_BRANCH=develop
fi
if [ -z $TRILINOS_UPDATE_BRANCH ]
then
TRILINOS_UPDATE_BRANCH=develop
fi
if [ -z $TRILINOS_PRISTINE_BRANCH ]
then
TRILINOS_PRISTINE_BRANCH=develop
fi
export OMP_NUM_THREADS=8
export JENKINS_DO_CUDA=OFF
export JENKINS_DO_OPENMP=OFF
export JENKINS_DO_PTHREAD=ON
export JENKINS_DO_SERIAL=OFF
export JENKINS_DO_COMPLEX=OFF
export JENKINS_ARCH_CXX_FLAG="-xCORE-AVX2 -mkl"
export JENKINS_ARCH_C_FLAG="-xCORE-AVX2 -mkl"
export BLAS_LIBRARIES="-mkl;${MKLROOT}/lib/intel64/libmkl_intel_lp64.a;${MKLROOT}/lib/intel64/libmkl_intel_thread.a;${MKLROOT}/lib/intel64/libmkl_core.a"
export LAPACK_LIBRARIES=${BLAS_LIBRARIES}
export JENKINS_DO_TESTS=ON
export JENKINS_DO_EXAMPLES=ON
export JENKINS_DO_SHARED=ON
export QUEUE=haswell
module load python
export KOKKOS_PATH=${PWD}/kokkos
#Already done:
if [ ! -d "${KOKKOS_PATH}" ]; then
git clone https://github.com/kokkos/kokkos ${KOKKOS_PATH}
fi
cd ${KOKKOS_PATH}
git checkout $KOKKOS_BRANCH
git pull
cd ..
source ${KOKKOS_PATH}/scripts/trilinos-integration/prepare_trilinos_repos.sh $TRILINOS_UPDATE_BRANCH $TRILINOS_PRISTINE_BRANCH
${TRILINOS_UPDATED_PATH}/sampleScripts/Sandia-SEMS/run_repo_comparison_slurm ${TRILINOS_UPDATED_PATH} ${TRILINOS_PRISTINE_PATH} ${TRILINOS_UPDATED_PATH}/sampleScripts/Sandia-SEMS/configure-testbeds-jenkins-all TestCompare ${QUEUE}

View File

@ -0,0 +1,60 @@
#!/bin/bash -el
ulimit -c 0
module load devpack/openmpi/2.1.1/intel/17.4.196/cuda/none
KOKKOS_BRANCH=$1
TRILINOS_UPDATE_BRANCH=$2
TRILINOS_PRISTINE_BRANCH=$3
if [ -z $KOKKOS_BRANCH ]
then
KOKKOS_BRANCH=develop
fi
if [ -z $TRILINOS_UPDATE_BRANCH ]
then
TRILINOS_UPDATE_BRANCH=develop
fi
if [ -z $TRILINOS_PRISTINE_BRANCH ]
then
TRILINOS_PRISTINE_BRANCH=develop
fi
export OMP_NUM_THREADS=8
export JENKINS_DO_CUDA=OFF
export JENKINS_DO_OPENMP=OFF
export JENKINS_DO_PTHREAD=OFF
export JENKINS_DO_SERIAL=ON
export JENKINS_DO_COMPLEX=ON
export JENKINS_ARCH_CXX_FLAG="-xCORE-AVX2 -mkl"
export JENKINS_ARCH_C_FLAG="-xCORE-AVX2 -mkl"
export BLAS_LIBRARIES="-mkl;${MKLROOT}/lib/intel64/libmkl_intel_lp64.a;${MKLROOT}/lib/intel64/libmkl_intel_thread.a;${MKLROOT}/lib/intel64/libmkl_core.a"
export LAPACK_LIBRARIES=${BLAS_LIBRARIES}
export JENKINS_DO_TESTS=ON
export JENKINS_DO_EXAMPLES=ON
export JENKINS_DO_SHARED=ON
export QUEUE=haswell
module load python
export KOKKOS_PATH=${PWD}/kokkos
#Already done:
if [ ! -d "${KOKKOS_PATH}" ]; then
git clone https://github.com/kokkos/kokkos ${KOKKOS_PATH}
fi
cd ${KOKKOS_PATH}
git checkout $KOKKOS_BRANCH
git pull
cd ..
source ${KOKKOS_PATH}/scripts/trilinos-integration/prepare_trilinos_repos.sh $TRILINOS_UPDATE_BRANCH $TRILINOS_PRISTINE_BRANCH
${TRILINOS_UPDATED_PATH}/sampleScripts/Sandia-SEMS/run_repo_comparison_slurm ${TRILINOS_UPDATED_PATH} ${TRILINOS_PRISTINE_PATH} ${TRILINOS_UPDATED_PATH}/sampleScripts/Sandia-SEMS/configure-testbeds-jenkins-all TestCompare ${QUEUE}

View File

@ -0,0 +1,63 @@
#!/bin/bash -el
ulimit -c 0
KOKKOS_BRANCH=$1
TRILINOS_UPDATE_BRANCH=$2
TRILINOS_PRISTINE_BRANCH=$3
if [ -z $KOKKOS_BRANCH ]
then
KOKKOS_BRANCH=develop
fi
if [ -z $TRILINOS_UPDATE_BRANCH ]
then
TRILINOS_UPDATE_BRANCH=develop
fi
if [ -z $TRILINOS_PRISTINE_BRANCH ]
then
TRILINOS_PRISTINE_BRANCH=develop
fi
module load devpack/openmpi/1.10.4/gcc/5.4.0/cuda/8.0.44
export OMP_NUM_THREADS=8
export JENKINS_DO_CUDA=ON
export JENKINS_DO_OPENMP=OFF
export JENKINS_DO_PTHREAD=OFF
export JENKINS_DO_SERIAL=ON
export JENKINS_DO_COMPLEX=OFF
export JENKINS_ARCH_CXX_FLAG="-mcpu=power8 -arch=sm_37"
export JENKINS_ARCH_C_FLAG="-mcpu=power8"
export BLAS_LIBRARIES="${BLAS_ROOT}/lib/libblas.a;gfortran;gomp"
export LAPACK_LIBRARIES="${LAPACK_ROOT}/lib/liblapack.a;gfortran;gomp"
export JENKINS_DO_TESTS=ON
export JENKINS_DO_EXAMPLES=ON
export QUEUE=rhel7F
module load python
export KOKKOS_PATH=${PWD}/kokkos
#Already done:
if [ ! -d "${KOKKOS_PATH}" ]; then
git clone https://github.com/kokkos/kokkos ${KOKKOS_PATH}
fi
export OMPI_CXX=${KOKKOS_PATH}/bin/nvcc_wrapper
cd ${KOKKOS_PATH}
git checkout $KOKKOS_BRANCH
git pull
cd ..
export CUDA_LAUNCH_BLOCKING=1
export CUDA_MANAGED_FORCE_DEVICE_ALLOC=1
source ${KOKKOS_PATH}/scripts/trilinos-integration/prepare_trilinos_repos.sh $TRILINOS_UPDATE_BRANCH $TRILINOS_PRISTINE_BRANCH
${TRILINOS_UPDATED_PATH}/sampleScripts/Sandia-SEMS/run_repo_comparison_lsf ${TRILINOS_UPDATED_PATH} ${TRILINOS_PRISTINE_PATH} ${TRILINOS_UPDATED_PATH}/sampleScripts/Sandia-SEMS/configure-testbeds-jenkins-all TestCompare ${QUEUE}

View File

@ -0,0 +1,58 @@
#!/bin/bash -el
ulimit -c 0
KOKKOS_BRANCH=$1
TRILINOS_UPDATE_BRANCH=$2
TRILINOS_PRISTINE_BRANCH=$3
if [ -z $KOKKOS_BRANCH ]
then
KOKKOS_BRANCH=develop
fi
if [ -z $TRILINOS_UPDATE_BRANCH ]
then
TRILINOS_UPDATE_BRANCH=develop
fi
if [ -z $TRILINOS_PRISTINE_BRANCH ]
then
TRILINOS_PRISTINE_BRANCH=develop
fi
module load devpack/openmpi/1.10.4/gcc/5.4.0/cuda/8.0.44
export OMP_NUM_THREADS=8
export JENKINS_DO_CUDA=OFF
export JENKINS_DO_OPENMP=ON
export JENKINS_DO_PTHREAD=OFF
export JENKINS_DO_SERIAL=OFF
export JENKINS_DO_COMPLEX=OFF
export JENKINS_ARCH_CXX_FLAG="-mcpu=power8"
export JENKINS_ARCH_C_FLAG="-mcpu=power8"
export BLAS_LIBRARIES="${BLAS_ROOT}/lib/libblas.a;gfortran;gomp"
export LAPACK_LIBRARIES="${LAPACK_ROOT}/lib/liblapack.a;gfortran;gomp"
export JENKINS_DO_TESTS=ON
export JENKINS_DO_EXAMPLES=ON
export QUEUE=rhel7F
module load python
export KOKKOS_PATH=${PWD}/kokkos
#Already done:
if [ ! -d "${KOKKOS_PATH}" ]; then
git clone https://github.com/kokkos/kokkos ${KOKKOS_PATH}
fi
cd ${KOKKOS_PATH}
git checkout $KOKKOS_BRANCH
git pull
cd ..
source ${KOKKOS_PATH}/scripts/trilinos-integration/prepare_trilinos_repos.sh $TRILINOS_UPDATE_BRANCH $TRILINOS_PRISTINE_BRANCH
${TRILINOS_UPDATED_PATH}/sampleScripts/Sandia-SEMS/run_repo_comparison_lsf ${TRILINOS_UPDATED_PATH} ${TRILINOS_PRISTINE_PATH} ${TRILINOS_UPDATED_PATH}/sampleScripts/Sandia-SEMS/configure-testbeds-jenkins-all TestCompare ${QUEUE}