Skip to content

Commit 10cb9f6

Browse files
committed
oshmem: remove unnecessary dependencies to ORTE
either use OPAL or OMPI layers, since ORTE layer is not present when PMIx RTE is used Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
1 parent 18f679e commit 10cb9f6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+203
-233
lines changed

oshmem/include/oshmem/constants.h

Lines changed: 50 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/*
22
* Copyright (c) 2013 Mellanox Technologies, Inc.
33
* All rights reserved.
4+
* Copyright (c) 2019 Research Organization for Information Science
5+
* and Technology (RIST). All rights reserved.
46
* $COPYRIGHT$
57
*
68
* Additional copyrights may follow
@@ -11,60 +13,61 @@
1113
#ifndef OSHMEM_CONSTANTS_H
1214
#define OSHMEM_CONSTANTS_H
1315

14-
#include "orte/constants.h"
16+
#include "opal/constants.h"
17+
1518
#include "oshmem/include/shmem.h"
1619

1720

18-
#define OSHMEM_ERR_BASE ORTE_ERR_MAX
21+
#define OSHMEM_ERR_BASE OPAL_ERR_MAX
1922

2023
/* error codes */
2124
enum {
22-
/* Error codes inherited from ORTE/OPAL. Still enum values so
25+
/* Error codes inherited from OPAL. Still enum values so
2326
that we might get nice debugger help */
24-
OSHMEM_SUCCESS = ORTE_SUCCESS,
25-
26-
OSHMEM_ERROR = ORTE_ERROR,
27-
OSHMEM_ERR_OUT_OF_RESOURCE = ORTE_ERR_OUT_OF_RESOURCE,
28-
OSHMEM_ERR_TEMP_OUT_OF_RESOURCE = ORTE_ERR_TEMP_OUT_OF_RESOURCE,
29-
OSHMEM_ERR_RESOURCE_BUSY = ORTE_ERR_RESOURCE_BUSY,
30-
OSHMEM_ERR_BAD_PARAM = ORTE_ERR_BAD_PARAM,
31-
OSHMEM_ERR_FATAL = ORTE_ERR_FATAL,
32-
OSHMEM_ERR_NOT_IMPLEMENTED = ORTE_ERR_NOT_IMPLEMENTED,
33-
OSHMEM_ERR_NOT_SUPPORTED = ORTE_ERR_NOT_SUPPORTED,
34-
OSHMEM_ERR_INTERUPTED = ORTE_ERR_INTERUPTED,
35-
OSHMEM_ERR_WOULD_BLOCK = ORTE_ERR_WOULD_BLOCK,
36-
OSHMEM_ERR_IN_ERRNO = ORTE_ERR_IN_ERRNO,
37-
OSHMEM_ERR_UNREACH = ORTE_ERR_UNREACH,
38-
OSHMEM_ERR_NOT_FOUND = ORTE_ERR_NOT_FOUND,
39-
OSHMEM_EXISTS = ORTE_EXISTS, /* indicates that the specified object already exists */
40-
OSHMEM_ERR_TIMEOUT = ORTE_ERR_TIMEOUT,
41-
OSHMEM_ERR_NOT_AVAILABLE = ORTE_ERR_NOT_AVAILABLE,
42-
OSHMEM_ERR_PERM = ORTE_ERR_PERM,
43-
OSHMEM_ERR_VALUE_OUT_OF_BOUNDS = ORTE_ERR_VALUE_OUT_OF_BOUNDS,
44-
OSHMEM_ERR_FILE_READ_FAILURE = ORTE_ERR_FILE_READ_FAILURE,
45-
OSHMEM_ERR_FILE_WRITE_FAILURE = ORTE_ERR_FILE_WRITE_FAILURE,
46-
OSHMEM_ERR_FILE_OPEN_FAILURE = ORTE_ERR_FILE_OPEN_FAILURE,
47-
48-
OSHMEM_ERR_RECV_LESS_THAN_POSTED = ORTE_ERR_RECV_LESS_THAN_POSTED,
49-
OSHMEM_ERR_RECV_MORE_THAN_POSTED = ORTE_ERR_RECV_MORE_THAN_POSTED,
50-
OSHMEM_ERR_NO_MATCH_YET = ORTE_ERR_NO_MATCH_YET,
51-
OSHMEM_ERR_BUFFER = ORTE_ERR_BUFFER,
52-
OSHMEM_ERR_REQUEST = ORTE_ERR_REQUEST,
53-
OSHMEM_ERR_NO_CONNECTION_ALLOWED = ORTE_ERR_NO_CONNECTION_ALLOWED,
54-
OSHMEM_ERR_CONNECTION_REFUSED = ORTE_ERR_CONNECTION_REFUSED ,
55-
OSHMEM_ERR_CONNECTION_FAILED = ORTE_ERR_CONNECTION_FAILED,
56-
OSHMEM_PACK_MISMATCH = ORTE_ERR_PACK_MISMATCH,
57-
OSHMEM_ERR_PACK_FAILURE = ORTE_ERR_PACK_FAILURE,
58-
OSHMEM_ERR_UNPACK_FAILURE = ORTE_ERR_UNPACK_FAILURE,
59-
OSHMEM_ERR_COMM_FAILURE = ORTE_ERR_COMM_FAILURE,
60-
OSHMEM_UNPACK_INADEQUATE_SPACE = ORTE_ERR_UNPACK_INADEQUATE_SPACE,
61-
OSHMEM_UNPACK_READ_PAST_END_OF_BUFFER = ORTE_ERR_UNPACK_READ_PAST_END_OF_BUFFER,
62-
OSHMEM_ERR_TYPE_MISMATCH = ORTE_ERR_TYPE_MISMATCH,
63-
OSHMEM_ERR_COMPARE_FAILURE = ORTE_ERR_COMPARE_FAILURE,
64-
OSHMEM_ERR_COPY_FAILURE = ORTE_ERR_COPY_FAILURE,
65-
OSHMEM_ERR_UNKNOWN_DATA_TYPE = ORTE_ERR_UNKNOWN_DATA_TYPE,
66-
OSHMEM_ERR_DATA_TYPE_REDEF = ORTE_ERR_DATA_TYPE_REDEF,
67-
OSHMEM_ERR_DATA_OVERWRITE_ATTEMPT = ORTE_ERR_DATA_OVERWRITE_ATTEMPT
27+
OSHMEM_SUCCESS = OPAL_SUCCESS,
28+
29+
OSHMEM_ERROR = OPAL_ERROR,
30+
OSHMEM_ERR_OUT_OF_RESOURCE = OPAL_ERR_OUT_OF_RESOURCE,
31+
OSHMEM_ERR_TEMP_OUT_OF_RESOURCE = OPAL_ERR_TEMP_OUT_OF_RESOURCE,
32+
OSHMEM_ERR_RESOURCE_BUSY = OPAL_ERR_RESOURCE_BUSY,
33+
OSHMEM_ERR_BAD_PARAM = OPAL_ERR_BAD_PARAM,
34+
OSHMEM_ERR_FATAL = OPAL_ERR_FATAL,
35+
OSHMEM_ERR_NOT_IMPLEMENTED = OPAL_ERR_NOT_IMPLEMENTED,
36+
OSHMEM_ERR_NOT_SUPPORTED = OPAL_ERR_NOT_SUPPORTED,
37+
OSHMEM_ERR_INTERUPTED = OPAL_ERR_INTERRUPTED,
38+
OSHMEM_ERR_WOULD_BLOCK = OPAL_ERR_WOULD_BLOCK,
39+
OSHMEM_ERR_IN_ERRNO = OPAL_ERR_IN_ERRNO,
40+
OSHMEM_ERR_UNREACH = OPAL_ERR_UNREACH,
41+
OSHMEM_ERR_NOT_FOUND = OPAL_ERR_NOT_FOUND,
42+
OSHMEM_EXISTS = OPAL_EXISTS, /* indicates that the specified object already exists */
43+
OSHMEM_ERR_TIMEOUT = OPAL_ERR_TIMEOUT,
44+
OSHMEM_ERR_NOT_AVAILABLE = OPAL_ERR_NOT_AVAILABLE,
45+
OSHMEM_ERR_PERM = OPAL_ERR_PERM,
46+
OSHMEM_ERR_VALUE_OUT_OF_BOUNDS = OPAL_ERR_VALUE_OUT_OF_BOUNDS,
47+
OSHMEM_ERR_FILE_READ_FAILURE = OPAL_ERR_FILE_READ_FAILURE,
48+
OSHMEM_ERR_FILE_WRITE_FAILURE = OPAL_ERR_FILE_WRITE_FAILURE,
49+
OSHMEM_ERR_FILE_OPEN_FAILURE = OPAL_ERR_FILE_OPEN_FAILURE,
50+
51+
OSHMEM_ERR_RECV_LESS_THAN_POSTED = (OSHMEM_ERR_BASE - 1),
52+
OSHMEM_ERR_RECV_MORE_THAN_POSTED = (OSHMEM_ERR_BASE - 2),
53+
OSHMEM_ERR_NO_MATCH_YET = (OSHMEM_ERR_BASE - 3),
54+
OSHMEM_ERR_BUFFER = OPAL_ERR_BUFFER,
55+
OSHMEM_ERR_REQUEST = (OSHMEM_ERR_BASE - 4),
56+
OSHMEM_ERR_NO_CONNECTION_ALLOWED = (OSHMEM_ERR_BASE - 5),
57+
OSHMEM_ERR_CONNECTION_REFUSED = (OSHMEM_ERR_BASE - 6),
58+
OSHMEM_ERR_CONNECTION_FAILED = OPAL_ERR_CONNECTION_FAILED,
59+
OSHMEM_PACK_MISMATCH = OPAL_ERR_PACK_MISMATCH,
60+
OSHMEM_ERR_PACK_FAILURE = OPAL_ERR_PACK_FAILURE,
61+
OSHMEM_ERR_UNPACK_FAILURE = OPAL_ERR_UNPACK_FAILURE,
62+
OSHMEM_ERR_COMM_FAILURE = OPAL_ERR_COMM_FAILURE,
63+
OSHMEM_UNPACK_INADEQUATE_SPACE = OPAL_ERR_UNPACK_INADEQUATE_SPACE,
64+
OSHMEM_UNPACK_READ_PAST_END_OF_BUFFER = OPAL_ERR_UNPACK_READ_PAST_END_OF_BUFFER,
65+
OSHMEM_ERR_TYPE_MISMATCH = OPAL_ERR_TYPE_MISMATCH,
66+
OSHMEM_ERR_COMPARE_FAILURE = (OSHMEM_ERR_BASE - 9),
67+
OSHMEM_ERR_COPY_FAILURE = (OSHMEM_ERR_BASE - 10),
68+
OSHMEM_ERR_UNKNOWN_DATA_TYPE = OPAL_ERR_UNKNOWN_DATA_TYPE,
69+
OSHMEM_ERR_DATA_TYPE_REDEF = OPAL_ERR_DATA_TYPE_REDEF,
70+
OSHMEM_ERR_DATA_OVERWRITE_ATTEMPT = OPAL_ERR_DATA_OVERWRITE_ATTEMPT
6871
};
6972

