diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 0eef4171..7be82e72 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -1,6 +1,8 @@ name: Run tests run-name: Run tests - ${{ github.sha }} on: push +env: + OPENBLAS_NUM_THREADS: 1 jobs: run_test: strategy: @@ -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 diff --git a/commit/operator/operator.pyxbld b/commit/operator/operator.pyxbld index 91b90c93..f3967a15 100644 --- a/commit/operator/operator.pyxbld +++ b/commit/operator/operator.pyxbld @@ -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']) diff --git a/tests/demo_data/ref_results/ref_results_BallandStick.pickle b/tests/demo_data/ref_results/ref_results_BallandStick.pickle index 661a5da7..c0b7bde4 100644 Binary files a/tests/demo_data/ref_results/ref_results_BallandStick.pickle and b/tests/demo_data/ref_results/ref_results_BallandStick.pickle differ diff --git a/tests/demo_data/ref_results/ref_results_StickZeppelinBall.pickle b/tests/demo_data/ref_results/ref_results_StickZeppelinBall.pickle index 9e95097b..7435916c 100644 Binary files a/tests/demo_data/ref_results/ref_results_StickZeppelinBall.pickle and b/tests/demo_data/ref_results/ref_results_StickZeppelinBall.pickle differ diff --git a/tests/test_demo.py b/tests/test_demo.py index 3bb66a30..cf810ed8 100644 --- a/tests/test_demo.py +++ b/tests/test_demo.py @@ -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(): @@ -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)