Hypre: Difference between revisions
From charlesreid1
| Line 37: | Line 37: | ||
The <code>-DMPIPP_H</code> compiler flags are only required for [[LAM MPI]] and [[OpenMPI]]; they are not needed if you use any other MPI install (e.g. MPICH). | The <code>-DMPIPP_H</code> compiler flags are only required for [[LAM MPI]] and [[OpenMPI]]; they are not needed if you use any other MPI install (e.g. MPICH). | ||
== Installation Errors == | |||
If you see an error like this: | |||
<syntaxhighlight lang="bash"> | |||
/usr/bin/ld: /path/to/hypre/src/utilities/dlamch.o: | |||
relocation R_X86_64_32S against `a local symbol' can not be used when making | |||
a shared object; recompile with -fPIC | |||
/path/to/hypre/src/utilities/dlamch.o: | |||
could not read symbols: Bad value | |||
collect2: ld returned 1 exit status | |||
</syntaxhighlight> | |||
Then you need to edit /path/to/hypre/src/lapack/Makefile, and add -fPIC as shown below: | |||
<syntaxhighlight lang="make"> | |||
dlamch.o : dlamch.c ${LAPACK_HEADERS} | |||
${CC} -c -fPIC dlamch.c | |||
</syntaxhighlight> | |||
= Resources = | = Resources = | ||
Revision as of 21:06, 6 October 2010
Hypre is a massively parallelizable linear solver library written and designed for use in C++. It provides many nice features and objects beyond simple "matrix" or "vector" objects - these include grids, meshes, and stencils. It was developed at Lawrence Livermore National Lab.
Installation
Installing Hypre can be tricky. The documentation will give much more in-depth details than this page. Links to the documentation are available at https://computation.llnl.gov/casc/hypre/software.html .
Dependencies
Hypre will require an installation of MPI on your machine. I use LAM MPI, but you can also use OpenMPI.
Configuration
Download the hypre tarball and decompress it. Put your configure wrapper into the src/ directory of the decompressed Hypre tarball.
Mac OS X
This configure line has been used to build Hypre 2.0.0, which is the latest stable release. It has not been tested on beta releases.
#!/bin/sh
#
# run configure
# make
# make install
./configure \
--with-MPI-include=/path/to/lam-mpi/include \
--with-MPI-lib-dirs=/path/to/lam-mpi/lib \
--with-MPI-libs="mpi lam pmpi util" \
--prefix=/path/to/hypre \
\
F77=/usr/local/bin/gfortran \
\
CFLAGS=-DMPIPP_H \
CXXFLAGS=-DMPIPP_H
The -DMPIPP_H compiler flags are only required for LAM MPI and OpenMPI; they are not needed if you use any other MPI install (e.g. MPICH).
Installation Errors
If you see an error like this:
/usr/bin/ld: /path/to/hypre/src/utilities/dlamch.o:
relocation R_X86_64_32S against `a local symbol' can not be used when making
a shared object; recompile with -fPIC
/path/to/hypre/src/utilities/dlamch.o:
could not read symbols: Bad value
collect2: ld returned 1 exit status
Then you need to edit /path/to/hypre/src/lapack/Makefile, and add -fPIC as shown below:
dlamch.o : dlamch.c ${LAPACK_HEADERS}
${CC} -c -fPIC dlamch.c
Resources
Hypre home page - http://acts.nersc.gov/hypre/