planc
Parallel Lowrank Approximation with Non-negativity Constraints
nmflibrary
common
distutils.h
Go to the documentation of this file.
1
/* Copyright 2016 Ramakrishnan Kannan */
2
#ifndef COMMON_DISTUTILS_H_
3
#define COMMON_DISTUTILS_H_
4
5
// #define MPI_VERBOSE 1
6
// #define WRITE_RAND_INPUT 1
7
8
// enum distalgotype {MU2D, HALS2D, ANLSBPP2D, NAIVEANLSBPP, AOADMM2D};
9
10
// ONED_DOUBLE for naive ANLS-BPP
11
// TWOD for HPC-NMF
12
enum
iodistributions
{
ONED_ROW
,
ONED_COL
,
ONED_DOUBLE
,
TWOD
};
13
14
#define ISROOT this->m_mpicomm.rank() == 0
15
#define MPI_SIZE this->m_mpicomm.size()
16
#define MPI_RANK this->m_mpicomm.rank()
17
#define MPI_ROW_RANK this->m_mpicomm.row_rank()
18
#define MPI_COL_RANK this->m_mpicomm.col_rank()
19
#define MPI_FIBER_RANK(i) this->m_mpicomm.fiber_rank(i)
20
#define MPI_SLICE_RANK(i) this->m_mpicomm.slice_rank(i)
21
#define NUMROWPROCS this->m_mpicomm.pr()
22
#define NUMCOLPROCS this->m_mpicomm.pc()
23
24
// #define MPITIC tic()
25
// #define MPITOC toc()
26
#define MPITIC mpitic()
27
#define MPITOC mpitoc()
28
// #define MPITIC mpitic(MPI_RANK)
29
// #define MPITOC mpitoc(MPI_RANK)
30
31
// #define PRINTROOT(MSG)
32
#define PRINTROOT(MSG) \
33
if (ISROOT) \
34
INFO << "::" << __PRETTY_FUNCTION__ << "::" << __LINE__ \
35
<< "::" << std::endl \
36
<< MSG << std::endl;
37
#define DISTPRINTINFO(MSG) \
38
INFO << MPI_RANK << "::" << __PRETTY_FUNCTION__ << "::" << __LINE__ \
39
<< "::" << std::endl \
40
<< MSG << std::endl;
41
#define PRINTTICTOCTOP \
42
if (ISROOT) \
43
INFO << "tictoc::" << tictoc_stack.top() << std::endl;
44
45
#endif // COMMON_DISTUTILS_H_
iodistributions
iodistributions
Definition:
distutils.h:12
ONED_COL
Definition:
distutils.h:12
TWOD
Definition:
distutils.h:12
ONED_DOUBLE
Definition:
distutils.h:12
ONED_ROW
Definition:
distutils.h:12
Generated on Mon Feb 18 2019 13:41:46 for planc by
1.8.14