Commit fbdae1fe authored by Hamilton, Steven P's avatar Hamilton, Steven P
Browse files

Fixes to allow python3.

parent c7c6fcb5
#!/usr/bin/env python
#!/usr/bin/env python3
import getopt
import sys
......
#! /usr/bin/env python
#! /usr/bin/env python3
import sys
import os
......@@ -62,10 +62,10 @@ def check_results(path_to_results):
check_h5 = True
if check_h5:
expected_passes += 1
#
# Get path to the correct results.
#
path_to_correct_results = get_path_to_correct_results()
#
# Get path to the correct results.
#
path_to_correct_results = get_path_to_correct_results()
ref_outfile = "c5g7_3d_output_ref.h5"
ref_fluxfile = "c5g7_3d_flux_ref.h5"
outfile = "c5g7_3d_output.h5"
......@@ -73,12 +73,12 @@ def check_results(path_to_results):
# Link reference files into results directory
if (not os.path.islink(os.path.join(path_to_results,ref_outfile))):
os.symlink(os.path.join(path_to_correct_results,ref_outfile),
os.symlink(os.path.join(path_to_correct_results,ref_outfile),
os.path.join(path_to_results,ref_outfile))
if (not os.path.islink(os.path.join(path_to_results,ref_fluxfile))):
os.symlink(os.path.join(path_to_correct_results,ref_fluxfile),
os.path.join(path_to_results,ref_fluxfile))
os.path.join(path_to_results,ref_fluxfile))
import check_profugus
......@@ -88,10 +88,10 @@ def check_results(path_to_results):
if ip == expected_passes:
ival = GOOD_RESULTS
print "Passed"
print("Passed")
else:
ival = BAD_RESULTS
print "Failed"
print("Failed")
return ival
......
......@@ -14,7 +14,7 @@
source __rgtenvironmentalfile__
module load __nccstestharnessmodule__
module load gcc
module load python/2.7.12
module load python/3.5.2
module load py-h5py/2.6.0
module load spectrum_mpi
module list
......
#!/usr/bin/env python
#!/usr/bin/env python3
import getopt
import sys
......
#! /usr/bin/env python
#! /usr/bin/env python3
import sys
import os
......@@ -62,10 +62,10 @@ def check_results(path_to_results):
check_h5 = False
if check_h5:
expected_passes += 1
#
# Get path to the correct results.
#
path_to_correct_results = get_path_to_correct_results()
#
# Get path to the correct results.
#
path_to_correct_results = get_path_to_correct_results()
ref_outfile = "c5g7_3d_output_ref.h5"
ref_fluxfile = "c5g7_3d_flux_ref.h5"
outfile = "c5g7_3d_output.h5"
......@@ -73,12 +73,12 @@ def check_results(path_to_results):
# Link reference files into results directory
if (not os.path.islink(os.path.join(path_to_results,ref_outfile))):
os.symlink(os.path.join(path_to_correct_results,ref_outfile),
os.symlink(os.path.join(path_to_correct_results,ref_outfile),
os.path.join(path_to_results,ref_outfile))
if (not os.path.islink(os.path.join(path_to_results,ref_fluxfile))):
os.symlink(os.path.join(path_to_correct_results,ref_fluxfile),
os.path.join(path_to_results,ref_fluxfile))
os.path.join(path_to_results,ref_fluxfile))
import check_profugus
......@@ -88,10 +88,10 @@ def check_results(path_to_results):
if ip == expected_passes:
ival = GOOD_RESULTS
print "Passed"
print("Passed")
else:
ival = BAD_RESULTS
print "Failed"
print("Failed")
return ival
......
......@@ -14,7 +14,7 @@
source __rgtenvironmentalfile__
module load __nccstestharnessmodule__
module load gcc
module load python/2.7.12
module load python/3.5.2
module load py-h5py/2.6.0
module load spectrum_mpi
module list
......@@ -87,7 +87,7 @@ ls -l
echo "Contents of input directory:"
ls -l ${INPUTDIR}/
ln -s ${INPUTDIR}/c5g7_3d_cpu_1node.xml .
ln -s ${INPUTDIR}/c5g7_3d_cpu_short.xml .
ln -s ${INPUTDIR}/c5g7_252g.xml .
#-----------------------------------------------------
......@@ -117,23 +117,23 @@ cp -rf $WORKDIR/* $RESULTSDIR && rm -rf $WORKDIR
# Move the batch file name to $RESULTSDIR -
# -
#-----------------------------------------------------
#mv __batchfilename__ $RESULTSDIR
mv __batchfilename__ $RESULTSDIR
#-----------------------------------------------------
# Check the final results. -
# -
#-----------------------------------------------------
#check_executable_driver.py -p $RESULTSDIR -i $UNIQUE_ID_STRING
check_executable_driver.py -p $RESULTSDIR -i $UNIQUE_ID_STRING
#-----------------------------------------------------
# The script now determines if we are to resubmit -
# itself. -
# -
#-----------------------------------------------------
#case __resubmitme__ in
# 0)
# test_harness_driver.py -r;;
#
# 1)
# echo "No resubmit";;
#esac
case __resubmitme__ in
0)
test_harness_driver.py -r;;
1)
echo "No resubmit";;
esac
#!/usr/bin/env python
#!/usr/bin/env python3
import getopt
import sys
......
#! /usr/bin/env python
#! /usr/bin/env python3
import sys
import os
......@@ -62,10 +62,10 @@ def check_results(path_to_results):
check_h5 = True
if check_h5:
expected_passes += 1
#
# Get path to the correct results.
#
path_to_correct_results = get_path_to_correct_results()
#
# Get path to the correct results.
#
path_to_correct_results = get_path_to_correct_results()
ref_outfile = "c5g7_3d_output_ref.h5"
ref_fluxfile = "c5g7_3d_flux_ref.h5"
outfile = "c5g7_3d_output.h5"
......@@ -73,12 +73,12 @@ def check_results(path_to_results):
# Link reference files into results directory
if (not os.path.islink(os.path.join(path_to_results,ref_outfile))):
os.symlink(os.path.join(path_to_correct_results,ref_outfile),
os.symlink(os.path.join(path_to_correct_results,ref_outfile),
os.path.join(path_to_results,ref_outfile))
if (not os.path.islink(os.path.join(path_to_results,ref_fluxfile))):
os.symlink(os.path.join(path_to_correct_results,ref_fluxfile),
os.path.join(path_to_results,ref_fluxfile))
os.path.join(path_to_results,ref_fluxfile))
import check_profugus
......@@ -88,10 +88,10 @@ def check_results(path_to_results):
if ip == expected_passes:
ival = GOOD_RESULTS
print "Passed"
print("Passed")
else:
ival = BAD_RESULTS
print "Failed"
print("Failed")
return ival
......
......@@ -14,7 +14,7 @@
source __rgtenvironmentalfile__
module load __nccstestharnessmodule__
module load gcc
module load python/2.7.12
module load python/3.5.2
module load py-h5py/2.6.0
module load spectrum_mpi
module list
......
#!/usr/bin/env python
#!/usr/bin/env python3
import getopt
import sys
......
#! /usr/bin/env python
#! /usr/bin/env python3
import sys
import os
......@@ -62,10 +62,10 @@ def check_results(path_to_results):
check_h5 = True
if check_h5:
expected_passes += 1
#
# Get path to the correct results.
#
path_to_correct_results = get_path_to_correct_results()
#
# Get path to the correct results.
#
path_to_correct_results = get_path_to_correct_results()
ref_outfile = "c5g7_3d_output_ref.h5"
ref_fluxfile = "c5g7_3d_flux_ref.h5"
outfile = "c5g7_3d_output.h5"
......@@ -73,12 +73,12 @@ def check_results(path_to_results):
# Link reference files into results directory
if (not os.path.islink(os.path.join(path_to_results,ref_outfile))):
os.symlink(os.path.join(path_to_correct_results,ref_outfile),
os.symlink(os.path.join(path_to_correct_results,ref_outfile),
os.path.join(path_to_results,ref_outfile))
if (not os.path.islink(os.path.join(path_to_results,ref_fluxfile))):
os.symlink(os.path.join(path_to_correct_results,ref_fluxfile),
os.path.join(path_to_results,ref_fluxfile))
os.path.join(path_to_results,ref_fluxfile))
import check_profugus
......@@ -88,10 +88,10 @@ def check_results(path_to_results):
if ip == expected_passes:
ival = GOOD_RESULTS
print "Passed"
print("Passed")
else:
ival = BAD_RESULTS
print "Failed"
print("Failed")
return ival
......
......@@ -14,7 +14,7 @@
source __rgtenvironmentalfile__
module load __nccstestharnessmodule__
module load gcc
module load python/2.7.12
module load python/3.5.2
module load py-h5py/2.6.0
module load spectrum_mpi
module list
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment