Fortran compiler for windows

192 views
Skip to first unread message

marsag

unread,
Jan 20, 2021, 9:38:56 PM1/20/21
to SNOPT
Hello, 

I'm playing with the trial version of SNOPT as my department is interested to buy a license.

Scrolling down the FAQs of SNOPT's website I noticed that to be compiled in Win10 only the commercial Intel fortran can be used. Is that really the case?

This means that on top of SNOPT license one needs to buy also an expensive license for a fortran compiler when gfortran has a long established heritage. Do you have an alternative toolchain to suggest for that?


SNOPT

unread,
Jan 20, 2021, 10:36:23 PM1/20/21
to SNOPT
You can use gfortran.  I've successfully compiled with mingw/cygwin and gfortran on Windows.  Pretty much every user on Windows that I've communicated with is using Visual Studio with the Intel compiler so that's what we provide.

--Elizabeth
Elizabeth Wong, Ph.D | project scientist
Dept. of Mathematics, UC San Diego

mar sag

unread,
Jan 20, 2021, 11:17:00 PM1/20/21
to SNOPT
Dear Elizabeth, 

many thanks for your reply. Glad to hear that, but can you elaborate a bit more, please? Since g-fortran is not officially supported by Mathworks, the process is not very clear. I just gave a try by installing independently MinGW to compile the example file timestwo.F and when I tried 
mex -setup
Matlab was not able to detect g-fortran, since it only looks by default at the Intel's compilers. (please, see below)

>> mex -v timestwo.F
Verbose mode is on.
No MEX options file identified; looking for an implicit selection.
... Looking for compiler 'Intel Visual Fortran Composer XE 2013 with Microsoft SDK 7.1' ...
... Looking for environment variable 'IFORT_COMPILER14' ...No.
... Looking for environment variable 'IFORT_COMPILER13' ...No.
Did not find installed compiler 'Intel Visual Fortran Composer XE 2013 with Microsoft SDK 7.1'.
... Looking for compiler 'Intel Visual Fortran Composer XE 2013 with Microsoft Visual Studio 2013' ...
... Looking for environment variable 'IFORT_COMPILER14' ...No.
... Looking for environment variable 'IFORT_COMPILER13' ...No.
Did not find installed compiler 'Intel Visual Fortran Composer XE 2013 with Microsoft Visual Studio 2013'.
... Looking for compiler 'Intel Parallel Studio XE 2015 for Fortran with Microsoft SDK 7.1' ...
... Looking for environment variable 'IFORT_COMPILER15' ...No.
Did not find installed compiler 'Intel Parallel Studio XE 2015 for Fortran with Microsoft SDK 7.1'.
... Looking for compiler 'Intel Parallel Studio XE 2015 for Fortran with Microsoft Visual Studio 2013' ...
... Looking for environment variable 'IFORT_COMPILER15' ...No.
Did not find installed compiler 'Intel Parallel Studio XE 2015 for Fortran with Microsoft Visual Studio 2013'.
... Looking for compiler 'Intel Parallel Studio XE 2015 for Fortran with Microsoft Visual Studio 2015' ...
... Looking for environment variable 'IFORT_COMPILER15' ...No.
Did not find installed compiler 'Intel Parallel Studio XE 2015 for Fortran with Microsoft Visual Studio 2015'.
... Looking for compiler 'Intel Parallel Studio XE 2016 for Fortran with Microsoft SDK 7.1' ...
... Looking for environment variable 'IFORT_COMPILER16' ...No.
Did not find installed compiler 'Intel Parallel Studio XE 2016 for Fortran with Microsoft SDK 7.1'.
... Looking for compiler 'Intel Parallel Studio XE 2016 for Fortran with Microsoft Visual Studio 2013' ...
... Looking for environment variable 'IFORT_COMPILER16' ...No.
Did not find installed compiler 'Intel Parallel Studio XE 2016 for Fortran with Microsoft Visual Studio 2013'.
... Looking for compiler 'Intel Parallel Studio XE 2016 for Fortran with Microsoft Visual Studio 2015' ...
... Looking for environment variable 'IFORT_COMPILER16' ...No.
Did not find installed compiler 'Intel Parallel Studio XE 2016 for Fortran with Microsoft Visual Studio 2015'.
... Looking for compiler 'Intel Parallel Studio XE 2017 for Fortran with Microsoft SDK 7.1' ...
... Looking for environment variable 'IFORT_COMPILER17' ...No.
Did not find installed compiler 'Intel Parallel Studio XE 2017 for Fortran with Microsoft SDK 7.1'.
... Looking for compiler 'Intel Parallel Studio XE 2017 for Fortran with Microsoft Visual Studio 2013' ...
... Looking for environment variable 'IFORT_COMPILER17' ...No.
Did not find installed compiler 'Intel Parallel Studio XE 2017 for Fortran with Microsoft Visual Studio 2013'.
... Looking for compiler 'Intel Parallel Studio XE 2017 for Fortran with Microsoft Visual Studio 2015' ...
... Looking for environment variable 'IFORT_COMPILER17' ...No.
Did not find installed compiler 'Intel Parallel Studio XE 2017 for Fortran with Microsoft Visual Studio 2015'.
... Looking for compiler 'Intel Parallel Studio XE 2017 for Fortran with Microsoft Visual Studio 2017' ...
... Looking for environment variable 'IFORT_COMPILER17' ...No.
Did not find installed compiler 'Intel Parallel Studio XE 2017 for Fortran with Microsoft Visual Studio 2017'.
Error using mex
No supported compiler or SDK was found. For options, visit https://www.mathworks.com/support/compilers.
 








--
You received this message because you are subscribed to a topic in the Google Groups "SNOPT" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/snopt/9Sh8r5xuuyU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to snopt+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/snopt/dd80461e-4161-44a8-b4aa-291c175d5fb5n%40googlegroups.com.

SNOPT

unread,
Jan 20, 2021, 11:49:49 PM1/20/21
to SNOPT
Oh Matlab...

My information was on compiling the Fortran/C/C++ libraries.  I didn't realize you were interested in Matlab.  Unfortunately, Matlab only supports gfortran on Linux platforms and only the Intel compiler on Windows and macOS.  In fact, I am in a similar situation as you as my group licenses the Intel compiler so that we can compile and provide libraries to our users.

If you are interested in purchasing SNOPT, we do provide compiled libraries and Matlab files so you should not need to compile the code yourself.  If you can use our trial versions of SNOPT, you should be able to use the fully-licensed version as well.

--Elizabeth
Elizabeth Wong, Ph.D | project scientist
Dept. of Mathematics, UC San Diego

mar sag

unread,
Jan 20, 2021, 11:57:46 PM1/20/21
to SNOPT
Hi Elizabeth, 

I'll talk about it with my dept head.  Meanwhile  I'll keep testing the trial version.

Thanks for your reply!  


Jason Everett

unread,
Apr 6, 2021, 9:31:05 PM4/6/21
to SNOPT
marsag/Elizabeth, just posted my "CmakeLists.txt" file in the other thread that worked for me w/ MinGW gfortran 64-bit compiling toolchain.

Thanks,
Jason

Reply all
Reply to author
Forward
0 new messages