Commit f612ac3d authored by David M. Rogers's avatar David M. Rogers
Browse files

Updated linking to allow direct cuda calls from exe.

parent 38c8c2ef
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -33,7 +33,10 @@ find_package(MPI REQUIRED)

##########  TARGETS  ################################################
add_library(mpiwrap src/wrapper.cc)
gpu_runtime_link(mpiwrap)
gpu_blas_link(mpiwrap)
add_executable(mpitest src/allreduce.cc)
gpu_runtime_link(mpitest)
#####################################################################

# configured header file stashing options
@@ -52,7 +55,7 @@ set_target_properties(mpiwrap PROPERTIES
                      POSITION_INDEPENDENT_CODE ${BUILD_SHARED_LIBS}
                      )

target_link_libraries(mpitest mpiwrap)
                  target_link_libraries(mpitest PUBLIC mpiwrap)

### Testing Instructions ###
include(CTest)
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
    exit(EXIT_FAILURE);                             \
  }                                                 \
} while(0)
#define devMalloc(ptr,size) CUDACHECK( cudaMalloc(&(void *)ptr, size) )
#define devMalloc(ptr,size) CUDACHECK( cudaMalloc(&ptr, size) )
#define devFree(ptr) CUDACHECK( cudaFree(ptr) )
#else

+1 −0
Original line number Diff line number Diff line
@@ -10,3 +10,4 @@ MPIH::MPIH(int *argc, char **argv[]) : comm(MPI_COMM_WORLD) {
MPIH::~MPIH() {
    MPI_Finalize();
}