|
libsc
2.8.7
The SC library provides support for parallel scientific applications.
|
sc Auxiliary Library The sc library provides functions and data types that can be useful in scientific computing. It is part of the p4est project, which uses it extensively. Consequently, it is also a dependency of all projects that use p4est. Some of the more important features are the following:
sc but also available to other projects for convenience. It is possible to nest packages this way, conveniently via git sumbodules.sc_mpi_*. With MPI enabled, they just call the corresponding MPI function. In case sc is configured without MPI (the conservative default), they implement initialize/finalize and collective calls as noops, which means that the sc_mpi_* calls do not have to be protected with the #ifdef SC_MPI construct in the code.To build from a fresh checkout, call ./bootstrap first. Then proceed as described next (building from a tar distribution). The bootstrap script usually does not need to be re-executed!
To build the sc library from a tar distribution, use the standard procedure of the GNU autotools. The configure script is best called from a new empty directory with a relative path to the source. It takes the following options:
--enable-debug (recommended for development) lowers the log level for increased verbosity and activates the SC_ASSERT macro for consistency checks.--enable-mpi (recommended in general) expects a working MPI build environment, pulls in the mpi.h include file and activates the MPI compiler wrappers. If this option is not given, trivial wrappers for MPI routines are activated, the simpler ones of which run fine, and the code is expected to be executed in serial only.A typical development configure line looks as follows:
relative/path/to/configure CFLAGS="-Wall -O0 -g" --enable-mpi --enable-debug
A typical production configure line looks as follows:
relative/path/to/configure CFLAGS="-Wall -O2" --enable-mpi
To specify a target path for make install add a --prefix=<installdir> option.
The CMake build works as usual with that system. There are analogous options to enable the MPI compile and debug mode.