Skip to content

Commit

Permalink
Build the samples on the CI services
Browse files Browse the repository at this point in the history
Requires libomp on macOS from homebrew. OpenMP with Visual C/C++ requires
the loop index to be a signed type (from OpenMP < 3.0).
  • Loading branch information
bryanwweber committed Jun 12, 2019
1 parent 076dece commit 7985ff6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ addons:
- scons
- boost
- python
- libomp
ssh_known_hosts:
- cantera.org

Expand Down Expand Up @@ -50,6 +51,7 @@ script: |
set -e
scons build -j2 python_cmd=/usr/bin/python3 VERBOSE=y python_package=full blas_lapack_libs=lapack,blas optimize=n coverage=y
scons test
scons samples
scons build sphinx_docs=y doxygen_docs=y sphinx_cmd="/usr/bin/python3 `which sphinx-build`"
if [[ "${TRAVIS_PULL_REQUEST}" == "false" ]] && [[ "${TRAVIS_BRANCH}" == "master" ]] && [[ "${TRAVIS_REPO_SLUG}" == "Cantera/cantera" ]]; then
openssl aes-256-cbc -k "${ctdeploy_pass}" -in ./doc/ctdeploy_key.enc -out ./doc/ctdeploy_key -d
Expand All @@ -75,6 +77,7 @@ script: |
else
scons build -j2 python_cmd=python3 VERBOSE=y python_package=full blas_lapack_libs=lapack,blas optimize=n coverage=y
scons test
scons samples
fi
after_success: |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
Expand Down
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ install:
build_script:
- cmd: C:\Python37-x64\Scripts\scons build -j2 boost_inc_dir=C:\Libraries\boost_1_62_0 debug=n VERBOSE=y python_package=full
- cmd: C:\Python37-x64\Scripts\scons samples

test_script:
- ps: |
Expand Down
2 changes: 1 addition & 1 deletion samples/cxx/openmp_ignition/openmp_ignition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void run()
// thread in cases where the workload is biased, e.g. calculations for low
// T0 take longer than calculations for high T0.
#pragma omp parallel for schedule(static, 1)
for (size_t i = 0; i < nPoints; i++) {
for (int i = 0; i < nPoints; i++) {
// Get the Cantera objects that were initialized for this thread
size_t j = omp_get_thread_num();
IdealGasMix& gas = *gases[j];
Expand Down

0 comments on commit 7985ff6

Please sign in to comment.