---
# System prepended metadata

title: HPC-X

---

# HPC-X

## Depend
### GCC 9.4.0
```bash=
#/bin/bash
#PBS -P 50000041
#PBS -N install_gcc
#PBS -l select=1:ncpus=24:mpiprocs=1:mem=10G
#PBS -l walltime=02:00:00
#PBS -q normal
#PBS -o out_install_gcc.txt
#PBS -e err_install_gcc.txt

module load binutils

GCCSOURCE=/home/users/industry/ai-hpc/apacsc27/kerwin/source/gcc-9.4.0
GCCDIR=/home/users/industry/ai-hpc/apacsc27/kerwin/program

cd $GCCSOURCE
rm -r build
mkdir build && cd build
../configure -v --prefix=$GCCDIR/gcc-9.4.0 --enable-checking=release --enable-languages=c,c++,fortran
make -j 24
make install
```

And after rebuild compiler we need to rebuild linker and other bintuils package.

### Binutils
```bash=
#/bin/bash
#PBS -P 50000041
#PBS -N install_binutils
#PBS -l select=1:ncpus=24:mpiprocs=1:mem=10G
#PBS -l walltime=02:00:00
#PBS -q normal
#PBS -o out_install_bin.txt
#PBS -e err_install_bin.txt


BINSOURCE=/home/users/industry/ai-hpc/apacsc27/kerwin/source/binutils-2.32
BINDIR=/home/users/industry/ai-hpc/apacsc27/kerwin/program

cd $BINSOURCE
rm -r build
mkdir build && cd build
../configure -v --prefix=$BINDIR/binutils-2.32 --enable-checking=release
make -j 24
make install
```

### FFTW3 hpcx mpi (gcc-5.1.0)
```bash=
LANG=en_US.utf-8
LC_ALL=en_US.utf-8

FFTWSOURCE=/home/users/industry/ai-hpc/apacsc27/kerwin/source/fftw-3.3.9
FFTWDIR=/home/users/industry/ai-hpc/apacsc27/kerwin/program
HPCX_HOME=/home/users/industry/ai-hpc/apacsc27/kerwin/source/hpcx-v2.4.0-gcc-MLNX_OFED_LINUX-4.6-1.0.1.1-redhat6.9-x86_64
FLAGS="-march=haswell"

module load gcc/5.1.0
module load binutils
source $HPCX_HOME/hpcx-init.sh
hpcx_load
env | grep HPCX
module list

which mpicc

cd $FFTWSOURCE
rm -r build
mkdir build && cd build
CC="mpicc" CXX="mpicxx" CFLAGS=$FLAGS CXXFLAGS=$FLAGS ../configure --enable-mpi --enable-avx2 --enable-sse2 --prefix=$FFTWDIR/fftw3-hpcx --enable-shared --disable-static --enable-float
make -j 24
make install
```
### Gromacs hpc-x
```bash=
#/bin/bash
#PBS -P 50000041
#PBS -N install_gromacs
#PBS -l select=1:ncpus=24:mpiprocs=1:mem=10G
#PBS -l walltime=02:00:00
#PBS -q normal
#PBS -o out_install_gromace-hpcx.txt
#PBS -e err_install_gromace-hpcx.txt

FFTWLIB=/home/users/industry/ai-hpc/apacsc27/kerwin/program/fftw3-gcc/lib
FFTWINCLUDE=/home/users/industry/ai-hpc/apacsc27/kerwin/program/fftw3-gcc/include
GROMACE_IN=/home/users/industry/ai-hpc/apacsc27/kerwin/program
GROMACE_SU=/home/users/industry/ai-hpc/apacsc27/kerwin/source/gromacs-2020
#FLAGS="-march=haswell -lcrypt"
HPCX_HOME=/home/users/industry/ai-hpc/apacsc27/kerwin/source/hpcx-v2.4.0-gcc-MLNX_OFED_LINUX-4.4-2.0.7.0-redhat6.9-x86_64
HWLOC=/home/users/industry/ai-hpc/apacsc27/kerwin/program/hwloc/include

module purge
module use $HOME/kerwin/runmodule
module use $HPCX_HOME/modulefiles
module load cmake/3.14.4
module unload gcc/4.9.3
module load gcc/9.4.0
#module load gcc/6.5.0
module load hpcx-ompi
module load python/3.6.0
module load binutils/2.32
#module load hwloc/2.5.0
#module load composerxe/2018.0.128

module list

which mpicc

cd $GROMACE_SU
rm -r build
mkdir build && cd build

time -p CC="mpicc" CXX="mpicxx" CFLAGS=$FLAGS CXXFLAGS=$FLAGS cmake  .. \
	-DGMX_FFT_LIBRARY=fftw3 \
	-DFFTWF_LIBRARY=$FFTWLIB/libfftw3f.so \
	-DFFTWF_INCLUDE_DIR=$FFTWINCLUDE \
	-DGMX_SIMD=AVX2_256 \
	-DGMX_MPI=ON \
	-DGMX_OPENMP=ON \
	-DGMX_BUILD_MDRUN_ONLY=ON \
	-DBUILD_SHARED_LIBS=OFF \
	-DGMX_DOUBLE=OFF \
	-DGMX_GPU=OFF \
	-DGMX_HWLOC=OFF \
	-DCMAKE_INSTALL_PREFIX=$GROMACE_IN/gromacs-hpcx-hwloc \
	-DCMAKE_BUILD_TYPE=Release -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_VERBOSE_MAKEFILE=TRUE

time -p make -j 48 install
```
