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

IPOPT build with coinhsl fails on macos arm64 #95

Open
rlkamalapurkar opened this issue Jul 4, 2024 · 4 comments
Open

IPOPT build with coinhsl fails on macos arm64 #95

rlkamalapurkar opened this issue Jul 4, 2024 · 4 comments

Comments

@rlkamalapurkar
Copy link

Configuration:
M3 Macbook Air, macOS Sonoma

Problem description:
If I fetch, build, and install Ipopt with ASL and MUMPS using coinbrew, without HSL sources, then everything works as expected.

If I copy the coinhsl source folder to /ThirdParty/HSL and then try to build, then ASL, MUMPS, and CoinHSL are all built and installed correctly, but the Ipopt build fails with the error message

clang: error: unsupported option '-fopenmp'
make[3]: *** [libipopt.la] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1

Any ideas how this can be fixed?

@rlkamalapurkar rlkamalapurkar changed the title IPOPT build with coinhsl fails on macos arm46 IPOPT build with coinhsl fails on macos arm64 Jul 4, 2024
@svigerske
Copy link
Member

svigerske commented Jul 4, 2024

I thought I just added a workaround. There is no release yet, and maybe coinbrew only picks releases?

An easy workaround on the users side should be to run coinbrew build with --disable-openmp.

@rlkamalapurkar
Copy link
Author

rlkamalapurkar commented Jul 4, 2024

Ah I see, I tried this yesterday, probably before your commit. From what I understand, with the workaround in place, multiprocessing is completely disabled, i.e., HSL is compiled without -fopenmp, correct?

If yes, then I am not sure about the workaround. Without the workaround, I can get a (what I think is OpenMP-enabled) build by

  1. build without coinhsl sources and install
  2. build again with coinhsl sources and install (ipopt will fail here, but we already have ipopt built in step 1, we just use that)

I suppose I could still do the same 2-step process by adding --enable-openmp to the coinbrew build command?

@svigerske
Copy link
Member

You can build ThirdParty-HSL with --enable-openmp, but then have to modify libcoinhsl.la to remove the -fopenmp before building Ipopt (could be tricky to do this with coinbrew). Removing libcoinhsl.la could also work.

You can also build ThirdParty-HSL (with --enable-openmp) and Ipopt separately, and let it Ipopt load the HSL library at runtime. Ipopt option hsllib lets you point to the HSL library.

@rlkamalapurkar
Copy link
Author

rlkamalapurkar commented Jul 5, 2024 via email

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

No branches or pull requests

2 participants