Skip to content

Commit

Permalink
Update assertion.
Browse files Browse the repository at this point in the history
  • Loading branch information
emfomy committed Sep 26, 2018
1 parent 1e1b09d commit 61d30d4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/lib/libisvd/core/env.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ void isvd_PrintEnvironment_cpu( const isvd_MpiComm mpi_comm ) {
mpi_int_t mpi_size = isvd_getMpiSize(mpi_comm);
omp_int_t omp_size = isvd_getOmpMaxSize();

printf("iSVD %s, %lu-bit isvd_int_t, %lu-bit pointer\n", ISVD_VERSION, sizeof(isvd_int_t) * 8, sizeof(void*) * 8);
printf("%d MPI processors, %d OpenMP threads per process\n\n", mpi_size, omp_size);
printf("iSVD %s, %lu-bit isvd_int_t, %lu-bit pointer.\n", ISVD_VERSION, sizeof(isvd_int_t) * 8, sizeof(void*) * 8);
printf("%d MPI processors, %d OpenMP threads per process.\n\n", mpi_size, omp_size);
}
4 changes: 2 additions & 2 deletions src/lib/libisvd/def.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ extern "C" {

#endif // ISVD_USE_GTEST && __cplusplus

#define isvd_assert_pass( condition ) { isvd_int_t code = condition; ISVD_UNUSED(code); isvd_assert_eq(code, 0); }
#define isvd_assert_code( condition ) { isvd_int_t code = condition; ISVD_UNUSED(code); isvd_assert_ne(code, 0); }
#define isvd_assert_pass( condition ) { isvd_assert_eq(condition, 0); }
#define isvd_assert_code( condition ) { isvd_assert_ne(condition, 0); }
#define isvd_assert_fail() { isvd_assert_true(false); }
//\}

Expand Down
2 changes: 1 addition & 1 deletion src/lib/libisvd/gpu/def.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ static const size_t isvd_kBlockSizeGpu = 64;

#define isvd_assert_pass_cuda( condition ) \
cudaError_t code = condition; \
if ( code ) fprintf(stderr, "\033[1;33m[%s] %s!\033[0m\n", cudaGetErrorName(code), cudaGetErrorString(code)); \
if ( code ) fprintf(stderr, "[%s] %s!\n", cudaGetErrorName(code), cudaGetErrorString(code)); \
isvd_assert_pass(code);

#endif // LIBISVD_GPU_DEF_H_

0 comments on commit 61d30d4

Please sign in to comment.