7073

oshmem/info/info.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
* Copyright (c) 2015 Mellanox Technologies, Inc.
33
* All rights reserved.
44
* Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All Rights reserved.
5+
* Copyright (c) 2019 Research Organization for Information Science
6+
* and Technology (RIST). All rights reserved.
57
* $COPYRIGHT$
68
*
79
* Additional copyrights may follow
@@ -15,13 +17,13 @@
1517
#include <string.h>
1618
#include <errno.h>
1719

18-
#include "orte/runtime/orte_globals.h"
19-
#include "orte/util/show_help.h"
20-
2120
#include "opal/util/opal_environ.h"
21+
#include "opal/util/show_help.h"
2222
#include "opal/util/output.h"
2323
#include "opal/util/printf.h"
2424

25+
#include "ompi/mca/rte/rte.h"
26+
2527
#include "oshmem/version.h"
2628
#include "oshmem/constants.h"
2729
#include "oshmem/info/info.h"
@@ -65,15 +67,15 @@ int oshmem_info_init(void)
6567
goto out;
6668
}
6769
}
68-
if (oshmem_shmem_info_env.print_version && 0 == ORTE_PROC_MY_NAME->vpid) {
70+
if (oshmem_shmem_info_env.print_version && 0 == OMPI_PROC_MY_NAME->vpid) {
6971
char version[OSHMEM_MAX_LIBRARY_VERSION_STRING];
7072
int len;
7173

7274
ret = oshmem_info_get_library_version(version, &len);
7375
if (OSHMEM_SUCCESS != ret || 0 == len) {
7476
goto out;
7577
}
76-
orte_show_help("help-shmem-runtime.txt",
78+
opal_show_help("help-shmem-runtime.txt",
7779
"oshmem_init:print-version",
7880
true,
7981
version);
@@ -85,8 +87,8 @@ int oshmem_info_init(void)
8587
goto out;
8688
}
8789
}
88-
if (oshmem_shmem_info_env.print_info && 0 == ORTE_PROC_MY_NAME->vpid) {
89-
orte_show_help("help-shmem-runtime.txt",
90+
if (oshmem_shmem_info_env.print_info && 0 == OMPI_PROC_MY_NAME->vpid) {
91+
opal_show_help("help-shmem-runtime.txt",
9092
"oshmem_init:print-info",
9193
true,
9294
OSHMEM_ENV_VERSION,

oshmem/mca/memheap/base/memheap_base_mkey.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
/*
33
* Copyright (c) 2013-2015 Mellanox Technologies, Inc.
44
* All rights reserved.
5-
* Copyright (c) 2015-2016 Research Organization for Information Science
6-
* and Technology (RIST). All rights reserved.
5+
* Copyright (c) 2015-2019 Research Organization for Information Science
6+
* and Technology (RIST). All rights reserved.
77
* Copyright (c) 2015 Intel, Inc. All rights reserved.
88
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
99
* reserved.
@@ -202,7 +202,7 @@ static void do_recv(int source_pe, opal_buffer_t* buffer)
202202
MEMHEAP_VERBOSE(5, "unpacking %d of %d", cnt, OPAL_UINT8);
203203
rc = opal_dss.unpack(buffer, &msg_type, &cnt, OPAL_UINT8);
204204
if (OPAL_SUCCESS != rc) {
205-
ORTE_ERROR_LOG(rc);
205+
OMPI_ERROR_LOG(rc);
206206
goto send_fail;
207207
}
208208

@@ -219,7 +219,7 @@ static void do_recv(int source_pe, opal_buffer_t* buffer)
219219
msg = OBJ_NEW(opal_buffer_t);
220220
if (!msg) {
221221
MEMHEAP_ERROR("failed to get msg buffer");
222-
ORTE_ERROR_LOG(rc);
222+
OMPI_ERROR_LOG(rc);
223223
return;
224224
}
225225

@@ -234,7 +234,7 @@ static void do_recv(int source_pe, opal_buffer_t* buffer)
234234
rc = send_buffer(source_pe, msg);
235235
if (MPI_SUCCESS != rc) {
236236
MEMHEAP_ERROR("FAILED to send rml message %d", rc);
237-
ORTE_ERROR_LOG(rc);
237+
OMPI_ERROR_LOG(rc);
238238
goto send_fail;
239239
}
240240
break;
@@ -264,7 +264,7 @@ static void do_recv(int source_pe, opal_buffer_t* buffer)
264264
send_fail: msg = OBJ_NEW(opal_buffer_t);
265265
if (!msg) {
266266
MEMHEAP_ERROR("failed to get msg buffer");
267-
ORTE_ERROR_LOG(rc);
267+
OMPI_ERROR_LOG(rc);
268268
return;
269269
}
270270
msg_type = MEMHEAP_RKEY_RESP_FAIL;
@@ -273,7 +273,7 @@ static void do_recv(int source_pe, opal_buffer_t* buffer)
273273
rc = send_buffer(source_pe, msg);
274274
if (MPI_SUCCESS != rc) {
275275
MEMHEAP_ERROR("FAILED to send rml message %d", rc);
276-
ORTE_ERROR_LOG(rc);
276+
OMPI_ERROR_LOG(rc);
277277
}
278278

279279
}
@@ -340,14 +340,14 @@ static int oshmem_mkey_recv_cb(void)
340340
tmp_buf = malloc(size);
341341
if (NULL == tmp_buf) {
342342
MEMHEAP_ERROR("not enough memory");
343-
ORTE_ERROR_LOG(0);
343+
OMPI_ERROR_LOG(0);
344344
return n;
345345
} else {
346346
memcpy(tmp_buf, (void*)&r->buf, size);
347347
msg = OBJ_NEW(opal_buffer_t);
348348
if (NULL == msg) {
349349
MEMHEAP_ERROR("not enough memory");
350-
ORTE_ERROR_LOG(0);
350+
OMPI_ERROR_LOG(0);
351351
free(tmp_buf);
352352
return n;
353353
}
@@ -366,7 +366,7 @@ static int oshmem_mkey_recv_cb(void)
366366
rc = PMPI_Start(&r->recv_req);
367367
if (MPI_SUCCESS != rc) {
368368
MEMHEAP_ERROR("Failed to post recv request %d", rc);
369-
ORTE_ERROR_LOG(rc);
369+
OMPI_ERROR_LOG(rc);
370370
return n;
371371
}
372372
opal_list_append(&memheap_oob.req_list, &r->super);

oshmem/mca/memheap/base/memheap_base_select.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/*
22
* Copyright (c) 2013-2015 Mellanox Technologies, Inc.
33
* All rights reserved.
4-
* Copyright (c) 2015 Research Organization for Information Science
5-
* and Technology (RIST). All rights reserved.
4+
* Copyright (c) 2015-2019 Research Organization for Information Science
5+
* and Technology (RIST). All rights reserved.
66
* $COPYRIGHT$
77
*
88
* Additional copyrights may follow
@@ -21,7 +21,6 @@
2121
#include "oshmem/util/oshmem_util.h"
2222
#include "oshmem/mca/memheap/memheap.h"
2323
#include "oshmem/mca/memheap/base/base.h"
24-
#include "orte/mca/errmgr/errmgr.h"
2524

2625
mca_memheap_base_module_t mca_memheap = {0};
2726

oshmem/mca/memheap/buddy/memheap_buddy.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/* Copyright (c) 2013 Mellanox Technologies, Inc.
22
* All rights reserved.
3+
* Copyright (c) 2019 Research Organization for Information Science
4+
* and Technology (RIST). All rights reserved.
35
* $COPYRIGHT$
46
*
57
* Additional copyrights may follow
@@ -14,10 +16,8 @@
1416
#include "oshmem/mca/memheap/buddy/memheap_buddy.h"
1517
#include "oshmem/mca/memheap/buddy/memheap_buddy_component.h"
1618
#include "oshmem/mca/memheap/base/base.h"
17-
#include "orte/mca/grpcomm/grpcomm.h"
1819
#include "opal/class/opal_hash_table.h"
1920
#include "opal/class/opal_object.h"
20-
#include "orte/util/name_fns.h"
2121

2222
static int buddy_init(mca_memheap_buddy_module_t* buddy);
2323

oshmem/mca/memheap/ptmalloc/memheap_ptmalloc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/* Copyright (c) 2013 Mellanox Technologies, Inc.
22
* All rights reserved.
3+
* Copyright (c) 2019 Research Organization for Information Science
4+
* and Technology (RIST). All rights reserved.
35
* $COPYRIGHT$
46
*
57
* Additional copyrights may follow
@@ -14,10 +16,8 @@
1416
#include "oshmem/mca/memheap/ptmalloc/memheap_ptmalloc.h"
1517
#include "oshmem/mca/memheap/ptmalloc/memheap_ptmalloc_component.h"
1618
#include "oshmem/mca/memheap/base/base.h"
17-
#include "orte/mca/grpcomm/grpcomm.h"
1819
#include "opal/class/opal_hash_table.h"
1920
#include "opal/class/opal_object.h"
20-
#include "orte/util/name_fns.h"
2121

2222
mca_memheap_ptmalloc_module_t memheap_ptmalloc = {
2323
{

oshmem/mca/scoll/basic/scoll_basic_barrier.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/*
22
* Copyright (c) 2013-2015 Mellanox Technologies, Inc.
33
* All rights reserved.
4+
* Copyright (c) 2019 Research Organization for Information Science
5+
* and Technology (RIST). All rights reserved.
46
* $COPYRIGHT$
57
*
68
* Additional copyrights may follow
@@ -12,8 +14,6 @@
1214
#include <stdio.h>
1315
#include <stdlib.h>
1416

15-
#include "orte/mca/grpcomm/grpcomm.h"
16-
1717
#include "oshmem/constants.h"
1818
#include "oshmem/mca/spml/spml.h"
1919
#include "oshmem/mca/scoll/scoll.h"

oshmem/mca/scoll/basic/scoll_basic_broadcast.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/*
22
* Copyright (c) 2013 Mellanox Technologies, Inc.
33
* All rights reserved.
4+
* Copyright (c) 2019 Research Organization for Information Science
5+
* and Technology (RIST). All rights reserved.
46
* $COPYRIGHT$
57
*
68
* Additional copyrights may follow
@@ -12,8 +14,6 @@
1214
#include <stdio.h>
1315
#include <stdlib.h>
1416

15-
#include "orte/mca/grpcomm/grpcomm.h"
16-
1717
#include "opal/util/bit_ops.h"
1818

1919
#include "oshmem/constants.h"

oshmem/mca/scoll/basic/scoll_basic_collect.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/*
22
* Copyright (c) 2013-2015 Mellanox Technologies, Inc.
33
* All rights reserved.
4+
* Copyright (c) 2019 Research Organization for Information Science
5+
* and Technology (RIST). All rights reserved.
46
* $COPYRIGHT$
57
*
68
* Additional copyrights may follow
@@ -12,8 +14,6 @@
1214
#include <stdio.h>
1315
#include <stdlib.h>
1416

15-
#include "orte/mca/grpcomm/grpcomm.h"
16-
1717
#include "oshmem/constants.h"
1818
#include "oshmem/mca/spml/spml.h"
1919
#include "oshmem/mca/scoll/scoll.h"

oshmem/mca/scoll/mpi/scoll_mpi.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
/**
2-
Copyright (c) 2011 Mellanox Technologies. All rights reserved.
3-
$COPYRIGHT$
4-
5-
Additional copyrights may follow
6-
7-
$HEADER$
1+
/*
2+
* Copyright (c) 2011 Mellanox Technologies. All rights reserved.
3+
* Copyright (c) 2019 Research Organization for Information Science
4+
* and Technology (RIST). All rights reserved.
5+
* $COPYRIGHT$
6+
*
7+
* Additional copyrights may follow
8+
*
9+
* $HEADER$
810
*/
911

1012
#ifndef MCA_SCOLL_MPI_H
@@ -20,8 +22,6 @@
2022
#include "oshmem/proc/proc.h"
2123
#include "ompi/communicator/communicator.h"
2224

23-
#include "orte/runtime/orte_globals.h"
24-
2525
#include "scoll_mpi_debug.h"
2626
BEGIN_C_DECLS
2727

0 commit comments

Comments
 (0)