Skip to content

Commit 5d35c73

Browse files
committed
Merge branch 'main' into oshmem/mca/ucx/fix-double-cleanup
2 parents 8eee1ba + e53e700 commit 5d35c73

File tree

4 files changed

+120
-9
lines changed

4 files changed

+120
-9
lines changed

.github/workflows/ompi_mpi4py.yaml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
name: GitHub Action CI
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
mpi4py:
7+
runs-on: ubuntu-latest
8+
timeout-minutes: 60
9+
steps:
10+
- name: Configure hostname
11+
run: echo 127.0.0.1 `hostname` | sudo tee -a /etc/hosts > /dev/null
12+
if: ${{ runner.os == 'Linux' || runner.os == 'macOS' }}
13+
14+
- name: Install depencencies
15+
run: sudo apt-get install -y -q
16+
libnuma-dev
17+
18+
- name: Checkout Open MPI
19+
uses: actions/checkout@v4
20+
with:
21+
path: mpi-build
22+
submodules: recursive
23+
24+
- name: Bootstrap Open MPI
25+
run: ./autogen.pl
26+
working-directory: mpi-build
27+
28+
- name: Configure Open MPI
29+
run: ./configure
30+
--disable-dependency-tracking
31+
--disable-sphinx
32+
--disable-man-pages
33+
--disable-mpi-fortran
34+
--disable-oshmem
35+
--enable-debug
36+
--enable-mem-debug
37+
LDFLAGS=-Wl,-rpath,/usr/local/lib
38+
working-directory: mpi-build
39+
40+
- name: Build MPI
41+
run: make -j 2
42+
working-directory: mpi-build
43+
44+
- name: Install MPI
45+
run: sudo make install
46+
working-directory: mpi-build
47+
48+
- name: Tweak MPI
49+
run: |
50+
# Tweak MPI
51+
mca_params="$HOME/.openmpi/mca-params.conf"
52+
mkdir -p "$(dirname "$mca_params")"
53+
echo mpi_param_check = true >> "$mca_params"
54+
echo mpi_show_handle_leaks = true >> "$mca_params"
55+
echo rmaps_base_oversubscribe = true >> "$mca_params"
56+
mca_params="$HOME/.prte/mca-params.conf"
57+
mkdir -p "$(dirname "$mca_params")"
58+
echo rmaps_default_mapping_policy = :oversubscribe >> "$mca_params"
59+
60+
- name: Show MPI
61+
run: ompi_info
62+
63+
- name: Show MPICC
64+
run: mpicc -show
65+
66+
- name: Use Python
67+
uses: actions/setup-python@v5
68+
with:
69+
python-version: 3
70+
architecture: x64
71+
72+
- name: Install Python packages (build)
73+
run: python -m pip install --upgrade
74+
setuptools pip wheel
75+
76+
- name: Install Python packages (test)
77+
run: python -m pip install --upgrade
78+
numpy cffi pyyaml
79+
80+
- name: Checkout mpi4py
81+
uses: actions/checkout@v4
82+
with:
83+
repository: "mpi4py/mpi4py"
84+
85+
- name: Install mpi4py
86+
run: python -m pip install .
87+
env:
88+
CFLAGS: "-O0"
89+
90+
- name: Test mpi4py (singleton)
91+
run: python test/main.py -v
92+
if: ${{ true }}
93+
- name: Test mpi4py (np=1)
94+
run: mpiexec -n 1 python test/main.py -v
95+
- name: Test mpi4py (np=2)
96+
run: mpiexec -n 2 python test/main.py -v -f
97+
- name: Test mpi4py (np=3)
98+
run: mpiexec -n 3 python test/main.py -v -f
99+
if: ${{ true }}
100+
timeout-minutes: 20
101+
- name: Test mpi4py (np=4)
102+
run: mpiexec -n 4 python test/main.py -v -f
103+
if: ${{ true }}
104+
timeout-minutes: 20
105+
- name: Test mpi4py (np=5)
106+
run: mpiexec -n 5 python test/main.py -v -f
107+
if: ${{ true }}
108+
timeout-minutes: 20
109+
- name: Test mpi4py.run
110+
run: python demo/test-run/test_run.py -v
111+
if: ${{ true }}
112+
timeout-minutes: 20

ompi/communicator/comm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1618,7 +1618,7 @@ int ompi_comm_create_from_group (ompi_group_t *group, const char *tag, opal_info
16181618

16191619
/*
16201620
* setup predefined keyvals - see MPI Standard for predefined keyvals cached on
1621-
* communicators created via MPI_Comm_from_group or MPI_Intercomm_create_from_groups
1621+
* communicators created via MPI_Comm_create_from_group or MPI_Intercomm_create_from_groups
16221622
*/
16231623
ompi_attr_hash_init(&newcomp->c_keyhash);
16241624
ompi_attr_set_int(COMM_ATTR,

ompi/communicator/comm_cid.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ static int ompi_comm_ext_cid_new_block (ompi_communicator_t *newcomm, ompi_commu
367367
opal_show_help("help-comm.txt",
368368
"MPI function not supported",
369369
true,
370-
"MPI_Comm_from_group/MPI_Intercomm_from_groups",
370+
"MPI_Comm_create_from_group/MPI_Intercomm_create_from_groups",
371371
msg_string);
372372
ret = MPI_ERR_UNSUPPORTED_OPERATION;
373373
break;
@@ -490,7 +490,7 @@ int ompi_comm_nextcid_nb (ompi_communicator_t *newcomm, ompi_communicator_t *com
490490

491491
/* old CID algorighm */
492492

493-
/* if we got here and comm is NULL then that means the app is invoking MPI-4 Sessions or later
493+
/* if we got here and comm is NULL then that means the app is invoking MPI-4 Sessions or later
494494
functions but the pml does not support these functions so return not supported */
495495
if (NULL == comm) {
496496
char msg_string[1024];
@@ -499,7 +499,7 @@ int ompi_comm_nextcid_nb (ompi_communicator_t *newcomm, ompi_communicator_t *com
499499
opal_show_help("help-comm.txt",
500500
"MPI function not supported",
501501
true,
502-
"MPI_Comm_from_group/MPI_Intercomm_from_groups",
502+
"MPI_Comm_create_from_group/MPI_Intercomm_create_from_groups",
503503
msg_string);
504504

505505
return MPI_ERR_UNSUPPORTED_OPERATION;

opal/mca/accelerator/rocm/accelerator_rocm_component.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* reserved.
77
* Copyright (c) 2017-2022 Amazon.com, Inc. or its affiliates.
88
* All Rights reserved.
9-
* Copyright (c) 2022 Advanced Micro Devices, Inc. All Rights reserved.
9+
* Copyright (c) 2022-2024 Advanced Micro Devices, Inc. All Rights reserved.
1010
* $COPYRIGHT$
1111
*
1212
* Additional copyrights may follow
@@ -17,13 +17,12 @@
1717
#include "opal_config.h"
1818

1919
#include <stdio.h>
20-
#include <dlfcn.h>
2120

2221
#include "opal/mca/dl/base/base.h"
2322
#include "opal/runtime/opal_params.h"
2423
#include "accelerator_rocm.h"
2524

26-
int opal_accelerator_rocm_memcpy_async = 1;
25+
int opal_accelerator_rocm_memcpy_async = 0;
2726
int opal_accelerator_rocm_verbose = 0;
2827
size_t opal_accelerator_rocm_memcpyD2H_limit=1024;
2928
size_t opal_accelerator_rocm_memcpyH2D_limit=1048576;
@@ -149,9 +148,9 @@ static int accelerator_rocm_component_register(void)
149148
&opal_accelerator_rocm_memcpyH2D_limit);
150149

151150
/* Use this flag to test async vs sync copies */
152-
opal_accelerator_rocm_memcpy_async = 1;
151+
opal_accelerator_rocm_memcpy_async = 0;
153152
(void) mca_base_var_register("ompi", "mpi", "accelerator_rocm", "memcpy_async",
154-
"Set to 0 to force using hipMemcpy instead of hipMemcpyAsync",
153+
"Set to 1 to force using hipMemcpyAsync instead of hipMemcpy",
155154
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_9,
156155
MCA_BASE_VAR_SCOPE_READONLY, &opal_accelerator_rocm_memcpy_async);
157156

0 commit comments

Comments
 (0)