Installling Intel Fortran on Cygwin

Installling Intel Fortran on Cygwin

I am trying to install l_fc_c_9.1.036 under a Cygwin shell running within WinXP. On attempting to run the script ./install.sh after untaring the gz archive in the install directory, I get the following message:

Software packages installed as RPMs are available system-wide.
We recommend that you install the software using RPM.
This requires use of root privileges on your system.
To continue, we suggest you login as root or
use an account that can sudo root commands
How would you prefer to proceed? (root/sudo/ignore) [ignore]:
Proceeding with non-root installation.
./secore: ./secore: cannot execute binary file

pmpgrant@w2agz ~/Installs/l_fc_c_9.1.036
$

As far as I know, "root" and "super user" have no meaning in Cygwin. The executable secore fails even when invoked directly from its directory instman. Other Cygwin executables run OK.

I have successfully installed and usedthis package on my Linux box running SUSE 10.1.

Thanks for all and any help.

15 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Since when is a linux executable a cygwin executable? Read the advice you got before. 2 choices: use your linux installation, or install MSVC and Windows ifort, open the ifort command line window, and run cygwin.bat there to combine the ifort and cygwin environments.

The easiest option in Cygwin is to use G95. It doesn't have a lot of non-standard features needed by older code, but works well with Fortran95 code. It would be nice if Intel had a non-Visual option for Win32, because the Visual Studio system is not so nice for command-line and Makefile usage. It also takes some effort to use from Cygwin.

The other good option is just to use a Cygwin shell and ssh to your Linux system, which will give better performance for serious computing. Windows will only get worse as people migrate to Vista.

Intel Visual Fortran for Windows works fine in Cygwin - command line use is supported and we have many customers using this combination. There is even a-unix switch that will allow use of forward slashes in pathnames on theifort command line.What doesn't work is trying to run a Linux executable under Cygwin.

Retired 12/31/2016

Howdy!

I am trying to get the ifort compiler to work undercygwin, but I can't.

I can get it to build a very simple test program from the command line in the DOS window, after having run ifortvars.bat).

But when I try this in a cygwin bash shell, I get the following error:
ed@DUDLEY ~$ ifort test.f90
Intel Fortran Compiler for 32-bit applications, Version 8.1 Build 20040802Z Package ID: w_fc_p_8.1.019
Copyright (C) 1985-2004 Intel Corporation. All rights reserved.

Intel Fortran Compiler for 32-bit applications, Version 8.1 Build 20040802Z Package ID: w_fc_p_8.1.019
Copyright (C) 1985-2004 Intel Corporation. All rights reserved.

fortcom: Severe: No such file or directory
... file is 'test.f90'
compilation aborted for test.f90 (code 1)

I have my PATH set to this:
/cygdrive/c/Program Files/Intel/Fortran/Compiler80/IA32/BIN:/cygdrive/c/Program Files/Common Files/Intel/Shared Fil
es/IA32/BIN:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/X11R6/bin:/opt/bin
e

Any thoughts as to what I might be doing wrong here?

Thanks!

Ed

You don't install ifort under cygwin, you install it normally under Windows. So, this topic doesn't really belong in the linux forum. You can open a cygwin bash shell in the ifort command line environment, which will prefix the entire ifort environment path, including the MSC++ paths, with the path of your cygwin installation. If you don't see the files in your current directory, there must be a problem with the way you started bash.

Howdy!

I am the maintainer for a free software library for climate (and other) scientists, called netCDF. It is tested on many platform every night, and I would like to add ifort/Windows to the nightly testing.

I did install ifort under windows.

I am trying to use it from cygwin, because cygwin is allowing my development machine to ssh in and run a bash script every night.

Currently it works for gcc/gfortran/g95 etc. However, I also have a copy of Intel fortran on this windows box and I would like to add it to the testing.

So, you see, there is no one here to open the ifort command line environment and launch a cygwin bash shell. I need the environment setting to work in bash, without anyone launching anything.

I have searched the web and know that many people can do this, but I have not found the correct method yet. If anyone could just send me the contents of their .bashrc or .profile file which got ifort working, that would be great.

Thanks!

Ed

