FronTier++ is configured and built using autoconf, configure, and make. For most users, it is the easiest to build FronTier++ using the wrapper shell script. For machines already registered, the autoconf is very easy, simply type: "./build -b".
This script sets some environment variables, calls autoconf and configure, and then optionally calls make. The build script has some command options to control the modules to compile, which can be seen by running "./build -h".
The build script recognizes a few systems commonly used by FronTier++ developers and users. For these platforms, the script should work automatically in batch mode without user intervention, assuming the user's environment has set up correctly.
For an unrecognized system, the build script will run in an interactive mode and prompts the user to enter some options for the compilers, PETSc, and HDF (zlib, jpeg and szip). The most basic set of environment variables is the compilers. In general you should specify proper MPI wrappers for C, C++, and FORTRAN compilers. If you specify the plain C or FORTRAN compilers instead of MPI wrappers, then FronTier++ will be compiled with MPI disabled. The most complex part of the configuration process is the specification for PETSc, since it may be platform and version dependent. In general, you should specify the root path for PETSc, the PETSC_ARCH variable, and PETSC_LIB. It is important that the PETSC_ARCH you specified matches with the MPI wrappers you specified; otherwise there may be compilation or runtime errors. After obtaining these options, build prints out the commands it would use to configure and build. You can copy and paste these commands for later use, or use them as a template for modification.
For more advanced users, you may want to configure and build FronTier++ manually, following three steps:
- Set environment variables;
- Call autoconf
- Call ./configure with additional options.
FronTier++ has a "configure.in" file, which will produce the configure file when "autoconf" is run in the FronTier++ directory.
- Configuring and building FronTier++ requires support for sh, GNU make, and the necessary compilers for C, and optionally MPI, PETSc and HDF.
1. Configuring for the FronTier++ Lite library:
- In the FronTier++ directory simply type "./configure", if you are unsure how to use this configuration script, or what configurations options are available, type "./configure --help". With this default configuration, all output will be in the VTK file format.
2. Configuring for parallel:
- FronTier++ supports parallel operation using the MPI protocol.
- The preferred implementation is openmpi. To build with parallel support and openmpi just type "./configure --with-openmpi=path_to_mpi", where path_to_mpi is the path in which openmpi is located.
- There is also support mpich. which can be configured using "./configure --with-mpich=path_to_mpich".
- To build with generic MPI support you can use: ./configure --with-mpi --with-extra-incs=inc_flags --with-extra-libs=lib_flags.
3. Building the FronTier++ with PETSc package:
- FronTier++ uses PETSc as linear solver in some applications. In the FronTier++/ directory simply type "./configure --with-petsc=petsc_path", where petsc_path is the directory the PETSc is installed.
- The inclusion of PETSc package enables FronTier++ to use elliptic solvers, parabolic solvers using implicit and Crank-Nicolson schemes. FronTier++ applications such as iFluid, rgbody, subsurf, crystal, finance, all call for PETSc solvers. Note that you may need to specify PETSC_ARCH, PETSC_INCLUDE, and PETSC_LIB variables on some platforms and/or for some PETSc builds.
4. Building the FronTier++ with HDF4 package:
Before building FronTier++ with HDF4, you need first to intall SZIP, JPEG and ZLIB. For more detailed information about how to install HDF4, refer to the tutorial.- FronTier++ uses HDF4 for 2D animation. In the FronTier++/ directory simply type "./configure --with-hdf=hdf_path", where hdf_path is the directory the HDF is installed.
- The inclusion of HDF package gives user capability of producing HDF files as output.
5. Building the FronTier++ with GD package:
- FronTier++ uses GD graphics library for 1D and 2D animations. In the FronTier++/ directory simply type "./configure --with-gd=gd_path", where gd_path is the directory the GD is installed.
- The inclusion of GD package gives user capability of producing animated gif files as output in some of the 1D and 2D problems.
To to compile what you have configured, in the FronTier++/ directory type "make".
After make has finished there will be a new subdirectory in FronTier++ called lib/ which will contain all libraries built in the distribution which were chosen, the FronTier++ version has four libraries:
- libutil.a: utility functions and macros for FronTier++
- libintfc.a: interface geometry functions and related calls for FronTier++
- libfront.a: propagation related functions and related calls for FronTier++
- libFronTier.a: a convenience library including the previous three