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

Add a README.md #55

Open
amontoison opened this issue Jul 25, 2024 · 7 comments
Open

Add a README.md #55

amontoison opened this issue Jul 25, 2024 · 7 comments
Labels
enhancement New feature or request

Comments

@amontoison
Copy link
Member

amontoison commented Jul 25, 2024

@jfowkes @nimgould
We should add a nice README.md like we did for GALAHAD.
It should explain that we have a new build system, precompiled shared libraries and the latest features like support of quadruple precision, shared libraries, Python and Julia interfaces, etc...

@amontoison amontoison added the enhancement New feature or request label Jul 25, 2024
@jfowkes
Copy link
Contributor

jfowkes commented Aug 15, 2024

@amontoison is CUTEst now also fully installable with Meson? If so we should definitely add the README and I will switch PyCUTEst over to installing SIFDecode/CUTEst with Meson. ARCHDefs is not needed with the Meson installs right?

@amontoison
Copy link
Member Author

amontoison commented Aug 15, 2024

Yes @jfowkes, you can compile libcutest with Meson on all platforms (even Windows). You just need to be careful if you want incomplete static libraries or complete shared libraries with the dexumer of SIF files.
The best examples of compilation are in the CI files.

You used an incomplete shared library before, but it's not supported by all linkers and quite hard to generate on Mac.
I think the future is the SIF demuxer 🙂

ARCHDefs is not needed except if you want to compile some interfaces in GALAHAD / CUTEst like MATLAB ones. But for Python and Julia we don't need it.

We should definitely update the README.

@nimgould
Copy link
Contributor

Careful, @jfowkes while we can install cutest this way, it does require @amontoison 's trick to add in the compiled elfuns.o (etc) to the shared library. The old way simply allows you to link in the elfuns.o on the fly. Your choice. In addition, the makefile build provides interfaces to over 30 other optimization solvers, and this is what many people use it for.

@jfowkes
Copy link
Contributor

jfowkes commented Aug 15, 2024

Good point @nimgould, I will of course carefully investigate the various options. @amontoison is it not possible to also compile the incomplete shared/static library with meson? That would be a good starting point.

@amontoison
Copy link
Member Author

amontoison commented Aug 15, 2024

@jfowkes You can compile the incomplete static library of CUTEst with Meson, it's the default behavior.

From that, you can then create a static or shared library libproblem.a / libproblem.$dlext when completed with the .o of the SIF file.
But it's just dedicated to one problem.

For the shared library with the SIF demuxer, you need to pass this option to Meson:

meson setup builddir -Ddefault_library=shared

It compiles this additional file:
https://github.com/ralna/CUTEst/blob/master/src/tools/cutest_delegate.f90
It provides routines to load any shared library of a SIF problem at runtime.

I don't provide an option for an incomplete shared library because:

  • we can't do it on Windows
  • it needs dedicated flags for each compiler
  • it needs dedicated flags for each platform

@jfowkes
Copy link
Contributor

jfowkes commented Aug 16, 2024

Thanks @amontoison, PyCUTEst currently does the first approach you describe so we can easily switch over to that as a starting point. The more involved change would be to move it over to the demuxer shared library, this is for the future!

@dpo
Copy link
Contributor

dpo commented Sep 9, 2024

Just so we remember what to add to the README, I just installed SIFDecode and CUTEst with Meson on Linux and all went smoothly. Here are the different steps:

1. Install Meson and Ninja (together, they replace Make):

- pip3 install —user meson
- install Ninja with your package manager or follow the instructions in the CMake section of the README:

  git clone https://github.com/ninja-build/ninja.git
  cd ninja
  git checkout release
  cmake -Bbuild-cmake
  cmake --build build-cmake

  The “ninja” executable is in build-cmake. Copy it to a place that is on your PATH.

2. Download and build SIFDecode (you don’t need ARCHDefs with this method)

  git clone https://github.com/ralna/SIFDecode.git
  cd SIFDecode
  meson setup builddir
  meson compile -C builddir
  export SIFDECODE=$PWD/builddir

3. Download and install CUTEst:

  git clone https://github.com/ralna/CUTEst.git
  cd CUTEst
  meson setup builddir [-Dquadruple=true]
  meson compile -C builddir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants