Created
October 9, 2018 09:27
-
-
Save dleutnant/872ee59a2140bd068bc84a756a5ce223 to your computer and use it in GitHub Desktop.
How to compile SWMM5 library on Debian with GCC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# change dir | |
cd ~ | |
# download swmm source code from epa website | |
wget https://www.epa.gov/sites/production/files/2018-08/swmm51013_engine_0.zip | |
# unzip engine files | |
unzip swmm51013_engine_0.zip | |
# extract makefiles to directory "MakeFiles" | |
unzip makefiles.zip -d MakeFiles | |
# extract source code to directory "source51013" | |
unzip source5_1_013.zip -d source51013 | |
# extract makefile to compile the shared object library (note: we overwrite the existing Readme.txt with the "-o" argument) | |
unzip -o MakeFiles/GNU-LIB.zip | |
# copy the Makefile to the directory containing the swmm5 source files | |
cp Makefile source51013/ | |
# change directory | |
cd source51013/ | |
# modify Makefile to avoid "/usr/bin/ld: swmm5.o: relocation R_X86_64_PC32 against symbol `ErrorCode' | |
# can not be used when making a shared object; recompile with -fPIC" error | |
sed -i "2i CFLAGS= -fPIC" Makefile | |
# compile the shared object library | |
make |
Thanks very much @dleutnant, I was able to successfully compiled the swmm5 and ran it with my model copying the external files into Linux and updating the file path. I am very grateful.
Hello, please is there a way to run a continuous model from command line. For example, run a simulation today and want tomorrow's simulation to start from yesterday's simulation. Somehow , the way .hsf file works in the GUI.
Your issue is not related to the gist. The swmm mailing list is more appropriate in this respect.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Your issue is not related to the gist. The swmm mailing list is more appropriate in this respect. Also, please make sure to read the chapter about error codes in the swmm manual. Anyway, I think you should check your file paths and make sure external files are accessible.