SUMMA-Actors: Structure for Unifying Multiple Modeling Alternatives with Actors
SUMMA-Actors is a modified version of the already existing SUMMA software that can be found here. SUMMA-Actors uses the Actor Model to increase scalability and fault-tolerance. It is built using the C++ Actor Framework.
Documentation
A more in-depth documentation can be found here. SUMMA-Actors depends on many files from the original SUMMA repo. Below is a quick start guide for compiling and running SUMMA-Actors, please consult our wiki for more in-depth documentation. Consider creating an issue for any missing documentaion, asking questions, or providing suggestions.
Directory Structure
SummaActors is set up with the following sub-directoies, we will consider the top level Summa Actors directory the root_dir
:
- bin
- build
- cmake
- includes
- makefiles
- source
- summa (https://github.com/CH-Earth/summa)
- utils
- README.md
First clone Summa-Actors to your workstation. Then cd into build/
and clone summa
or summa-sundials
into Summa-Actor's build directory.
Compiling Summa-Actors
To compile SUMMA-Actors, use cmake
with the CMakeLists.txt
located in build/cmake/
. You have the option to compile with or without the sundials library, definded by the line option(SUNDIALS "Use SUNDIALS" ON)
in the CMakeLists.txt
file. If set to ON
, it compiles with sundials. If set to OFF
, it compiles without sundials.
If compiling with sundials make sure to install the sundials IDA solver version 6.3.0
before attempting to compile SUMMA-Actors. Once installed specifiy the instalation directory of sundials by modifying the line set(DIR_SUNDIALS "/path/to/sundials/libs")
in the CMakeLists.txt
file.
Before compiling, make sure to install the following dependencies:
- g++
- gfortran
- NetCDF-Fortran
- OpenBLAS
- C++ Actor Framework
Here are the steps to compile SUMMA-Actors:
- cd into
build/cmake/
- create a build directory within the
build/cmake/
directory - cd into
build/cmake/build
- run
cmake ..
- run
make -j
- The
summa_actors
executable is created in thebin/
directory.
SUMMA-Actors supports four build types: Debug, Cluster, Release, and Cluster_Debug. The default build type is Release. You can set the build type by using the -DCMAKE_BUILD_TYPE=build_type
option, where build_typ
e is one of the four options listed above. To compile with the Cluster build type, make sure to load the following modules with module load
before compiling when working on clusters:
- gcc/9.3.0
- netcdf-fortran
- openblas
- caf
Running SUMMA-Actors
Running SUMMA-Actors is done with the following command: ./summa_actor -g startGRU -n numGRU -c path_to_config_file
The values for -g and -n are integers where -c is the full path to the configuraiton file for summa actors.
The configuration file is a json file. The contents of the JSON file are below:
{ "Distributed_Settings": { "distributed_mode": false, "servers_list": [{"hostname": "simlab01"}, {"hostname": "simlab05"}], "port": 4444, "total_hru_count": 517315, "num_hru_per_batch": 1000 },
"Summa_Actor": {
"max_gru_per_job": 500
},
"File_Access_Actor": {
"num_partitions_in_output_buffer": 4,
"num_timesteps_in_output_buffer": 500
},
"Job_Actor": {
"file_manager_path": "/gladwell/kck540/Sundials_Settings/fileManager_actors.txt",
"output_csv": false,
"csv_path": ""
},
"HRU_Actor": {
"print_output": true,
"output_frequency": 1000
}
}
The settings above should work for most use cases, some of the feautures we want to automate such as max_gru_per_job. However, the only field that you should have to adjust is the file_manager_path
. This is the path to the file that manages the complete configuration of the SUMMA simulation. The summa confiuration files are explained in more depth in the follwoing (documentation)[https://summa.readthedocs.io/en/latest/input_output/SUMMA_input/]
Credits
The inital implementation of SUMMA is credited to the inital publications below. These publications can be found in Water Resources Research.
-
Clark, M. P., B. Nijssen, J. D. Lundquist, D. Kavetski, D. E. Rupp, R. A. Woods, J. E. Freer, E. D. Gutmann, A. W. Wood, L. D. Brekke, J. R. Arnold, D. J. Gochis, R. M. Rasmussen, 2015a: A unified approach for process-based hydrologic modeling: Part 1. Modeling concept. Water Resources Research, doi:10.1002/2015WR017198.
-
Clark, M. P., B. Nijssen, J. D. Lundquist, D. Kavetski, D. E. Rupp, R. A. Woods, J. E. Freer, E. D. Gutmann, A. W. Wood, D. J. Gochis, R. M. Rasmussen, D. G. Tarboton, V. Mahat, G. N. Flerchinger, D. G. Marks, 2015b: A unified approach for process-based hydrologic modeling: Part 2. Model implementation and case studies. Water Resources Research, doi:10.1002/2015WR017200.
We also credit the original creators of the C++ Actor Framework which allowed us to implement the actor model into SUMMA-Actors. Links to their research work can be found below.
-
Charousset, D., Schmidt, T. C., Hiesgen, R., Wählisch, M., 2013: Native actors: a scalable software platform for distributed, heterogeneous environments. AGERE!, doi:10.1145/2541329.2541336.
-
Charousset, D., Schmidt, T. C., Hiesgen, R., 2016: Revisiting actor programming in C++. Computer Languages, Systems & Structures, [doi:10.1016/j.cl.2016.01.002](http:// dx.doi.org/10.1016/j.cl.2016.01.002)