Skip to content

Commit 975f586

Browse files
authored
Merge pull request #3187 from jsquyres/pr/v2.0.3/compiler-warning-fixes
v2.0.3: compiler warning fixes
2 parents 1e2b337 + cb4bc5a commit 975f586

File tree

11 files changed

+34
-62
lines changed

11 files changed

+34
-62
lines changed

ompi/mca/coll/base/coll_base_allgatherv.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* Copyright (c) 2015-2016 Research Organization for Information Science
1717
* and Technology (RIST). All rights reserved.
1818
* Copyright (c) 2017 IBM Corporation. All rights reserved.
19+
* Copyright (c) 2017 Cisco Systems, Inc. All rights reserved
1920
* $COPYRIGHT$
2021
*
2122
* Additional copyrights may follow
@@ -603,7 +604,7 @@ ompi_coll_base_allgatherv_intra_basic_default(const void *sbuf, int scount,
603604
struct ompi_communicator_t *comm,
604605
mca_coll_base_module_t *module)
605606
{
606-
int i, size, rank, err;
607+
int size, rank, err;
607608
MPI_Aint extent, lb;
608609
char *send_buf = NULL;
609610
struct ompi_datatype_t *newtype, *send_type;

ompi/mca/coll/sync/coll_sync.h

Lines changed: 5 additions & 5 deletions
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) 2008-2009 Cisco Systems, Inc. All rights reserved.
12+
* Copyright (c) 2008-2017 Cisco Systems, Inc. All rights reserved
1313
* $COPYRIGHT$
1414
*
1515
* Additional copyrights may follow
@@ -71,7 +71,7 @@ int mca_coll_sync_gather(const void *sbuf, int scount,
7171

7272
int mca_coll_sync_gatherv(const void *sbuf, int scount,
7373
struct ompi_datatype_t *sdtype,
74-
void *rbuf, int *rcounts, int *disps,
74+
void *rbuf, const int *rcounts, const int *disps,
7575
struct ompi_datatype_t *rdtype,
7676
int root,
7777
struct ompi_communicator_t *comm,
@@ -85,7 +85,7 @@ int mca_coll_sync_reduce(const void *sbuf, void *rbuf, int count,
8585
mca_coll_base_module_t *module);
8686

8787
int mca_coll_sync_reduce_scatter(const void *sbuf, void *rbuf,
88-
int *rcounts,
88+
const int *rcounts,
8989
struct ompi_datatype_t *dtype,
9090
struct ompi_op_t *op,
9191
struct ompi_communicator_t *comm,
@@ -105,8 +105,8 @@ int mca_coll_sync_scatter(const void *sbuf, int scount,
105105
struct ompi_communicator_t *comm,
106106
mca_coll_base_module_t *module);
107107

108-
int mca_coll_sync_scatterv(const void *sbuf, int *scounts, int *disps,
109-
struct ompi_datatype_t *sdtype,
108+
int mca_coll_sync_scatterv(const void *sbuf, const int *scounts,
109+
const int *disps, struct ompi_datatype_t *sdtype,
110110
void *rbuf, int rcount,
111111
struct ompi_datatype_t *rdtype,
112112
int root,

ompi/mca/coll/sync/coll_sync_gatherv.c

Lines changed: 2 additions & 2 deletions
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) 2009 Cisco Systems, Inc. All rights reserved.
12+
* Copyright (c) 2009-2017 Cisco Systems, Inc. All rights reserved
1313
* $COPYRIGHT$
1414
*
1515
* Additional copyrights may follow
@@ -31,7 +31,7 @@
3131
*/
3232
int mca_coll_sync_gatherv(const void *sbuf, int scount,
3333
struct ompi_datatype_t *sdtype,
34-
void *rbuf, int *rcounts, int *disps,
34+
void *rbuf, const int *rcounts, const int *disps,
3535
struct ompi_datatype_t *rdtype, int root,
3636
struct ompi_communicator_t *comm,
3737
mca_coll_base_module_t *module)

ompi/mca/coll/sync/coll_sync_reduce_scatter.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
1212
* Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
13-
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
13+
* Copyright (c) 2009-2017 Cisco Systems, Inc. All rights reserved
1414
* $COPYRIGHT$
1515
*
1616
* Additional copyrights may follow
@@ -30,7 +30,8 @@
3030
* Accepts: - same as MPI_Reduce_scatter()
3131
* Returns: - MPI_SUCCESS or error code
3232
*/
33-
int mca_coll_sync_reduce_scatter(const void *sbuf, void *rbuf, int *rcounts,
33+
int mca_coll_sync_reduce_scatter(const void *sbuf, void *rbuf,
34+
const int *rcounts,
3435
struct ompi_datatype_t *dtype,
3536
struct ompi_op_t *op,
3637
struct ompi_communicator_t *comm,

ompi/mca/coll/sync/coll_sync_scatterv.c

Lines changed: 3 additions & 3 deletions
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) 2009 Cisco Systems, Inc. All rights reserved.
12+
* Copyright (c) 2009-2017 Cisco Systems, Inc. All rights reserved
1313
* $COPYRIGHT$
1414
*
1515
* Additional copyrights may follow
@@ -29,8 +29,8 @@
2929
* Accepts: - same arguments as MPI_Scatterv()
3030
* Returns: - MPI_SUCCESS or error code
3131
*/
32-
int mca_coll_sync_scatterv(const void *sbuf, int *scounts,
33-
int *disps, struct ompi_datatype_t *sdtype,
32+
int mca_coll_sync_scatterv(const void *sbuf, const int *scounts,
33+
const int *disps, struct ompi_datatype_t *sdtype,
3434
void *rbuf, int rcount,
3535
struct ompi_datatype_t *rdtype, int root,
3636
struct ompi_communicator_t *comm,

ompi/mca/osc/pt2pt/osc_pt2pt.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* All rights reserved.
1111
* Copyright (c) 2007-2016 Los Alamos National Security, LLC. All rights
1212
* reserved.
13-
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
13+
* Copyright (c) 2010-2017 Cisco Systems, Inc. All rights reserved
1414
* Copyright (c) 2012-2013 Sandia National Laboratories. All rights reserved.
1515
* Copyright (c) 2015-2016 Research Organization for Information Science
1616
* and Technology (RIST). All rights reserved.
@@ -669,7 +669,6 @@ static inline void osc_pt2pt_copy_for_send (void *target, size_t target_len, con
669669
*/
670670
static inline void osc_pt2pt_gc_clean (ompi_osc_pt2pt_module_t *module)
671671
{
672-
ompi_request_t *request;
673672
opal_list_item_t *item;
674673

675674
OPAL_THREAD_LOCK(&module->gc_lock);

opal/datatype/opal_datatype_pack.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Copyright (c) 2004-2006 The Regents of the University of California.
1212
* All rights reserved.
1313
* Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
14-
* Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
14+
* Copyright (c) 2013-2017 Cisco Systems, Inc. All rights reserved
1515
* $COPYRIGHT$
1616
*
1717
* Additional copyrights may follow
@@ -464,9 +464,7 @@ opal_pack_general_function( opal_convertor_t* pConvertor,
464464
unsigned char *conv_ptr, *iov_ptr;
465465
size_t iov_len_local;
466466
uint32_t iov_count;
467-
int type, rc;
468-
const opal_convertor_master_t* master = pConvertor->master;
469-
ptrdiff_t advance;
467+
int type;
470468

471469
DO_DEBUG( opal_output( 0, "opal_convertor_general_pack( %p:%p, {%p, %lu}, %d )\n",
472470
(void*)pConvertor, (void*)pConvertor->pBaseBuf,
@@ -566,7 +564,10 @@ opal_pack_general_function( opal_convertor_t* pConvertor,
566564
PUSH_STACK( pStack, pConvertor->stack_pos, pos_desc, OPAL_DATATYPE_LOOP, count_desc,
567565
pStack->disp + local_disp);
568566
pos_desc++;
567+
#if 0
568+
// This label currently in another if 0'ed out block
569569
update_loop_description: /* update the current state */
570+
#endif
570571
conv_ptr = pConvertor->pBaseBuf + pStack->disp;
571572
UPDATE_INTERNAL_COUNTERS( description, pos_desc, pElem, count_desc );
572573
DDT_DUMP_STACK( pConvertor->pStack, pConvertor->stack_pos, pElem, "advance loop" );

opal/mca/btl/tcp/btl_tcp_component.c

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* University of Stuttgart. All rights reserved.
1111
* Copyright (c) 2004-2005 The Regents of the University of California.
1212
* All rights reserved.
13-
* Copyright (c) 2007-2015 Cisco Systems, Inc. All rights reserved.
13+
* Copyright (c) 2007-2017 Cisco Systems, Inc. All rights reserved
1414
* Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
1515
* Copyright (c) 2009 Oak Ridge National Laboratory
1616
* Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights
@@ -409,40 +409,6 @@ static int mca_btl_tcp_component_close(void)
409409
mca_common_cuda_fini();
410410
#endif /* OPAL_CUDA_SUPPORT */
411411

412-
#if MCA_BTL_TCP_SUPPORT_PROGRESS_THREAD
413-
OBJ_DESTRUCT(&mca_btl_tcp_component.tcp_frag_eager_mutex);
414-
OBJ_DESTRUCT(&mca_btl_tcp_component.tcp_frag_max_mutex);
415-
416-
if( (NULL != mca_btl_tcp_event_base) &&
417-
(mca_btl_tcp_event_base != opal_sync_event_base) ) {
418-
/* Turn of the progress thread before moving forward */
419-
if( -1 != mca_btl_tcp_progress_thread_trigger ) {
420-
mca_btl_tcp_progress_thread_trigger = 0;
421-
/* Let the progress thread know that we're going away */
422-
if( -1 != mca_btl_tcp_pipe_to_progress[1] ) {
423-
close(mca_btl_tcp_pipe_to_progress[1]);
424-
mca_btl_tcp_pipe_to_progress[1] = -1;
425-
}
426-
while( -1 != mca_btl_tcp_progress_thread_trigger ) {
427-
/*event_base_loopbreak(mca_btl_tcp_event_base);*/
428-
sched_yield();
429-
usleep(100); /* give app a chance to re-enter library */
430-
}
431-
}
432-
opal_event_del(&mca_btl_tcp_component.tcp_recv_thread_async_event);
433-
opal_event_base_free(mca_btl_tcp_event_base);
434-
mca_btl_tcp_event_base = NULL;
435-
436-
/* Close the remaining pipes */
437-
if( -1 != mca_btl_tcp_pipe_to_progress[0] ) {
438-
close(mca_btl_tcp_pipe_to_progress[0]);
439-
mca_btl_tcp_pipe_to_progress[0] = -1;
440-
}
441-
}
442-
OBJ_DESTRUCT(&mca_btl_tcp_ready_frag_mutex);
443-
OBJ_DESTRUCT(&mca_btl_tcp_ready_frag_pending_queue);
444-
#endif
445-
446412
return OPAL_SUCCESS;
447413
}
448414

opal/mca/btl/tcp/btl_tcp_proc.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,6 @@ mca_btl_tcp_proc_t* mca_btl_tcp_proc_lookup(const opal_process_name_t *name)
763763
if (OPAL_UNLIKELY(NULL == proc)) {
764764
mca_btl_base_endpoint_t *endpoint;
765765
opal_proc_t *opal_proc;
766-
int rc;
767766

768767
BTL_VERBOSE(("adding tcp proc for unknown peer {.jobid = 0x%x, .vpid = 0x%x}",
769768
name->jobid, name->vpid));

opal/mca/memory/patcher/memory_patcher_component.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* University of Stuttgart. All rights reserved.
1111
* Copyright (c) 2004-2005 The Regents of the University of California.
1212
* All rights reserved.
13-
* Copyright (c) 2009-2016 Cisco Systems, Inc. All rights reserved.
13+
* Copyright (c) 2009-2017 Cisco Systems, Inc. All rights reserved
1414
* Copyright (c) 2013-2017 Los Alamos National Security, LLC. All rights
1515
* reserved.
1616
* Copyright (c) 2016 Research Organization for Information Science
@@ -59,6 +59,11 @@ static int patcher_query (int *);
5959

6060
static int mca_memory_patcher_priority;
6161

62+
/* NTH: we can't currently allow madvise to be intercepted due to a
63+
* deadlock when running with glibc. In the future, we may re-enable
64+
* this hook if the deadlock can be resolved. */
65+
#define WANT_INTERCEPT_MADVISE 0
66+
6267
opal_memory_patcher_component_t mca_memory_patcher_component = {
6368
.super = {
6469
.memoryc_version = {
@@ -244,6 +249,7 @@ static void *intercept_mremap (void *start, size_t oldlen, void *new_address, si
244249

245250
#endif
246251

252+
#if WANT_INTERCEPT_MADVISE
247253
#if defined (SYS_madvise)
248254

249255
static int (*original_madvise) (void *, size_t, int);
@@ -278,6 +284,7 @@ static int intercept_madvise (void *start, size_t length, int advice)
278284
}
279285

280286
#endif
287+
#endif // WANT_INTERCEPT_MADVISE
281288

282289
#if defined SYS_brk
283290

@@ -496,16 +503,14 @@ static int patcher_open (void)
496503
}
497504
#endif
498505

499-
/* NTH: we can't currently allow madvise to be intercepted due to a deadlock when running with glibc. in
500-
* the future we may re-enable this hook if the deadlock can be resolved. */
501-
#if 0
506+
#if WANT_INTERCEPT_MADVISE
502507
#if defined (SYS_madvise)
503508
rc = opal_patcher->patch_symbol ("madvise", (uintptr_t)intercept_madvise, (uintptr_t *) &original_madvise);
504509
if (OPAL_SUCCESS != rc) {
505510
return rc;
506511
}
507512
#endif
508-
#endif
513+
#endif // WANT_INTERCEPT_MADVISE
509514

510515
#if defined(SYS_shmdt) && defined(__linux__)
511516
rc = opal_patcher->patch_symbol ("shmdt", (uintptr_t) intercept_shmdt, (uintptr_t *) &original_shmdt);

0 commit comments

Comments
 (0)