SEIMS is hosted on Github. SEIMS is dependent on several open-source software, e.g., GDAL andmongo-c-driver. Currently, there are no compiled binaries for distribution, but only through source code.
Users are encouraged to download and install (means compile from the source code) SEIMS manually. Generally, the master
branch of SEIMS repository (https://github.com/lreis2415/SEIMS/tree/master) is the relative stable version, while the dev
branch reflects the latest development changes and now is the default branch.
Users are highly recommended to take a look at the automatic workflow of installation and testing of SEIMS on Windows, Linux, and macOS through GitHub actions:
The configuration yml scripts are located in SEIMS/.github/workflows
.
Users can use git to clone the repository or download the compressed zip file directly.
master
or dev
branch using git.D:\demo
, right-click in the space and select “Git Bash Here”. Then, enter the following two commands to configure your basic settings of git, i.e., the username and email of your Github account.If it is the first time to use git in your computer, a SSH key should be created and added to your Github account.
First, type the following command to generate a SSH key and store to your user directory, e.g., C:/Users/XXX/.ssh/id_rsa.pub
ssh-keygen -t rsa -C "email@example.com"
Then, copy the content of this file and add to your Github account (“Settings” -> “SSH and GPG keys” -> “New SSH key”).
master
branch: git clone git@github.com:lreis2415/SEIMS.git --branch master --single-branch
master
branch, https://github.com/lreis2415/SEIMS/archive/master.zip) directly and then decompress it to a local directory without spaces, e.g., D:\demo
.Several software and libraries are required to compile and run SEIMS successfully.
conda
commandCMake 3.1+ is used to build the C/C++ project of SEIMS such as Microsoft Visual Studio solution (*.sln
). CMake can be downloaded from the official site https://cmake.org/download/. The installer is something like cmake-3.x.x-win64-x64.msi
for Windows64-x64. After the installation of CMake, please add the path of CMake executable, e.g., C:\Program Files (x86)\CMake\bin
, to the system variable PATH
. In such a way, we can run CMake in CMD (Command Prompt) directly by typing cmake rather than the absolute path.
SEIMS uses several features of C++11 such as nullptr
and auto
keywords. Therefore, the minimum support version is MSVC 2010. Microsoft Visual Studio is a powerful IDE based on Microsoft Visual C++. If you don’t want to install Microsoft Visual Studio, the Visual C++ build tools can allow you to build C++ libraries and applications targeting Windows desktop, which are the same tools that you find in Microsoft Visual Studio. Even though, Visual Studio is still highly recommended. If you want to develop parallel applications based on MPI, MSVC 2010 is the best choice since it is the last MSVC version that integrated the MPI cluster debugger. MPI cluster debugger is the most convenient and powerful tools on Windows to debug MPI-based parallel applications. More details about MPI cluster debugger can be found in https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/dd560809(v=vs.100). Otherwise, MSVC 2013, 2015, and 2019 are all supported and recommended. All these MSVC versions can be downloaded from https://visualstudio.microsoft.com/vs/older-downloads/.
GCC is recommended on Linux or macOS.
The macOS has the default variant of Clang, i.e., AppleClang, which excludes OpenMP. The Clang compiler installed through homebrew is highly recommended on Mac.
The Intel C++ compiler can be installed as an addon in Microsoft Visual Studio on Windows.
Microsoft MPI (MS-MPI) is a Microsoft implementation of the MPI (Message Passing Interface, https://www.mpi-forum.org/) standard for developing and running parallel applications on the Windows platform. MS-MPI v6 and later versions are recommended. Download MS-MPI (two installer files are required, i.e., msmpisdk.msi
and MSMpiSetup.exe
) from Microsoft download center, e.g., https://www.microsoft.com/en-us/download/details.aspx?id=47259 for MS-MPI v6, and install to the default locations. By default, the environment variables of MS-MPI will be set automatically. Open System->Advanced system settings->Environment variables->System variables
to make sure the following variable-value pairs are existed. If not, please add them manually with the correct paths of your computer.
MPICH can be install through homebrew on Mac.
OpenMPI can be install through homebrew on Mac.
The GISInternals support site maintained by Tamas Szekeres is the most famous site that provides compiled GDAL library by MSVC on Windows platform. Users should pick up the exact version according to your compiler and OS architecture, e.g., I have MSVC 2013 (_MSC_VER=1800) installed on Windows 10-64bit and I want GDAL-1.11.4 to compile 64-bit applications, so I should download the release-1800-x64-gdal-1-11-4-mapserver-6-4-3.zip
and release-1800-x64-gdal-1-11-4-mapserver-6-4-3-libs.zip
from archived releases (http://www.gisinternals.com/archive.php).
C:/GDAL
.%GDAL_PATHS%
to the end of the system variable PATH
.gdalinfo
. Open a new CMD window, and enter gdalinfo --version
, something like GDAL 1.11.4, released 2016/01/25
should be printed.On Ubuntu, the GDAL can be installed simply by apt-get
command:
Be default, the latest GDAL version will be installed.
On macOS, the GDAL can be installed simply by brew
command:
The mongo-c-driver library for MongoDB (https://github.com/mongodb/mongo-c-driver) is adopted by SEIMS to handle data Input/Output (IO) with MongoDB. Since mongo-c-driver is still under active and continuous development, the building method and API (Application Program Interface) functions may be different with versions. The last version supported by VS2010 is recommended, i.e., 1.16.2
. Any reported bugs caused by version compatible are welcome!
D:\demo\mongo-c-driver-1.16.2
Open VS201x Developer Command Prompt
and execute the following commands in order. Assume that the desired destination of compiled libraries and headers of mongo-c-driver is C:\mongo-c-driver-vs201x
.
Notes:
msbuild.exe
cannot be found by CMD, please find it in the path of .NetFramework, e.g., C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe
.C:\mongo-c-driver-vs201x
.%MONGOC_LIB%
to the end of the system variable PATH
.On Ubuntu, the GDAL can be installed simply by apt-get
command:
Be default, the latest GDAL version will be installed.
On macOS, the GDAL can be installed simply by brew
command:
Note: See the offical document for Compatibility Table Legend between mongo-c-driver and MongoDB server.
Given the requirements of flexible data structures, elastic scalability, and high performance, a widely used NoSQL database, MongoDB (https://www.mongodb.com), was adopted to manage all kinds of data in SEIMS. The free available version of MongoDB server is MongoDB community server which can be downloaded from the official website or installed using package management tools, e.g., apt-get and homebrew.
Download the previous stable release version 3.6.9 https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-ssl-3.6.9-signed.msi, or other proper version.
1. Installation and simple test
mongodb-win32-x86_64-2008plus-ssl-3.2.3-signed.msi
as example) to a local directory without spaces, e.g., D:\MongoDB
.D:\MongoDB\logs
) to store journal files.db
(e.g., D:\MongoDB\db
) to store data.D:\MongoDB\bin\mongod.exe --dbpath=D:\mongodb\db
Tue Oct 09 11:50:55 [websvr] admin web console waiting for connections on port 27017
This means MongoDB server has started successfully and the port 27017 is occupied by MongoDB.D:\MongoDB\bin\mongo.exe
If the last line is connecting to: test, the connection to MongoDB is successful. The default database named test is connected.If something like `{ "_id" : ObjectId("5c222fdff492e1436718e00b"), "Hello" : 0 }` showed in the last line, the key-value data (i.e., key is `hello` and value is `0`) has been inserted into the newly created collection `foo` in `test` database successfully.
exit
to leave MongoDB.D:\MongoDB\bin\mongod.exe --dbpath=D:\MongoDB\db --logpath=D:\MongoDB\logs\mongodb.log --install --serviceName "MongoDB"
D:\MongoDB\bin\mongod --install --serviceName "MongoDB" --serviceDisplayName "MongoDB" --logpath D:\MongoDB\logs\mongodb.log --logappend --dbpath D:\MongoDB\db --directoryperdb
To view, query, and update data stored in MongoDB, a user-friendly and efficient GUI is urgently needed. Robo 3T is what we need (https://robomongo.org/download). Download the proper version for your system and install it. Open Robo 3T and connect to the localhost:27017
(i.e., 127.0.0.1:27017
). The key-pair data we just inserted can be found.
Install Python environment for running SEIMS, including preprocess, postprocess, parameters_sensitivity, calibration, and scenario_analysis
We recommend to use Python3.x, although Python2.7 is still supported. Conda
is highly recommended to run pySEIMS. Please use the following commands in Anaconda or Miniconda shell to create a new python environment for SEIMS.
See this commit for more information about GDAL versions' compatibility for C++ and Python environments.
Now, we have set up the C/C++ building environment for SEIMS, e.g., MSVC 2015, MS-MPI v6, GDAL 1.11.4, and mongo-c-driver 1.16.2. In case of any unpredictable omissions or errors, users are highly recommended to test the C/C++ building environment by compiling the Common Cross-platform Geographic-computing Library (CCGL, https://github.com/crazyzlj/CCGL) and running its unit test. CCGL has been integrated into SEIMS and no additional download is required.
Common commands to compile CCGL and run unit tests:
Specifically, for users using MSVC on Windows, please follow the steps below:
D:\demo\SEIMS\seims\src\ccgl
, and assume the directory for building CCGL is D:\compile\CCGL_vs2015
.FAILED
tests occurred, you should check the settings of prerequisite software and libraries carefully. If you do not sure what the errors mean, please contact the developers for supports.SEIMS is mainly written by C++ and Python. Python is an interpreted language which means the source code can be executed directly under the Python environment without any manual compilation. Therefore, the installation of SEIMS is the compilation and installation of C++ applications. The C++ applications of SEIMS not only include the main programs and modules for watershed modeling, but also the integrated programs for preprocessing such as watershed delineation by TauDEM (http://hydrology.usu.edu/taudem/taudem5/index.html) and static task scheduling with the graph of subbasins by METIS (http://glaros.dtc.umn.edu/gkhome/metis/metis/overview). All the C++ applications are organized by CMake and can be built, compiled, and installed at one time.
Common commands to compile SEIMS:
Specifically, for users using MSVC on Windows, please follow the steps below:
D:\demo\SEIMS
.msbuild.exe
. D:\demo\SEIMS\build\bin
.