-
Notifications
You must be signed in to change notification settings - Fork 0
python generator
By passing NULL instead of a file name to cortex_undumpi_open
, you specify that the MPI events won't come from a file, but will directly be generated from within the program. The way to generate these events from a Python script is very simple. Right after calling cortex_python_set_module
to specify the script (and potentially the class) where your translations are implemented, add a call to cortex_python_call_generator(profile, "GenerateThings");
. The first argument is the cortex profile returned by cortex_undumpi_open. The second argument is the name of a function (located in the provided translator class, or translator module, if no class has been provided). This function must take an integer as parameter (the rank of the MPI process for which MPI events should be generated). It can call all the cortex.MPI_*
functions to generate events the same way the translation functions do.
And example of this feature is provided in the test folder (gen_python).