-
Notifications
You must be signed in to change notification settings - Fork 58
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
migration of mprans to xtensor #1068
Merged
Merged
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
6c4f10b
xtensor
davidbrochart 7a82d45
Install xtensor for hashdist
davidbrochart 912cb05
Add PROTEUS_OPT compilation options for xtensor-based extensions
davidbrochart 10a5082
Added xtensor-python to environment.yaml
JohanMabille 48931e6
AddedMass based on xtensor
JohanMabille f85c8eb
SedClosure based on xtensor
JohanMabille d87882b
VOF3P based on xtensor
JohanMabille 2c38803
NCLS3P based on xtensor
JohanMabille ac22551
Moved mprans2/setup.py into proteus/setup.py
JohanMabille 9ff52fd
MCorr3P based on xtensor
JohanMabille a18bd72
mprans.RANS3PSed
davidbrochart aaf2926
mprans.RANS3PSed2D
davidbrochart 3ac0d47
Moved RANS3PSed to mprans
davidbrochart c1633f4
Add calculateVelocityAverage
davidbrochart 6abc305
Dissipation2D
davidbrochart e0d9891
VOS3P
davidbrochart ebe9a2a
PresInc
davidbrochart 8f84e88
Dissipation
davidbrochart 32ed891
CLSVOF
davidbrochart 50ec5b5
NCLS
davidbrochart 4dd14dd
MCorr
davidbrochart c9c59cc
RANS2P
davidbrochart f3042d9
RANS2P2D
davidbrochart 7c662a2
RANS2P_IB
davidbrochart 34bc00d
Travis parallel compilation disabled
davidbrochart 9dad38c
RDLS
davidbrochart 592276f
VOF
davidbrochart 1c76f10
MoveMesh
davidbrochart 4409c66
MoveMesh2D
davidbrochart dc1fa16
SW2D
davidbrochart e217e84
SW2DCV
davidbrochart 7eea25a
GN_SW2DCV
davidbrochart e6b8476
Kappa and Kappa2D
davidbrochart 19831c3
Fixed AddedMass
JohanMabille 558eecc
Fixed VOF3P
JohanMabille 6fed51e
Fixed NCLS3P
JohanMabille 636967b
Fixed MCorr3P
JohanMabille d2a9e14
RANS3PF
JohanMabille aa3fb7e
SedClosure.h
JohanMabille f12d848
Splitted RANS3PF.h and RANS3PF2D.h
JohanMabille 91640cb
Disabled optimizations
JohanMabille 2a45964
Fixed build after rebase
JohanMabille 6762b5b
Reverted RANS3PF and enabled optimizations again
JohanMabille 16329ff
Merge branch 'master' into xtensor
zhang-alvin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,4 +41,5 @@ dependencies: | |
- ipyparallel | ||
- pillow | ||
- recordtype | ||
- xtensor-python | ||
- git-lfs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,5 +11,6 @@ dependencies: | |
- cython | ||
- pillow | ||
- pip | ||
- xtensor-python | ||
- pip: | ||
- recordtype |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
rm -rf proteus/xtensor | ||
mkdir -p proteus/xtensor | ||
cd proteus/xtensor | ||
mkdir xtl xtensor-python xtensor pybind11 | ||
wget https://github.com/QuantStack/xtl/archive/0.6.11.tar.gz -O xtl.tar.gz | ||
wget https://github.com/QuantStack/xtensor-python/archive/0.24.1.tar.gz -O xtensor-python.tar.gz | ||
wget https://github.com/xtensor-stack/xtensor/archive/0.21.2.tar.gz -O xtensor.tar.gz | ||
wget https://github.com/pybind/pybind11/archive/v2.4.3.tar.gz -O pybind11.tar.gz | ||
tar zxf xtl.tar.gz --strip-components=1 -C xtl | ||
tar zxf xtensor-python.tar.gz --strip-components=1 -C xtensor-python | ||
tar zxf xtensor.tar.gz --strip-components=1 -C xtensor | ||
tar zxf pybind11.tar.gz --strip-components=1 -C pybind11 | ||
rm *.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include "pybind11/pybind11.h" | ||
#include "pybind11/stl_bind.h" | ||
|
||
#define FORCE_IMPORT_ARRAY | ||
#include "ADR.h" | ||
|
||
#if defined(__GNUC__) && !defined(__clang__) | ||
namespace workaround | ||
{ | ||
inline void define_allocators() | ||
{ | ||
std::allocator<int> a0; | ||
std::allocator<double> a1; | ||
} | ||
} | ||
#endif | ||
|
||
namespace py = pybind11; | ||
using proteus::cppADR_base; | ||
|
||
PYBIND11_MODULE(ADR, m) | ||
{ | ||
xt::import_numpy(); | ||
|
||
py::class_<cppADR_base>(m, "ADR") | ||
.def(py::init(&proteus::newADR)) | ||
.def("calculateResidual", &cppADR_base::calculateResidual) | ||
.def("calculateJacobian", &cppADR_base::calculateJacobian); | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What did changing the number of workers resolve?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This avoids timeout on travis due to long compilation. My guess is that the worker is going out of memory because of many template instantiations and swaps a lot. The number of workers can be reset to 2 when we moved to the dict of pyarray objects and reduce the size of the API.