Intro to Performance CS410 Project
The folder structure of the project breaks into four main directories. The table below contains all of these main directories with brief descriptions of what they each contain.
Directory | Description |
---|---|
build | Contains the VIC model source code, and needed scripts for compilation. |
data | Contains the VIC input data used in our study, as well as other data we found. |
results | Contains the results from the tests we executed. |
run | Contains the VIC release and debug executables compiled for Linux x86_64 . |
To compile the VIC binaries you will need to have the following dependencies installed.
- Make
- Build Essentials
After installing these on your system, execute the following commands.
$ cd build/
$ ./build.sh
The above commands will build both the release and debug versions of the VIC executable and put them in the run
directory.
To run the VIC executable, you will need to have first compile the binary, and then you will need an input data set with a global parameters file. For the Stehekin data set, execute the following commands.
$ cd data/Stehekin/
$ ../../run/vic_classic.exe -g parameters/global_param.STEHE.txt
NOTE: Use
vic_classic_debug.exe
for the VIC executable to use the debug version of VIC.
NOTE: This script must be ran with Python 3
The script run_test.py
is meant for running tests and gathering wall clock time on the execution of VIC over a specific data set. The script has the following command line arguments:
usage: run_tests.py [-h] [-bin BIN] [-n N] stats_result_file tests
positional arguments:
stats_result_file Result file to write statistical data to
tests JSON file defining tests to execute
optional arguments:
-h, --help show this help message and exit
-bin BIN Location of the VIC exe to execute
-n N Number of iterations to execute a test
An example of executing this script is:
$ python3 run_test.py results.csv tests.json
This will execute the tests defined in tests.json
and output the results of the tests to the results.csv
file.
The JSON configuration file has given to this script has the following structure:
{
"tests": [
{
"name": "<STRING>",
"working_dir": "<STRING>",
"global_params": "<STRING>",
"vic_results_dir": "<STRING>"
},
]
}
In this JSON file, tests
is a list of objects with the structure shown above. The keys correspond to the following data.
name
- Name of the testworking_dir
- Directory to execute the test fromglobal_params
- Location from theworking_dir
directory of the VIC global parameters filevic_results_dir
- Results directory for VIC to verify exists, and to create if it does not
This repo contains code from the VIC model source code, and is therefore subject to their licensing. For more information visit their documentation or GitHub repository linked below.