bbopt / nomad

NOMAD - A blackbox optimization software
https://nomad-4-user-guide.readthedocs.io/
GNU Lesser General Public License v3.0
114 stars 24 forks source link

Add pip installation #111

Closed pklimov closed 7 months ago

pklimov commented 1 year ago

I found an unofficial pip installation path to an older and possibly modified version of NOMAD. Would be convenient to have an official pip installation path to the latest version.

ctribes commented 1 year ago

I will push this feature up in the list of TODO.

jan-provaznik commented 1 year ago

I have looked at the possible approaches to PyPi distribution.

ctribes commented 1 year ago

Thanks for this analysis. I really prefer the first approach : ship pre-compiled wheels for common platforms. I agree about the LGPL licence.

I suppose that, to obtain the binaries, your approach relies on a modified setup_PyNomad.py script ? How to modify it to obtain static link with nomad libraries ? You can create a pull request to add a modified setup_PyNomadStatic.py.

jan-provaznik commented 1 year ago

In my experiment I modified the relevant CMakeLists.txt files to build both static and shared version of the nomad{Algo,Eval,Util} libraries. The approach I took compiles the underlying objects only once, the compilation time does not increase noticeably. I have then slightly lobotomized the setup.py script to do my bidding.

A slight problem is I have not tested this on any other platform beside Linux. I'll put the necessary modifications together and make a pull request ASAP, the testing can be done once at least a proof of concept exists.

ctribes commented 7 months ago

Done in v.4.4.0