In principle, once you have everything set up, you could shell off a cmd.exe, run ifortvars.bat and then cygwin.bat and so get the usual combined ifort and cygwin bash environment. Otherwise, you would have to translate a great deal of ifortvars.bat and vcvars32.bat into bash syntax and make your own script. If you are testing 64-bit ifort, you will have to adjust ifort.cfg so as to invoke Microsoft link, in case cygwin 32-bit link comes first in PATH.
Or, you might shell off a cmd.exe session, perform your compilation in that session, then return to bash and run tests. However, the success of many people at running ifort under bash should assure you that ifort has no trouble finding source files in the current directory of a correctly running bash. In fact, the usual reason for using cygwin to drive ifort builds is in order to accomplish standard Makefile tasks which are impossible under SFU.
Your earlier post seemed to imply that you were trying to run ifort without Microsoft C, at least without admitting the necessary Microsoft directories to your PATH. It seemed that you had individual ideas of what you wanted to do which were unlikely to correspond with anything readers of this forum might have done, particularly since you are still on the linux forum.

tim18:In principle, once you have everything set up, you could shell off a cmd.exe, run ifortvars.bat and then cygwin.bat and so get the usual combined ifort and cygwin bash environment. Otherwise, you would have to translate a great deal of ifortvars.bat and vcvars32.bat into bash syntax and make your own script. If you are testing 64-bit ifort, you will have to adjust ifort.cfg so as to invoke Microsoft link, in case cygwin 32-bit link comes first in PATH.

I am running a bash script which does testing of various compilers and configure options. Is there no way to just deal with ifort from this bash script in a normal way? That is, without shelling off a cmd.exe, which then has to start another bash shell, and then run a new script which runs ifort?

Can't I just run ifort from the already existing bash shell that is running all the other compilers?

Surely what gfortran and g95 can do, ifort can do.

I did find one bash file on the net which claims to achieve this. I am going to muck around with it and I will post the result here if I can get it to work.

tim18:Or, you might shell off a cmd.exe session, perform your compilation in that session, then return to bash and run tests. However, the success of many people at running ifort under bash should assure you that ifort has no trouble finding source files in the current directory of a correctly running bash. In fact, the usual reason for using cygwin to drive ifort builds is in order to accomplish standard Makefile tasks which are impossible under SFU.
Your earlier post seemed to imply that you were trying to run ifort without Microsoft C, at least without admitting the necessary Microsoft directories to your PATH. It seemed that you had individual ideas of what you wanted to do which were unlikely to correspond with anything readers of this forum might have done, particularly since you are still on the linux forum.

If you could point me to a better forum, I would be happy to move there. I am posting in this one because this is where I found the exisiting (and only) thread relating to ifort and cygwin.

I am indeed running ifort without Microsoft C. I am using gcc, as is usual under cygwin.

Does the ifort on windows require that I use Microsoft C?

Is there something in the microsoft directories that I need in my path?

I have no objection to using the Microsoft C compiler instead, if I have to do that.

Should I be using the -unix option with ifort?

Thanks,

Ed

Your PATH must include the selections made by ifortvars.bat, and, in turn, vcvars[32|64].bat. If the cygwin FAQ doesn't enlighten you about executing a .bat file with non-posix paths from inside bash, there will be relevant entries in the cygwin mail list archives. These URLs are appended automatically at the end of every cygwin mail list post.
If you want to make a pure bash script which sets the ifort and cl paths, it must end up with similar results to what you see when you run ifortvars.bat and cygwin.bat. cygwin has a path syntax converter utility which may help, if you wish to use that.
You still seem to be expecting cygwin compilers to be able to substitute for the Microsoft libraries required by ifort. This has no possibility of working.
cygwin supports running the mingw compilers under cygwin. This is no help to ifort. The stock mingw doesn't work in 64-bit Windows. There is another
version which supports 32-bit compilation under 64-bit Windows, but
that has no relevance except to show that 32-bit mingw has less
possibility of supporting even 32-bit ifort under 64-bit Windows. Those are distinct from the cygwin compilers, and require Microsoft msvcrt.lib, but don't involve other libraries supplied with Microsoft CL on which ifort depends.
As you are running in command line mode, the free Visual Studio, together with the C++ plug-in[s], is sufficient.
You have steadfastly declined to say whether you are testing 32- or 64-bit compilers. You have to get the answer to that straight in your mind, if you don't want to tell us. Certain cygwin utilities, such as ar, are compatible with 32-bit ifort but not with 64-bit.
If you are confused about 32- vs 64-bit operation, you will have trouble on linux as well as on Windows. I'm sure that 64-bit platforms are important to those who use your libraries.

