PageRenderTime 20ms CodeModel.GetById 16ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

/src/qsnet/qswutil.h

https://code.google.com/
C++ Header | 75 lines | 37 code | 10 blank | 28 comment | 0 complexity | bb0c03bcbf35a21e7e3bab9c5a639efd MD5 | raw file
 1/*****************************************************************************\
 2 *  $Id$
 3 *****************************************************************************
 4 *  Copyright (C) 2001-2006 The Regents of the University of California.
 5 *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
 6 *  Written by Jim Garlick <garlick@llnl.gov>.
 7 *  UCRL-CODE-2003-005.
 8 *  
 9 *  This file is part of Pdsh, a parallel remote shell program.
10 *  For details, see <http://www.llnl.gov/linux/pdsh/>.
11 *  
12 *  Pdsh is free software; you can redistribute it and/or modify it under
13 *  the terms of the GNU General Public License as published by the Free
14 *  Software Foundation; either version 2 of the License, or (at your option)
15 *  any later version.
16 *  
17 *  Pdsh is distributed in the hope that it will be useful, but WITHOUT ANY
18 *  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
19 *  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
20 *  details.
21 *  
22 *  You should have received a copy of the GNU General Public License along
23 *  with Pdsh; if not, write to the Free Software Foundation, Inc.,
24 *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
25\*****************************************************************************/
26
27#ifndef _QSWUTIL_INCLUDED
28#define _QSWUTIL_INCLUDED
29
30#if defined(HAVE_LIBELANCTRL)
31#  include <elan/capability.h>
32#elif defined(HAVE_LIBELAN3)
33#  include <elan3/elan3.h>
34#endif
35
36#include "src/common/hostlist.h"
37
38#ifndef ELAN_MAX_RAILS
39#  define ELAN_MAX_RAILS 16
40#endif
41#define QSW_RAILMASK_MAX    ((1<<ELAN_MAX_RAILS) - 1)
42
43typedef struct {
44    int prgnum;
45    int rank;
46    int nodeid;
47    int procid;
48    int nnodes;
49    int nprocs;
50} qsw_info_t;
51
52int qsw_init(void);
53void qsw_fini(void);
54
55int qsw_encode_cap(char *s, int len, ELAN_CAPABILITY * cap);
56int qsw_encode_cap_bitmap(char *s, int len, ELAN_CAPABILITY * cap, int i);
57int qsw_decode_cap(char *s, ELAN_CAPABILITY * cap);
58int qsw_decode_cap_bitmap(char *s, ELAN_CAPABILITY * cap, int i);
59int qsw_cap_bitmap_count(void);
60int qsw_encode_info(char *s, int len, qsw_info_t * qi);
61int qsw_decode_info(char *s, qsw_info_t * qi);
62int qsw_init_capability(ELAN_CAPABILITY * cap, int nprocs,
63                        hostlist_t nodelist, int cyclic_alloc, 
64                        unsigned int railmask);
65int qsw_get_prgnum(void);
66void qsw_setup_program(ELAN_CAPABILITY * cap, qsw_info_t * qi, uid_t uid);
67int qsw_prgsignal(int prgid, int signo);
68
69int qsw_spawn_neterr_thr(void);
70
71#endif                          /* _QSWUTIL_INCLUDED */
72
73/*
74 * vi:tabstop=4 shiftwidth=4 expandtab
75 */