Skip to content

Latest commit

 

History

History
226 lines (163 loc) · 6.17 KB

BUILD.md

File metadata and controls

226 lines (163 loc) · 6.17 KB

Installation Guide

Target Environments

Type Target Env. Approach
(a) GPU cluster GPU + OpenMP + MPI
(b) CPU cluster OpenMP + MPI
(c) GPU node GPU + OpenMP
(d) CPU node OpenMP

Requirement

Library GPU cluster CPU cluster GPU node CPU node Note
FFTW3 yes yes yes yes --enable-float required (FAQ)
MPI (e.g. OpenMPI) yes yes
CUDA Toolkit yes yes ver >= 5.0 required
CUDA SDK code samples yes yes same version as toolkit

For more detailed build information, please reffer to the FAQ page.

Section Link

Please select appropriate section for your environment:


(a) Compile for GPU cluster (GPU & MPI)

1. Get source code and change directory

# from GitHub (clone)
git clone https://github.com/akiyamalab/MEGADOCK.git
cd MEGADOCK

# from GitHub (zip)
wget https://github.com/akiyamalab/MEGADOCK/archive/master.zip
unzip master.zip
cd MEGADOCK-master

2. Edit Makefile (PATH, options)

CUDA_INSTALL_PATH ?= your/cuda/toolkit/install/path # default: /usr/local/cuda
CUDA_SAMPLES_PATH ?= your/cuda/sdk/install/path     # default: /usr/local/cuda/samples
FFTW_INSTALL_PATH ?= your/fftw/library/install/path # default: /usr/local
CPPCOMPILER       ?= g++                            # default: g++ (or icpc, others)
MPICOMPILER       ?= mpicxx                         # default: mpicxx (or others)
OPTIMIZATION      ?= -O3                            # 
OMPFLAG           ?= -fopenmp                       # default: -fopenmp (g++), or -openmp, -qopenmp (intel)
USE_GPU := 1
USE_MPI := 1

3. generate binary

After completion of make command, a binary file megadock-gpu-dp will be generated.

# build a binary
make

# see help
megadock-gpu-dp -h

(b) Compile for MPI cluster (MPI)

1. Get source code and change directory

# from GitHub (clone)
git clone https://github.com/akiyamalab/MEGADOCK.git
cd MEGADOCK

# from GitHub (zip)
wget https://github.com/akiyamalab/MEGADOCK/archive/master.zip
unzip master.zip
cd MEGADOCK-master

2. Edit Makefile (PATH, options)

FFTW_INSTALL_PATH ?= your/fftw/library/install/path # default: /usr/local
CPPCOMPILER       ?= g++                            # default: g++ (or icpc, others)
MPICOMPILER       ?= mpicxx                         # default: mpicxx (or others)
OPTIMIZATION      ?= -O3                            # 
OMPFLAG           ?= -fopenmp                       # default: -fopenmp (g++), or -openmp, -qopenmp (intel)
USE_GPU := 0
USE_MPI := 1

3. generate binary

After completion of make command, a binary file megadock-dp will be generated.

# build a binary
make

# see help
megadock-dp -h

(c) Compile for GPU node (GPU)

1. Get source code and change directory

# from GitHub (clone)
git clone https://github.com/akiyamalab/MEGADOCK.git
cd MEGADOCK

# from GitHub (zip)
wget https://github.com/akiyamalab/MEGADOCK/archive/master.zip
unzip master.zip
cd MEGADOCK-master

2. Edit Makefile (PATH, options)

CUDA_INSTALL_PATH ?= your/cuda/toolkit/install/path # default: /usr/local/cuda
CUDA_SAMPLES_PATH ?= your/cuda/sdk/install/path     # default: /usr/local/cuda/samples
FFTW_INSTALL_PATH ?= your/fftw/library/install/path # default: /usr/local
CPPCOMPILER       ?= g++                            # default: g++ (or icpc, others)
OPTIMIZATION      ?= -O3                            # 
OMPFLAG           ?= -fopenmp                       # default: -fopenmp (g++), or -openmp, -qopenmp (intel)
USE_GPU := 1
USE_MPI := 0

3. generate binary

After completion of make command, a binary file megadock-gpu will be generated.

# build a binary
make

# see help
megadock-gpu -h

(d) Compile for CPU node (only thread parallelization)

1. Get source code and change directory

# from GitHub (clone)
git clone https://github.com/akiyamalab/MEGADOCK.git
cd MEGADOCK

# from GitHub (zip)
wget https://github.com/akiyamalab/MEGADOCK/archive/master.zip
unzip master.zip
cd MEGADOCK-master

2. Edit Makefile (PATH, options)

FFTW_INSTALL_PATH ?= your/fftw/library/install/path # default: /usr/local
CPPCOMPILER       ?= g++                            # default: g++ (or icpc, others)
OPTIMIZATION      ?= -O3                            # 
OMPFLAG           ?= -fopenmp                       # default: -fopenmp (g++), or -openmp, -qopenmp (intel)
USE_GPU := 0
USE_MPI := 0

3. generate binary

After completion of make command, a binary file megadock will be generated.

# build a binary
make

# see help
megadock -h

Clean up

# remove generated files
make allclean

Note for compilation

  • USE_MPI and USE_GPU flags in Makefile should be 1 or 0 for all compilations. If the white spaces exist at end of the line, those flags will be ignored.
  • For GPU use, SM_VERSIONS can specity the target NVIDIA GPU architectures of the generated binary. Please change it for your target system. (Default: sm_60)