Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
9 Views

using ifort with cygwin

Hi,

I'am using windows version fo ifort compiler with cygwin system. The link problem has been solved by editing the ifort.cfg configuration file, but it seems ifort still could not recognize unix-like paths which start with '/'. The following command line generates an error message:

> ifort -c /home/operation/test.f90 -o /home/operation/test.exe

ifort: command line warning #10006: ignoring unknown option '/home/operation/test.f90'

ifort: command line error: no files specified; for help type "ifort /help" 

There willl be no error if relative path was used. Someone please help, thanks.

0 Kudos
9 Replies
Highlighted
Black Belt
9 Views

See https://software.intel

See https://software.intel.com/en-us/articles/alias-method-for-using-intel-windows-compilers-under-cygwin-bash-shell/

There used to be a -unix option that told the ifort command to ignore forward slashes in paths, but it does not seem to be recognized in the current versions. Maybe Lorri will see this and comment.

Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
New Contributor I
9 Views

Quote:Steve Lionel (Ret.)

Steve Lionel (Ret.) wrote:

See https://software.intel.com/en-us/articles/alias-method-for-using-intel-w...

There used to be a -unix option that told the ifort command to ignore forward slashes in paths, but it does not seem to be recognized in the current versions. Maybe Lorri will see this and comment.

Thanks Steve, It seems as is, then I have to try some workaround maybe.

0 Kudos
Highlighted
Black Belt
9 Views

cygwin has utilities to

cygwin has utilities to translate path representations, if that is what you want.  It's also possible to make Microsoft style paths using \ escape sequences, but it's ugly and error prone.  In case you've forgotten what a posix shell does, the first \ is swallowed as an escape character.

0 Kudos
Highlighted
New Contributor I
9 Views

Quote:Tim P. wrote:

Tim P. wrote:

cygwin has utilities to translate path representations, if that is what you want.  It's also possible to make Microsoft style paths using \ escape sequences, but it's ugly and error prone.  In case you've forgotten what a posix shell does, the first \ is swallowed as an escape character.

Thanks Tim, now I'm able to compiler single Fortran source file using ifort. As metioned in the thread given by Steve above, in auto build system(autotools, cmake...etc.) there is still lack of support for ivf.

0 Kudos
Highlighted
New Contributor II
9 Views

I don't know if this will be

I don't know if this will be of use to you, but Code::Blocks is a very configurable cross-platform free IDE.

http://www.codeblocks.org/

0 Kudos
Highlighted
New Contributor I
9 Views

Quote:gib wrote:

gib wrote:

I don't know if this will be of use to you, but Code::Blocks is a very configurable cross-platform free IDE.

http://www.codeblocks.org/

Thanks gib, I'll have a try.

0 Kudos
Highlighted
Black Belt
9 Views

I don't know why cmake wouldn

I don't know why cmake wouldn't work.  I and others have used standard make for years.  cygwin doesn't change any defaults; you could use builds set up in cygwin sources for examples.  For example, a minimum override of detaults for make:

FC  = ifort

CC = icl

FFLAGS = -O3 -fpp -align:array32byte -debug:inline-debug-info -Qunroll:4 -standard-semantics -Qopt-report-file=$*_opt.txt

.SUFFIXES:      .obj .f90

although Microsoft link accepts .o with warnings.

The following isn't the way most people would go, but I use make rules like:

target:   mains.obj subs.obj 

             mv mains.exe $@.exe

             mv mains.pdb $@.pdb

.f90.obj:

            $(FC) $(FFLAGS) -c $*.f90

cygwin build setups will show how to set up $@.exe correctly; it might be considered a bit ugly after you add -Fe$@

Actually, you can use either / or - in FFLAGS as the shell doesn't interpret inside there.

I think Steve L has indicated his disapproval of adding options like -assume:underscore,old_maxminloc -names:lowercase but they do work.

I don't know whether cmake for Windows has default rules which differ from the ones for cygwin or linux.  If you don't install cygwin cmake, you should be able to run the Windows one.

 

0 Kudos
Highlighted
New Contributor I
9 Views

Yes, Tim, standard make may

Yes, Tim, standard make may work fine by using relative paths or other strategies but the big difference for cmake tool is that it would use absolute path in its generated make file which the windows version of ivf cannot recognize properly so it may sometimes fail.

0 Kudos
Highlighted
9 Views

RE: "-unix" switch

RE: "-unix" switch

That is not supported with Intel Fortran; it was a legacy switch from the Digital/Compaq Visual Fortran days.

 

0 Kudos