Syncrosim › Forums › ST-Sim & State-and-Transition Simulation Models › Problem running spatially explicit models using the Linux command line utilities
- This topic has 8 replies, 3 voices, and was last updated 7 years, 7 months ago by leonardo-frid.
-
AuthorPosts
-
August 4, 2016 at 2:56 pm #3985Mike GoughParticipant
I’m trying to run a spatially explicit ST-Sim model using the Linux command line utilities. The models run fine from the SyncroSim 3.0 GUI, but attempting to run the same models using the command line utilities results in errors (on both Windows & Linux w/ Mono & GDAL).
On Windows, I’ve tried issuing the following command:
SyncroSim.Console.exe –run –lib=C:/Temp/ST-Sim-Spatial-Sample-V2-4-6/ST-Sim-Spatial-Sample-V2-4-6.ssim –sid=210
And get the following error:
The system cannot find the file specified
On Linux, the same command (prefixed with sudo mono) results in the following error:
Error when processing Raster file ‘C:\Temp\ST-Sim-Spatial-Sample-V2-4-6\ST-Sim-Spatial-Sample-V2-4-6.ssim.input\Scenario-262\STSim_InitialConditionsSpatial\stateClass_30x30.tif’.
Has anyone had any success running a spatially explicit model using the command line utilities? If so, any suggestions or tips/tricks would be appreciated.
Thanks!
August 4, 2016 at 5:59 pm #3986leonardo-fridKeymasterHi Mike. I am able to do a spatial run with this library no problem. Here are the steps and code I used using windows Power Shell. If you are still not able to run, it may be that you have renamed, moved or not included the folders containing inputs that accompany the ssim library.
# **********************************************************
# Example PowerShell Script to Run a Spatial Model in ST-Sim V3.0 from the commandline
# 1. Script was run using the library located at: http://www.apexrms.com/downloads/syncrosim/ST-Sim-Spatial-Sample-V2-4-6.zip
# 2. Download the library and extract the contents to a single directory on your computer
# 3. Open the library in the GUI to ensure the library is upgraded to your current version
# 4. Run this script to do a spatial run of the current management scenario
# **********************************************************
# Author Leonardo Frid, ApexRMS
# Date 2016.08.04
# **********************************************************# **********************************************************
# Declarations
# **********************************************************# The path to syncroSim on your computer
$syncroSimPath = “C:\Program Files\SyncroSim\1”# The path to the library you want to run
$libPath = “C:\Users\Leonardo\Documents\My SyncroSim Files\Sample\ST-Sim-Spatial-Sample-V2-4-6\ST-Sim-Spatial-Sample-V2-4-6.ssim”# The scenario Id for the scenario you want to run
[Int]$scenarioId = 210# **********************************************************
# Run the model
# **********************************************************cd $syncroSimPath
.\SyncroSim.console.exe –run –lib=”$libPath” –sid=”$scenarioId”# **********************************************************
# End
# **********************************************************August 4, 2016 at 6:36 pm #3987Mike GoughParticipantThanks Leonardo!
Ok, so the issue was that the Linux command line utilities package I had downloaded from here didn’t have the Externals/DotSpatial directory in it. With that directory in place, we are up and running.
Many thanks for the assistance,
Mike
August 4, 2016 at 6:55 pm #3988leonardo-fridKeymasterHI Mike,
That’s strange because the Externals/DotSpatial directory is only required for visualizing output in the GUI, not for running the model. Are you sure, you did not change anything else?
Regards,
LeonardoAugust 4, 2016 at 7:11 pm #3989Mike GoughParticipantYes. I just downloaded a fresh copy of syncrosim-linux-1-0-24-x64.zip.
Extracted the contents, went into the directory, and issued the following command:
SyncroSim.Console.exe –run –lib=C:\Temp\ST-Sim-Spatial-Sample-V2-4-6\ST-Sim-Spatial-Sample-V2-4-6.ssim –sid=210
Got the error message I was getting before (“The system cannot find the file specified”)
Copied the Externals directory from C:\Program Files\SyncroSim\1\ to the syncrosim-linux-1-0-24-x64 directory.
Reran the command above, and it’s currently generating output TIFFs.
August 9, 2016 at 1:33 pm #3990leonardo-fridKeymasterThanks for getting back to us on this Mike. I would be curious to hear what versions of GDAL, Mono and Linux you are using. We are able to do a run without the Externals/DotSpatial directory using the following:
GDAL 1.11.3, released 2015/09/16
Mono JIT compiler version 4.2.1 (Debian 4.2.1.102+dfsg2-7ubuntu4)
Ubuntu Linux VERSION=”16.04.1 LTS (Xenial Xerus)”Cheers,
LeonardoAugust 9, 2016 at 2:06 pm #3991Taylor MutchParticipantHi Leonardo,
We actually are still having a couple issues with running the model spatially, and it most likely has to do with an improper install of GDAL (
gdalinfo --version
returnsGDAL 1.10.1, released 2013/08/26
, so that needs to be resolved per the system reqs for SyncroSim).We are working with the following:
Mono JIT compiler version 4.4.1
Ubuntu Linux VERSION="14.04.4 LTS"
Mike or I will report back if we still have issues after upgrading GDAL (or burning and rebuilding our dev server, whichever comes first).
Cheers,
Taylor- This reply was modified 5 years, 1 month ago by Tom RoeAdmin.
August 9, 2016 at 2:32 pm #3993Mike GoughParticipantJust to clarify, adding the Externals directory allowed me to run the spatial sample models successfully from the command line on Windows 7. I’m using the Linux command line utilities just because we’re calling ST-Sim from a Django app that will eventually run on a Linux server.
August 9, 2016 at 6:43 pm #3994leonardo-fridKeymasterOK, that makes more sense. In Windows, you can’t use the Linux zip file installation as there are differences for some of the binaries for running on windows vs. linux. If you want to run using command line utils in windows, do a regular windows installation and then call the SyncroSim.console.exe that is located in the regular installation directory (…Program Files\SyncroSim\1).
We are planning in the future (version 1.0.28 and later) to create a zip install for windows just like we do for Linux. The added bonus of this is that it will allow you to have different versions of SyncroSim installed and running on the same computer.
-
AuthorPosts
- You must be logged in to reply to this topic.