Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
en:services:application_services:high_performance_computing:software:compilation [2022/08/25 17:15] – [MPI4py] jogajaen:services:application_services:high_performance_computing:software:compilation [2022/10/12 15:23] (current) – [Compilation] jogaja
Line 1: Line 1:
 +====== Applications Compilation ======
  
 +The recommended compiler module for C, C++, and Fortran code is the default Intel compiler intel/compiler. We also provide GNU and Open64 compilers, the PGI compiler suite will follow. Open64 is often recommended for AMD CPUs, but we do not have experience with it. For math (BLAS and fftw3) the Intel MKL is a good default choice intel/mkl, with ACML being an alternative for AMD processors. Usually it is not necessary to use fftw3 modules alongside with the MKL, as the latter provides fftw support as well. Please note that the module python/scipy/mkl/0.12.0 provides Python's numpy and scipy libraries compiled with Intel MKL math integration, thus offering good math function performance in a scripting language.
 +
 +intel/mpi and the various OpenMPI flavors are recommended for MPI, mostly due to the fact that the mvapich and mvapich2 libraries lack testing. 
 +
 +===== CPU Architecture =====
 +gwdu101 and gwdu102 are Intel Cascade Lake-based systems (2x 48 cores, 192 GB RAM), while gwdu103 is Intel Sandy Bridge based (2x 12 cores, 64 GB RAM). If your software takes advantage of special CPU dependent features, it is recommended to use the same CPU architecture for compiling as targeted for running your jobs.
 +
 +===== mpi4py =====
 +To obtain consistent results, it is recommended **NOT** to install mpi4py conda environment. It is advisable to load the system's mpi library then use 'pip install'.
 +Installation via conda will install the conda version of MPI instead of the system's, this will work but it will be very slow and results produced might be inconsistent.
 +
 +To install mpi4py via pip, follow the steps below:
 +=== 1. Create and activate a conda environment ===
 +<code>
 +$ module load anaconda3
 +$ conda create --name my-mpi4py python=3.8 -y
 +$ conda activate my-mpi4py
 +</code>
 +
 +=== 2. Install mpi4py in the created conda environment ===
 +
 +Load the specific MPI version.
 +
 +<code>
 +$ module load openmpi
 +</code>
 +
 +Set the loaded version version of MPI to be used by MPI4py
 +
 +<code>
 +$ export MPICC=$(which mpicc)
 +</code>
 +
 +Then install the mpi4py using pip
 +<code>
 +$ pip install mpi4py --no-cache-dir
 +</code>
 +
 +Finally, when the installation is finished, check that it was properly installed by running
 +<code>
 +$ python -c "import mpi4py"
 +</code>