Commit 5b85d967 authored by incardon's avatar incardon

Fixing verbose print

parent 3a6f57ad
......@@ -30,6 +30,7 @@ target_include_directories (vcluster_test PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/con
target_include_directories (vcluster_test PUBLIC ${Boost_INCLUDE_DIRS})
target_include_directories (vcluster_test PUBLIC ${PETSC_INCLUDES})
target_include_directories (vcluster PUBLIC ${CUDA_INCLUDE_DIRS})
target_include_directories (vcluster PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories (vcluster PUBLIC ${PETSC_INCLUDES})
target_include_directories (vcluster PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/config)
......
......@@ -2,6 +2,9 @@
#define VCLUSTER_BASE_HPP_
#include "config.h"
#ifdef CUDA_GPU
#include <cuda_runtime.h>
#endif
#ifdef OPENMPI
#include <mpi.h>
#include <mpi-ext.h>
......@@ -296,13 +299,15 @@ public:
context = new mgpu::ofp_context_t(false,shmrank);
#if defined(PRINT_RANK_TO_GPU) && defined(HAVE_CUDA)
unsigned char node_name[MPI_MAX_PROCESSOR_NAME];
int len;
#if defined(PRINT_RANK_TO_GPU) && defined(CUDA_GPU)
char node_name[MPI_MAX_PROCESSOR_NAME];
int len;
int dev;
int MPI_Get_processor_name(node_name,&len);
MPI_Get_processor_name(node_name,&len);
std::cout << "Rank: " << m_rank << " on host: " << node_name << " work no GPU: " << cudaGetDevice() << std::endl;
std::cout << "Rank: " << m_rank << " on host: " << node_name << " work on GPU: " << context->getDevice() << std::endl;
#endif
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment