Skip to content

Commit

Permalink
ci: add OPENBLAS_NUM_THREADS env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
fullbat committed Mar 15, 2024
1 parent 69cdf84 commit b9f9904
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 15 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Run tests
run-name: Run tests - ${{ github.sha }}
on: push
env:
OPENBLAS_NUM_THREADS: 1
jobs:
run_test:
strategy:
Expand Down Expand Up @@ -41,11 +43,6 @@ jobs:
python-version: ${{ matrix.config.py }}
- name: Install dmri-commit
run: pip install . --no-cache-dir --force-reinstall
- name: Print info
run: |
gcc --version
python -V
pip list
- name: Run test
id: run_test
working-directory: tests
Expand Down
2 changes: 1 addition & 1 deletion commit/operator/operator.pyxbld
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ def make_ext(modname, pyxfilename):
('nIC', config.nIC),
('nEC', config.nEC),
('nISO', config.nISO)],
extra_compile_args=['-w', '-O3'])
extra_compile_args=['-w', '-O3', '-Ofast'])
Binary file modified tests/demo_data/ref_results/ref_results_BallandStick.pickle
Binary file not shown.
Binary file modified tests/demo_data/ref_results/ref_results_StickZeppelinBall.pickle
Binary file not shown.
18 changes: 9 additions & 9 deletions tests/test_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@ def check_results(pickle_result, ref_pickle):
result_optimization = data[0]["optimization"]
ref_optimization = ref_data[0]["optimization"]
print(result_optimization["fit_details"])
# print(ref_optimization["fit_details"])
# try:
# assert result_optimization["fit_details"] == ref_optimization["fit_details"]
# except AssertionError:
# print("fit_details are not equal")
# sys.exit(1)
print(ref_optimization["fit_details"])
try:
assert result_optimization["fit_details"] == ref_optimization["fit_details"]
except AssertionError:
print("fit_details are not equal")
sys.exit(1)


def run_tests():
Expand All @@ -132,9 +132,9 @@ def run_tests():
run_commit_StickZeppelinBall(local_path)
results_pickle = os.path.join( local_path, 'COMMIT', 'Results_StickZeppelinBall', 'results.pickle' )
check_results(results_pickle, ref_pickle_StickZeppelinBall)
# run_commit_BallandStick(local_path)
# results_pickle = os.path.join( local_path, 'COMMIT', 'Results_StickZeppelinBall', 'results.pickle' )
# check_results(results_pickle, ref_pickle_BallandStick)
run_commit_BallandStick(local_path)
results_pickle = os.path.join( local_path, 'COMMIT', 'Results_StickZeppelinBall', 'results.pickle' )
check_results(results_pickle, ref_pickle_BallandStick)
# run_commit_VolumeFractions()
# results_pickle = os.path.join( local_path, 'demo_data', 'COMMIT', 'Results_VolumeFractions', 'results.pickle' )
# check_results(results_pickle, ref_pickle_VolumeFractions)
Expand Down

0 comments on commit b9f9904

Please sign in to comment.