~ubuntu-branches/ubuntu/vivid/slurm-llnl/vivid

« back to all changes in this revision

Viewing changes to src/slurmd/slurmstepd/io.h

  • Committer: Bazaar Package Importer
  • Author(s): Gennaro Oliva
  • Date: 2009-09-24 23:28:15 UTC
  • mfrom: (1.1.11 upstream) (3.2.4 sid)
  • Revision ID: james.westby@ubuntu.com-20090924232815-enh65jn32q1ebg07
Tags: 2.0.5-1
* New upstream release 
* Changed dependecy from lib-mysqlclient15 to lib-mysqlclient 
* Added Default-Start for runlevel 2 and 4 and $remote_fs requirement in
  init.d scripts (Closes: #541252)
* Postinst checks for wrong runlevels 2 and 4 links
* Upgraded to standard version 3.8.3
* Add lintian overrides for missing slurm-llnl-configurator.html in doc
  base registration
* modified postrm scripts to ignore pkill return value in order to avoid
  postrm failure when no slurm process is running
* Checking for slurmctld.pid before cancelling running and pending
  jobs during package removal 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************\
2
2
 * src/slurmd/slurmstepd/io.h - slurmstepd standard IO routines
3
 
 * $Id: io.h 13672 2008-03-19 23:10:58Z jette $
 
3
 * $Id: io.h 17803 2009-06-10 22:06:56Z da $
4
4
 *****************************************************************************
5
5
 *  Copyright (C) 2002 The Regents of the University of California.
6
6
 *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
7
7
 *  Written by Mark Grondona <mgrondona@llnl.gov>.
8
 
 *  LLNL-CODE-402394.
 
8
 *  CODE-OCEC-09-009. All rights reserved.
9
9
 *  
10
10
 *  This file is part of SLURM, a resource management program.
11
 
 *  For details, see <http://www.llnl.gov/linux/slurm/>.
 
11
 *  For details, see <https://computing.llnl.gov/linux/slurm/>.
 
12
 *  Please also read the included file: DISCLAIMER.
12
13
 *  
13
14
 *  SLURM is free software; you can redistribute it and/or modify it under
14
15
 *  the terms of the GNU General Public License as published by the Free
56
57
        void *data;
57
58
};
58
59
 
 
60
/* For each task's ofname and efname, are all the names NULL, 
 
61
   one null and the others "/dev/null", all non-null and unique,
 
62
   or all non-null and identical. */
 
63
typedef enum {
 
64
        SLURMD_ALL_NULL,   /* output from all tasks goes to the client (srun) */
 
65
        SLURMD_ONE_NULL,   /* output from one task goes to the client, output
 
66
                              from other tasks is discarded */
 
67
        SLURMD_ALL_UNIQUE, /* separate output files per task.  written from 
 
68
                              tasks unless slurmd_job_t->labelio == true, in 
 
69
                              which case the slurmstepd does the write */
 
70
        SLURMD_ALL_SAME,   /* all tasks write to the same file.  written from 
 
71
                              tasks unless slurmd_job_t->labelio == true, in 
 
72
                              which case the slurmstepd does the write */
 
73
        SLURMD_UNKNOWN
 
74
} slurmd_filename_pattern_t;
 
75
 
 
76
 
59
77
struct io_buf *alloc_io_buf(void);
60
78
void free_io_buf(struct io_buf *buf);
61
79
 
66
84
 * yet started, we initialize the msg_queue as an empty list and
67
85
 * directly add the eio_obj_t to the eio handle with eio_new_initial_handle.
68
86
 */
69
 
int io_initial_client_connect(srun_info_t *srun, slurmd_job_t *job);
 
87
int io_initial_client_connect(srun_info_t *srun, slurmd_job_t *job, 
 
88
                              int stdout_tasks, int stderr_tasks);
70
89
 
71
90
/* 
72
91
 * Initiate a TCP connection back to a waiting client (e.g. srun).
76
95
 */
77
96
int io_client_connect(srun_info_t *srun, slurmd_job_t *job);
78
97
 
 
98
 
 
99
/* 
 
100
 * Open a local file and create and eio object for files written
 
101
 * from the slurmstepd, probably with labelled output.
 
102
 */
 
103
int
 
104
io_create_local_client(const char *filename, int file_flags, 
 
105
                       slurmd_job_t *job, bool labelio,
 
106
                       int stdout_tasks, int stderr_tasks);
 
107
 
79
108
/*
80
109
 * Initialize each task's standard I/O file descriptors.  The file descriptors
81
110
 * may be files, or may be the end of a pipe which is handled by an eio_obj_t.
101
130
 
102
131
void io_close_all(slurmd_job_t *job);
103
132
 
 
133
void io_close_local_fds(slurmd_job_t *job);
 
134
 
 
135
 
 
136
/* 
 
137
 *  Look for a pattern in the stdout and stderr file names, and see
 
138
 *  if stdout and stderr point to the same file(s).
 
139
 *  See comments above for slurmd_filename_pattern_t.
 
140
 */
 
141
void io_find_filename_pattern(  slurmd_job_t *job, 
 
142
                                slurmd_filename_pattern_t *outpattern, 
 
143
                                slurmd_filename_pattern_t *errpattern,
 
144
                                bool *same_out_err_files );
 
145
 
 
146
/* 
 
147
 *  Get the flags to be used with the open call to create output files.
 
148
 */
 
149
int io_get_file_flags(slurmd_job_t *job);
 
150
 
104
151
/*
105
152
 *  Initialize "user managed" IO, where each task has a single TCP
106
153
 *  socket end point shared on stdin, stdout, and stderr.