Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ifort installation too complicated

221 views
Skip to first unread message

James Van Buskirk

unread,
Jan 18, 2023, 11:58:41 PM1/18/23
to
A program I developed on gfortran crashes with my ancient version of
ifort. I wanted to download the free compiler but it seems to be saying
that I don't have Microsoft Visual Studio installed. I downloaded and
installed it but I get the same error on installation.

My problem is that I just want basic command-line capability to
compile with ifort just like I do for gfortran, but the instructions
have so many alternatives embedded in them that I don't really
know what other packages I should download, which version of
ifort to install, and what selections I should make when installing.
Is there an instruction set available for how to get a minimalist
installation working?

Jeff Ryman

unread,
Jan 19, 2023, 2:30:29 AM1/19/23
to

James Van Buskirk

unread,
Jan 19, 2023, 8:14:58 AM1/19/23
to
"Jeff Ryman" wrote in message
news:706d7544-c8d1-4004...@googlegroups.com...
That is exactly the confusing page. I downloaded VisualStudioSetup.exe
and the file says it is version 17.4.33213.308 . I installed it and I seem
to have a working Microsoft Visual Studio 2022, at the least IDE started
up when I tried it.

Then I downloaded w_fortran-compiler_p_2023.0.0.25579_offline.exe
and I get a warning that my OS version is old, but this doesn't seem
fatal. But then after accepting the license agreement and choosing the
recommended installation, I get a warning that I don't have Microsoft
Visual Studio 2017, 2019, or 2022 or Microsoft Build Tools 2017, 2019,
or 2022 and that Microsoft Visual Studio 2022 does not have Desktop
development with C++ components installed.

At this point I abort installation. What am I doing wrong?

Steve Lionel

unread,
Jan 19, 2023, 9:15:52 AM1/19/23
to
On 1/19/2023 8:14 AM, James Van Buskirk wrote:
> Then I downloaded w_fortran-compiler_p_2023.0.0.25579_offline.exe
> and I get a warning that my OS version is old, but this doesn't seem
> fatal.  But then after accepting the license agreement and choosing the
> recommended installation, I get a warning that I don't have Microsoft
> Visual Studio 2017, 2019, or 2022 or Microsoft Build Tools 2017, 2019,
> or 2022 and that Microsoft Visual Studio 2022 does not have Desktop
> development with C++ components installed.
>
> At this point I abort installation.  What am I doing wrong?

See
https://www.intel.com/content/www/us/en/developer/articles/guide/installing-microsoft-visual-studio-2019-for-use-with-intel-compilers.html
--
Steve Lionel
ISO/IEC JTC1/SC22/WG5 (Fortran) Convenor
Retired Intel Fortran developer/support
Email: firstname at firstnamelastname dot com
Twitter: @DoctorFortran
LinkedIn: https://www.linkedin.com/in/stevelionel
Blog: https://stevelionel.com/drfortran
WG5: https://wg5-fortran.org

James Van Buskirk

unread,
Jan 19, 2023, 10:57:05 AM1/19/23
to
"Steve Lionel" wrote in message news:k2t1kj...@mid.individual.net...

> On 1/19/2023 8:14 AM, James Van Buskirk wrote:
> > Then I downloaded w_fortran-compiler_p_2023.0.0.25579_offline.exe
> > and I get a warning that my OS version is old, but this doesn't seem
> > fatal. But then after accepting the license agreement and choosing the
> > recommended installation, I get a warning that I don't have Microsoft
> > Visual Studio 2017, 2019, or 2022 or Microsoft Build Tools 2017, 2019,
> > or 2022 and that Microsoft Visual Studio 2022 does not have Desktop
> > development with C++ components installed.

> > At this point I abort installation. What am I doing wrong?

> See
> https://www.intel.com/content/www/us/en/developer/articles/guide/installing-microsoft-visual-studio-2019-for-use-with-intel-compilers.html

Thanks Steve, that did it! Now I can compile hello.f90. However my
slightly more complicated program seems to die at about the same
place. Do I still have to add stuff like /assume:realloc_lhs or
something, or should ifort have fixed this kind of nonconformance
automatically at this point?

Well, at least I can now try to track down the crash point...

James Van Buskirk

unread,
Jan 19, 2023, 11:26:41 AM1/19/23
to
"James Van Buskirk" wrote in message news:tqbp8d$1k1f7$1...@dont-email.me...

> Well, at least I can now try to track down the crash point...

My first problem was that if I compiled with

ifort cheby2.f90 /out:cheby2

the compiler would echo

-out:cheby2.exe

but in fact would create a file called cheby2 instead. Appending .exe

ifort cheby2.f90 /out:cheby2.exe

at least gets me to the crash point with the new compiler.

James Van Buskirk

