Error running spatial models with SyncroSim on Linux

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #23032
    alex-filazzolaalex-filazzola
    Participant

    Issue:
    Spatial model runs on Linux using Syncrosim versions earlier than v2.5.8 return errors because of the interaction with GDAL. If GDAL is installed correctly but the wrong version is being referenced, you will likely see this error:
    Method not found: OSGeo.GDAL.CPLErr OSGeo.GDAL.Dataset.FlushCache()
    If the right version of GDAL is installed, but an earlier version of SyncroSim is installed, you will likely see this error:
    The type initializer for ‘SyncroSim.StochasticTime.Spatial’ threw an exception.

    Solution:
    To properly configure SyncroSim to work with Linux, ensure you have the latest version of SyncroSim installed (2.5.8 or higher) and follow the steps below.
    1. Install Miniconda on Linux (Follow the installation instructions for Linux on the Miniconda website).
    2. Install mono for .NET Framework by running the following in the command prompt:

    apt-get update && apt-get install -y \
    unzip \
    mono-complete \
    curl

    3. Create and activate the conda “gdal” environment that contains the gdal-csharp dependency by running the following in the command prompt:

    conda create -y –name gdal -c conda-forge gdal-csharp
    source /root/miniconda3/bin/activate gdal

    4. Set the LD_LIBRARY_PATH environment variable to the Miniconda installation by running the following in the command prompt:

    export LD_LIBRARY_PATH=$CONDA_PREFIX/lib

    You should now be able to run spatial models using SyncroSim for Linux.

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.