Skip to content

Commit 028af8c

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 Refs. #2891 Signed-off-by: Gilles Gouaillardet <[email protected]> (back-ported from commit a49422f)
1 parent 7e39b80 commit 028af8c

File tree

4 files changed

+5
-54
lines changed

4 files changed

+5
-54
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 & 18 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-2016 Intel, Inc. All rights reserved.
20-
* Copyright (c) 2014-2015 Research Organization for Information Science
20+
* Copyright (c) 2014-2017 Research Organization for Information Science
2121
* and Technology (RIST). All rights reserved.
2222
* $COPYRIGHT$
2323
*
@@ -93,13 +93,11 @@ static int mca_btl_tcp_component_open(void);
9393
static int mca_btl_tcp_component_close(void);
9494

9595
opal_event_base_t* mca_btl_tcp_event_base = NULL;
96-
#if MCA_BTL_TCP_SUPPORT_PROGRESS_THREAD
9796
int mca_btl_tcp_progress_thread_trigger = -1;
9897
int mca_btl_tcp_pipe_to_progress[2] = { -1, -1 };
9998
static opal_thread_t mca_btl_tcp_progress_thread = { { 0 } };
10099
opal_list_t mca_btl_tcp_ready_frag_pending_queue = { { 0 } };
101100
opal_mutex_t mca_btl_tcp_ready_frag_mutex = OPAL_MUTEX_STATIC_INIT;
102-
#endif /* MCA_BTL_TCP_SUPPORT_PROGRESS_THREAD */
103101

104102
mca_btl_tcp_component_t mca_btl_tcp_component = {
105103
.super = {
@@ -287,17 +285,6 @@ static int mca_btl_tcp_component_register(void)
287285
/* Check if we should support async progress */
288286
mca_btl_tcp_param_register_int ("progress_thread", NULL, 0, OPAL_INFO_LVL_1,
289287
&mca_btl_tcp_component.tcp_enable_progress_thread);
290-
#if !defined(MCA_BTL_TCP_SUPPORT_PROGRESS_THREAD)
291-
if( mca_btl_tcp_component.tcp_enable_progress_thread ) {
292-
opal_show_help("help-mpi-btl-tcp.txt",
293-
"unsuported progress thread",
294-
true, "progress thread",
295-
opal_process_info.nodename,
296-
mca_btl_tcp_component.tcp_if_seq,
297-
"Progress thread support compiled out");
298-
}
299-
#endif /* !defined(MCA_BTL_TCP_SUPPORT_PROGRESS_THREAD) */
300-
301288
mca_btl_tcp_component.report_all_unfound_interfaces = false;
302289
(void) mca_base_component_var_register(&mca_btl_tcp_component.super.btl_version,
303290
"warn_all_unfound_interfaces",
@@ -355,13 +342,11 @@ static int mca_btl_tcp_component_open(void)
355342
OBJ_CONSTRUCT(&mca_btl_tcp_component.tcp_frag_user, opal_free_list_t);
356343
opal_proc_table_init(&mca_btl_tcp_component.tcp_procs, 16, 256);
357344

358-
#if MCA_BTL_TCP_SUPPORT_PROGRESS_THREAD
359345
OBJ_CONSTRUCT(&mca_btl_tcp_component.tcp_frag_eager_mutex, opal_mutex_t);
360346
OBJ_CONSTRUCT(&mca_btl_tcp_component.tcp_frag_max_mutex, opal_mutex_t);
361347
OBJ_CONSTRUCT(&mca_btl_tcp_component.tcp_frag_user_mutex, opal_mutex_t);
362348
OBJ_CONSTRUCT(&mca_btl_tcp_ready_frag_mutex, opal_mutex_t);
363349
OBJ_CONSTRUCT(&mca_btl_tcp_ready_frag_pending_queue, opal_list_t);
364-
#endif /* MCA_BTL_TCP_SUPPORT_PROGRESS_THREAD */
365350

366351
/* if_include and if_exclude need to be mutually exclusive */
367352
if (OPAL_SUCCESS !=
@@ -753,7 +738,6 @@ static int mca_btl_tcp_component_create_instances(void)
753738
return ret;
754739
}
755740

756-
#if MCA_BTL_TCP_SUPPORT_PROGRESS_THREAD
757741
static void* mca_btl_tcp_progress_thread_engine(opal_object_t *obj)
758742
{
759743
opal_thread_t* current_thread = (opal_thread_t*)obj;
@@ -780,7 +764,6 @@ static void mca_btl_tcp_component_event_async_handler(int fd, short unused, void
780764
opal_event_add(event, 0);
781765
}
782766
}
783-
#endif
784767

785768
/*
786769
* 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)