[documentation] Add a note about precompiled libHSL
GALAHAD is precompiled with GitHub is a way that allows dynamic swaping of the dummy libhsl_subset/$dlext / libhsl_subset_64.$dlext from https://github.com/ralna/libHSL by the official libraries available at https://licences.stfc.ac.uk/products/Software/HSL/libhsl.
It should work with the releases >= 5.3.0 now and we should probably explain that to the C / Fortran users. It is already documented for the Julia users.
Dominique asked me a few questions about it because it is not documented.
Good, I presume you will do this as you know how it works. Under the makefile build, we have a default environment variable HSL=-lhsl, so I presume it is simply a case of changing this to HSL="-lhsl_subset -L(somepath)" or something. I looked at the links you/HSL provides above, and it isn't immediately clear what to do for the HSL subset, but I presume it is trivial. It is simply
C
-I${prefix}/include -L${prefix}/lib -lhsl_subet
Fortran
-I${prefix}/modules -I${prefix}/include -L${prefix}/lib -lhsl_subset and can you pull in both the 32 and 64 bit libraries at the same time?
It is the step just after that Nick. We already take care of the compilation / linking for the user.
What we can do now is to replaced the shared library libhsl_subset.so (dependency of libgalahad_double.so) dynamically without recompilation.
It allows to plug-in the official precompiled libHSL libraries in precompiled GALAHAD libraries with very limited work (which is great for windows users that don't have compiler / linker installed).
OK, I've ordered HSL, and presumably I'll get the code sometime soon. Then I will try. I'll add this to the docs for the makefile install, but you better do this for the meson one (presumably in the visible README on the website)
To be clear, I was asking if it's possible to
- compile GALAHAD with the dummy libHSL
- instruct GALAHAD to use the full libHSL if it becomes available after the fact without recompiling GALAHAD and without overwriting the dummy shared libraries.
Requirement 2 is necessary when GALAHAD and dummy libHSL are installed in system locations (as opposed to a user's home), as would occur when a user doesn't have superuser privileges, and as does occur when you installed precompiled "bottles" with Homebrew.
This is trivial for the makefile install, indeed what happens automatically there; all the dummy hsl files are compiled into libgalahad_hsl.a, the link stage compiles using the environment variable $HSL (which is set by default to -lgalahad_hsl), and this allows the user (indeed galahad itself if so configured via the HSLSUBSET environment variable) to override this with the proper libhsl.a. But, of course, this is a static library thing where things can easily be juggled at link and go time.
I’m only talking about the meson system, which is what users read about in the README.
I'll defer to the experts in that case
Sent from Outlook for Androidhttps://aka.ms/AAb9ysg
From: Dominique @.> Sent: Thursday, September 11, 2025 4:16:54 PM To: ralna/GALAHAD @.> Cc: Gould, Nick (STFC,RAL,SC) @.>; Comment @.> Subject: Re: [ralna/GALAHAD] [documentation] Add a note about precompiled libHSL (Issue #512)
[https://avatars.githubusercontent.com/u/38760?s=20&v=4]dpo left a comment (ralna/GALAHAD#512)https://github.com/ralna/GALAHAD/issues/512#issuecomment-3281356633
I’m only talking about the meson system, which is what users read about in the README.
— Reply to this email directly, view it on GitHubhttps://github.com/ralna/GALAHAD/issues/512#issuecomment-3281356633, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACW4A6XOY3HGE63QTCCK6AT3SGG6NAVCNFSM6AAAAACGHOZ6WWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTEOBRGM2TMNRTGM. You are receiving this because you commented.Message ID: @.***>
@dpo It will require a demuxer of the HSL libraries like I did in CUTEst for the SIF libraries ("trampoline").
It may be possible in theory but it is a lot of work because Nick also relies on the Fortran modules for HSL.
For CUTEst / SIF we only need some symbols in a shared library and we call directly call them with libdl.
It requires a redesign of GALAHAD for the interface of HSL packages. It is not on our roadmap.
Ok. I thought that was how things worked already, but apparently not. Nevermind. I guess Homebrew will not have libHSL.