1 -- This code creates 3 simgrid processes and verifies that the global values
2 -- in each Lua world are correctly cloned from maestro and become different
6 global_string = "A global string set by maestro"
8 -- Assigns to the global string the first argument and prints it
9 function set_global_string(...)
11 global_string = arg[1]
12 simgrid.info("Changing the global string")
16 -- Replaces the function please_dont_change_me() by set_global_string()
20 simgrid.info("Overwriting function please_dont_replace_me()")
21 please_dont_replace_me = set_global_string
22 please_dont_replace_me(...)
25 -- Show a hello message and prints the global string
26 function please_dont_replace_me(...)
28 simgrid.info("Hello from please_dont_replace_me(). I'm lucky, I still exist in this state.")
32 -- Prints the value of global_string
33 function print_global()
35 simgrid.info("Global string is '"..global_string.."'")
40 simgrid.platform("../../msg/small_platform.xml")
41 simgrid.application("deployment_duplicated_globals.xml")