Last active
September 26, 2015 06:57
-
-
Save memmett/1057694 to your computer and use it in GitHub Desktop.
Various build instructions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GCC on orga | |
=========== | |
First, download and install GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+. Also ISL. | |
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
unset LD_LIBRARY_PATH | |
unset CXXFLAGS | |
cd gmp-4.3.2 | |
./configure --prefix=$HOME/opt | |
make -j 8 install | |
cd isl-0.12.2 | |
./configure --prefix=$HOME/opt --with-gmp-prefix=$HOME/opt | |
make -j 8 install | |
cd mpfr-2.4.2 | |
./configure --prefix=$HOME/opt --with-gmp=$HOME/opt | |
make -j 8 install | |
cd mpc-0.8.1 | |
./configure --prefix=$HOME/opt --with-gmp=$HOME/opt --with-mpfr=$HOME/opt | |
make -j 8 install | |
export LD_LIBRARY_PATH=$HOME/opt/lib:$HOME/opt/lib64 | |
cd gcc-4.9.1 | |
./configure --enable-languaes=c,c++,fortran --disable-multilib --prefix=$HOME/opt --with-gmp=$HOME/opt --with-mpfr=$HOME/opt --with-mpc=$HOME/opt --with-isl=$HOME/opt | |
make -j 8 | |
make install | |
PETSc on orga | |
============= | |
Using gcc 4.7 installed in /home/memmett/gcc-4.7: | |
export PATH=/home/memmett/gcc-4.7/bin:$PATH | |
unset CXXFLAGS | |
cd /home/memmett/projects/petsc | |
./configure CXXFLAGS=-D__USE_XOPEN2K8 --with-shared-libraries --with-cmake=/home/memmett/opt/bin/cmake --download-fblaslapack --with-c2html=0 --with-sowing=0 | |
make PETSC_DIR=/home/memmett/projects/petsc PETSC_ARCH=arch-linux2-c-debug all | |
Subsequently, to build a PETSc example: | |
make PETSC_DIR=/home/memmett/projects/petsc PETSC_ARCH=arch-linux2-c-debug exXX | |
Now that I have gcc4.9: | |
./configure --with-shared-libraries --with-cmake=/home/memmett/opt/bin/cmake --download-fblaslapack --download-c2html --download-sowing | |
MPICH2 | |
====== | |
Debugging: -- | |
Optimized: --enable-fast=all,-O3 | |
Compile: | |
$ PREFIX=$HOME/venv/killdevil_mpich2 | |
$ ./configure --prefix=$PREFIX --enable-shared --without-mpe | |
$ make | |
$ make install | |
FFTW3 | |
===== | |
Compile: | |
$ PREFIX=$HOME/venv/killdevil_sysmpich2 | |
$ ./configure --prefix=$PREFIX --enable-shared --enable-threads --enable-openmp --enable-mpi --enable-sse2 | |
$ make | |
$ make install | |
$ pip install PyFFTW3 | |
h5py | |
==== | |
$ export HDF5_DIR=$PREFIX | |
$ pip install h5py | |
HDF5 | |
==== | |
Fortran support: --enable-fortran | |
Shared lib: --enable-shared | |
MPI: --enable-parallel | |
May need to do: | |
$ export FC=mpif90 | |
$ export CC=mpicc | |
Then, compile: | |
$ export PREFIX=$HOME/opt | |
$ ./configure --prefix=$PREFIX --enable-shared --enable-fortran --enable-parallel | |
$ gmake -j 4 | |
$ gmake install | |
PETSc on OpenBSD | |
================ | |
Install prerequisites: | |
$ sudo pkg_add py-scipy | |
$ sudo pkg_add openmpi | |
$ sudo pkg_add cmake | |
$ sudo pkg_add mercurial | |
Checkout the source: | |
$ hg clone http://petsc.cs.iit.edu/petsc/petsc-dev | |
$ cd petsc-dev | |
Configure: | |
$ export PETSC_DIR=$PWD | |
$ ./config/configure.py --with-shared-libraries --with-dynamic-loading --with-fortran=0 --with-x=0 --with-cmake=/usr/local/bin/cmake | |
Build: | |
$ cd arch-openbsd* | |
$ make | |
Test: | |
$ cd .. | |
$ make test | |
PETSc on Debian | |
=============== | |
Similar to above, except: | |
$ ./config/configure.py --with-shared-libraries --with-dynamic-loading --with-fortran=0 --with-x=0 --with-cmake=/usr/bin/cmake --with-c2html=0 | |
PETSc on Fedora | |
=============== | |
./config/configure.py --with-shared-libraries --with-dynamic-loading --with-fortran=0 --with-cmake=/usr/bin/cmake --with-c2html=0 --ldflags='-L/usr/lib64' | |
petsc4py on OpenBSD | |
=================== | |
Install Cython: | |
$ pip install cython | |
Checkout the source: | |
$ hg clone https://petsc4py.googlecode.com/hg/ petsc4py | |
$ cd petsc4py | |
Build and install: | |
$ python setup.py build | |
$ python setup.py install | |
Test: | |
$ python tests/test-vec.py | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment