Skip to content

Commit

Permalink
Merge branch 'hotfix/1.3.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
emfomy committed Sep 26, 2018
2 parents bd0544f + 61d30d4 commit c0e6ad7
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 29 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include(cmake/old.cmake)
set(ISVD_NAME "Integrated Singular Value Decomposition")
set(ISVD_MAJOR_VERSION 1)
set(ISVD_MINOR_VERSION 3)
set(ISVD_PATCH_VERSION 1)
set(ISVD_PATCH_VERSION 2)
set(ISVD_VERSION "${ISVD_MAJOR_VERSION}.${ISVD_MINOR_VERSION}.${ISVD_PATCH_VERSION}")
if(NOT CMAKE_VERSION VERSION_LESS 3.0.0)
cmake_policy(SET CMP0048 OLD)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,5 @@ Please link exactly one library for all categories.
* [Mu Yang, “Highly Scalable Parallelism of Integrated Randomized Singular Value Decomposition with Big Data Applications”](http://doi.org/10.6342/NTU201702960)

# License {#Readme_License}
* [MIT License](LICENSE.md)
\include LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ static void test( char dista, char ordera ) {

// Deallocate memory
isvd_Free(yst_);
#else
#else // ISVD_USE_MKL
ISVD_UNUSED(mpi_rank);
ISVD_UNUSED(Pmb);
#endif /// ISVD_USE_MKL
#endif // ISVD_USE_MKL

// Deallocate memory
isvd_Free(a0);
Expand Down
5 changes: 0 additions & 5 deletions cmake/packages.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ if(ISVD_USE_PACKAGE)
endforeach()
endif()

# Set target

# Set target
find_library(
M_LIBRARY
Expand Down Expand Up @@ -69,9 +67,6 @@ endif()
mark_as_advanced(M_LIBRARY PTHREAD_LIBRARY)
set(DEFAULT_LIBRARY ${M_LIBRARY} ${PTHREAD_LIBRARY})

mark_as_advanced(M_LIBRARY PTHREAD_LIBRARY)
set(DEFAULT_LIBRARY ${M_LIBRARY} ${PTHREAD_LIBRARY})

function(ISVD_SET_TARGET target)
set_property(TARGET ${target} PROPERTY OUTPUT_NAME "${target}${BIN_SUFFIX}")
target_link_libraries(${target} ${DEFAULT_LIBRARY})
Expand Down
6 changes: 3 additions & 3 deletions cpplint/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ mark_as_advanced(CMAKE_CPPLINT)
# Break
if(NOT CMAKE_CPPLINT)

# Add rule 'doc'
# Add rule 'cpplint'
add_custom_target(
cpplint
COMMAND eval "exit 1"
Expand Down Expand Up @@ -36,5 +36,5 @@ add_custom_target(
COMMENT "Run cpplint"
)

set_cpplint_target(include/c 128 "-build/include,-build/include_order,-readability/casting,-whitespace/blank_line,-whitespace/braces,-whitespace/parens")
set_cpplint_target(lib 128 "-build/include,-build/include_order,-build/include_what_you_use,-readability/casting,-whitespace/blank_line,-whitespace/braces,-whitespace/parens")
set_cpplint_target(tmp/src/include/c 128 "-build/include,-build/include_order,-readability/casting,-whitespace/blank_line,-whitespace/braces,-whitespace/parens")
set_cpplint_target(tmp/src/lib 128 "-build/include,-build/include_order,-build/include_what_you_use,-readability/casting,-whitespace/blank_line,-whitespace/braces,-whitespace/parens")
2 changes: 1 addition & 1 deletion doxygen/tutorial/core/notation.dox
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
- For \f$j = P-1\f$, \f$n^{(j)} = n - n_b(P-1)\f$.
- \f$n^{(0)} + n^{(1)} + \dotsb + n^{(P-1)} = n\f$.

\see isvd_Param
\see \ref isvd_Param
*/
6 changes: 5 additions & 1 deletion src/include/c/isvd/core/param.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ extern "C" {
/// \ingroup c_core_module
/// \brief The parameters.
///
/// \see \ref tutorial_core_notation
/// \note Use \ref isvd_createParam to initialize the parameters rather than directly declaring it.
///
/// \see \ref isvd_createParam, \ref tutorial_core_notation
///
typedef struct {

Expand Down Expand Up @@ -93,6 +95,8 @@ typedef struct {
/// \ingroup c_core_module
/// \brief Initializes the parameters.
///
/// \see \ref isvd_Param, \ref tutorial_core_notation
///
isvd_Param isvd_createParam(
const isvd_int_t nrow, const isvd_int_t ncol, const isvd_int_t rank, const isvd_int_t over_rank,
const isvd_int_t num_sketch, const mpi_int_t mpi_root, const isvd_MpiComm mpi_comm
Expand Down
10 changes: 1 addition & 9 deletions src/include/c/isvd/def.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <inttypes.h>
#include <complex.h>
#include <math.h>
#include <mpi.h>
#include <isvd/config.h>

#undef I
Expand Down Expand Up @@ -91,16 +92,7 @@ typedef int omp_int_t;

/// \ingroup c_core_module
/// \brief The MPI communicator type.
#if !defined(DOXYGEN_SHOULD_SKIP_THIS)
#if !defined(__cplusplus)
typedef int isvd_MpiComm;
#else // __cplusplus
#include <mpi.h>
typedef MPI_Comm isvd_MpiComm;
#endif // __cplusplus
#else // DOXYGEN_SHOULD_SKIP_THIS)
typedef MPI_Comm isvd_MpiComm;
#endif // DOXYGEN_SHOULD_SKIP_THIS

#if defined(__cplusplus)
}
Expand Down
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/core/param.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ isvd_Param isvd_createParam(
const isvd_MpiComm mpi_comm
) {

mpi_int_t mpi_size = isvd_getMpiSize(MPI_COMM_WORLD);
mpi_int_t mpi_rank = isvd_getMpiRank(MPI_COMM_WORLD);
mpi_int_t mpi_size = isvd_getMpiSize(mpi_comm);
mpi_int_t mpi_rank = isvd_getMpiRank(mpi_comm);

struct {
isvd_int_t nrow_;
Expand Down
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
5 changes: 5 additions & 0 deletions src/lib/libisvd/gpu/def.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,9 @@

static const size_t isvd_kBlockSizeGpu = 64;

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

#endif // LIBISVD_GPU_DEF_H_
2 changes: 1 addition & 1 deletion src/lib/libisvd/gpu/env.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void isvd_Init_gpu( int *argcp, char ***argvp, const isvd_MpiComm mpi_comm ) {
ISVD_UNUSED(argvp);
const isvd_int_t mpi_rank = isvd_getMpiRank(mpi_comm);
int count = 0;
isvd_assert_pass(cudaGetDeviceCount(&count));
isvd_assert_pass_cuda(cudaGetDeviceCount(&count));
isvd_assert_ne(count, 0);
magma_init();
magma_setdevice(mpi_rank % count);
Expand Down

0 comments on commit c0e6ad7

Please sign in to comment.