flow

flow

Functions

GebrGeoXmlFlow * gebr_geoxml_flow_new ()
void gebr_geoxml_flow_add_flow ()
void gebr_geoxml_flow_foreach_parameter ()
void gebr_geoxml_flow_set_date_last_run ()
gchar * gebr_geoxml_flow_get_date_last_run ()
void gebr_geoxml_flow_server_set_group ()
void gebr_geoxml_flow_server_get_group ()
void gebr_geoxml_flow_server_set_date_last_run ()
gchar * gebr_geoxml_flow_server_get_date_last_run ()
void gebr_geoxml_flow_io_set_input ()
void gebr_geoxml_flow_io_set_output ()
void gebr_geoxml_flow_io_set_error ()
gchar * gebr_geoxml_flow_io_get_input ()
gchar * gebr_geoxml_flow_io_get_output ()
gchar * gebr_geoxml_flow_io_get_error ()
GebrGeoXmlProgram * gebr_geoxml_flow_append_program ()
int gebr_geoxml_flow_get_program ()
glong gebr_geoxml_flow_get_programs_number ()
GebrGeoXmlProgram * gebr_geoxml_flow_get_first_mpi_program ()
GebrGeoXmlCategory * gebr_geoxml_flow_append_category ()
int gebr_geoxml_flow_get_category ()
glong gebr_geoxml_flow_get_categories_number ()
gboolean gebr_geoxml_flow_change_to_revision ()
GebrGeoXmlRevision * gebr_geoxml_flow_append_revision ()
void gebr_geoxml_flow_set_revision_data ()
enum GEBR_GEOXML_RETV gebr_geoxml_flow_get_revision ()
void gebr_geoxml_flow_get_revision_data ()
gulong gebr_geoxml_flow_get_revision_index_by_id ()
GebrGeoXmlRevision * gebr_geoxml_flow_get_revision_by_id ()
gboolean gebr_geoxml_flow_get_parent_revision ()
glong gebr_geoxml_flow_get_revisions_number ()
gboolean gebr_geoxml_flow_validate ()
gboolean gebr_geoxml_flow_has_control_program ()
gboolean gebr_geoxml_flow_insert_iter_dict ()
void gebr_geoxml_flow_remove_iter_dict ()
GebrGeoXmlProgram * gebr_geoxml_flow_get_control_program ()
void gebr_geoxml_flow_io_set_output_append ()
gboolean gebr_geoxml_flow_io_get_output_append ()
void gebr_geoxml_flow_io_set_error_append ()
gboolean gebr_geoxml_flow_io_get_error_append ()
void gebr_geoxml_flow_update_iter_dict_value ()
void gebr_geoxml_flow_revalidate ()
gboolean gebr_geoxml_flow_is_parallelizable ()
GList * gebr_geoxml_flow_divide_flows ()
gint * gebr_geoxml_flow_calculate_proportional_n ()
gdouble * gebr_geoxml_flow_calulate_weights ()
GList * gebr_geoxml_flow_get_mpi_flavors ()
gchar * gebr_geoxml_flow_io_get_input_real ()
gchar * gebr_geoxml_flow_io_get_output_real ()
gboolean gebr_geoxml_flow_is_single_core ()
gchar * gebr_geoxml_flow_create_dot_code ()
gchar * gebr_geoxml_flow_revisions_get_root_id ()

Description

Functions

gebr_geoxml_flow_new ()

GebrGeoXmlFlow *
gebr_geoxml_flow_new ();

gebr_geoxml_flow_add_flow ()

void
gebr_geoxml_flow_add_flow (GebrGeoXmlFlow *flow,
                           GebrGeoXmlFlow *flow2);

gebr_geoxml_flow_foreach_parameter ()

void
gebr_geoxml_flow_foreach_parameter (GebrGeoXmlFlow *flow,
                                    GebrGeoXmlCallback callback,
                                    gpointer user_data);

gebr_geoxml_flow_set_date_last_run ()

void
gebr_geoxml_flow_set_date_last_run (GebrGeoXmlFlow *flow,
                                    const gchar *last_run);

gebr_geoxml_flow_get_date_last_run ()

gchar *
gebr_geoxml_flow_get_date_last_run (GebrGeoXmlFlow *flow);

gebr_geoxml_flow_server_set_group ()

void
gebr_geoxml_flow_server_set_group (GebrGeoXmlFlow *flow,
                                   const gchar *type,
                                   const gchar *name);

gebr_geoxml_flow_server_get_group ()

void
gebr_geoxml_flow_server_get_group (GebrGeoXmlFlow *flow,
                                   gchar **type,
                                   gchar **name);

gebr_geoxml_flow_server_set_date_last_run ()

