Setting environment variables for Fortran XE Composer 2013 SP1.2.144 compiler for 64b - intel-fortran

I've successfully installed l_fcompxe_2013_sp1.2.144 for my Linux ubuntu 64 bits i5.
To setup environment variables I've changed to root and run
./compilervars.sh intel64
./compilervars_arch.sh intel64
located in folder /opt/intel/composer_xe_2013_sp1.2.144/bin
after that, I've tried this
ifort --help
but message says ifort: command not found
what am I doing wrong?

Make sure you source the script. I couldn't tell from your question whether you had sourced or just executed the script
you should do:
source PATH-TO-INSTALLATION/bin/compilervars.sh intel64
(same as):
. PATH-TO-INSTALLATION/bin/compilervars.sh intel64

Related

Installing Make in Cygwin

I am trying to build a Linux project in windows 7 environment usign cygwin. However I am continuously getting below error while configuring make for cygwin installation.
-bash: make: command not found
After searching on inernet the only solution is re running of setup and installed make package. I have installed automake1.15 but it is in noarch folder and there is no binary make.exe in bin folder.
run command setup-x86_64.exe -q --packages=make(because make is not installed) in command prompt where the setup-x86_64.exe file is available
There's a big difference between the 2:
[GNU]: Automake - Generates Makefile templates
[GNU]: GNU Make - Builds software from sources (via Makefiles)
So you need to select Make from Cygwin setup.
Notes:
Automake (or any package, as a matter of fact) is downloaded in the noarch dir, when it's compatible with any OS (Cygwin, in this case) architecture (32 bit and 64 bit (currently)), meaning that it doesn't contain binaries (.exes, .dlls (.sos)), only script-like files
Make on the other hand, does contain binaries (/usr/bin/make itself it is a binary) and will be downloaded in the appropriate dir (x86_64 or x86)
The download dir is not the same thing as the installation dir (there may be more than one, and it's under Cygwin installation dir)
For more (generic) details, check [Cygwin]: Installing and Updating Cygwin Packages.
[Cygwin]: Cygwin FAQ - Does the Cygwin Setup program accept command-line arguments? might also be a good starting point for command line options (check [SO]: Installing Make in Cygwin (#PJain's answer)).
Final note: Cygwin is kind of obsolete. Switch to WSL(2), which runs a real Ubuntu (no wrappers / adapters) as a VM (in Hyper-V - which runs at a totally different level).

Tizen-sdk-for-wearable-setup Installation issue because of JAVA HOME

System Configuration:
OS - Windows 8
System type - 64-bit Operating System , x64-based processor
I have installed java-8 and set JAVA_HOME as
C:\Program Files\Java\jdk1.8.0
I am getting error as below image while Tizen-sdk-for-wearable-setup Installation.
error - Cannot execute Java even if it was installed. Check environment variable or Java version(over 1.6) please.
I tried installing after JDK 7 both 32 bit and 64 bit and setting JAVA_HOME - Program Files path and Program Files (x86) path both also it didn't worked.
I have a another system in which the Issue didn't occurred.
System Configuration :
OS - Windows 7 Enterprise
System Type - 32 bit operating system.
Installed Java - C:\Program Files\Java\jdk1.6.0_45
JAVA_HOME set as - C:\Progra~1\Java\jdk1.6.0_45
Now there may be many chances why installation is not getting in my win-8 64 bit.
64 bit JAVA support is not available.
I am not sure about ~ symbol in JAVA_HOME path but it may be to escape space between Program Files and I have not set java home using this symbol.
In win-8 64 bit I have 2 folders. Program Files and Program Files (x86) , I am not sure whether to use ~ or " " to set JAVA_HOME and for 32 bit java or 64 bit java installed.
May be only java 1.6 is supported right now.
I searched and found similar issues :
I find this link but not able to get why its advised to set the system environment Path Variable to 'c:\windows\system32'.
In this link its advised to use InstallManager.jar via cmd.exe.
I can try each possible assumption till it works but hoping to find a solution with proper reason why I am getting this error.
If any one knows how should I work this out please help.
At last solve the Issue.
Installed jdk1.7.0_51 (I think currently JAVA 8 is not supported).
Set the JAVA_HOME as C:\PROGRA~1\Java\jdk1.7.0_51 (thanks to #Michael comment).
This link: https://answers.madewithmarmalade.com/questions/16878/cant-install-tizen-sdk-on-windows-8-64-bit.html solved for me the problem of Tizen SDK installation:
Change directory to %LOCALAPPDATA%\Temp\tizensdk_TimeStampOfInstallationInvocation
java -jar InstallManager.jar
My system: Windows 7 Ultimate x64. Java's version installed (64 bit):
g:>echo %JAVA_HOME%
c:\Program Files\Java\jdk1.8.0_05
g:>echo %CLASSPATH%
c:\Program Files\Java\jdk1.8.0_05\jre\lib
Added to PATH: c:\Program Files\Java\jdk1.8.0_05\bin\
(Tizen IDE and "Hello World" example run just fine.)
I encountered the same problem and finally I realised that my version of Tizen installer is 64bit but I installed 32bit java in my computer. Then I downloaded 32bit Tizen installer and everything was fine.
I encountered the same problem, and it was solved by placing the Java path in the beginning of the system path ! weird.. but worked :)
You must include, depending on whether you downloaded the x86 or x64 Tizen installer, C:\Program Files (x86)\Java\jre7\bin or C:\Program Files\Java\jre7\bin in the PATH environment system variable. You can't use java 8. See this oracle page for instructions on setting environment variables. I have read some others mention that they put the entry at the very beginning of the PATH variable. I think this would only matter if you also had an entry for java 8, but better safe than sorry.

How can I programmatically configure compiler for CMake via Python on Windows?

I have a python build script I'm using to build a number of projects that are configured via CMake on windows. Previously, we used MSVC to build these projects, and everything was fine. I want to try to incorporate ICC into the build now, via these python scripts. I can choose the native compiler directly in the UI if necessary, but I'd rather do everything programmatically.
Problem is, it's failing with either syntax errors, or just not paying attention to the cmake options.
I can set:
"CMAKE_CXX_COMPILER:PATH":"C:/Program Files (x86)/Intel/Composer XE 2013/bin/intel64/icl.exe",
"CMAKE_C_COMPILER:PATH":"C:/Program Files (x86)/Intel/Composer XE 2013/bin/intel64/icl.exe"
And that's part of a cmakeItems array that's then fed into the generation:
generate(x86Generator, cmakeItems, osName, buildTarget)
where the other options are set via command line switches (for x86generator and buildTarget) or by default (ie, osName is detected in the script itself).
Before trying anything, I'm running this from a command line prompt where I've run
iclvars intel64
in the icc bin directory to ensure that all of the icc variables are properly configured, and I can type icl on the command line and confirm that it's in the path.
Running the above means that the C compiler remains the default msvc compiler.
I've also tried running:
set(CMAKE_C_COMPILER_INIT icl)
set(CMAKE_CXX_COMPILER_INIT icl)
but that's giving me a syntax error on the icl portion. I thought that maybe it's a path issue, but doing:
set(CMAKE_C_COMPILER_INIT "C:\Program Files (x86)\Intel\Composer XE 2013\bin\intel64\icl")
set(CMAKE_CXX_COMPILER_INIT "C:\Program Files (x86)\Intel\Composer XE 2013\bin\intel64\icl")
is also giving me a syntax error.
So how can I programmatically set the C/CXX compiler from a python script calling cmake?
On the command line you specify the compiler via the environment variables CC and CXX. I'ld guess you need to properly prepare the envornment of the cmake command and you should not change CMakeLists.txt internals.
E.g.
import subprocess
subprocess.Popen('CC=%s CXX=%s cmake ../path/to/src' %('icc','icpc'))
The answer is:
ICC does not work with CMake on Windows, so don't bother.
http://www.cmake.org/Bug/view.php?id=6929
Much better to run it with some form of visual studio compiler and then mess about with icprojconverter:
http://software.intel.com/en-us/articles/ICProjConvert100

gcc is not compatible with 64 bit?

I install the cygwin and set the path to the C:\cygwin\bin, however when I run gcc in the command line, it shows the error as follows:
Can someone help me on this?
The problem is that gcc.exe is a symlink to gcc-3.exe or gcc-4.exe. Cygwin understands symlinks (so invoking gcc from the cygwin shell will work), but windows cmd.exe does not.
I just copied gcc-4.exe to gcc.exe and now all is good.
I see that cygwin have installer for 64 bit. Try to verify if is not for 32 bits. However, reinstall it from some mirror sites.

How to run a makefile in Windows?

I have some demos that I downloaded and they come with a Makefile.win and a Makefile.sgi. How can I run these in Windows to compile the demos?
You can install GNU make with chocolatey, a well-maintained package manager, which will add make to the global path and runs on all CLIs (powershell, git bash, cmd, etc…) saving you a ton of time in both maintenance and initial setup to get make running.
Install the chocolatey package manager for Windows
compatible to Windows 7+ / Windows Server 2003+
Run choco install make
I am not affiliated with choco, but I highly recommend it, so far it has never let me down and I do have a talent for breaking software unintentionally.
If you have Visual Studio, run the Visual Studio Command prompt from the Start menu, change to the directory containing Makefile.win and type this:
nmake -f Makefile.win
You can also use the normal command prompt and run vsvars32.bat (c:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools for VS2008). This will set up the environment to run nmake and find the compiler tools.
Check out GnuWin's make (for windows), which provides a native port for Windows (without requiring a full runtime environment like Cygwin)
If you have winget, you can install via the CLI like this:
winget install GnuWin32.Make
Also, be sure to add the install path to your system PATH:
C:\Program Files (x86)\GnuWin32\bin
Check out cygwin, a Unix alike environment for Windows
Here is my quick and temporary way to run a Makefile
download make from SourceForge: gnuwin32
install it
go to the install folder
C:\Program Files (x86)\GnuWin32\bin
copy the all files in the bin to the folder that contains Makefile
libiconv2.dll libintl3.dll make.exe
open the cmd (you can do it with right click with shift) in the folder that contains Makefile and run
make.exe
done.
Plus, you can add arguments after the command, such as
make.exe skel
If you install Cygwin. Make sure to select make in the installer. You can then run the following command provided you have a Makefile.
make -f Makefile
https://cygwin.com/install.html
I use MinGW tool set which provides mingw32-make build tool, if you have it in your PATH system variables, in Windows Command Prompt just go into the directory containing the files and type this command:
mingw32-make -f Makefile.win
and it's done.
I tried all of the above. What helps me:
Download the mingw-get.
Setup it.
Add something like this C:\MinGW\bin to environment variables.
Launch (!important) git bash. Power shell, developer vs cmd, system cmd etc didn't help.
Type mingw-get into the command line.
After type mingw-get install mingw32-make.
Done! Now You might be able to use make-commands from any folder that contains Makefile.
With Visual Studio 2017 I had to add this folder to my Windows 10 path env variable:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.10.25017\bin\HostX64\x64
There's also HostX86
If it is a "NMake Makefile", that is to say the syntax and command is compatible with NMake, it will work natively on Windows. Usually Makefile.win (the .win suffix) indicates it's a makefile compatible with Windows NMake. So you could try nmake -f Makefile.win.
Often standard Linux Makefiles are provided and NMake looks promising. However, the following link takes a simple Linux Makefile and explains some fundamental issues that one may encounter. It also suggests a few alternatives to handling Linux Makefiles on Windows.
Makefiles in Windows
Firstly, add path of visual studio common tools (c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools) into the system path. To learn how to add a path into system path, please check this website:
http://www.computerhope.com/issues/ch000549.htm. You just need to this once.
After that, whenever you need, open a command line and execute vsvars32.bat to add all required visual studio tools' paths into the system path.
Then, you can call nmake -f makefile.mak
PS: Path of visual studio common tools might be different in your system. Please change it accordingly.
I tried with cygwin & gnuwin, and didn't worked for me, I guess because the makefile used mainly specific linux code.
What it worked was use Ubuntu Bash for Windows 10. This is a Marvel if you come from MAC as it is my case:
To install the Ubuntu Bash: https://itsfoss.com/install-bash-on-windows/
Once in the console, to install make simply type "make" and it gives the instructions to download it.
Extras:
Useful enable copy / paste on bash: Copy Paste in Bash on Ubuntu on Windows
In my case the make called Maven, so I have to install it as well: https://askubuntu.com/questions/722993/unable-to-locate-package-maven
To access windows filesystem C: drive, for example: "cd /mnt/c/"
Hope it helps
Install msys2 with make dependency add both to PATH variable.
(The second option is GNU ToolChain for Windows. MinGW version has already mingw32-make included.)
Install Git Bash. Run mingw32-make from Git Bash.
If you have already installed the Windows GNU compiler (MinGW) from MSYS2 then make command comes pre-installed as wingw32-make. Always match cmake makefile generation with the correct make command. Mixing these generate problems.
MinGW makefile generation with MinGW make command
Visual Studio makefile generation with VS equivalent make command
And this is always possible as long as you have the source code. Just delete old build directory and start over by specifying this time the right parameter in cmake ,e.g.
mkdir build
cd build
cmake -G "MinGW MakeFiles" path/to/src/whereCMakeLists.txtInstructionsAre
mingw32-make
myProject.exe # RUN
I have encountered issues during compilation where multiple make commands interact. To prevent this just edit/remove the environmental variables that lead to different make commands. For example to prevent conflicts with mingw, keep only C:\msys64\mingw64\bin but remove C:\msys64\usr\bin. That other path contains the msys make and as I said you do not want to combine make commands during compilation.
Download from https://sourceforge.net/projects/gnuwin32/
Set the variable path in advance setting for recognize in command prompt (C:\Program Files (x86)\GnuWin32\bin)
So if you're using Vscode and Mingw then you should first make sure that the bin folder of the mingw is included in the environment path and it is preferred to change the mingw32-make.exe to make to ease the task and then create a makefile
and include this code in it .
all:
gcc -o filename filename.c
./filename
Then save the makefile and open Vscode Code terminal and write make. Then makefile will get executed.
I am assuming you added mingw32/bin is added to environment variables else please add it and I am assuming it as gcc compiler and you have mingw installer.
First step: download mingw32-make.exe from mingw installer, or please check mingw/bin folder first whether mingw32-make.exe exists or not, else than install it, rename it to make.exe.
After renaming it to make.exe, just go and run this command in the directory where makefile is located. Instead of renaming it you can directly run it as mingw32-make.
After all, a command is just exe file or a software, we use its name to execute the software, we call it as command.
For me installing ubuntu WSL on windows was the best option, that is the best tool for compiling makefile on windows. One thousand is better than Cygwin64, because to compile a makefile you will need another package and compile software like maybe gfortran, netcdf, etc, ect, in ubuntu WSL you can install all of these packages very easily and quickly ;)
The procedure I followed is;
I installed Gnuwin32's make using the installable.
Added the "make" path to the environmental variable PATH.
Verified the installation using "make --version"
Go to http://gnuwin32.sourceforge.net/packages/make.htm and download make-3.81.exe, install and add to Windows path.
May be it can work.
pip install Makefile

Resources