tim18:You don't install ifort under cygwin, you install
it normally under Windows. So, this topic doesn't really belong in the
linux forum. You can open a cygwin bash shell in the ifort
command line environment, which will prefix the entire ifort
environment path, including the MSC++ paths, with the path of your
cygwin installation. If you don't see the files in your current
directory, there must be a problem with the way you started bash.

Actually, this doesn't work.

When I open the command line environment for ifort, I can build and run a simple F90 program , test.f90.

Then I start bash, and try to compile test.f90, but it gives me the
license not found error. It is not understanding my INTEL_LICENSE_FILE
variable, although the DOS shell did.

So it looks like I have to convert the license file location to a unix style path...

Thanks,

Ed

After opening an ifort command prompt window, and using cygwin.bat to start bash:

$ env|grep LICENSE
INTEL_LICENSE_FILE=c:Program FilesCommon FilesIntelLicenses

so I doubt anyone could give you any cygwin-specific magic for this. As it is not being read as a posix path, it is just a plain Windows environment variable with single backslashes.

Quoting - ed@unidata.ucar.edu

tim18:
You don't install ifort under cygwin, you install it normally under Windows. So, this topic doesn't really belong in the linux forum. You can open a cygwin bash shell in the ifort command line environment, which will prefix the entire ifort environment path, including the MSC++ paths, with the path of your cygwin installation. If you don't see the files in your current directory, there must be a problem with the way you started bash.

Actually, this doesn't work.

When I open the command line environment for ifort, I can build and run a simple F90 program , test.f90.

Then I start bash, and try to compile test.f90, but it gives me the license not found error. It is not understanding my INTEL_LICENSE_FILE variable, although the DOS shell did.

So it looks like I have to convert the license file location to a unix style path...

Thanks,

Ed

Could you tell me how do you build and run a F90 program?Thank you

Quoting - pmpgrant

I am trying to install l_fc_c_9.1.036 under a Cygwin shell running within WinXP. On attempting to run the script ./install.sh after untaring the gz archive in the install directory, I get the following message:

Software packages installed as RPMs are available system-wide.
We recommend that you install the software using RPM.
This requires use of root privileges on your system.
To continue, we suggest you login as root or
use an account that can sudo root commands
How would you prefer to proceed? (root/sudo/ignore) [ignore]:
Proceeding with non-root installation.
./secore: ./secore: cannot execute binary file

pmpgrant@w2agz ~/Installs/l_fc_c_9.1.036
$

As far as I know, "root" and "super user" have no meaning in Cygwin. The executable secore fails even when invoked directly from its directory instman. Other Cygwin executables run OK.

I have successfully installed and usedthis package on my Linux box running SUSE 10.1.

Thanks for all and any help.

Thanks ! I could run the compiler now.

Surely what gfortran and g95 can do, ifort can do.

I am indeed running ifort without Microsoft C. I am using gcc, as is usual under cygwin.

I spoke with another customer yesterday who considers it important that ifort (Windows version) "support" cygwin. By "support," he means full interoperabiity with cygwin gcc and cygwin1.dll (preferably in native 64-bit mode, which cygwin doesn't support). I don't think he is considering the security implications of letting his proprietary application, as well as Intel software tools, escape in a form linked with cygwin1.dll, potentially requiring open source code.

Cygwin does now provide an option to install gfortran, compatible with the gcc 4.3.

Still, no one compiler supports interoperability with both gcc and MSVC, nor both 32- and 64-bit native operation. gfortran on linux supports the -m32 switch, which turns over compilation to a separate 32-bit compiler (if that install option has been taken). cygwin supports a switch to turn over compilation to a 32-bit mingw development system, a purpose being to avoid the GPL requirements which are incurred by linking against cygwin1.dll.

I am entirely sympathetic to the open sourcing requirements of these licenses. Such sympathy includes recognizing those requirements and not violating them.

Leave a Comment

Please sign in to add a comment. Not a member? Join today