PadicoTM

Documentation

« back to PM2 home.
Portals4.c
Go to the documentation of this file.
1/*
2 * Padico -- a High Performance Parallel and Distributed Computing Environment
3 * Copyright (c) 2002-2024 INRIA and the University of Rennes 1
4 * Alexandre DENIS <Alexandre.Denis@inria.fr>
5 * Christian PEREZ <Christian.Perez@inria.fr>
6 *
7 * The software has been registered at the Agency for the Protection of
8 * Programs (APP) under the number IDDN.FR.001.260013.000.S.P.2002.000.10000.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 */
24
29#include <Padico/Puk.h>
30#include <Padico/Module.h>
31#include <Padico/Topology.h>
32
33#include <portals4.h>
34
35
36static int padico_portals4_init(void);
37static void padico_portals4_finalize(void);
38
40 "Topology");
41
42
43/* ********************************************************* */
44
50
51static struct
52{
54} padico_portals4 = { .port = NULL };
55
56
57/* ********************************************************* */
58
59static int padico_portals4_init(void)
60{
61 int rc = PtlInit();
62 if(rc != PTL_OK)
63 {
64 padico_warning("failed to initialise portals4 library");
65 return -1;
66 }
67
71 if(rc != PTL_OK)
72 {
73 padico_warning("failed to initialise portals4 network interface");
74 PtlFini();
75 return -1;
76 }
79 if(rc != PTL_OK)
80 {
81 padico_warning("failed to get phys ID");
83 PtlFini();
84 return -1;
85 }
86
87 padico_print("phys ID- nid = %d; pid = %d\n", port->process_id.phys.nid, port->process_id.phys.pid);
88
90 if(network)
91 {
93 }
94 else
95 {
97 }
99 padico_portals4.port = port;
100
102 PtlFini();
103 return 0;
104}
105
107{
108 if(padico_portals4.port != NULL)
109 {
111 }
112}
static struct @62 padico_portals4
static void padico_portals4_finalize(void)
Definition Portals4.c:106
struct padico_portals4_port_s * port
Definition Portals4.c:53
static int padico_portals4_init(void)
Definition Portals4.c:59
return NULL
Definition Shm.h:88
static int done
Definition console-mod.c:49
padico_rc_t rc
Definition PadicoTM.h:146
padico_topo_network_t padico_topo_network_create(const char *id, padico_topo_binding_scope_t scope, size_t addr_size, int family)
Definition topology.c:1853
padico_topo_network_t padico_topo_network_getbyid(const char *network_id)
Definition topology.c:2351
#define padico_topo_getlocalhost()
Definition Topology.h:319
padico_topo_binding_t padico_topo_host_bind(padico_topo_host_t host, padico_topo_network_t network, const void *address)
Declare a new binding for a host.
Definition topology.c:1609
@ PADICO_TOPO_SCOPE_HOST
Definition Topology.h:95
padico_topo_network_t network
Definition psp-mx.c:113
padico_topo_network_t network
Definition Portals4.c:48
ptl_process_t process_id
Definition Portals4.c:47
a network, containing entities with bindings