batsim.h 1.12 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
{
10 11 12 13 14 15 16 17 18 19
	FINALIZE				//! Server -> Node
	,LAUNCH_JOB				//! Server -> Node
	,JOB_SUBMITTED			//! Submitter -> Server
	,JOB_COMPLETED			//! Launcher/killer -> Server
	,SCHED_EVENT			//! SchedulerHandler -> Server
	,SCHED_READY			//! SchedulerHandler -> Server
	,LAUNCHER_INFORMATION	//! Node -> Launcher
	,KILLER_INFORMATION		//! Node -> Killer
	,SUBMITTER_HELLO		//! Submitter -> Server
	,SUBMITTER_BYE			//! Submitter -> Server
20 21 22
} e_task_type_t;

/*
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;