batsim.h 1.78 KB
Newer Older
1 2
#pragma once

3
#include <simgrid/msg.h>
4 5

/**
6
 * @brief Types of tasks exchanged between nodes.
7
 */
8 9
typedef enum
{
Millian Poquet's avatar
Millian Poquet committed
10 11 12 13 14 15 16 17 18 19
    FINALIZE				//!< Server -> Node. The server tells the node to stop its execution.
    ,LAUNCH_JOB				//!< Server -> Node. The server tells the node to launch a new job.
    ,JOB_SUBMITTED			//!< Submitter -> Server. The submitter tells the server a new job has been submitted.
    ,JOB_COMPLETED			//!< Launcher/killer -> Server. The launcher or killer tells the server a job has been completed.
    ,SCHED_EVENT			//!< SchedulerHandler -> Server. The scheduler handler tells the server a scheduling event occured.
    ,SCHED_READY			//!< SchedulerHandler -> Server. The scheduler handler tells the server that the scheduler is ready (messages can be sent to it).
    ,LAUNCHER_INFORMATION	//!< Node -> Launcher. The node gives launching information to the job launcher.
    ,KILLER_INFORMATION		//!< Node -> Killer. The node gives killing information to the job killer.
    ,SUBMITTER_HELLO		//!< Submitter -> Server. The submitter tells it starts submitting to the server.
    ,SUBMITTER_BYE			//!< Submitter -> Server. The submitter tells it stops submitting to the server.
20 21
} e_task_type_t;

Millian Poquet's avatar
Millian Poquet committed
22
/**
23
 * @brief Data attached with the tasks used to communicate between MSG processes
24
 */
25 26
typedef struct s_task_data
{
27 28 29
    e_task_type_t type;	//! Type of task
    int job_id;			//! The job ID
    void *data;			//! Either NULL or points to something else based on type
30
} s_task_data_t;
31 32 33 34 35 36

/**
 * @brief Data structure used to launch a job
 */
typedef struct s_lauch_data
{
37 38 39
    int jobID;                       	//! The job identification number
    int reservedNodeCount;           	//! The number of reserved nodes
    int * reservedNodesIDs;          	//! The nodes on which the job will be run
40
} s_launch_data_t;