-
Notifications
You must be signed in to change notification settings - Fork 66
General Build instructions
You will need `git` installed for this.
git clone https://github.com/SCOREC/core.git scorec
MPI is a required third-party library, there are two good implementations:
Note that when using the jessie version of mpich -lpthread has to be added directly via -DCMAKE_CXX_FLAGS.
Zoltan and ParMetis are strongly recommended third-party libraries. Note, Zoltan must be built against the ParMETIS install and they must both use the same size indices.
It is recommended that you add the installation paths of third-party libraries to the environment variable
CMAKE_PREFIX_PATH
which will make the following step go a lot smoother
If core is built with SIMMETRIX_ENABLED than an install of Simmetrix's SimModSuite is required. As of SCOREC/core@88b247a SimModSuite version 11.0.170411dev (or newer) is required.
You will need `cmake` installed for this. An example configure script is provided
cd scorec mkdir build cd build source ../example_config.sh
For more advanced configuration, here is a description of some available options:
- Required: Set
-DCMAKE_C_COMPILERto /path/to/C/mpi/compiler/wrapper - Required: Set
-DCMAKE_CXX_COMPILERto /path/to/C++/mpi/compiler/wrapper - Optional: Set C and CXX compiler flags:
- Note:
-DCMAKE_C_FLAGSdoes not affect the build. - Note:
-DCMAKE_CXX_FLAGSdoes not affect the build. -
-DSCOREC_CXX_OPTIMIZEdefaults toONto set the cxx flag"-O2" -
-DSCOREC_CXX_SYMBOLSdefaults toONto set the cxx flags"-g" -
-DSCOREC_CXX_WARNINGSdefaults toONto set the cxx flags"-Werror -Wextra -Wall" - Set
-DSCOREC_EXTRA_CXX_FLAGSto specify cxx flags in addition to the above - Set
-DSCOREC_CXX_FLAGSto override all previously set cxx flags
- Note:
- Optional: Set
-DCMAKE_INSTALL_PREFIXto the directory where headers, libs, and binary files are installed when 'make install' is ran. - Optional: Specifying CMake dependency install locations
- Set
-DCMAKE_PREFIX_PATHto the prefix directories for optional components instead of setting the INSTALL_PREFIX for each component.
- Set
- Optional: Enable support for Simmetrix libraries
- Set
-DENABLE_SIMMETRIX=True - Set
-DSIM_MPI="mpich3.1.2", this string depends on your Simmetrix installation - Set
-DSIM_PARASOLID=Trueif the Simmetrix Parasolid interface is also desired - Set
-DSIM_ACIS=Trueif the Simmetrix ACIS interface is also desired
- Set
- Optional: Disable building executables
- Set
-DBUILD_EXES=False
- Set
- Optional: Build all executables and prepare for testing
- Set
-DIS_TESTING=True
- Set
- Optional: Build shared libraries (static libs are built by default)
- Set
-DBUILD_SHARED_LIBS=True
- Set
- Optional: Specifying ParMETIS and ZOLTAN install locations
- Set
-DMETIS_LIBRARYto /path/to/lib/libmetis.a - Set
-DPARMETIS_LIBRARYto /path/to/lib/libparmetis.a - Set
-DPARMETIS_INCLUDE_DIRto /path/to/parmetis/include where parmetis.h is located - Set
-DZOLTAN_LIBRARYto /path/to/lib/libzoltan.a - Set
-DZOLTAN_INCLUDE_DIRto /path/to/zoltan/include where zoltan.h is located
- Set
- Optional: Enable support for parts with more than ~30M elements
- Set
-DMDS_ID_TYPE='long'
- Set
- Optional: Enable support for
.smbcompression through ZLib- Set
-DPCU_COMPRESS=True
- Set
- Optional: (For advanced usage) Maximum buffer size for adjacency computation
- Set
-DMDS_SET_MAXto the desired upper bound
- Set
- Optional: (For advanced usage) Compile a "Release" build
- Set
-DSCOREC_CXX_FLAGS="-O3 -DNDEBUG -Wall -Wextra"or - Set
-DCMAKE_BUILD_TYPE=Release
- Set
- Optional: (For level 20 mesh masters) Disable VTK compression if you are working with a huge (> 20M ?) serial mesh
- Set
-DLION_COMPRESS=OFF
- Set
To compile all the libraries, use
make -j 4
When IS_TESTING=True in CMake, all executables will build by default. Otherwise, only the "utility" executables such as partitioners and file converters are build by default.
The executables are then available in
core/build/test/
To install the libraries and headers after defining CMAKE_INSTALL_PREFIX, run
make install
Download the test meshes
git clone [email protected]:SCOREC/pumi-meshes.git
Reconfigure with MESHES and IS_TESTING defined
-DIS_TESTING=True -DMESHES="/path/to/meshes"
Rebuild
make -j 4
Run CTest
ctest -VV