COMBINATORIAL_BLAS  1.6
SpDefs.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* Parallel Combinatorial BLAS Library (for Graph Computations) */
3 /* version 1.6 -------------------------------------------------*/
4 /* date: 6/15/2017 ---------------------------------------------*/
5 /* authors: Ariful Azad, Aydin Buluc --------------------------*/
6 /****************************************************************/
7 /*
8  Copyright (c) 2010-2017, The Regents of the University of California
9 
10  Permission is hereby granted, free of charge, to any person obtaining a copy
11  of this software and associated documentation files (the "Software"), to deal
12  in the Software without restriction, including without limitation the rights
13  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14  copies of the Software, and to permit persons to whom the Software is
15  furnished to do so, subject to the following conditions:
16 
17  The above copyright notice and this permission notice shall be included in
18  all copies or substantial portions of the Software.
19 
20  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26  THE SOFTWARE.
27  */
28 
29 
30 #ifndef _SP_DEFS_H_
31 #define _SP_DEFS_H_
32 
33 #ifndef __STDC_CONSTANT_MACROS
34 #define __STDC_CONSTANT_MACROS
35 #endif
36 #ifndef __STDC_LIMIT_MACROS
37 #define __STDC_LIMIT_MACROS
38 #endif
39 #ifdef _STDINT_H
40  #undef _STDINT_H
41 #endif
42 #ifdef _GCC_STDINT_H // for cray
43  #undef _GCC_STDINT_H // original stdint does #include_next<"/opt/gcc/4.5.2/snos/lib/gcc/x86_64-suse-linux/4.5.2/include/stdint-gcc.h">
44 #endif
45 #include <stdint.h>
46 #include <inttypes.h>
47 
48 #include <cmath>
49 #include <limits.h>
50 #include "SequenceHeaps/knheap.C"
51 #include "psort/psort.h"
52 #include "psort/psort_samplesort.h"
53 #include "psort/MersenneTwister.h"
54 #include "CommGrid.h"
55 
56 extern int cblas_splits; // TODO: move this inside namespace
57 
58 namespace combblas {
59 
60 #define ONEMILLION 1000000
61 #define MAXLINELENGTH 200
62 #define MINLINELENGTH 2
63 #define PRINT_LIMIT 50
64 #define EPSILON 0.01
65 #define FLOPSPERLOC 0 // always use SPA based merger inside the sequential code
66 #define HEAPMERGE 1 // use heapmerge for accumulating contributions from row neighbors
67 #define MEM_EFFICIENT_STAGES 16
68 #define MAXVERTNAME 64
69 
70 
71 // MPI::Abort codes
72 #define GRIDMISMATCH 3001
73 #define DIMMISMATCH 3002
74 #define NOTSQUARE 3003
75 #define NOFILE 3004
76 #define MATRIXALIAS 3005
77 #define UNKNOWNMPITYPE 3006
78 
79 // Enable bebug prints
80 //#define SPREFDEBUG
81 //#define IODEBUG
82 //#define SPGEMMDEBUG
83 
84 // MPI Message tags
85 // Prefixes denote functions
86 // TR: Transpose
87 // RD: ReadDistribute
88 // RF: Sparse matrix indexing
89 #define TRTAGNZ 121
90 #define TRTAGM 122
91 #define TRTAGN 123
92 #define TRTAGROWS 124
93 #define TRTAGCOLS 125
94 #define TRTAGVALS 126
95 #define RDTAGINDS 127
96 #define RDTAGVALS 128
97 #define RDTAGNNZ 129
98 #define RFROWIDS 130
99 #define RFCOLIDS 131
100 #define TRROWX 132
101 #define TRCOLX 133
102 #define TRX 134
103 #define TRI 135
104 #define TRNNZ 136
105 #define TROST 137
106 #define TRLUT 138
107 #define SWAPTAG 139
108 #define ROTATE 140
109 #define PUPSIZE 141
110 #define PUPDATA 142
111 
112 enum Dim
113 {
116 };
117 
118 
119 // force 8-bytes alignment in heap allocated memory
120 #ifndef ALIGN
121 #define ALIGN 8
122 #endif
123 
124 #ifndef THRESHOLD
125 #define THRESHOLD 4 // if range1.size() / range2.size() < threshold, use scanning based indexing
126 #endif
127 
128 #ifndef MEMORYINBYTES
129 #define MEMORYINBYTES (196 * 1048576) // 196 MB, it is advised to define MEMORYINBYTES to be "at most" (1/4)th of available memory per core
130 #endif
131 
132 }
133 
134 #endif
int cblas_splits
Definition: DirOptBFS.cpp:72
Definition: CCGrid.h:4