File: Bconfig.h

package info (click to toggle)
blacs-mpi 1.1-28.2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 2,320 kB
  • ctags: 2,031
  • sloc: fortran: 14,968; ansic: 12,353; makefile: 531; sh: 1
file content (149 lines) | stat: -rw-r--r-- 3,214 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
/*
 *  This file includes the standard C libraries, as well as system dependant
 *  include files.  All BLACS routines include this file.
 */

#ifndef BCONFIG_H
#define BCONFIG_H 1

/*
 * Include files
 */
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#ifdef __STDC__
#include <stdarg.h>
#else
#include <varargs.h>
#endif
#include <mpi.h>

/*
 * These macros define the naming strategy needed for a fortran77
 * routine to call a C routine, and whether to build so they may be
 * called from C or f77.  For the f77 call C interface, ADD_ assumes that
 * f77 calls expect C routines to have an underscore postfixed to the name
 * (Suns, and the Intel expect this).  NOCHANGE indicates that f77 expects
 * the name called by fortran to be identical to that compiled by C
 * (RS6K's do this).  UPCASE says it expects C routines called by fortran
 * to be in all upcase (CRAY wants this).  The variable F77_CALL_C is always
 * set to one of these values.  If the BLACS will be called from C, we define
 * INTFACE to be CALL_C, otherwise, it is set to F77_CALL_C.
 */
#define ADD_     0
#define NOCHANGE 1
#define UPCASE   2
#define F77ISF2C 3
#define C_CALL   4

#ifdef UpCase
#define F77_CALL_C UPCASE
#endif

#ifdef NoChange
#define F77_CALL_C NOCHANGE
#endif

#ifdef Add_
#define F77_CALL_C ADD_
#endif

#ifdef f77IsF2C
#define F77_CALL_C F77ISF2C
#endif

#ifndef F77_CALL_C
#define F77_CALL_C ADD_
#endif

#ifdef CallFromC
#define INTFACE C_CALL
#else
#define INTFACE F77_CALL_C
#endif

/*
 *  Uncomment these macro definitions, and substitute the topology of your
 *  choice to vary the default topology (TOP = ' ') for broadcast and combines.
#define DefBSTop '1'
#define DefCombTop '1'
 */

/*
 * Uncomment this line if your MPI_Send provides a locally-blocking send
 */
/* #define SndIsLocBlk */

/*
 * Comment out the following line if your MPI does a data copy on every
 * non-contiguous send
 */
#ifndef NoMpiBuff
#define MpiBuffGood
#endif

/*
 * If your MPI cannot form data types of zero length, uncomment the
 * following definition
 */
/* #define ZeroByteTypeBug */

/*
 * Figure out how to translate between C and fortran communicators.
 */
#define USEMPICH 1
#define CSAMEF77 2
#define BONEHEAD 3
#define USEMPI2  4

#ifdef UseMpi2
#define BI_TransComm USEMPI2
#endif

#ifdef UseMpich
#define BI_TransComm USEMPICH
#endif

#ifdef CSameF77
#define BI_TransComm CSAMEF77
#endif

#ifndef BI_TransComm
#define BI_TransComm BONEHEAD
#endif

/*
 * If the user has not chosen which MPI interface to use, use F77 if
 * BLACS_GRIDMAP/INIT is going to block, and C otherwise
 */
#ifndef UseCMpi
#ifndef UseF77Mpi

#if (BI_TransComm == BONEHEAD)
#define UseF77Mpi
#endif

#endif
#endif

/*
 *  These macros set the timing and debug levels for the BLACS.  The fastest
 *  code is produced by setting both values to 0.  Higher levels provide
 *  more timing/debug information at the cost of performance.  Present levels
 *  of debug are:
 *  0 : No debug information
 *  1 : Mainly parameter checking.
 *
 *  Present levels of timing are:
 *  0 : No timings taken
 */
#ifndef BlacsDebugLvl
#define BlacsDebugLvl 0
#endif
#ifndef BlacsTimingLvl
#define BlacsTimingLvl 0
#endif

#include "Bdef.h"
#endif