void
gebr_geoxml_flow_server_set_date_last_run
                               (GebrGeoXmlFlow *flow,
                                const gchar *date);

Sets the last run date for this server.

flow and date should not be passed as NULL.

See gebr_geoxml_flow_server_get_date_last_run().

Parameters

flow

a flow

 

date

server last run date

 

gebr_geoxml_flow_server_get_date_last_run ()

gchar *
gebr_geoxml_flow_server_get_date_last_run
                               (GebrGeoXmlFlow *flow);

Retrieve the last run date for this server.

flow should not be passed as NULL.

Parameters

flow

a flow

 

gebr_geoxml_flow_io_set_input ()

void
gebr_geoxml_flow_io_set_input (GebrGeoXmlFlow *flow,
                               const gchar *input);

Set the flow input file path to input . The input file is the one used to gather the input sent by the last program of flow .

flow and input should not be passed as NULL.

See gebr_geoxml_flow_server_io_get_input().

Parameters

flow

a flow

 

input

flow's input path

 

gebr_geoxml_flow_io_set_output ()

void
gebr_geoxml_flow_io_set_output (GebrGeoXmlFlow *flow,
                                const gchar *output);

Set the flow output file path to output . The output file is the one used to gather the output sent by the last program of flow .

flow and input should not be passed as NULL.

See gebr_geoxml_flow_server_io_get_output().

Parameters

flow

a flow

 

output

flow's output path

 

gebr_geoxml_flow_io_set_error ()

void
gebr_geoxml_flow_io_set_error (GebrGeoXmlFlow *flow,
                               const gchar *error);

Set the flow error file path to error . This should be the file containing the error log, which might include program's stderr

flow and input should not be passed as NULL.

See gebr_geoxml_flow_server_io_get_error gebr_geoxml_program_set_stderr().

Parameters

flow

a flow

 

error

flow's error path

 

gebr_geoxml_flow_io_get_input ()

gchar *
gebr_geoxml_flow_io_get_input (GebrGeoXmlFlow *flow);

Retrieves the input file path of flow . If the input file path was not set before, default will be an empty string "".

flow should not be passed as NULL.

See gebr_geoxml_flow_server_io_set_input()

Parameters

flow

a flow

 

gebr_geoxml_flow_io_get_output ()

gchar *
gebr_geoxml_flow_io_get_output (GebrGeoXmlFlow *flow);

Retrieves the output file path of flow . If the output file path was not set before, default will be an empty string "".

flow should not be passed as NULL.

See gebr_geoxml_flow_server_io_set_output().

Parameters

flow

a flow

 

gebr_geoxml_flow_io_get_error ()

gchar *
gebr_geoxml_flow_io_get_error (GebrGeoXmlFlow *flow);

Retrieves the error file path of flow . If the error file path was not set before, default will be an empty string "".

flow should not be passed as NULL.

See gebr_geoxml_flow_server_io_set_error().

Parameters

flow

a flow

 

gebr_geoxml_flow_append_program ()

GebrGeoXmlProgram *
gebr_geoxml_flow_append_program (GebrGeoXmlFlow *flow);

Creates a new program associated and append to the list of programs Provided for convenience

Parameters

flow

a flow

 

gebr_geoxml_flow_get_program ()

int
gebr_geoxml_flow_get_program (GebrGeoXmlFlow *flow,
                              GebrGeoXmlSequence **program,
                              gulong index);

Writes to program the index ieth category that flow belong. If an error occurred (either GEBR_GEOXML_RETV_INVALID_INDEX and GEBR_GEOXML_RETV_NULL_PTR) the content of program is assigned to NULL.

If flow is NULL nothing is done.

Returns one of: GEBR_GEOXML_RETV_SUCCESS, GEBR_GEOXML_RETV_INVALID_INDEX, GEBR_GEOXML_RETV_NULL_PTR

See gebr_geoxml_sequence_move gebr_geoxml_sequence_move_up(), gebr_geoxml_sequence_move_down(), gebr_geoxml_sequence_remove().

Parameters

flow

a flow

 

program

a program

 

index

the index of desired program

 

gebr_geoxml_flow_get_programs_number ()

glong
gebr_geoxml_flow_get_programs_number (GebrGeoXmlFlow *flow);

Get the number of programs flow has.

If flow is NULL, returns -1.

Parameters

flow

a flow

 

gebr_geoxml_flow_get_first_mpi_program ()

GebrGeoXmlProgram *
gebr_geoxml_flow_get_first_mpi_program
                               (GebrGeoXmlFlow *flow);

gebr_geoxml_flow_append_category ()

GebrGeoXmlCategory *
gebr_geoxml_flow_append_category (GebrGeoXmlFlow *flow,
                                  const gchar *name);

Creates a new category and append it to the list of categories. If the category already exist, returns it.

