How to complie ALGENCAN in Windows 10?

88 views
Skip to first unread message

Zhibin Deng

unread,
Apr 28, 2020, 6:55:17 AM4/28/20
to TANGO Project - ALGENCAN
Dear developers,

Thank you for your excellent work in developing such a good nonlinear optimization solver. 

I previously worked in Linux. But now I have to work on Windows 10. Is that possible to give a detail compilation way of ALGENCAN on Window 10 64 bit? Thank you. 

Best regards,


Zhibin Deng

John Gardenghi

unread,
Apr 28, 2020, 1:46:48 PM4/28/20
to TANGO Project - ALGENCAN
Dear Zhibin,

First of all, thanks for you interest in Algencan.

Although the compilation files of Algencan 3.1.1 were conceived to run on Linux, it is perfectly possible to run Algencan on Windows 10.

There are many ways of running Algencan in Windows, I will describe you the easier one for me; it follows. If it does not work for you, please let us know.

1 - Download MinGW from https://osdn.net/projects/mingw/releases/ and run the installer. (MinGW is one of the available packages containing GCC compilers for Windows.)
2 - After the installation of MinGW is done, the MinGW Installation Manager may be opened (if not, run it from Start Menu). You must select "mingw32-base-bin"', "mingw32-gcc-fortran-bin", and "mingw32-gcc-g++-bin" packages and proceed in "Installation -> Apply Changes" menu.
3 - After the packages were installed, you may want to add C:\MinGW\bin folder in your Path environment variable.
   3.1 - You can access this by opening run (Windows+R) -> systempropertiesadvanced -> Environment Variables -> Edit "Path" and add the mentioned folder.
4 - Open Windows PowerShell and go into algencan-3.1.1 folder.
5 - Type "mingw32-make"
   5.1 - In Windows PowerShell, the linux commands "mv" and "rm" do not have the argument "-f" (this is instead "-Force"). Therefore, commands "mv" and "rm" in the Algencan makefiles may fail. Among others side effects, this implies that (i) the library "libalgencan.a" will not be moved to "algencan-3.1.1/lib" folder after compilation is done and (ii) "make clean" and "make distclean" may not work.
6 - After compilation is done (ignore errors related with the problem described in 5.1(i)), you can compile the example toy problem following these steps:
   6.1 - Go into "algencan-3.1.1/sources/examples/f90" folder and enter: "gfortran -L..\..\algencan\ -o toyprob toyprob.f90 -lalgencan"
   6.2 - You can run "toyprob.exe"

To compile your own code, please adjust the folder and filenames in Step 6.1.

Regards,
John.
Reply all
Reply to author
Forward
0 new messages