unread,
Jan 19, 2023, 6:36:02 PM1/19/23
to
"James Van Buskirk" wrote in message news:tqbqvt$1kb9q$1...@dont-email.me...

> "James Van Buskirk" wrote in message news:tqbp8d$1k1f7$1...@dont-email.me...

> My first problem was that if I compiled with

> ifort cheby2.f90 /out:cheby2

Actually this would produce a warning. The actual command line that
reproduces this issue is

ifort hello.f90 /link kernel32.lib /out:hello

Steve Lionel

unread,
Jan 20, 2023, 11:27:17 AM1/20/23
to
On Windows, /exe is the option to use instead of /out. But in this
example, all you need is:

ifort hello.f90

This will create a hello.exe; kernel32 is linked in by default. Perhaps
you could spend a few minutes reading the documentation on how to use
the compiler from the command line at
https://www.intel.com/content/www/us/en/develop/documentation/fortran-compiler-oneapi-dev-guide-and-reference/top/compiler-setup/use-the-command-line.html#use-the-command-line

If you need more help on Intel Fortran, please ask in their user forum
at
https://community.intel.com/t5/Intel-Fortran-Compiler/bd-p/fortran-compiler

FortranFan

unread,
Jan 20, 2023, 12:07:01 PM1/20/23
to
On Friday, January 20, 2023 at 11:27:17 AM UTC-5, Steve Lionel wrote:

> ..
> On Windows, /exe is the option to use instead of /out. ..

/exe is no longer a thing, don't thing it ever was. Neither with the underlying MSVC linker on Windows from Microsoft not with the Intel Fortran driver:

https://www.intel.com/content/www/us/en/develop/documentation/fortran-compiler-oneapi-dev-guide-and-reference/top/compiler-reference/compiler-options/linking-or-linker-options.html

https://learn.microsoft.com/en-us/cpp/build/reference/linker-options?view=msvc-170

Steve Lionel

unread,
Jan 20, 2023, 12:47:45 PM1/20/23
to
On 1/20/2023 12:06 PM, FortranFan wrote:
> /exe is no longer a thing, don't thing it ever was. Neither with the underlying MSVC linker on Windows from Microsoft not with the Intel Fortran driver:

https://www.intel.com/content/www/us/en/develop/documentation/fortran-compiler-oneapi-dev-guide-and-reference/top/compiler-reference/compiler-options/output-debug-and-precompiled-header-options/exe.html

FortranFan

unread,
Jan 20, 2023, 2:48:29 PM1/20/23
to
On Friday, January 20, 2023 at 12:47:45 PM UTC-5, Steve Lionel wrote:

> ..
> https://www.intel.com/content/www/us/en/develop/documentation/fortran-compiler-oneapi-dev-guide-and-reference/top/compiler-reference/compiler-options/output-debug-and-precompiled-header-options/exe.html

My bad.

I had looked a fair bit in the Microsoft documentation and also at Intel Fortran under linker options and in the build system files of a team I work with that uses IFORT and MSVC that dates back to DEC Fortran and MSVC 6.0 circa late 1990s and failed to find /exe anywhere! I only saw /out getting mentioned with Microsoft's link.exe and it's also used in the build scripts. The one place I overlooked was under compiler options with IFORT - didn't think /exe will be listed there!

James Van Buskirk

unread,
Jan 20, 2023, 6:14:35 PM1/20/23
to
"Steve Lionel" wrote in message news:k2vtn1...@mid.individual.net...

> On Windows, /exe is the option to use instead of /out. But in this
> example, all you need is:

> ifort hello.f90

> This will create a hello.exe; kernel32 is linked in by default.

I just put in kernel32.lib to create an mcve. The actual command line was

ifort cheby2.f90 chebyx.obj xygraph.obj /link Gdi32.lib Opengl32.lib
Glu32.lib User32.lib /out:cheby2.exe

In this context I think the /out command line parameter is read by link.exe,
not the Intel Fortran compiler.

>
> Perhaps you could spend a few minutes reading the documentation on how to
> use the compiler from the command line

I have found that I could get a lot of info via

ifort hello.f90 /#

BTW, the first crash was my fault, not ifort's. For some reason the
gfortran
executable didn't experience a problem due to deferencing an
unallocated array. The current crash is weird in that ifort gets hung in
a loop whereas gfortran doesn't. Hopefully I can figure out what's
going on -- it happens in a rather murky part of the code.

Steve Lionel

unread,
Jan 20, 2023, 7:42:38 PM1/20/23
to
On 1/20/2023 6:14 PM, James Van Buskirk wrote:
> ifort cheby2.f90 chebyx.obj xygraph.obj /link Gdi32.lib Opengl32.lib
> Glu32.lib User32.lib /out:cheby2.exe
>
> In this context I think the /out command line parameter is read by
> link.exe,
> not the Intel Fortran compiler.

Correct - anything after /link is sent to the linker.
0 new messages