Parameters

flow

a flow

 

name

the name for category

 

gebr_geoxml_flow_get_category ()

int
gebr_geoxml_flow_get_category (GebrGeoXmlFlow *flow,
                               GebrGeoXmlSequence **category,
                               gulong index);

Writes to category the index ieth category that belongs to flow . If an error ocurred, the content of category is assigned to NULL.

Returns one of: GEBR_GEOXML_RETV_SUCCESS, GEBR_GEOXML_RETV_INVALID_INDEX, GEBR_GEOXML_RETV_NULL_PTR

See gebr_geoxml_sequence_move(), gebr_geoxml_sequence_move_up gebr_geoxml_sequence_move_down(), gebr_geoxml_sequence_remove().

Parameters

flow

a flow

 

category

a category

 

index

the index of desired category

 

gebr_geoxml_flow_get_categories_number ()

glong
gebr_geoxml_flow_get_categories_number
                               (GebrGeoXmlFlow *flow);

Get the number of categories that flow has.

If flow is NULL returns -1.

Parameters

flow

a flow

 

gebr_geoxml_flow_change_to_revision ()

gboolean
gebr_geoxml_flow_change_to_revision (GebrGeoXmlFlow *flow,
                                     GebrGeoXmlRevision *revision);

gebr_geoxml_flow_append_revision ()

GebrGeoXmlRevision *
gebr_geoxml_flow_append_revision (GebrGeoXmlFlow *flow,
                                  const gchar *comment);

gebr_geoxml_flow_set_revision_data ()

void
gebr_geoxml_flow_set_revision_data (GebrGeoXmlRevision *revision,
                                    const gchar *flow,
                                    const gchar *date,
                                    const gchar *comment,
                                    const gchar *id);

gebr_geoxml_flow_get_revision ()

enum GEBR_GEOXML_RETV
gebr_geoxml_flow_get_revision (GebrGeoXmlFlow *flow,
                               GebrGeoXmlSequence **revision,
                               gulong index);

Writes to revision the index ieth revision that belongs flow . If an error occurred (either GEBR_GEOXML_RETV_INVALID_INDEX and GEBR_GEOXML_RETV_NULL_PTR) the content of revision is assigned to NULL.

If flow is NULL nothing is done.

Returns one of: GEBR_GEOXML_RETV_SUCCESS, GEBR_GEOXML_RETV_INVALID_INDEX, GEBR_GEOXML_RETV_NULL_PTR

See gebr_geoxml_sequence_move gebr_geoxml_sequence_move_up gebr_geoxml_sequence_move_down gebr_geoxml_sequence_remove

Parameters

flow

a flow

 

revision

a revision

 

index

the index of desired program

 

gebr_geoxml_flow_get_revision_data ()

void
gebr_geoxml_flow_get_revision_data (GebrGeoXmlRevision *revision,
                                    gchar **flow,
                                    gchar **date,
                                    gchar **comment,
                                    gchar **id);

gebr_geoxml_flow_get_revision_index_by_id ()

gulong
gebr_geoxml_flow_get_revision_index_by_id
                               (GebrGeoXmlFlow *flow,
                                gchar *parent_id);

gebr_geoxml_flow_get_revision_by_id ()

GebrGeoXmlRevision *
gebr_geoxml_flow_get_revision_by_id (GebrGeoXmlFlow *flow,
                                     const gchar *id);

gebr_geoxml_flow_get_parent_revision ()

gboolean
gebr_geoxml_flow_get_parent_revision (GebrGeoXmlFlow *flow,
                                      gchar **date,
                                      gchar **comment,
                                      gchar **id);

gebr_geoxml_flow_get_revisions_number ()

glong
gebr_geoxml_flow_get_revisions_number (GebrGeoXmlFlow *flow);

gebr_geoxml_flow_validate ()

gboolean
gebr_geoxml_flow_validate (GebrGeoXmlFlow *flow,
                           GebrValidator *validator,
                           GError **error);

Determine if a flow can be executed or not. If not, return the correct type of error in error and returns FALSE.

Parameters

flow

The GebrGeoXmlFlow to be validated.

 

validator

A GebrValidator.

 

error

Return location for the error or NULL if you don't need it.

 

Returns

TRUE if no error was set, FALSE otherwise.


gebr_geoxml_flow_has_control_program ()

gboolean
gebr_geoxml_flow_has_control_program (GebrGeoXmlFlow *flow);

If this flow has a program marked as a control, this function returns TRUE. Otherwise returns FALSE. The purpose of this function is to allow only one control for each flow. It is not possible to set a program to be a control, only if you directly edit the XML file of a flow.

Returns

TRUE if flow has a program which is a control, FALSE otherwise.


gebr_geoxml_flow_insert_iter_dict ()

