HSL compiling and linking windows-spyder 64 bit

582 views
Skip to first unread message

Daniela Silva

unread,
Jul 20, 2018, 1:45:49 PM7/20/18
to CasADi
After much trying I finally successfully compiled and linked the HSL package with Spyder 3.6 (python 64 bits) in Windows 10. These are the steps I followed:

- From http://www.math.ucla.edu/~wotaoyin/windows_coding.html I downloaded msys64. I also followed the steps given in the webiste to install MINGW64, MIP (not sure if it is necessary), OPENBLAS and cmake.
- Then, I added C:\msys64\mingw64\bin to the PATH in windows
- From the command windown Mingw64 I downloaded Metis-4.0 as instructed in https://github.com/casadi/casadi/wiki/Obtaining-HSL using the commands:
     tar -xvf metis-4.0.3.tar.gz # Unpack Metis
- Then I unpacked the HSL source code and put Metis-4.03 into the resulting folder as instructed in https://github.com/casadi/casadi/wiki/Obtaining-HSL
- I created a folder in Documents to install HSL
- Finally form the Mingw64 shell I executed the following commads (https://groups.google.com/forum/#!topic/casadi-users/uJygStQULeI) :
       1. cd  <path to where you wanna install>     # Goes into the folder you wanna install hsl
       2. <path to where the unpacked hsl source folder with metis is>/configure  --with-blas="-lopenblas" CXXFLAGS="-O3 -fopenmp" FCFLAGS="-O3 -fopenmp" CFLAGS="-O3 -fopenmp"   
       3. make
       4. make install
Finally, in the folder you install the hls you get a folder called ".libs". In this folder you have "libcoinhsl-0.dll" to which you have to create a symbolic link (https://github.com/casadi/casadi/wiki/Obtaining-HSL):
       5. ln -s <path to where you installed hsl>/.libs/libcoinhsl-0.dll     <path to where you installed hsl>/.libs/libhsl.dll    # Create a symbolic link named libhsl.dll 
If you check into the ".libs", you now notice you have a file named "libhsl.dll". Add the folder containing this file (.libs in this case) to the PATH in windows, and to the `PYTHONPATH manager (if you are using spyder).

Hope this helps.

Joel Andersson

unread,
Jul 23, 2018, 6:11:21 AM7/23/18
to CasADi
Thank you for sharing! Joel

Marco Aurélio S. Aguiar

unread,
Jul 25, 2018, 10:17:30 AM7/25/18
to CasADi
Hey,

Thank you for sharing. I managed to compile it in the past but I IPOPT/CasADi would randomly crash during optimization.
Have you had any issue?

Best Regards,
Marco

Daniela Silva

unread,
Aug 4, 2018, 10:51:06 AM8/4/18
to CasADi
No, so far everything is working fine.

Francis

unread,
Aug 18, 2018, 1:14:27 PM8/18/18
to CasADi
Hi,

Great work! Following your instructions, I finally managed to install the 64 bit HSL solvers on Windows. I need to report a few things though.

1. I didn't install MIP.
2. When testing cmake after the installation, it failed though I tried to install it a few times. I guess this may be related to the testing file rather than the cmake installation itself since the following steps went well.

Regards,
Francis
Reply all
Reply to author
Forward
Message has been deleted
0 new messages