Building and running
Having written the code for your simulation, you need to be able to build it into an executable format to be deployed onto the Hadean platform, and be able to start your simulation running. When building a Simulate simulation, you use the same executable for running on your local Linux machine and on remote cloud based clusters. There's no need to recompile with specific flags or configuration - the exact same executable will work both locally and remotely.
To build a simulation, run the commands listed bellow in your simulation directory. You can run each command separately, as shown below
$ cmake -B build -G Ninja
$ ninja -C ./build
Or you can run both commands at the same time considering that it differs depending on the terminal in use:
$ cmake -B build -G Ninja & ninja -C ./build
A template cMakeLists.txt will be provided in your starter pack.
Once you have a simulation ready to run, you can run it with the Aether Engine SDK CLI. When running, you can choose to run your simulation either on the local workstation or on a cloud cluster.
When developing, you will likely want to use your local workstation to quickly run and tests changes to your simulation code. To do this, use
hadean run
. When running a simulation locally, the simulation will be started and the logs streamed back to the console. The local machine will also host a Muxer that you can connect clients to through
localhost
(127.0.0.1) or physical/virtual NIC IP.In order to stop a simulation when it has been started, press
CTRL+c
. It is sometimes necessary to make compiled libraries available on your cluster or local VM in order to dynamically link your code. In order to support this the hadean run command supports the ability to pass in mappings that will load local files into you containers. Use the following mapping to make shared libraries available.
hadean run -m lib=your_folder_name1
The lib folder will be made available to all simulate processes and is included in LD_LIBRARY_PATH
Running on a cloud cluster works in the same way as running locally, with the addition of a
cluster
flag and the name of the cluster you want to targethadean
cluster
run --name [cluster_name]
In order to run on a cloud cluster, you will need to have provisioned the servers and set up the Hadean Platform on them, for details on how to do this see Managing clusters. Once you have set up a cloud cluster to run on, you can get the cluster key or the name, which is used to identify the cluster.
This is available at http://portal.hadean.com, underneath the name of each cluster or by running the command
hadean cluster list
Last modified 2mo ago