---
# System prepended metadata

title: openmpi

---

## fftw
### with gcc
```shell=
wget http://www.fftw.org/fftw-3.3.8.tar.gz
tar xvf fftw-3.3.8.tar.gz
cd fftw-3.3.8
module load /home/users/industry/ai-hpc/apacsc29/scratch/modulefiles/gcc/8.4.0
bash -c '
    CODE_NAME=fftw \
    CODE_TAG=3.3.8 \
    CODE_DIR=/home/users/industry/ai-hpc/apacsc29/scratch/NAMD/fftw-3.3.8 \
    CMAKE_PATH=/home/users/industry/ai-hpc/apacsc29/scratch/app/cmake/bin/cmake \
    INSTALL_DIR=/home/users/industry/ai-hpc/apacsc29/scratch/NAMD/fftw-build \
    GCC_PATH=/home/users/industry/ai-hpc/apacsc29/scratch/app/lib/gcc/bin/gcc
    GCC_FLAGS='"-march=broadwell -mtune=broadwell -mavx2 -msse4.2 -O3 -DNDEBUG"' \
    ### To build shared library (single precision) with GNU Compiler
    BUILD_LABEL=$CODE_TAG-shared-gcc840-avx2-broadwell \
    CMD_BUILD_SHARED_GCC=" 
    mkdir -p $CODE_DIR/build-$BUILD_LABEL \
    && cd $CODE_DIR/build-$BUILD_LABEL \
    && $CMAKE_PATH .. \
    -DBUILD_SHARED_LIBS=ON -DENABLE_FLOAT=ON \
    -DENABLE_OPENMP=OFF -DENABLE_THREADS=OFF \
    -DCMAKE_C_COMPILER=$GCC_PATH -DCMAKE_CXX_COMPILER=$GCC_PATH \
    -DENABLE_AVX2=ON -DENABLE_AVX=ON \
    -DENABLE_SSE2=ON -DENABLE_SSE=ON \
    -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR/$BUILD_LABEL \
    -DCMAKE_C_FLAGS_RELEASE=$GCC_FLAGS \
    -DCMAKE_CXX_FLAGS_RELEASE=$GCC_FLAGS \
    && time -p make VERBOSE=1 V=1 install  \
    && cd $INSTALL_DIR/$BUILD_LABEL && ln -s lib64 lib | tee $BUILD_LABEL.log "

    eval $CMD_BUILD_SHARED_GCC;
    wait
    echo $CMD_BUILD_SHARED_GCC;
    ' | tee fftw3buildlog 2>&1


```
:::info
```shell=
#%Module

set FFTW_DIR /home/users/industry/ai-hpc/apacsc29/scratch/NAMD/fftw-build/3.3.8-shared-gcc840-avx2-broadwell

prepend-path CPLUS_INCLUDE_PATH $FFTW_DIR/include
prepend-path LD_LIBRARY_PATH $FFTW_DIR/lib
prepend-path LIBRARY_PATH $FFTW_DIR/lib
```
:::
# openmpi
#### 3.1.6(without ucx)
```shell=
wget https://download.open-mpi.org/release/open-mpi/v3.1/openmpi-3.1.6.tar.gz
tar xvf openmpi-3.1.6.tar.gz
cd openmpi-3.1.6
module load /home/users/industry/ai-hpc/apacsc29/scratch/modulefiles/gcc/8.4.0
./configure  --prefix=/home/users/industry/ai-hpc/apacsc29/scratch/app/openmpi-3.1.6-general
make -j24
make -j24 install
```
:::info
```shell=
#%Module

set             TOP_DIR         /home/users/industry/ai-hpc/apacsc29/scratch/app/openmpi-3.1.6-general
prepend-path    PATH            ${TOP_DIR}/bin
prepend-path    LD_LIBRARY_PATH ${TOP_DIR}/lib
prepend-path    MANPATH         ${TOP_DIR}/share/man
prepend-path    CPATH           ${TOP_DIR}/include
prepend-path    LIBRARY_PATH    ${TOP_DIR}/lib
```
:::