Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
lesson_21 [2020/02/18 00:33]
argemiro
lesson_21 [2023/08/14 18:08]
admin [Dinamica EGO script language and console launcher]
Line 1: Line 1:
 {{ :​logo_logo.png?​400 |}} {{ :​logo_logo.png?​400 |}}
 \\ \\
-=====LESSON 21: Dinamica EGO script language and console launcher=====  ​+=====Dinamica EGO script language and console launcher=====  ​
 \\ \\
 \\ \\
Line 24: Line 24:
 {{ :​tutorial:​script_4.1.jpg |}} {{ :​tutorial:​script_4.1.jpg |}}
  
-Now that you have learned a bit about programming with EGO script language, another resource available in Dinamica EGO is the Console Launcher. Any model saved in Dinamica EGO, either EGOML/XML or EGO, can be run from the command prompt. ​+Now that you have learned a bit about programming with EGO script language, another resource available in Dinamica EGO is the Command Line Tool. Any model saved in Dinamica EGO, either EGOML/XML or EGO, can be run from the command prompt.
  
-To facilitate running a model from the command ​promptwe have developed a Console Launcher toolAlso, Console Launcher allows for queuing models and running them sequentiallyCall the Console Launcher ​from the tools subfolder ​in the Start/​Programs/​Dinamica EGO shortcutIt will open the following interface.+To run Dinamica EGO from the command ​linesimply run DinamicaConsoleX (where the X is the major versior number of the application -- e.gDinamicaConsole7) ​from a command prompt. DinamicaConsole utility is located ​in the Dinamica EGO installation folderThe parameters of the Dinamica Console Toool are:
  
-{{ :​tutorial:​script_9.jpg |}} +^ Dinamica Console Option ^ Option Description ^ 
- +| -verifier <​name>​ | Set functor verifier. | 
-<WRAP center round box 60%+| -output <​filename>​ | Write an output file representing the input model script. | 
-Some parameters ​of Console Launcher are:  +| -log-level ​<level number| Set the maximum execution log level. UNCONDITIONAL=0,​ ERROR=1, WARNING=2, RESULT=3, INFO=4, INFO2=5, DEBUG=6, or DEBUG2=7. | 
- +| -log-subsystem <level number> | Set the execution log subsystem level. GENERAL=1, OPENCL=2, SCRIPT_READER_WRITER=4,​ FUNCTOR_SCHEDULER=8,​ FUNCTOR_DEPENDENCE_GRAPH=16,​ FUNCTOR_EXECUTION=32,​ FILESYSTEM=64,​ MAP_IO_HANDLER=128,​ FUNCTOR_COPY_ANALYSIS=256,​ and SYSTEM=256. To use more than one, use the sum of the number of the corresponding subsystems. | 
--Scheduler: how the model functors are going be sequenced ​ +| -predefined-seed | Use a predefined value as the seed of the random number generators. | 
- +-processors <​number>​ | Override ​the number of logical processors that should ​be used. 0=use total number of processor cores instead. | 
--Verifier: Type of script ​verification +| -granularity <​number>​ | Override the default granularity value. | 
- +-dont-run | Do not run the model script. | 
--Log Level: Maximum ​level of log report ​ +| -propagate-exceptions | Propagate top-level ​exceptions. | 
- +| -beep | Beep to indicate that the execution has completed. | 
--Use Predefined seed: Check it to use predefined seed to generate random numbers. Using a predefined seed forces Dinamica EGO to always generate ​the same output, even if the model is stochastic.  +| -ask-to-close | Wait confirmation ​to close the window| 
- +| -disable-parallel-map-load | Disable loading maps in parallel. | 
--Processors: number ​of processors/​cores that model will use (Use 0 to automatically detect the number available) ​ +-disable-parallel-functors | Disable parallel processing ​of functors. | 
- +| -disable-parallel-steps | Disable parallel processing of loop steps. | 
--Run Model: Check it to run model completelyotherwiseDinamica EGO will load all models ​and exit. Disable ​this flag to validate a large number ​of models+-memory-allocation-policy <​code>​ | Policy used to control memory allocation. PREFER_MEMORY=0BALANCED=1PREFER_DISK=2,​ MEMORY_ONLY=3 ​and AGGRESSIVE=4 | 
-</WRAP+| -accelerators-policy <​code>​ | Policy used to select accelerator devicesNO_DEVICES=0,​ ALL_DEVICES=1,​ and USER_CONFIG=2 | 
- +| -disable-native-expressions | Disable ​compilation ​of image expressions to native representation| 
-You can save the Console Launcher configuration into a batch file tooThis is useful ​in case you want to couple ​Dinamica EGO with other software.+| -metadata-profile ​<code| Type of the profile used to write file metadata. CUSTOM=0, CSR/​UFMG_ptBR=1,​ and CSR/​UFMG_en=2. | 
 +| -map-metadata-template-filename <​filename>​ | Filename with the template used to to write map metadata. Assume the use of CUSTOM profile. | 
 +| -map-metadata-file-extension <​extension>​ | File extension used to write map metadataAssume the use of CUSTOM profile. | 
 +| -write-semicolon-in-csv | Write CSV files using semicolons as value separators. | 
 +| -session-name <​name>​ | Create session with the given name to share data between ​Dinamica EGO and an external application
 +| -list-accelerators | Show the available accelerator devices. | 
 +| -list-functors | Show the available functors. | 
 +| -version | Show version info. | 
 +| -help | Show this help. |
  
 <note tip>​**TIP**:​ another way to loosely couple other computer programs with Dinamica EGO is by means of functor [[:Run External Process]], available in the Control Tab.  By using this functor, you will be able to make a call to an external program from within Dinamica, pass to this program intermediate results and feed its output back again into the Dinamica EGO model. </​note> ​ <note tip>​**TIP**:​ another way to loosely couple other computer programs with Dinamica EGO is by means of functor [[:Run External Process]], available in the Control Tab.  By using this functor, you will be able to make a call to an external program from within Dinamica, pass to this program intermediate results and feed its output back again into the Dinamica EGO model. </​note> ​
 \\ \\
 \\ \\
-===Congratulations,​ you have successfully completed this lesson!=== 
 \\ \\
-☞[[lesson_22|Next ​Lesson]]+☞[[lesson_22|Next: Heuristic calibration of models by using Genetic Algorithm]]
 \\ \\
 ☞[[:​guidebook_start| Back to Guidebook Start]] ☞[[:​guidebook_start| Back to Guidebook Start]]