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 meson build system #36

Merged
merged 14 commits into from
Jun 13, 2024
Merged

Add a meson build system #36

merged 14 commits into from
Jun 13, 2024

Conversation

amontoison
Copy link
Member

@dpo @nimgould @jfowkes

I take one hour tonight to start the Meson build system.

Nick, can you remove the sed command and add a proper way to compile in single and double precision?

@nimgould
Copy link
Contributor

nimgould commented Oct 22, 2023 via email

@nimgould
Copy link
Contributor

nimgould commented Oct 23, 2023 via email

@jfowkes
Copy link
Contributor

jfowkes commented Oct 23, 2023

In light of what Nick has said, and in my experience with PyCUTEst where we only provide a double precision version, I don't think it makes sense to provide CUTEst (and by extension SIFDecode) in single precision. We should only provide double precision.

@amontoison
Copy link
Member Author

I agree with Jari, I prefer to only keep the double precision version.
Let's support only what is working.
I remember that Dominique tried to use the single precision version in Julia and it was not working well (JuliaSmoothOptimizers/CUTEst.jl#179 and JuliaSmoothOptimizers/CUTEst.jl#177).

Having a Meson build system for CUTEst and being able to able a shared library seems way more relevant.

@nimgould
Copy link
Contributor

nimgould commented Oct 23, 2023 via email

@nimgould
Copy link
Contributor

nimgould commented Oct 24, 2023 via email

@amontoison
Copy link
Member Author

amontoison commented Oct 24, 2023

Hi Alexis, as I said before, sif files are hard coded in double precision, and I can't use preprocessor commands, it needs something like sed.

Hi Nick, I think that you solve a different problem that what I have in mind.
When you compile libcutest_single.so or libcutest_double.so, you need to apply some sed commands (like replace MA27AD by MA27A).
I was just asking if we can have flags like -DCUTEST_SINGLE and -DCUTEST_DOUBLE for the compilation. It works well in GALAHAD.

@nimgould
Copy link
Contributor

nimgould commented Oct 30, 2023

Hi Alexis, my plan is to branch cutest so that at least the tools are maintained by preprocessing commands (as in galahad) not via sed. This shouldn't be difficult, but will take time. There a number of things in the old sed system that are not needed (e.g, the ma27->ma57 substitutions).

I'll let you know when I have started, I am working on something else right at the moment (and recovering from a high-speed dog collision accident, standing at my terminal is difficult!)

@amontoison amontoison force-pushed the meson branch 2 times, most recently from e3466df to 8e3b615 Compare May 30, 2024 23:44
@amontoison
Copy link
Member Author

../include/cutest.h(60): error: identifier "__float128" is undefined
  typedef __float128   quadreal;

The old Intel compilers on Windows don't like __float128.

@nimgould
Copy link
Contributor

I suppose that ths needs a CPP command to skip the definition for intel on windows. I don't know what the appropriate check is

@amontoison
Copy link
Member Author

@nimgould
We need the following check:

#if defined(__INTEL_COMPILER) && defined(_WIN32)

@nimgould
Copy link
Contributor

nimgould commented Jun 1, 2024

I've put the check you suggest along with _Quad in this case as this seems to be the Intel quad name. Let's see

@amontoison
Copy link
Member Author

amontoison commented Jun 1, 2024

I've put the check you suggest along with _Quad in this case as this seems to be the Intel quad name. Let's see

@nimgould The issue is this line:
415d14a#diff-5497473d7bb58b3ec5a4f041d0a6b52df8b375909bb0d83e85b2dd2f0a763806R60

I updated cutest.h in this PR.

@amontoison
Copy link
Member Author

../include/cutest.h(61): error: identifier "_Quad" is undefined
  typedef _Quad   quadreal;

We should drop the old Intel compilers for CI and say somewhere that only the new Intel compilers are supported on Windows.

@nimgould
Copy link
Contributor

nimgould commented Jun 1, 2024 via email

@nimgould
Copy link
Contributor

nimgould commented Jun 1, 2024 via email

@nimgould
Copy link
Contributor

nimgould commented Jun 2, 2024

or -Qoption,cpp,--extended_float_types . These intel flags are a mess!

@jfowkes
Copy link
Contributor

jfowkes commented Jun 3, 2024

We should drop the old Intel compilers for CI and say somewhere that only the new Intel compilers are supported on Windows.

Absolutely, there is little point testing on unsupported compilers that are increasingly more broken...

@amontoison amontoison merged commit bc0e47b into master Jun 13, 2024
16 of 20 checks passed
@amontoison amontoison deleted the meson branch June 13, 2024 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants