Skip to content

Commit a49422f

Browse files
committed
btl/tcp: get rid of the MCA_BTL_TCP_SUPPORT_PROGRESS_THREAD macro
since pthreads are now mandatory, the MCA_BTL_TCP_SUPPORT_PROGRESS_THREAD is always true and hence can be safely removed Signed-off-by: Gilles Gouaillardet <[email protected]>
1 parent 11dc86f commit a49422f

File tree

4 files changed

+5
-55
lines changed

4 files changed

+5
-55
lines changed

opal/mca/btl/tcp/btl_tcp.h

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Copyright (c) 2004-2005 The Regents of the University of California.
1212
* All rights reserved.
1313
* Copyright (c) 2010-2011 Cisco Systems, Inc. All rights reserved.
14-
* Copyright (c) 2014-2015 Research Organization for Information Science
14+
* Copyright (c) 2014-2016 Research Organization for Information Science
1515
* and Technology (RIST). All rights reserved.
1616
* Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights
1717
* reserved.
@@ -53,12 +53,6 @@
5353
#define MCA_BTL_TCP_STATISTICS 0
5454
BEGIN_C_DECLS
5555

56-
#if (HAVE_PTHREAD_H == 1)
57-
#define MCA_BTL_TCP_SUPPORT_PROGRESS_THREAD 1
58-
#else
59-
#define MCA_BTL_TCP_SUPPORT_PROGRESS_THREAD 0
60-
#endif /* (HAVE_PTHREAD_H == 1) */
61-
6256
extern opal_event_base_t* mca_btl_tcp_event_base;
6357

6458
#define MCA_BTL_TCP_COMPLETE_FRAG_SEND(frag) \
@@ -81,7 +75,6 @@ extern opal_event_base_t* mca_btl_tcp_event_base;
8175
} \
8276
} while (0)
8377

84-
#if MCA_BTL_TCP_SUPPORT_PROGRESS_THREAD
8578
extern opal_list_t mca_btl_tcp_ready_frag_pending_queue;
8679
extern opal_mutex_t mca_btl_tcp_ready_frag_mutex;
8780
extern int mca_btl_tcp_pipe_to_progress[2];
@@ -103,14 +96,6 @@ extern int mca_btl_tcp_progress_thread_trigger;
10396
opal_event_add(event, (value)); \
10497
} \
10598
} while (0)
106-
#else
107-
#define MCA_BTL_TCP_CRITICAL_SECTION_ENTER(name)
108-
#define MCA_BTL_TCP_CRITICAL_SECTION_LEAVE(name)
109-
#define MCA_BTL_TCP_ACTIVATE_EVENT(event, value) \
110-
do { \
111-
opal_event_add(event, (value)); \
112-
} while (0)
113-
#endif /* MCA_BTL_TCP_SUPPORT_PROGRESS_THREAD */
11499

115100
/**
116101
* TCP BTL component.
@@ -158,12 +143,10 @@ struct mca_btl_tcp_component_t {
158143

159144
int tcp_enable_progress_thread; /** Support for tcp progress thread flag */
160145

161-
#if MCA_BTL_TCP_SUPPORT_PROGRESS_THREAD
162146
opal_event_t tcp_recv_thread_async_event;
163147
opal_mutex_t tcp_frag_eager_mutex;
164148
opal_mutex_t tcp_frag_max_mutex;
165149
opal_mutex_t tcp_frag_user_mutex;
166-
#endif
167150
/* Do we want to use TCP_NODELAY? */
168151
int tcp_not_use_nodelay;
169152

opal/mca/btl/tcp/btl_tcp_component.c

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* reserved.
1818
* Copyright (c) 2013-2015 NVIDIA Corporation. All rights reserved.
1919
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
20-
* Copyright (c) 2014-2015 Research Organization for Information Science
20+
* Copyright (c) 2014-2016 Research Organization for Information Science
2121
* and Technology (RIST). All rights reserved.
2222
* $COPYRIGHT$
2323
*
@@ -97,13 +97,11 @@ static int mca_btl_tcp_component_open(void);
9797
static int mca_btl_tcp_component_close(void);
9898

9999
opal_event_base_t* mca_btl_tcp_event_base = NULL;
100-
#if MCA_BTL_TCP_SUPPORT_PROGRESS_THREAD
101100
int mca_btl_tcp_progress_thread_trigger = -1;
102101
int mca_btl_tcp_pipe_to_progress[2] = { -1, -1 };
103102
static opal_thread_t mca_btl_tcp_progress_thread = { { 0 } };
104103
opal_list_t mca_btl_tcp_ready_frag_pending_queue = { { 0 } };
105104
opal_mutex_t mca_btl_tcp_ready_frag_mutex = OPAL_MUTEX_STATIC_INIT;
106-
#endif /* MCA_BTL_TCP_SUPPORT_PROGRESS_THREAD */
107105

108106
mca_btl_tcp_component_t mca_btl_tcp_component = {
109107
.super = {
@@ -292,16 +290,6 @@ static int mca_btl_tcp_component_register(void)
292290
/* Check if we should support async progress */
293291
mca_btl_tcp_param_register_int ("progress_thread", NULL, 0, OPAL_INFO_LVL_1,
294292
&mca_btl_tcp_component.tcp_enable_progress_thread);
295-
#if !defined(MCA_BTL_TCP_SUPPORT_PROGRESS_THREAD)
296-
if( mca_btl_tcp_component.tcp_enable_progress_thread ) {
297-
opal_show_help("help-mpi-btl-tcp.txt",
298-
"unsuported progress thread",
299-
true, "progress thread",
300-
opal_process_info.nodename,
301-
mca_btl_tcp_component.tcp_if_seq,
302-
"Progress thread support compiled out");
303-
}
304-
#endif /* !defined(MCA_BTL_TCP_SUPPORT_PROGRESS_THREAD) */
305293
mca_btl_tcp_component.report_all_unfound_interfaces = false;
306294
(void) mca_base_component_var_register(&mca_btl_tcp_component.super.btl_version,
307295
"warn_all_unfound_interfaces",
@@ -362,13 +350,11 @@ static int mca_btl_tcp_component_open(void)
362350
OBJ_CONSTRUCT(&mca_btl_tcp_component.tcp_frag_user, opal_free_list_t);
363351
opal_proc_table_init(&mca_btl_tcp_component.tcp_procs, 16, 256);
364352

365-
#if MCA_BTL_TCP_SUPPORT_PROGRESS_THREAD
366353
OBJ_CONSTRUCT(&mca_btl_tcp_component.tcp_frag_eager_mutex, opal_mutex_t);
367354
OBJ_CONSTRUCT(&mca_btl_tcp_component.tcp_frag_max_mutex, opal_mutex_t);
368355
OBJ_CONSTRUCT(&mca_btl_tcp_component.tcp_frag_user_mutex, opal_mutex_t);
369356
OBJ_CONSTRUCT(&mca_btl_tcp_ready_frag_mutex, opal_mutex_t);
370357
OBJ_CONSTRUCT(&mca_btl_tcp_ready_frag_pending_queue, opal_list_t);
371-
#endif /* MCA_BTL_TCP_SUPPORT_PROGRESS_THREAD */
372358

373359
/* if_include and if_exclude need to be mutually exclusive */
374360
if (OPAL_SUCCESS !=
@@ -396,7 +382,6 @@ static int mca_btl_tcp_component_close(void)
396382
{
397383
mca_btl_tcp_event_t *event, *next;
398384

399-
#if MCA_BTL_TCP_SUPPORT_PROGRESS_THREAD
400385
/**
401386
* If we have a progress thread we should shut it down before
402387
* moving forward with the TCP tearing down process.
@@ -433,7 +418,6 @@ static int mca_btl_tcp_component_close(void)
433418

434419
OBJ_DESTRUCT(&mca_btl_tcp_ready_frag_mutex);
435420
OBJ_DESTRUCT(&mca_btl_tcp_ready_frag_pending_queue);
436-
#endif
437421

438422
if (NULL != mca_btl_tcp_component.tcp_btls) {
439423
free(mca_btl_tcp_component.tcp_btls);
@@ -786,7 +770,6 @@ static int mca_btl_tcp_component_create_instances(void)
786770
return ret;
787771
}
788772

789-
#if MCA_BTL_TCP_SUPPORT_PROGRESS_THREAD
790773
static void* mca_btl_tcp_progress_thread_engine(opal_object_t *obj)
791774
{
792775
opal_thread_t* current_thread = (opal_thread_t*)obj;
@@ -813,7 +796,6 @@ static void mca_btl_tcp_component_event_async_handler(int fd, short unused, void
813796
opal_event_add(event, 0);
814797
}
815798
}
816-
#endif
817799

818800
/*
819801
* Create a listen socket and bind to all interfaces

opal/mca/btl/tcp/btl_tcp_frag.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* All rights reserved.
1313
* Copyright (c) 2014 Los Alamos National Security, LLC. All rights
1414
* reserved.
15-
* Copyright (c) 2015 Research Organization for Information Science
15+
* Copyright (c) 2015-2016 Research Organization for Information Science
1616
* and Technology (RIST). All rights reserved.
1717
* Copyright (c) 2015-2016 Cisco Systems, Inc. All rights reserved.
1818
* $COPYRIGHT$
@@ -280,15 +280,6 @@ bool mca_btl_tcp_frag_recv(mca_btl_tcp_frag_t* frag, int sd)
280280
frag->iov[1].iov_base = (IOVBASE_TYPE*)(frag->segments[0].seg_addr.pval);
281281
frag->iov[1].iov_len = frag->hdr.size;
282282
frag->iov_cnt++;
283-
#ifndef __sparc
284-
#if !MCA_BTL_TCP_SUPPORT_PROGRESS_THREAD
285-
/* The following cannot be done for sparc code
286-
* because it causes alignment errors when accessing
287-
* structures later on in the btl and pml code.
288-
*/
289-
dont_copy_data = 1;
290-
#endif
291-
#endif
292283
goto repeat;
293284
}
294285
break;

opal/mca/btl/tcp/help-mpi-btl-tcp.txt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# Copyright (c) 2015-2016 The University of Tennessee and The University
55
# of Tennessee Research Foundation. All rights
66
# reserved.
7+
# Copyright (c) 2016 Research Organization for Information Science
8+
# and Technology (RIST). All rights reserved.
79
# $COPYRIGHT$
810
#
911
# Additional copyrights may follow
@@ -67,14 +69,6 @@ available), and may eventually timeout / abort.
6769
PID: %d
6870
Errno: %d (%s)
6971
#
70-
[unsuported progress thread]
71-
WARNING: Support for the TCP progress thread has not been compiled in.
72-
Fall back to the normal progress.
73-
74-
Local host: %s
75-
Value: %s
76-
Message: %s
77-
#
7872
[peer hung up]
7973
An MPI communication peer process has unexpectedly disconnected. This
8074
usually indicates a failure in the peer process (e.g., a crash or

0 commit comments

Comments
 (0)