Skip to content

Instantly share code, notes, and snippets.

@appleparan
Last active October 7, 2018 06:27
Show Gist options
  • Save appleparan/0514d945bdb35fea9e832a83c678624d to your computer and use it in GitHub Desktop.
Save appleparan/0514d945bdb35fea9e832a83c678624d to your computer and use it in GitHub Desktop.
mpiP install from scratch
  • Assume that you already have quite recent version of gcc
  1. install binutils

    1. get recent version of https://ftp.gnu.org/gnu/binutils/

        cd ~
        mkdir src
      
    2. copy this file to src directory

        cd src
        tar zxvf binutils-2.31.tar.gz
        cd binutils
        ./configure --prefix=$HOME/usr/ --enable-shared --enable-64-bit-bfd
        make
        make install
      
    3. Add PATH for $HOME/usr/local/binutils

  2. Follow command to build mpiP : CFLAGS are needed to avoid config.h error in binutils. read this

CFLAGS="-DPACKAGE=mpiP -DPACKAGE_VERSION=3.4.1" ./configure --prefix=$HOME/usr --with-binutils-dir=$HOME/usr/local/binutils --enable-demangling=GNU --with-wtime 
make
make shared
make install
  1. Change your code Makefile to link with mpiP
CCFLAGS=-I$(HOME)/usr/local/binutils/include -I$(HOME)/usr/include  -DMPIIO
LIBS=-lmpiP -lbfd -liberty -lm -lunwind
LDFLAGS=-L$(HOME)/usr/local/binutils/lib -L$(HOME)/usr/lib -Wl,-rpath,$(HOME)/usr/local/binutils/lib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment