libsc 2.8.6
The SC library provides support for parallel scientific applications.
The sc Auxiliary Library
Author
Carsten Burstedde, Lucas C. Wilcox, Tobin Isaac et.al.

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:

  • The build system is based on the GNU autotools. Several macro files reside in the config/ subdirectory. These are used in sc but also available to other projects for convenience. It is possible to nest packages this way.
  • The library provides MPI wrappers in case it is configured without MPI. They implement initialize/finalize and collective calls as noops, which means that these do not have to be protected with the #ifdef SC_MPI construct in the code.
  • The library provides a logging framework that can be adapted by other packages. Multiple log levels are available, as well as options to output on just one or all MPI processes.
  • The library provides a set of data containers, such as dynamically resizable arrays.

To build the sc library from a tar distribution, use the standard procedure of the GNU autotools. The configure script takes the following options:

  • --enable-debug lowers the log level for increased verbosity and activates the SC_ASSERT macro for consistency checks.
  • --enable-mpi pulls in the mpi.h include file and activates the MPI compiler wrappers. If this option is not given, wrappers for MPI routines are used instead and the code is compiled in serial only.
  • --disable-mpiio may be used to avoid using MPI_File based calls. The usage of --disable-mpiio is deprecated and should not be used anymore.

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

See also
https://www.p4est.org/
https://www.gnu.org/licenses/licenses.html