Git Product home page Git Product logo

Comments (10)

sshiraiwa avatar sshiraiwa commented on September 28, 2024 3

Closing this issue with this ScreenShot ;D
Additionally, this repo is now configured to test a release is using Github action.
Screenshot from 2020-12-08 16-48-32

from pymfem.

sshiraiwa avatar sshiraiwa commented on September 28, 2024 2

Thank you for your inputs. I am putting together a new setup script, and I am testing it on TestPyPI.

https://test.pypi.org/project/mfem/

This is not the official PyPI. It is a site meant for testing a PyPI package.
I am still testing this. I am going to do at least following test before putting it to PyPI

  • build on MacOS
  • check parallel build
  • add --cuda option (I need this for myself ;D)

I also cleaned up README.md so that it looks nicer on PyPI and GitHub. Please give me your
feedback. This work in a brach (https://github.com/mfem/PyMFEM/tree/pip_install_dev)

Note version number is screwed because PyPI does not allow to overwrite he package which was
already uploaded. It will be changed to 4.2.0rc1 when this is uploaded to PyPI.

from pymfem.

v-dobrev avatar v-dobrev commented on September 28, 2024 1

I think it makes sense for pip install mfem to install the minimal parallel version of MFEM -- this requires c++ compiler, MPI, METIS and HYPRE. If users want to enable more external libraries in MFEM, things will be tricky. They can build the extended version of MFEM themselves and point PyMFEM to that build with an environment variable. However, I don't know if PyMFEM can update itself and create additional wrappers for the new classes and functions provided by MFEM for the additional external libraries. Maybe these can be separate packages, e.g. one will need to install pip install mfem-petsc.

from pymfem.

sshiraiwa avatar sshiraiwa commented on September 28, 2024 1

@v-dobrev. Yes. Just to be clear, I am thinking to create the following command like options.

python setup.py # install mfem and PyMFEM in serial
python setup.py --with-parallel # install mfem/metis/hypre and PyMFEM in both serial and parallel (require mpi4py)
python setup.py --mfem-prefix = # use /include/mfem/config/config.hpp and other headers
link with /lib/libmfem.so

Of course, the third option assumes all the libraries are installed as .so so that Python can load it.
Also, in the future, adding a .so checker by calling cmake from setup.py wouldn't be too complicated especially
there are CMAKE FindXXXs in https://github.com/mfem/mfem/tree/master/config/cmake/modules.

from pymfem.

jcwright77 avatar jcwright77 commented on September 28, 2024

from pymfem.

sshiraiwa avatar sshiraiwa commented on September 28, 2024

@jcwright77 Thank for supporting the plan. Yes, CMAKE in MFEM distribution will be used to install
mfem.

From user's perspective, however, installing the wrapper without installing mfem ready to use doesn't
make much sense. The idea, here, is to minimize what a new user needs to do. For example, when
he/she installs ubuntu to a new PC box, and wants to try mfem with Python w/o before doing anything
else ;D

I thought about the second approach too, but it requires the wrapper to be ready when MFEM
releases C++, which is unlikely at this point. But there may be a good way to take this route.
@tzanio, what do you think?

By the way, "pip install wxpython" installs wxwidgets, "pip install gmsh" install gmsh itself, and there is
even "pip installl cmake".

from pymfem.

jcwright77 avatar jcwright77 commented on September 28, 2024

from pymfem.

sshiraiwa avatar sshiraiwa commented on September 28, 2024

@v-dobrev Thank you for your input. I think we will add mpi4py as a dependency when installing the parallel version.
We can then ask mpi4py what mpi compiler is used. Installing METIS and HYPRE from setup.py is certainly possible.

Regarding other dependencies, ]I think we can write setup.py to run SWIG to generate a wrapper code when extra flat
like --with-mumps is on. Then, in the script to generate wrapper code (SWIG interface file, or so-called i-file), we can load config.hpp and use #ifdef-#endif.
In fact, PUMI extension is already using this feature. We can do the same for other libraries.

from pymfem.

v-dobrev avatar v-dobrev commented on September 28, 2024

So if you first install pip install mfem and later decide to build your own MFEM version with more external libraries, then you just need to re-install the mfem python package (pointing it to the new MFEM build with an environment variable). Is that what you're thinking?

from pymfem.

v-dobrev avatar v-dobrev commented on September 28, 2024

For completeness, the link to the PyPI page is: https://pypi.org/project/mfem.

from pymfem.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.