Skip to content

Commit 0fe4818

Browse files
committed
Merge pull request #1318 from hjelmn/osc_rdma_fixes
osc/rdma: disable put aggregation when using threads
2 parents ae3df29 + 6180386 commit 0fe4818

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

ompi/mca/osc/rdma/osc_rdma_comm.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
22
/*
3-
* Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights
3+
* Copyright (c) 2014-2016 Los Alamos National Security, LLC. All rights
44
* reserved.
55
* $COPYRIGHT$
66
*
@@ -484,7 +484,7 @@ static int ompi_osc_rdma_aggregate_alloc (ompi_osc_rdma_sync_t *sync, ompi_osc_r
484484

485485
ompi_osc_rdma_aggregate_append (aggregation, request, source_buffer, size);
486486

487-
OPAL_THREAD_SCOPED_LOCK(&sync->lock, opal_list_append (&sync->aggregations, (opal_list_item_t *) aggregation));
487+
opal_list_append (&sync->aggregations, (opal_list_item_t *) aggregation);
488488

489489
return OMPI_SUCCESS;
490490
}

ompi/mca/osc/rdma/osc_rdma_component.c

+16-9
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
12-
* Copyright (c) 2007-2015 Los Alamos National Security, LLC. All rights
12+
* Copyright (c) 2007-2016 Los Alamos National Security, LLC. All rights
1313
* reserved.
1414
* Copyright (c) 2006-2008 University of Houston. All rights reserved.
1515
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
@@ -265,14 +265,21 @@ static int ompi_osc_rdma_component_init (bool enable_progress_threads,
265265
}
266266

267267
OBJ_CONSTRUCT(&mca_osc_rdma_component.aggregate, opal_free_list_t);
268-
ret = opal_free_list_init (&mca_osc_rdma_component.aggregate,
269-
sizeof(ompi_osc_rdma_aggregation_t), 8,
270-
OBJ_CLASS(ompi_osc_rdma_aggregation_t), 0, 0,
271-
32, 128, 32, NULL, 0, NULL, NULL, NULL);
272-
if (OPAL_SUCCESS != ret) {
273-
opal_output_verbose(1, ompi_osc_base_framework.framework_output,
274-
"%s:%d: opal_free_list_init failed: %d\n",
275-
__FILE__, __LINE__, ret);
268+
269+
if (!enable_mpi_threads && mca_osc_rdma_component.aggregation_limit) {
270+
ret = opal_free_list_init (&mca_osc_rdma_component.aggregate,
271+
sizeof(ompi_osc_rdma_aggregation_t), 8,
272+
OBJ_CLASS(ompi_osc_rdma_aggregation_t), 0, 0,
273+
32, 128, 32, NULL, 0, NULL, NULL, NULL);
274+
275+
if (OPAL_SUCCESS != ret) {
276+
opal_output_verbose(1, ompi_osc_base_framework.framework_output,
277+
"%s:%d: opal_free_list_init failed: %d\n",
278+
__FILE__, __LINE__, ret);
279+
}
280+
} else {
281+
/* only enable put aggregation when not using threads */
282+
mca_osc_rdma_component.aggregation_limit = 0;
276283
}
277284

278285
return ret;

0 commit comments

Comments
 (0)