Usually, HYPRE can be built by simply typing configure followed by make in the top-level source directory.
To automatically generate machine specific makefiles, type configure in the top level directory. The configure script is a portable script generated by GNU Autoconf. It runs a series of tests to determine characteristics of the machine on which it is running, and it uses the results of the these tests to produce the machine specific makefiles, called `Makefile', from template files called `Makefile.in' in each directory. Once the makefiles are produced you can run make as you would with any other makefile.
The configure script primarily does the following things:
The configure script makes these decisions based on a hierarchical check. First, it attempts to identify the machine on which it is running as a specific supported machine. Next it will try to identify the architecture as a supported architecture. If both of these fail, generic default decisions are made by the script. However, the script does have some command-line options that can give you control over the choices it will make. You can type configure -help to see the list of all of the command-line options to configure. This is the best resource for information on configure options. Below is some additional helpful information. Be aware that not all command line options have been tested on all machines and architectures, even supported machines and architectures.
PATH
. To specify another BLAS library available, use
-with-BLAS=pathname or
-with-BLAS=link list. To configure and compile without
BLAS use the -without-BLAS option.
Configure automatically generates a file HYPRE_config.h
that
includes all the header files found to be necessary by configure.
This file may be used to see how a compiled version of the library was
configured and may also be included by the user in his/her own code.
A program linking with HYPRE must be compiled with -I$HYPRE_DIR/include and linked with -L$HYPRE_DIR/lib -lhypre library name... -lhypre library name..., where $HYPRE_DIR is the directory where HYPRE is installed. Additionally, any other libraries to which HYPRE is linked must also be linked to by the users application. For example, the BLAS library or PETSc library are often (but not always) linked in by HYPRE and would also need to be linked in by the users application.
It may be useful to reference the Makefile
in the test
subdirectory. This makefile is designed to build test applications
that link with and call HYPRE. All include and linking flags that
are used by HYPRE and needed by these test applications get
exported to this file by the configure
script.