Skip to content

Commit 5275aa5

Browse files
Adding -pthread flag for linking issues into src/Makefile (ROCm#30)
* Adding -pthread flag for linking issues into src/Makefile * Adding -pthread flag for linking issues into CMakeLists.txt
1 parent 453e729 commit 5275aa5

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

‎CMakeLists.txt‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# ########################################################################
22
# Copyright 2022 Advanced Micro Devices, Inc.
33
# ########################################################################
4+
#Adding pthread flag for linking
5+
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
46
macro(check_mpi mpi_compiler mpi_lib_a mpi_lib_so)
57
find_program(MPI_MPICXX ${mpi_compiler})
68
if (MPI_MPICXX)

‎src/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ endif
2626
HIPCUFLAGS += -I$(ROCM_PATH)/include
2727
HIPCUFLAGS += -I$(ROCM_PATH)/include/hip
2828
LDFLAGS += -L$(ROCM_PATH)/lib -lhsa-runtime64 -lrt
29-
HIPLDFLAGS += $(CUSTOM_RCCL_LIB) -L$(ROCM_PATH)/lib -lhsa-runtime64 -lrt
29+
HIPLDFLAGS += $(CUSTOM_RCCL_LIB) -L$(ROCM_PATH)/lib -lhsa-runtime64 -lrt -pthread
3030

3131
ifeq ($(DEBUG), 0)
3232
HIPCUFLAGS += -O3

0 commit comments

Comments
 (0)