Intel compiler for linux

Installing the GNU C compiler and GNU C++ compiler

To install the gcc and g++ compilers, you will need the build-essential package. This will also install GNU make.

build-essential contains a list of packages which are essential for building Ubuntu packages including gcc compiler, make and other required tools.

$ sudo apt-get update $ sudo apt-get upgrade $ sudo apt-get install build-essential $ gcc -v $ make -v

Now, you should able to compile software using C / C++ compilers.

To install the manpages for c and c++ development, install the manpages-dev package.

Installing the GNU Java compiler

Note that GNU’s Java compiler is not the same as the one developed and distributed by Sun Microsystems, and will not provide Java to the firefox browser. For that, please see Java. To install gcj, the GNU Java compiler, install the following package: gcj.

To install the GNU Java bytecode interpreter, you need the gij package.

To have gcj compile to executables, install libgcj6-dev (otherwise an error during compilation occurs: libgcj.spec: No such file or directory). Use synaptic to install libgcj6-dev.

Installing the GNU Fortran compilers

To install the GNU Fortran 77 compiler — g77, you need the g77 package.

Читайте также:  Yandex browser install linux manjaro

To install the GNU Fortran 95 compiler — gfortran, the package is: gfortran.

Installing the GNU autotools

To install autoconf and automake, you need the autoconf and automake packages.

Apt-get will tell you to explicitly choose a version of automake. If, for example, you decide to use automake1.9, you need to specify the version, such as the automake1.9 package.

32-bit Builds on AMD64

The GNU compilers have options that allow them to create 32-bit object and executable files on 64-bit operating systems, and vica versa. The critical options are -m32 (to build 32-bit) and -m64 (to build 64-bit).

These options will be present when you install the compiler of your choice. However, they won’t actually work unless you install several additional packages.

The first thing you will need is the multilib package for the compiler you are using. For example, to add multilib support to the default version of g++ (4.1 in gutsy), you would install . For 4.2, you would need .

The multilib packages are compiler runtime packages. Now, you need 32-bit (or 64-bit) versions of whatever libraries you need to link your application program. 64-bit packages have names that start with lib64. Install these on 32-bit systems to support 64-bit builds. 32-bit packages have names that start with lib32. Install these on 64-bit systems to support 32-bit builds. Whatever else you are doing, you will probably need . If you are using g++, you will need .

Installing the Intel Compiler Suite Professional Edition 10.x

  1. gcc, build-essential, libc6-dev (see above)
  2. ia32-libs, g++-multilib, and libc6-dev-i386 (for 64-bit systems)
  3. 32-bit packages starting with lib32 (for 64-bit systems)
  4. alien and rpm for installing the RPM packages that Intel distributes.
  5. libstdc++5 and libstdc++5-3.3-dev for good measure because Intel’s builds depend on these runtimes.
Читайте также:  Parted linux удалить все разделы

before you attempt installing the Intel Compiler Suite.

Get the License Number and Extract to a path without spaces

Ensure that you have obtained the license number for your installation and extracted the downloaded installation archive into a path that does not contain any spaces. This last statement is utterly important. The installer script that comes with the package has a bug that does not allow you to install the compiler suite if you have any spaces in the installer script path.

On 64-bit systems you may also need to issue these commands

# cd /usr/lib32 # ln -s libpthread.so libpthread.so.0 # ln -s libm.so libm.so.6 # ln -s libc.so libc.so.6 # ln -s libdl.so libdl.so.2

because the chklic_32_64 license checking utility from Intel dynamically links to these libraries.

Once you’re done preparing to install the compiler suite, it’s time to go to the installer directory and install the compiler (be sure to also read through accompanying documentation; e.g., README, INSTALL.txt):

Run the Installation Script

$ cd /home/user/intel_compiler_suite $ sudo ./install.sh . Follow the wizard as it guides you through the installation process.

After installing the compiler, you need to tell your shell the location of these executables by adding their parent paths to the PATH environment variable.

Edit /etc/bash.bashrc to add the installation path to the PATH environment variable

export PATH=/opt/intel/cc/10.1.012/bin:/opt/intel/idb/10.1.012/bin:$

Where 10.1.012 is the version of the compiler suite installed.

Installing the X11 development compilers

Install script for X11 development libs

$ sudo apt-get -y install libx11-dev

InstallingCompilers (последним исправлял пользователь cable-31-58 2012-08-10 10:18:50)

The material on this wiki is available under a free license, see Copyright / License for details
You can contribute to this wiki, see Wiki Guide for details

Читайте также:  Adding user to folder permissions linux

Источник

Install Intel oneAPI on Ubuntu 20.04 LTS

In order to use Intel C compiler and Intel Fortran compiler for numerical computation, Intel oneAPI Base Toolkit and HPC Toolkit (Intel Fortran) on Ubuntu 20.04 LTS of WSL2 of Windows 10 Pro were installed. This site (in Japanese) was referred.
The Intel compilers are now available free of charge, and can be installed using apt, which is very convenient.

Install the required drivers

Install the required drivers by referring to here.

# Add package repository sudo apt-get install -y gpg-agent wget wget -qO - https://repositories.intel.com/graphics/intel-graphics.key | sudo apt-key add - sudo apt-add-repository 'deb [arch=amd64] https://repositories.intel.com/graphics/ubuntu focal main' # Install run-time packages sudo apt-get update sudo apt-get install intel-opencl-icd intel-level-zero-gpu level-zero intel-media-va-driver-non-free libmfx1 # OPTIONAL: Install developer packages sudo apt-get install libigc-dev intel-igc-cm libigdfcl-dev libigfxcmrt-dev level-zero-dev

After this, the following GPU-related settings were written; but I ignored them because I don’t have a GPU.

stat -c "%G" /dev/dri/render* . # for GPU

Install Intel oneAPI

Work in the directory /tmp , which is accessible to both user and root.

cd /tmp wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list sudo apt update

Specify the packages to install. Here Base Toolkit and HPC Toolkit were installed. Installation of Base Toolkit took a long time.

sudo apt install intel-basekit sudo apt install intel-hpckit

The installation directory is /opt/intel/oneapi .

Configuration for Intel compilers

To use the Intel compilers, execute the following. Appending this to ~/.bashrc will save you the trouble of running it every time.

source /opt/intel/oneapi/setvars.sh

Check the version of the compiler.

ifort --version icc --version icpc --version

References

Источник

Оцените статью
Adblock
detector