gboolean
gebr_geoxml_flow_insert_iter_dict (GebrGeoXmlFlow *flow);

gebr_geoxml_flow_remove_iter_dict ()

void
gebr_geoxml_flow_remove_iter_dict (GebrGeoXmlFlow *flow);

gebr_geoxml_flow_get_control_program ()

GebrGeoXmlProgram *
gebr_geoxml_flow_get_control_program (GebrGeoXmlFlow *flow);

If this flow has a program marked as a control, this function returns GebrGeoxmlProgram. Otherwise returns NULL. The purpose of this function is to allow only one control for each flow. It is not possible to set a program to be a control, only if you directly edit the XML file of a flow.

Returns

GebrGeoxmlProgram if flow has a program which is a control, NULL otherwise.


gebr_geoxml_flow_io_set_output_append ()

void
gebr_geoxml_flow_io_set_output_append (GebrGeoXmlFlow *flow,
                                       gboolean setting);

Parameters

flow

a GebrGeoXmlFlow

 

setting

TRUE to make output append

 

gebr_geoxml_flow_io_get_output_append ()

gboolean
gebr_geoxml_flow_io_get_output_append (GebrGeoXmlFlow *flow);

Parameters

flow

a GebrGeoXmlFlow

 

Returns

TRUE if output appends, FALSE otherwise


gebr_geoxml_flow_io_set_error_append ()

void
gebr_geoxml_flow_io_set_error_append (GebrGeoXmlFlow *flow,
                                      gboolean setting);

Parameters

flow

a GebrGeoXmlFlow

 

setting

TRUE to make error append

 

gebr_geoxml_flow_io_get_error_append ()

gboolean
gebr_geoxml_flow_io_get_error_append (GebrGeoXmlFlow *flow);

Parameters

flow

a GebrGeoXmlFlow

 

Returns

TRUE if error appends, FALSE otherwise


gebr_geoxml_flow_update_iter_dict_value ()

void
gebr_geoxml_flow_update_iter_dict_value
                               (GebrGeoXmlFlow *flow);

Updates the `iter' dictionary variable with the start value of the for loop of this flow. If the flow does not have a loop, does nothing and returns silently.


gebr_geoxml_flow_revalidate ()

void
gebr_geoxml_flow_revalidate (GebrGeoXmlFlow *flow,
                             GebrValidator *validator);

Revalidates all flow 's programs and set their statuses accordingly.

Parameters

flow

A GebrGeoXmlFlow to be revalidated.

 

validator

The GebrValidator that will validate flow 's programs.

 

gebr_geoxml_flow_is_parallelizable ()

gboolean
gebr_geoxml_flow_is_parallelizable (GebrGeoXmlFlow *flow,
                                    GebrValidator *validator);

gebr_geoxml_flow_divide_flows ()

GList *
gebr_geoxml_flow_divide_flows (GebrGeoXmlFlow *flow,
                               GebrValidator *validator,
                               gint *distributed_n,
                               gint distributed_n_len);

Parameters

flow

A GebrGeoXmlFlow to be divided on n_weights flows

 

validator

The GebrValidator that will be used to check if flow is parallelizable

 

distributed_n

The gint vector of distributed nsteps of loop

 

distributed_n_len

The number of flows to return

 

Returns

A GList of flows


gebr_geoxml_flow_calculate_proportional_n ()

gint *
gebr_geoxml_flow_calculate_proportional_n
                               (gint total_n,
                                gdouble *weights,
                                gint n_weights);

gebr_geoxml_flow_calulate_weights ()

gdouble *
gebr_geoxml_flow_calulate_weights (gint n_servers,
                                   gdouble *scores,
                                   gdouble acc_scores);

gebr_geoxml_flow_get_mpi_flavors ()

GList *
gebr_geoxml_flow_get_mpi_flavors (GebrGeoXmlFlow *flow);

gebr_geoxml_flow_io_get_input_real ()

gchar *
gebr_geoxml_flow_io_get_input_real (GebrGeoXmlFlow *flow);

gebr_geoxml_flow_io_get_output_real ()

gchar *
gebr_geoxml_flow_io_get_output_real (GebrGeoXmlFlow *flow);

gebr_geoxml_flow_is_single_core ()

gboolean
gebr_geoxml_flow_is_single_core (GebrGeoXmlFlow *flow,
                                 GebrValidator *validator);

gebr_geoxml_flow_create_dot_code ()

gchar *
gebr_geoxml_flow_create_dot_code (GebrGeoXmlFlow *flow,
                                  GHashTable *hash);

gebr_geoxml_flow_revisions_get_root_id ()

gchar *
gebr_geoxml_flow_revisions_get_root_id
                               (GHashTable *hash);

Types and Values