From 0f173234bb2837327d806e9e4de9af3dda9a7043 Mon Sep 17 00:00:00 2001 From: Wei Zhang Date: Mon, 16 Dec 2019 16:18:22 -0800 Subject: [PATCH] Add -L$(MPI_HOME)/lib64 to NVLDFLAGS In some cases, the MPI library is not in $(MPI_HOME)/lib but in $(MPI_HOME)/lib64. For example, on RedHat like Linux system (CentOS, Amazon Linux), and MPI is installed by yum or rpm. Under such circumstance, the current make file will cause failure. This patch address this issue by adding -L$(MPI_HOME)/lib64 to NVLDFLAGS in src/Makefile. Signed-off-by: Wei Zhang --- src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index 034cc67..ed723d4 100644 --- a/src/Makefile +++ b/src/Makefile @@ -52,7 +52,7 @@ endif ifeq ($(MPI), 1) NVCUFLAGS += -DMPI_SUPPORT -I$(MPI_HOME)/include -NVLDFLAGS += -L$(MPI_HOME)/lib -lmpi +NVLDFLAGS += -L$(MPI_HOME)/lib -L$(MPI_HOME)/lib64 -lmpi endif LIBRARIES += curand nccl nvToolsExt NVLDFLAGS += $(LIBRARIES:%=-l%)