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

Windows support via msys2 #18

Closed
wants to merge 21 commits into from
Closed

Windows support via msys2 #18

wants to merge 21 commits into from

Conversation

richardotis
Copy link
Contributor

Compile Windows builds of ipopt using msys2.

Depends on conda-forge/mumps-feedstock#25

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipe) and found some lint.

Here's what I've got...

For recipe:

  • Selectors are suggested to take a <two spaces>#<one space>[<expression>] form. See lines [13, 14, 22, 23, 31, 32, 33, 43, 51, 52, 53]

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@bocklund
Copy link

@conda-forge-admin, please rerender

@richardotis
Copy link
Contributor Author

conda-forge/mumps-feedstock#25 is now merged.

@conda-forge-admin, please re-render

@richardotis
Copy link
Contributor Author

So we have a working ipopt DLL building on Windows now. I'm going to try also to build the exe to address #17

@richardotis
Copy link
Contributor Author

Looks like the exe requires AMPL, which we don't support on Windows yet: https://github.com/conda-forge/ampl-mp-feedstock
It's another CMake project, so fixing everything to work with our msys2 toolchain will probably take a while.

@richardotis
Copy link
Contributor Author

@conda-forge-admin, please re-render

cd build

rem rm /mingw-w64/bin/make.exe
bash -c "CXXDEFS=-DCOIN_USE_MUMPS_MPI_H ADD_CXXFLAGS='-I/mingw-w64/include -L/mingw-w64/lib -L/mingw-w64/bin' ../configure --build=x86_64-w64-mingw32 --disable-linear-solver-loader --with-blas-lib='-lopenblas' --with-mumps-lib='-ldmumps -lmumps_common -lpord -lgfortran' --enable-dependency-linking --prefix=/mingw-w64"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

disabling the linear solver loader is a bad idea - that's important functionality if you care at all about performance

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll take another look. I was getting unrelenting segmentation faults trying to get the linear solver loader to work, but I'm fully willing to admit the possibility of user error.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can be picky about finding the runtime libraries IIRC, and how the solver you're trying to load was built. I've forgotten what the status is of HSL providing Windows binaries to academic users. Dynamically loading the MKL version of Pardiso may also be flaky

- ipopt.patch

- ipopt.patch # [not win]
- dll_makefile.patch # [win]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

configure with --enable-shared, shouldn't need to manually patch makefiles

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure that I have a Windows-compatible configure script from upstream to do this the right way.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You do. I wrote the patches upstream that enabled it, 5ish years ago.

- blas 1.1 {{ variant }}
- openblas
- metis 5.1.* # [not win]
- scotch # [not win]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's no direct dependency on scotch on unix either

@chrisdembia
Copy link

Will this be usable in downstream projects compiled with MSVC? I'm wondering because of the .ci_support/win_c_compilervs2015cxx_compilervs2015.yaml file.

@chrisdembia
Copy link

I've been working on compiling Ipopt with clang-cl (and mumps compiled with flang), and I am somewhat interested in getting this build into conda-forge.

@richardotis
Copy link
Contributor Author

I will probably not have time to take another look at this until the new year. I may be able to lightly support someone else picking up the baton in the short term.

@chrisdembia
Copy link

Would you be supportive of also using clang-cl, etc. in addition to the msys2 toolchain?

@moorepants
Copy link
Contributor

@chrisdembia I'll chime in, I think we'd accept any PR that works here natively with the tool chain conda-forge offers.

@chrisdembia
Copy link

Okay great.

@richardotis
Copy link
Contributor Author

Closed in favor of #34

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.

7 participants