-
Notifications
You must be signed in to change notification settings - Fork 89
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
Add PyAlbany #647
Add PyAlbany #647
Conversation
What if we ignored python2 completely and require python3? |
@bartgol it will mainly simplify the cmake files. Except that, I don't think that it will impact the other files. |
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.
It looks great! However, I get a seg fault when I try to run the tests
-D Trilinos_ENABLE_PyTrilinos:BOOL=ON \ | ||
-D PyTrilinos_DOCSTRINGS:BOOL=OFF \ | ||
``` | ||
The first option enable PyTrilinos and the second one disables PyTrilinos docstrings. This last option is required if you are using Doxygen 1.8.13. |
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.
I had to add also
-D SWIG_EXECUTABLE:FILEPATH="${HOME}/Workspace/TPL/swig/swig-3.0.11/install/bin/swig"
both in the Trilinos and in the Albany cmake script.
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.
Thanks for your inputs about the README.md, I updated it to include them.
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.
Thanks, but -D SWIG_EXECUTABLE="/usr/bin/swig" \
needs to be added to the Albany config as well.
All the 4 PyAlbany tests fail in a similar way: |
@mperego thanks a lot for having tested them. There is definitely something wrong. I wonder whether the issue could be related to the version of mpi used by mpi4py. Could you test the following first?
|
Thanks @mperego for your review, I updated the files as suggested. |
@kliegeois Only this PyTrilinos test fail: Here's the path of mpi4py
It can import Tpetra and Teuchos but not wpyalbany
|
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.
It looks good!
Thanks @mperego ! I will update the README.md tomorrow and, at least to me, the PR will be good to be merged. |
@mperego I have just updated the README.md (and squashed the related commits). |
@kliegeois Looks good to me. Thanks. Feel free to go ahead and merge the branch. |
Thanks @mperego ! |
This PR includes a python interface for Albany: PyAlbany.
The original goal of this interface was to ease the usage of reduced Hessian-vector products by providing ways to read and write distributed multivectors.
PyAlbany is not enabled by default and none of the work included in this PR should impact existing tests or builds.
PyAlbany is built against PyTrilinos, the python interface of Trilinos.
Currently, it is required to list both the source directory and the build directory of Trilinos to compile PyAlbany correctly.
It will be possible to avoid this in the future if PyTrilinos installs some swig files.
A detailed explanation of the building process and the dependencies can be found in this ReadMe.
This PR includes tests and an example.
The code has been tested with Python 2 and 3 (note that Python 3 build needs a small modification of Trilinos which is not merged yet PR #8444); in debug and release (note that PyAlbany cannot be compiled warning-free; I did not achieve to build PyTrilinos warning-free).
I tried to be verbose on the comments and documentation.
@mperego @ikalash @bartgol @jewatkins