Experimental features are early versions for users to test before final release. We work hard to ensure that every available Simudyne SDK feature is thoroughly tested, but these experimental features may have minor bugs we still need to work on.
If you have any comments or find any bugs, please share with support@simudyne.com.
Deploying from Development to Spark
This page explains how to setup and use the Simudyne SDK to run on top of Spark, for distributing your models.
Specific Versions
Spark 2 - use version 2.3.x of Simudyne SDK
Spark 3 - use version 2.5.2+ of Simudyne SDK
Please note that you should not use version 2.4.0-2.5.0 of the SDK if you wish to use Spark. This is because version 2.4 uses Scala 12 which is only supported by version 3 of Spark, and the libraries to complement this Spark 3 support are included in version 2.5.2+
To run your model, you will need to build a fatJar file which will carry your model, the Simudyne SDK and all the necessary dependencies. You will then need to upload it to the master node of your cluster where you can submit your Spark jobs.
Some more dependencies and shading are needed for your project and some will be provided by Spark.
You can then upload this jar file to your master node as well as the simudyneSDK.properties file and you license file.
By default the license file will be looked for in the directory you called spark3-submit from, you can change this behaviour using the configuration core.license-file.
Spark Model Runner
The spark model runner allows you to run the same simulation multiple time on a spark cluster to create a distributed multirun.
Running a distributed multirun simulation depends on the package core-runner-spark which needs to be imported in your project:
You must be aware that a property set in the simudyneSDK.properties file will override the one passed to the spark3-submit, for this reason we recommend only using properties based on configuration for testing, and to use spark-submit based configuration when possible.
You can then submit your job using spark3-submit. Here is a example with some configurations options:
spark3-submit --class Main --master <sparkMasterURL> --deploy-mode client --files simudyneSDK.properties,mylicense.license path-to-fat-jar.jar
Including the Simudyne SDK properties and license
The Simudyne SDK cannot run without the config field and license on every node, in order to do this, we pass the files to every node using the parameter `--files` (as in the command above). Edit the command to pass the full path to the actual properties files and license file so these can be found and copied onto the clusters nodes.
This command will run the main function of the class Main and distribute it on Spark. You can then access the console through the config parameters nexus-server.hostname and nexus-server.port.
They default to localhost and 8080. You can also interact with the server through the REST API
spark3-submit allows you to configure Spark. You need to choose a configuration that best suits your cluster.
To learn more about Spark configuration, refer to the official documentation.
If you wish to use the runner directly, and not use the console nor the REST API, you can use the SparkModelRunner
Spark Distributed Graph
The distributed graph backend allows you to run large graphs on a cluster of machines.
Running a distributed graph simulation depends on the core-graph-distributed package which needs to be imported in your project:
Please be aware that properties set in simudyneSDK.properties file takes precedence over options passed to spark3-submit.
You can then submit your job using spark3-submit. Here is an example:
spark3-submit --class Main --master yarn --deploy-mode client --files simudyneSDK.properties,licenseKey hdfs://path/name-of-the-fat-jar.jar
This command will run the main function of the class Main and distribute it on Spark. You can then access the console through the config parameters nexus-server.hostname and nexus-server.port.
They default to localhost and 8080. You can also interact with the server through the REST API
spark3-submit allows you to configure Spark. You need to choose a configuration that best suits your cluster.
To learn more about Spark configuration, refer to the official documentation.