diff options
author | 2018-12-12 10:36:42 -0800 | |
---|---|---|
committer | 2018-12-12 10:36:42 -0800 | |
commit | 86ff3fa5cfb5695f55cd514d8df0e99b81187cce (patch) | |
tree | 22c9f627f37ad905bee89782cb71b4a14e468d53 /Regression/prepare_file_travis.py | |
parent | 22dd9a7bdbfcf07fb3ad5d442011e4423cddbd6c (diff) | |
download | WarpX-86ff3fa5cfb5695f55cd514d8df0e99b81187cce.tar.gz WarpX-86ff3fa5cfb5695f55cd514d8df0e99b81187cce.tar.zst WarpX-86ff3fa5cfb5695f55cd514d8df0e99b81187cce.zip |
manually reverting back to last known working version of WarpX
Diffstat (limited to 'Regression/prepare_file_travis.py')
-rw-r--r-- | Regression/prepare_file_travis.py | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/Regression/prepare_file_travis.py b/Regression/prepare_file_travis.py index 6d0e0dfc8..82b3c8e0e 100644 --- a/Regression/prepare_file_travis.py +++ b/Regression/prepare_file_travis.py @@ -1,22 +1,35 @@ # This script modifies `WarpX-test.ini` (which is used for nightly builds) # and creates the file `travis-test.ini` (which is used for continous # integration on TravisCI (https://travis-ci.org/) -# The subtests that are selected are controlled by the environement WARPX_DIM +# The subtests that are selected are controlled by WARPX_TEST_DIM +# The architecture (CPU/GPU) is selected by WARPX_TEST_ARCH import re import os # Get relevant environment variables -dim = os.environ.get('WARPX_DIM', None) +dim = os.environ.get('WARPX_TEST_DIM', None) +arch = os.environ.get('WARPX_TEST_ARCH', 'CPU') + +# Find the directory in which the tests should be run +current_dir = os.getcwd() +test_dir = re.sub('warpx/Regression', '', current_dir ) with open('WarpX-tests.ini') as f: text = f.read() # Replace default folder name -text = re.sub('/home/regtester/AMReX_RegTesting/', '/home/travis/', text) +text = re.sub('/home/regtester/AMReX_RegTesting', test_dir, text) # Add doComparison = 0 for each test text = re.sub( '\[(?P<name>.*)\]\nbuildDir = ', '[\g<name>]\ndoComparison = 0\nbuildDir = ', text ) +# Change compile options when running on GPU +if arch == 'GPU': + text = re.sub( 'addToCompileString =', + 'addToCompileString = USE_GPU=TRUE USE_OMP=FALSE USE_ACC=TRUE', text) + text = re.sub( 'COMP\s*=.*', 'COMP = pgi', text ) +print('Compiling for %s' %arch) + # Use only 2 cores for compiling text = re.sub( 'numMakeJobs = \d+', 'numMakeJobs = 2', text ) |