Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run CI on pull requests to main as well #56

Merged
merged 9 commits into from
Feb 21, 2024
1 change: 1 addition & 0 deletions .github/workflows/client-R-cran-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: client-R-cran-package

on:
push:
pull_request:
branches:
- 'main'

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/client-R-git-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: client-R-git-package

on:
push:
pull_request:
branches:
- 'main'

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/client-c++-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: client-c++-example

on:
push:
pull_request:
branches:
- 'main'

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/client-c++.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: client-c++

on:
push:
pull_request:
branches:
- 'main'

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/client-matlab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: client-matlab

on:
push:
pull_request:
branches:
- 'main'

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/client-python-emcee.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: client-python-emcee

on:
push:
pull_request:
branches:
- 'main'

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/client-python-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: client-python-example

on:
push:
pull_request:
branches:
- 'main'

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/client-python-pymc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: client-python-pymc

on:
push:
pull_request:
branches:
- 'main'

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/client-python-qmcpy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: client-python-qmcpy

on:
push:
pull_request:
branches:
- 'main'

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/client-python-raw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: client-python-raw

on:
push:
pull_request:
branches:
- 'main'

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/client-python-tinyDA.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: client-python-tinyDA

on:
push:
pull_request:
branches:
- 'main'

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/client-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: client-python

on:
push:
pull_request:
branches:
- 'main'

Expand Down
5 changes: 2 additions & 3 deletions hpc/lib/umbridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

// Increase timeout to allow for long-running models.
// This should be (to be on the safe side) significantly greater than the maximum time your model may take

#define CPPHTTPLIB_READ_TIMEOUT_SECOND 7 * 24 * 60 * 60
#define CPPHTTPLIB_READ_TIMEOUT_SECOND 7*24*60*60

#include <string>
#include <vector>
Expand Down Expand Up @@ -518,7 +517,7 @@ namespace umbridge {
return;

std::unique_lock<std::mutex> model_lock(model_mutex, std::defer_lock);
if (error_checks_parallel) {
if (enable_parallel) {
model_lock.lock();
}
std::vector<double> gradient = model.Gradient(outWrt, inWrt, inputs, sens, config_json);
Expand Down
4 changes: 2 additions & 2 deletions lib/umbridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ namespace umbridge {
}

// Provides access to a model via network
void serveModels(std::vector<Model*> models, std::string host, int port, bool enable_parallel = true, bool error_checks = true) {
void serveModels(std::vector<Model*> models, std::string host, int port, bool enable_parallel = false, bool error_checks = true) {

httplib::Server svr;
std::mutex model_mutex; // Ensure the underlying model is only called sequentially
Expand Down Expand Up @@ -517,7 +517,7 @@ namespace umbridge {
return;

std::unique_lock<std::mutex> model_lock(model_mutex, std::defer_lock);
if (error_checks_parallel) {
if (!enable_parallel) {
model_lock.lock();
}
std::vector<double> gradient = model.Gradient(outWrt, inWrt, inputs, sens, config_json);
Expand Down
Loading