Showing results for 
Search instead for 
Did you mean: 

How to obtain ifort.exe environment in Cygwin64's Bash Shell?

I am trying to get back to my Cygwin w/ Bash ifort.exe environment.

Reason: Fresh O/S & Intel Fortran install after disaster (ransom ware, curiosity killed the cat.)

Platform: Fresh install of Windows 7 Pro SP1 on Sun Ultra 27 WS (Xeon W3580 3.33GHz)

Development: Fresh install of Cygwin64 w/ Bash shell & make.

I have successfully recovered a Bash shell command line capability. However, I have lost how to create the Intel Fortran environment ($ ifort.exe fma3d.f).

Desk top Bash invocation shortcut --

  Target: C:\cygwin64\bin\mintty.exe -i /Cygwin-Terminal.ico -

Start in: D:\Fma3D\fma3d\v31

I vaguely recall that either the shortcut Target or a line in bash.rc contained 'mojo' that created the Intel Fortran environment for the Cygwin64 Bash shell.

Can somebody tell what the 'mojo' is and where it needs to reside?


0 Kudos
3 Replies

I haven't work with Cygwin in

I haven't work with Cygwin in some time but I know you can start an Intel compiler pre-initialized command-prompt (from the shortcuts provided in the Intel Parallel Studio XE program group) first and then within that command-prompt window enter something like: C:\cygwin\Cygwin.bat (whatever matches your installation) which starts the Cygwin shell pre-initialized to use the Intel compilers. Maybe you can adapt that to a custom Cygwin shortcut.

I think to resolve to the VS linker you may also need some aliases in .bash_profile like:

alias ifort='ifort -Qlocation,link,"$VCINSTALLDIR/bin"'
alias icl='icl -Qlocation,link,"$VCINSTALLDIR/bin"'

0 Kudos

Kevin D (Intel),

Kevin D (Intel),

Thanks for responding and getting me pointed in a fruitful direction. Here is where I stand with solving this problem. (the solution may not be the most elegant, but here is the text file I have written (to myself) and located in a number of places so that if the information is needed at a later date, I can find it and use it.


          Cygwin64's Bash shell with Intel Fortran Environment
                March 2, 2017

Environment: MS Windows Pro 7 SP1 64-bit O/S (Updates to March 2, 2017)
             with MS compliant Cygwin64 GNU Bash shell + Unix utilities

          This MS Windows short-cut Target construct
           is a combination of the following items:

  (1) MS cmd.exe shell short-cut Target;


  (2) Intel Fortran *.bat file;

        "C:\Program Files (x86)\IntelSWTools\parallel_studio_xe_2017.2.046\bin\psxevars.bat" intel64

  (3) Cygwin64 BASH shell short-cut Target;

        C:\cygwin64\bin\mintty.exe -i /Cygwin-Terminal.ico -

     "I once had an employee who was into dominance. In the morning, he
      was always late to work. Rather than hanging his coat on an unused
      hook, he would hang his coat on top of another person's coat."

  MS cmd.exe shell with two tasks;

       cmd.exe [/C|/K] "task1 & task2"
         task1 is "C:\Program Files (x86)\IntelSWTools\parallel_studio_xe_2017.2.046\bin\psxevars.bat" intel64
         task2 is  C:\cygwin64\bin\mintty.exe -i /Cygwin-Terminal.ico -

Composite MS cmd.exe shell short-cut Target to obtain desired
Cygwin Bash shell with Intel Fortran environment ($ ifort fma3d.f);

  %windir%\system32\cmd.exe /C ""C:\Program Files (x86)\IntelSWTools\parallel_studio_xe_2017.2.046\bin\psxevars.bat" intel64 & C:\cygwin64\bin\mintty.exe -i /Cygwin-Terminal.ico -"

  Note: /C causes the MS cmd.exe to execute and go away.
        /K causes the MS cmd.exe to execute and stick around.
        In both cases, a Cygwin GNU Bash shell command-line
        window is produced with the Intel ifort environment.

  MS cmd.exe reference:


0 Kudos
Black Belt

I use Cygwin in combination

I use Cygwin in combination with IFort mainly to have access to text-utilities and tools such as grep, sed, etc. For this purpose, it is enough to launch an IFort command window, and add <cyg_install_dir>\bin at the tail end of PATH. For the few Cygwin text-utilities that have the same names as Windows utilities, such as sort, find and link, I keep duplicate EXE files in the Cygwin\bin directory, renaming them as usort, ufind, ulink, etc.

0 Kudos