libprima / prima

PRIMA is a package for solving general nonlinear optimization problems without using derivatives. It provides the reference implementation for Powell's derivative-free optimization methods, i.e., COBYLA, UOBYQA, NEWUOA, BOBYQA, and LINCOA. PRIMA means Reference Implementation for Powell's methods with Modernization and Amelioration, P for Powell.
http://libprima.net
BSD 3-Clause "New" or "Revised" License
291 stars 35 forks source link

Fix failing job on gcc 11 #123

Closed nbelakovski closed 6 months ago

nbelakovski commented 6 months ago

There's a comment in the .yml which describes the fix, but basically setup-fortran doesn't quite set up gcc 11 correctly. It's not quite their fault since the windows-latest image contains gcc 12 by default so they need to work around that and they didn't quite do it correctly.

What was happening is that the programs would get compiled with gcc 11, but when they ran, due to issues with how the PATH was set up, they would try to link against libgfortran-5.dll that was compiled with gcc 12 and this led to a crash. I tried to fix the PATH issues, but was unable to, so I decided to just rename the gcc 12 version of the dll so that it wouldn't get picked up.

I also noticed that the base image does not provide ninja, nor were the windows runners installing it explicitly. I'm not sure how it was installed, I think as a side effect of the setup-fortran action, but in any case I got some errors due to ninja not being installed so I went ahead and installed it explicitly.

Lastly I added the bash shell during some of my testing and I thought it was best to leave it there so that we can use bash across all 3 platforms for any future work.

This obviously supercedes https://github.com/libprima/prima/pull/115