Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
remote_execution_feature [2024/10/22 18:49]
admin created
remote_execution_feature [2024/10/23 16:08] (current)
admin
Line 1: Line 1:
-===== Using Dinamica'​s Remote Execution Feature (version 8.1.0+) =====+====== Using Dinamica'​s Remote Execution Feature (version 8.1.0+) ​======
  
-==== Coordinator ====+===== Coordinator ​Setup =====
  
-In folder ​where you have write permissions, run the following command:+To configure the coordinator,​ navigate to directory ​where you have write permissions ​and execute ​the following command:
  
-''​c:\Program Files\Dinamica EGO 8\DinamicaCoordinator ​--address X.X.X.X --port YYYY''​+**Windows** 
 +<​code>​c:\Program Files\Dinamica EGO 8\DinamicaCoordinator8 ​--address X.X.X.X --port YYYY</​code>​
  
-Where X.X.X.X ​is the machine'​s address, and YYYY is the port number where the coordinator will wait for connections. The machine where this program is running will be considered the coordinator,​ responsible for distributing the workload to the available agents.+**Linux** 
 +<​code>​./​DinamicaEGO-810-Ubuntu-LTS.AppImage --coordinator --address ​X.X.X.X ​--port ​YYYY</​code>​
  
-==== Agents ====+Replace ''​X.X.X.X''​ with the IP address of the machine that will serve as the coordinator,​ and ''​YYYY''​ with the port number where it will listen for incoming connections. This machine will act as the coordinator,​ responsible for managing and distributing tasks to connected agents.
  
-In a folder where you have write permissionsrun:+The Dinamica Coordinator supports various parameterswhich can be viewed by running the following commands:
  
-''​c:\Program Files\Dinamica EGO 8\DinamicaAgent ​--address X.X.X.X --port YYYY''​+**Windows** 
 +<​code>​c:\Program Files\Dinamica EGO 8\DinamicaCoordinator8 ​--help</​code>​
  
-Where X.X.X.X is the coordinator's address and YYYY is the port number used by the coordinator. The machine running this program will be considered an agent, responsible for executing tasks requested by the coordinator. You can set up agents on as many machines as necessary. Additionally,​ it is possible to create an agent on the same machine where the coordinator is running, although this is not recommended in cases where the agent'​s tasks require a lot of processing power.+**Linux** 
 +<​code>​./​DinamicaEGO-810-Ubuntu-LTS.AppImage --coordinator ​--help</​code>​
  
-==== Running a Model ====+===== Agent Setup =====
  
-On the machine ​where the model will be executed, open the Dinamica interface ​and edit the settings under Tools -> Options | Execution | Remote Computing, entering the address and port of the machine where the coordinator is running.+To configure an agent, navigate to a directory ​where you have write permissions ​and run:
  
-From this pointit is possible ​to run models ​that contain ​the RunRemotely ​container. ​Place all operators that will be executed remotely inside ​this container and run the model as usual.+**Windows** 
 +<​code>​c:​\Program Files\Dinamica EGO 8\DinamicaAgent --address X.X.X.X --port YYYY</​code>​ 
 + 
 +**Linux** 
 +<​code>​./​DinamicaEGO-810-Ubuntu-LTS.AppImage --agent --address X.X.X.X --port YYYY</​code>​ 
 + 
 +Here, ''​X.X.X.X''​ should be the IP address of the coordinator,​ and ''​YYYY''​ is the port number used by the coordinator to communicate with agents. The machine running ​this command will function as an agentexecuting tasks assigned by the coordinator. You can deploy agents on multiple machines to expand the processing capacity. Agents can also be run on the same machine as the coordinator,​ but this is not recommended if the agent'​s tasks are computationally intensive. 
 + 
 +The Dinamica Agent supports various parameters, which can be viewed by running the following commands: 
 + 
 +**Windows** 
 +<​code>​c:​\Program Files\Dinamica EGO 8\DinamicaAgent --help</​code>​ 
 + 
 +**Linux** 
 +<​code>​./​DinamicaEGO-810-Ubuntu-LTS.AppImage --agent --help</​code>​ 
 + 
 +===== Running Parts of a Model Remotely ===== 
 + 
 +To execute parts of a model remotely, access the Dinamica interface on the machine where the model is located. Navigate ​to `Tools -> Options | Execution | Remote Computing` and input the coordinator’s address and port number. 
 + 
 +Once the remote settings are configured, you can run models ​containing ​the [[Run Remotely]] ​container. ​All operations intended for remote execution must be placed within ​this containerand you can then run the model as usual. The [[Run Remotely]] container ensures that the designated parts of the model are executed remotely. 
 + 
 +===== "Run Remotely"​ Configuration and Features ===== 
 + 
 +==== Overriding Coordinator Settings ==== 
 + 
 +The [[Run Remotely]] container allows you to override the coordinator address and other options defined in the global configuration by using the container’s input ports. This feature provides flexibility,​ enabling you to adjust the coordinator and connection settings dynamically during runtime. It is particularly useful when working in environments with varying network configurations or when managing multiple distributed setups. 
 + 
 +==== Using Multiple Coordinators ==== 
 + 
 +You can configure different instances of the [[Run Remotely]] container to connect to different coordinators. This allows different parts of a model to be distributed and processed by distinct coordinators and agents, which is especially beneficial for large-scale simulations or workloads that need to be split across multiple machines. By distributing the workload across different environments,​ you can optimize resource utilization and reduce processing time. Each section of the model communicates with its designated coordinator,​ allowing for granular control over distributed execution. 
 + 
 +==== "Run Remotely"​ Limitations ==== 
 + 
 +  * You can pass most data types from functors outside the [[Run Remotely]] container to functors inside it. However, passing maps from outside to inside the [[Run Remotely]] container is not supported and will result in an error. 
 + 
 +  * Data cannot be passed from functors inside the [[Run Remotely]] container to functors outside of it. Attempting to do so will generate an error.