COMPILE PPM 1.0
1. compile vizing:
1.1 vizing is written by older c++ standard, hence the latest version of g++ can't work,
2.1 the g++ version 34 "g++34" is employed to compile the code.
2. compile the metis library.
2.1 the metis include the the ppm-1.0.1 has problem to compile, the error is related to __log2. The error message is "/usr/include/bits/mathcalls.h:145: note: previous declaration of ‘__log2’ was here". Hence, use the metis library download from the PPM, address: http://www.ppm-library.org/index.php/download
2.2 replace the metis by metis4 and copy the library to "libmetis.a"
3. install fftw3
3.1 download fftw3 from : http://www.fftw.org/download.html
3.2 unpack the fftw3 by: tar xvzf fftw-3*.tar.gz
3.3 configure the fftw3 : ./configure
3.4 make the fftw3 : make
3.4 install the fftw3: sudo make install
3.5 the detail procedure can see INSTALL
3. compile the PPM library.
3.1 set the file in Make.userprefs: change FC as the setting mpif90
e.g : FC:=/usr/bin/mpif90
3.2 set the FFTWDIR ( check where the FFTW installed by the following command :
rpm -ql fftw )
e.g : FC:=/home/tmsxh/fftw-3.3
3.3 change the compiler flag in ppm_define.h
3.4 in order to get the preporcessed source file of PPM libaray comment the following line in file "Makefile.static", the program will not remove the preporcessed fortran file.
# @rm $(OBJ_DIR)/__$*.f
the preprocessed fortran code are stored in folder
COMPLIE PPM 1.2
1. install the metis libaray.
2. configure the library before compile by: ./configure --enable-mpi=mpich2 FC=/usr/bin/mpif90 --enable-linux LDFLAGS=-L./metis4/lib
2.1 –enable-mpi= mpich2 : specify the mpich2 is employed as mpi library;
2.2 FC = /usr/bin/mpif90 : specify the fortran MPI compiler; the mpif90 need to configured, before compile the PPM library;
2.3 LDFLAGS= : specify the location of metis library and other library.
3. compile the PPM library by : make
4. install the PPm library by : sudo make install
the install will copy the “include” library to: /usr/local/include/ppm
and “library” to : /usr/local/lib