2. How to install¶
2.1. Introduction¶
You can install Omni Compiler by using the general installation method on UNIX ( ./configure; make; make install
).
When executing ./configure
without options, only XcalableMP is installed.
If you want to install XcalableACC and OpenACC,
you need to add options to ./configure
General instructions and Each supercomputers explain how to install XcalableMP.
Optional instructions explains how to install XcalableACC and OpenACC.
2.2. Get Omni Compiler package¶
There are two ways to get Omni Compiler from our official site or GitHub.
2.2.1. Official site¶
You can get it from http://omni-compiler.org , where provides Stable package and Nightly Build package. The Nightly Build version is generated every midnight around 0 o’clock (Japan time) when the latest repository on GitHub has been updated from the previous day.
2.2.2. GitHub¶
$ git clone --recursive https://github.com/omni-compiler/omni-compiler.git
2.3. Software dependencies¶
Before you start to install Omni Compiler, the following software must be installed.
- Yacc
- Lex
- C Compiler (supports C90)
- Fortran Compiler (supports Fortran 90)
- C++ Compiler
- Java Compiler
- MPI Implementation (supports MPI-2 or over)
- libxml2
- make
The following shows the procedure for installing software in major Linux distributions.
- Debian GNU/Linux 9.0
$ sudo aptitude install flex gcc gfortran g++ openjdk-8-jdk libopenmpi-dev openmpi-bin libxml2-dev byacc make perl
- Ubuntu 18.04
$ sudo apt-get install flex gcc gfortran g++ openjdk-8-jdk libopenmpi-dev openmpi-bin libxml2-dev byacc make perl
- CentOS 7.2
$ sudo yum install flex gcc gfortran gcc-c++ java-1.7.0-openjdk-devel openmpi-devel libxml2-devel byacc make perl
2.4. General instructions¶
This section explains how to install Omni Compiler in a general Unix environment.
2.4.1. Build and Install¶
$ ./configure --prefix=(INSTALL PATH)
$ make
$ make install
(INSTALL PATH)
indicates the place where Omni Compiler is installed.
Note
(INSTALL PATH)
can not be set to a directory of source code of Omni Compiler.
2.4.2. Set PATH¶
- bash and zsh
$ export PATH=(INSTALL PATH)/bin:$PATH
- csh and tcsh
% setenv PATH (INSTALL PATH)/bin:$PATH
2.5. Each supercomputers¶
When you add an option --target=(machine name)
to ./configure
,
you can build Omni Compiler that is suitable for the following specific architectures.
2.5.1. The K computer¶
$ ./configure --target=Kcomputer-linux-gnu --prefix=(INSTALL PATH)
$ make
$ make install
2.5.2. Fujitsu FX100¶
$ ./configure --target=FX100-linux-gnu --prefix=(INSTALL PATH)
$ make
$ make install
If you use “MPI Version 3” instead of “Fujitsu MPI Extended RDMA” for one-sided communication features, you add --disable-fjrdma
to ./configure
.
$ ./configure --target=FX100-linux-gnu --disable-fjrdma --prefix=(INSTALL PATH)
2.5.3. Fujitsu FX10¶
$ ./configure --target=FX10-linux-gnu --prefix=(INSTALL PATH)
$ make
$ make install
2.5.4. Intel Knights Landing¶
$ ./configure --target=KNL-linux-gnu --prefix=(INSTALL PATH)
$ make
$ make install
2.5.5. Intel Knights Corner¶
$ ./configure --target=KNC-linux-gnu --prefix=(INSTALL PATH)
$ make
$ make install
2.5.6. NEC SX-ACE¶
If a login node does not have libxml2
, you need to install libxml2.
$ tar xfz libxml2-git-snapshot.tar.gz
$ cd libxml2-2.9.2
$ ./configure --without-python --prefix=(LIBXML2 PATH)
$ make
$ make install
Next, you install Omni Compiler.
$ ./configure --target=sxace-nec-superux --with-libxml2=(LIBXML2 PATH) --prefix=(INSTALL PATH)
$ make
$ make install
2.5.7. NEC SX9¶
$ ./configure --target=sx9-nec-superux --prefix=(INSTALL PATH)
$ make
$ make install
2.5.8. HITACHI SR16000¶
$ bash
$ export PATH=/opt/freeware/bin/:$PATH
$ export PATH=/usr/java6/jre/bin/:$PATH
$ bash ./configure --target=powerpc-hitachi-aix --prefix=(INSTALL PATH)
$ make
$ make install
2.5.9. IBM BlueGene/Q¶
If a login node does not have Java
, you need to install Java
.
For example,
you can get openjdk1.7.0-ppc-aix-port-linux-ppc64-b**.tar.bz2” from the OpenJDK website.
$ ./configure --target=powerpc-ibm-cnk --prefix=(INSTALL PATH)
$ make
$ make install
2.6. Optional instructions¶
2.6.1. How to install OpenACC¶
You add --enable-openacc
to ./configure
.
If you need, you also add install PATH of cuda by --with-cuda=(CUDA PATH)
.
$ ./configure --enable-openacc --with-cuda=(CUDA PATH)
$ make
$ make install
It may be possible to generate a more suitable runtime library by setting options for the nvcc
command,
which is used to generate the runtime library for OpenACC.
In that case, you can add the --with-gpu-cflags="(NVCC CFLAGS)"
option to ./configure
.
$ ./configure --enable-openacc --with-cuda=(CUDA PATH) --with-gpu-cflags="-arch=sm_20 -O3"
2.6.2. How to install XcalableACC¶
You add --enable-openacc --enable-xacc
to ./configure
.
As with OpenACC, you can add the --with-cuda=(CUDA PATH)
and --with-gpu-cflags="(NVCC CFLAGS)"
options to ./configure
.
$ ./configure --enable-openacc --enable-xacc --with-cuda=(CUDA PATH)
$ make
$ make install
2.6.3. Use of PGI compiler¶
You specify --with-cuda=(CUDA PATH)
that is included in PGI compiler.
Moreover, CUDA provided by NVIDIA is also needed to build Omni Compiler.
For example, when PGI Community Edition 16.10 is installed in /opt/pgi-1610 and CUDA 7.5 provided by NVIDIA is installed in /opt/cuda-7.5, you can do setting as following.
$ export PATH=/opt/cuda-7.5/bin:$PATH
$ which nvcc
$ /opt/cuda-7.5/bin/nvcc
$ ./configure --enable-openacc --enable-xacc --with-cuda=/opt/pgi-1610/linux86-64/2016/cuda/7.5/
$ make
$ make install
2.6.4. Use of onesided library on XcalableMP¶
You may generate a better runtime library by using MPI and a onesided library on XcalableMP. Omni Compiler supports the following onesided libraries.
- Fujitsu MPI Extended RDMA
- GASNet
- MPI Version 3
2.6.4.1. Fujitsu MPI Extended RDMA¶
Fujitsu MPI Extended RDMA is available only on the K computer, FX100, and FX10.
By using ./configure --target=(machine name)
, Omni Compiler automatically uses Fujitsu MPI Extended RDMA.
2.6.4.2. GASNet¶
GASNet is a onesided communication library developed at U.C. Berkeley.
If you want to use GASNet, you should add “install path of GASNet” and “its conduit” to ./configure
.
$ ./configure --with-gasnet=(GASNET PATH) --with-gasnet-conduit=(GASNET CONDUIT)
When you omit --with-gasnet-conduit=(GASNET CONDUIT)
, Omni Compiler automatically selects an available conduit.
2.6.4.3. MPI Version 3¶
Omni Compiler automatically selects MPI Version 3 under the following conditions.
- Using MPI implementation supports MPI Version 3
- Not using GASNet
- Except for the K computer, FX100, and FX10
2.6.4.4. How to confirm onesided library¶
You can confirm which onesided communication library Omni Compiler used in the last output of ./configure
.
- Fujitsu MPI Extended RDMA
Onesided : yes
Communication Library : Fujitsu RDMA
- GASNet
Onesided : yes
Communication Library : GASNet
- MPI Version 3
Onesided : yes
Communication Library : MPI3
- Not use onesided library
Onesided : no
2.6.5. How to indicate compiler used by Omni Compiler¶
The compiler used by Omni Compiler can be classified into two types by the location of its binary.
- Local compiler is used in the Pre-process, Frontend, Translator, and Backend processes. A binary generated by a local compiler is used on the machine where you build Omni Compiler, for example, the login node of a cluster system.
- Native compiler is used to generate an execution file and runtime library of Omni Compiler. A binary generated by a native compiler is used on the machine where you carry out calculations, for example, the compute node of a cluster system.
Even though Omni Compiler automatically selects the above compilers when executing ./configure
,
you can select them by using the following variables.
- Local compiler
Variable | Description |
---|---|
CC | C compiler |
CFLAGS | C compiler flags |
FC | Fortran compiler |
FCFLAGS | Fortran compiler flags |
JAVA | Java application launcher |
JAVAC | Java compiler |
JAR | Java Archive Tool |
- Native compiler
Variable | Description |
---|---|
MPI_CPP | C preprocessor |
MPI_CPPFLAGS | C preprocessor flags |
MPI_CC | C compiler |
MPI_CFLAGS | C compiler flags |
MPI_CLIBS | C compiler linker flags |
MPI_FPP | Fortran preprocessor |
MPI_FPPFLAGS | Fortran preprocessor flags |
MPI_FC | Fortran compiler |
MPI_FCFLAGS | Fortran compiler flags |
MPI_FCLIBS | Fortran compiler linker flags |
For example, if you want to use the icc
for CC
, you execute ./configure CC=icc
.
2.6.6. Use of BLAS for runtime library¶
Part of the runtime library of Omni Compiler can use BLAS.
For example, when a function xmp_matmul()
that is one of the intrinsic functions uses BLAS, it may execute faster.
2.6.6.1. Not select (Default)¶
Internal functions prepared in the runtime library are used.
2.6.6.2. The K computer¶
When executing ./configure --target=Kcomputer-linux-gnu
, the runtime library uses BLAS provided in the K computer.
2.6.6.3. FX100 or FX10¶
When executing ./configure --enable-SSL2BLAMP
, the runtime library uses BLAS provided in FX100 or FX10.
2.6.6.4. Intel MKL¶
When executing ./configure --enable-intelmkl
, the runtime library uses Intel MKL.
2.6.6.5. Selected BLAS¶
When executing ./configure --with-libblas=(BLAS PATH)
, the runtime library uses its BLAS.
2.7. Run on Docker¶
This page describes how to use the Docker image for Omni Compiler on Docker Hub.
$ docker run -it -u xmp -w /home/xmp omnicompiler/xcalablemp