2008-04-30 19:49:53 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2004-2008 The Trustees of Indiana University and Indiana
|
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
2011-06-23 20:38:02 +00:00
|
|
|
* Copyright (c) 2004-2011 The University of Tennessee and The University
|
2008-04-30 19:49:53 +00:00
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2015-06-23 20:59:57 -07:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
2008-04-30 19:49:53 +00:00
|
|
|
* University of Stuttgart. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2017-01-23 09:14:20 -08:00
|
|
|
* Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
|
2008-04-30 19:49:53 +00:00
|
|
|
* $COPYRIGHT$
|
2015-06-23 20:59:57 -07:00
|
|
|
*
|
2008-04-30 19:49:53 +00:00
|
|
|
* Additional copyrights may follow
|
2015-06-23 20:59:57 -07:00
|
|
|
*
|
2008-04-30 19:49:53 +00:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
/** @file:
|
|
|
|
*
|
|
|
|
* Populates global structure with system-specific information.
|
|
|
|
*
|
|
|
|
* Notes: add limits.h, compute size of integer and other types via sizeof(type)*CHAR_BIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _ORTE_NIDMAP_H_
|
|
|
|
#define _ORTE_NIDMAP_H_
|
|
|
|
|
|
|
|
#include "orte_config.h"
|
|
|
|
#include "orte/types.h"
|
|
|
|
|
|
|
|
#include "opal/dss/dss_types.h"
|
|
|
|
|
|
|
|
#include "orte/runtime/orte_globals.h"
|
|
|
|
|
|
|
|
BEGIN_C_DECLS
|
|
|
|
|
2017-03-29 18:28:25 -07:00
|
|
|
#define ORTE_MAX_REGEX_CMD_LENGTH 1024
|
|
|
|
|
2008-04-30 19:49:53 +00:00
|
|
|
#define ORTE_MAX_NODE_PREFIX 50
|
|
|
|
#define ORTE_CONTIG_NODE_CMD 0x01
|
|
|
|
#define ORTE_NON_CONTIG_NODE_CMD 0x02
|
|
|
|
|
2017-03-29 18:28:25 -07:00
|
|
|
|
2017-05-10 12:40:02 -07:00
|
|
|
ORTE_DECLSPEC void orte_util_nidmap_init(void);
|
|
|
|
|
2017-05-12 16:16:47 -07:00
|
|
|
ORTE_DECLSPEC int orte_util_nidmap_create(opal_pointer_array_t *pool, char **regex);
|
2017-03-29 18:28:25 -07:00
|
|
|
ORTE_DECLSPEC int orte_util_nidmap_parse(char *regex);
|
|
|
|
|
2017-01-23 09:14:20 -08:00
|
|
|
/* create a regular expression describing the nodes in the
|
|
|
|
* allocation */
|
|
|
|
ORTE_DECLSPEC int orte_util_encode_nodemap(opal_buffer_t *buffer);
|
|
|
|
|
|
|
|
/* decode a regular expression created by the encode function
|
|
|
|
* into the orte_node_pool array */
|
|
|
|
ORTE_DECLSPEC int orte_util_decode_daemon_nodemap(opal_buffer_t *buffer);
|
2008-04-30 19:49:53 +00:00
|
|
|
|
2017-03-29 18:28:25 -07:00
|
|
|
ORTE_DECLSPEC int orte_util_build_daemon_nidmap(void);
|
2017-02-01 16:33:14 -08:00
|
|
|
|
2017-05-12 16:16:47 -07:00
|
|
|
/* create a regular expression describing the ppn for a job */
|
|
|
|
ORTE_DECLSPEC int orte_util_nidmap_generate_ppn(orte_job_t *jdata, char **ppn);
|
|
|
|
|
|
|
|
/* decode the ppn */
|
|
|
|
ORTE_DECLSPEC int orte_util_nidmap_parse_ppn(orte_job_t *jdata, char *ppn);
|
|
|
|
|
2008-04-30 19:49:53 +00:00
|
|
|
END_C_DECLS
|
2011-06-23 20:38:02 +00:00
|
|
|
|
2011-08-26 22:16:14 +00:00
|
|
|
#endif
|