COMBINATORIAL_BLAS 1.6
 
Loading...
Searching...
No Matches
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
56extern int cblas_splits; // TODO: move this inside namespace
57
58namespace 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#define INVALIDPARAMS 3007
79
80// Enable bebug prints
81//#define SPREFDEBUG
82//#define IODEBUG
83//#define SPGEMMDEBUG
84
85// MPI Message tags
86// Prefixes denote functions
87// TR: Transpose
88// RD: ReadDistribute
89// RF: Sparse matrix indexing
90#define TRTAGNZ 121
91#define TRTAGM 122
92#define TRTAGN 123
93#define TRTAGROWS 124
94#define TRTAGCOLS 125
95#define TRTAGVALS 126
96#define RDTAGINDS 127
97#define RDTAGVALS 128
98#define RDTAGNNZ 129
99#define RFROWIDS 130
100#define RFCOLIDS 131
101#define TRROWX 132
102#define TRCOLX 133
103#define TRX 134
104#define TRI 135
105#define TRNNZ 136
106#define TROST 137
107#define TRLUT 138
108#define SWAPTAG 139
109#define ROTATE 140
110#define PUPSIZE 141
111#define PUPDATA 142
112
113enum Dim
114{
115Column,
116Row
117};
118
119
120// force 8-bytes alignment in heap allocated memory
121#ifndef ALIGN
122#define ALIGN 8
123#endif
124
125#ifndef THRESHOLD
126#define THRESHOLD 4 // if range1.size() / range2.size() < threshold, use scanning based indexing
127#endif
128
129#ifndef MEMORYINBYTES
130#define MEMORYINBYTES (196 * 1048576) // 196 MB, it is advised to define MEMORYINBYTES to be "at most" (1/4)th of available memory per core
131#endif
132
133}
134
135#endif
int cblas_splits
Definition BcastTest.cpp:26
@ Column
Definition SpDefs.h:115