File: acconfig.h

package info (click to toggle)
lam 6.5.6-6
  • links: PTS
  • area: main
  • in suites: woody
  • size: 15,464 kB
  • ctags: 11,670
  • sloc: ansic: 101,210; cpp: 12,146; sh: 10,821; makefile: 4,050; fortran: 218
file content (490 lines) | stat: -rw-r--r-- 12,467 bytes parent folder | download
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
/* -*- c -*-
 *
 *	LAM configuation header file.
 *      See the top-level LICENSE file for license and copyright
 *      information.
 *
 *	$Id: acconfig.h,v 6.25.2.4 2001/11/19 16:09:46 brbarret Exp $
 *
 * Function: - OS, CPU and compiler dependent configuration */

#ifndef _LAM_CONFIG_H
#define _LAM_CONFIG_H

@TOP@

/*
 * Version and configuration information
 */
#define LAM_ARCH                        "unknown"
#define LAM_RPI                         "unknown"
#define LAM_VERSION                     "unknown"
#define LAM_MAJOR_VERSION               "unknown"
#define LAM_MINOR_VERSION               "unknown"
#define LAM_RELEASE_VERSION             "unknown"
#define LAM_ALPHA_VERSION               "unknown"
#define LAM_BETA_VERSION                "unknown"


/*
 * Signal used internally by LAM.
 */
#define LAM_SIGUSR			SIGUSR2

/*
 * Choose the RPI. Set *ONE* of these to 1.
 */
#define LAM_RPI_TCP			0
#define LAM_RPI_SHM_SYSV		0
#define LAM_RPI_SHM_USYSV		0
#define LAM_RPI_MYRI                    0
#define LAM_RPI_VIA                     0

/*
 * Some RPI's allow the use of the "shortcircuit" to bypass the normal
 * queue progression if the queue is empty.
 */
#define SHORTCIRCUIT                    0

/* 
 * Define as 1 if you have it. 
 * Slightly risky here -- only define this if is hasn't already been
 * defined.  Prevents redefinitions from other libraries (hopefully
 * they're set to the same value!)
 */
#ifndef HAVE_ATEXIT
#define HAVE_ATEXIT			0
#endif
#ifndef HAVE_GETCWD
#define HAVE_GETCWD			0
#endif
#ifndef HAVE_SNPRINTF
#define HAVE_SNPRINTF			0
#endif
#ifndef HAVE_ATOLL
#define HAVE_ATOLL			0
#endif
#ifndef HAVE_STRTOLL
#define HAVE_STRTOLL			0
#endif

#ifndef HAVE_SCHED_H
#define HAVE_SCHED_H			0
#endif
#ifndef HAVE_STROPTS_H
#define HAVE_STROPTS_H			0
#endif
#ifndef HAVE_GRP_H
#define HAVE_GRP_H			0
#endif
#ifndef HAVE_NETINET_TCP_H
#define HAVE_NETINET_TCP_H		0
#endif
#ifndef HAVE_RPC_TYPES_H
#define HAVE_RPC_TYPES_H		0
#endif
#ifndef HAVE_RPC_XDR_H
#define HAVE_RPC_XDR_H			0
#endif

/*
 * Use to select for IMPI support or not
 */
#define LAM_WANT_IMPI                   0
#define LAM_WANT_IMPI_SERVER            0
#define LAM_IMPI_SERVER                 "bogus"

/*
 * Check the characteristics of our C++ compiler
 * Only do this if we're compiling IMPI!
 */
#if LAM_WANT_IMPI
#define LAM_CXX_NOTHROW_NEW		0
#define LAM_CXX_NOTHROW_NEW_ARG		0
#define LAM_CXX_EXCEPTIONS		0
#define LAM_CXX_BOOL			0
#define LAM_CXX_TRUE_FALSE		0
#if !LAM_CXX_BOOL
/* If we do not have bool, we do not have true or false either */
typedef enum { false, true } bool;
#else
/* 
 * If we do have bool, we may or may not have true and false (!).
 * Can't just typedef true and false, though, because some compilers
 * will make typedef types as small as possible, which may not be the
 * same type/size as "bool" (e.g., if bool is and int) 
 */
#if !LAM_CXX_TRUE_FALSE
bool false = (bool) 0;
bool true = (bool) 1;
#endif
#endif

#endif /* LAM_WANT_IMPI */

/*
 * Various LAM tests 
 */
#define LAM_HAVE_SA_RESTART		0
#define LAM_HAVE_SA_LEN			0
#define LAM_HAVE_UNION_SEMUN		0
#define LAM_HAVE_FIONBIO                0
#define LAM_HAVE_BSD43_FD_PASSING	0
#define LAM_HAVE_BSD44_FD_PASSING       0
#define LAM_HAVE_SVR4_FD_PASSING	0
#define LAM_CMSG_DATA_BROKEN            0
#define LAM_HAVE_OPENPTY                0
#define LAM_HAVE_BSD_PTYS		0
#define LAM_HAVE_SYSV_PTYS		0
#define LAM_HAVE_PTYS (LAM_HAVE_BSD_PTYS || LAM_HAVE_SYSV_PTYS)
#define LAM_HAVE_SYSV_SEMAPHORES        0

/* 
 * Define as 1 if have yield() or sched_yield() function.
 */
#ifndef HAVE_SCHED_YIELD
#define HAVE_SCHED_YIELD		0
#endif

/* 
 * Define as 1 if you need it. 
 */
#define LAM_NEED_SYS_SELECT_H		0

/* 
 * Set *ONE* of these to 1 according to the format the FORTRAN compiler
 * uses for external names.
 */
#define LAM_WANT_FORTRAN                0
#define LAM_FORTRANNOUNDERSCORE         0
#define LAM_FORTRANCAPS                 0
#define LAM_FORTRANUNDERSCORE           0
#define LAM_FORTRANDOUBLEUNDERSCORE     0        

/*
 * Predefined types
 */
#define LAM_HAVE_int2			0
#define LAM_HAVE_uint2			0
#define LAM_HAVE_int4			0
#define LAM_HAVE_uint4			0
#define LAM_HAVE_int8			0
#define LAM_HAVE_uint8			0
#define LAM_HAVE_float4			0
#define LAM_HAVE_float8			0

/*
 * Type sizes.
 * Very, very annoying because of standardized AC_CHECK_SIZEOF macro...
 */
#define LAM_SIZEOF_SHORT		0
#define LAM_SIZEOF_WCHAR		0
#define LAM_SIZEOF_INT			0
#define LAM_SIZEOF_LONG			0
#define LAM_SIZEOF_LONG_LONG		0
#define LAM_SIZEOF_FLOAT		0
#define LAM_SIZEOF_DOUBLE		0
#define LAM_SIZEOF_LONG_DOUBLE		0
#define LAM_SIZEOF_VOID_P		0

#define LAM_ALIGNMENT_SHORT	       	0
#define LAM_ALIGNMENT_WCHAR	       	0
#define LAM_ALIGNMENT_INT	       	0
#define LAM_ALIGNMENT_LONG	       	0
#define LAM_ALIGNMENT_LONG_LONG		0
#define LAM_ALIGNMENT_FLOAT	       	0
#define LAM_ALIGNMENT_DOUBLE		0
#define LAM_ALIGNMENT_LONG_DOUBLE	0
#define LAM_ALIGNMENT_VOID_P		0

#define LAM_SIZEOF_FORTRAN_INT		0
#define LAM_SIZEOF_FORTRAN_REAL		0
#define LAM_SIZEOF_FORTRAN_DBLPREC     	0
#define LAM_SIZEOF_FORTRAN_COMPLEX     	0
#define LAM_SIZEOF_FORTRAN_DBLCOMPLEX	0

#define LAM_ALIGNMENT_FORTRAN_INT	0
#define LAM_ALIGNMENT_FORTRAN_REAL	0
#define LAM_ALIGNMENT_FORTRAN_COMPLEX	0
#define LAM_ALIGNMENT_FORTRAN_DBLPREC	0
#define LAM_ALIGNMENT_FORTRAN_DBLCOMPLEX	0

/* 
 * Use select for spinlock yielding even when OS yield functionality is
 * available.
 */
#define LAM_USE_SELECT_YIELD		0

/*
 * Define to 1 if the struct stat elements are not int4's
 * Currently, this is only for the portland group compilers
 */
#define LAM_STAT_MEMBERS_INT4           1

/*
 * Which threads package do we have?
 */
#define LAM_HAVE_SOL_THREADS            0
#if LAM_HAVE_SOL_THREADS
#include <thread.h>
#include <synch.h>
typedef thread_t lam_thread_t;
typedef mutex_t lam_real_mutex_t;
#endif

#define LAM_HAVE_PTHREADS               0
#if LAM_HAVE_PTHREADS
#include <pthread.h>
typedef pthread_t lam_thread_t;
typedef pthread_mutex_t lam_real_mutex_t;
#endif

#define LAM_HAVE_THREADS (LAM_HAVE_SOL_THREADS || LAM_HAVE_PTHREADS)
#if !LAM_HAVE_THREADS
typedef int lam_thread_t;
typedef int lam_real_mutex_t;
#endif

/*
 * Define to 1 if we want ROMIO support
 * Some architectures need -laio in conjunction with ROMIO
 */
#define LAM_WANT_ROMIO                  1
#define HAVE_LIBAIO                     0

/*
 * Do we want the profiling layer?
 */
#define LAM_WANT_PROFILE                1

/*
 * Define to 1 if we want MPI 2 C++ bindings support
 */
#define LAM_WANT_MPI2CPP                1

/*
 * Some compilers do not define __STDC__ correctly (e.g., Solaris
 * workshop, at least version 4.2).  As such, the LAM header files
 * will not include full ANSI prototyping, which is a real pain for
 * users.  We can override that here -- set to 1 if you want full
 * ANSI prototypes.
 */
#define LAM_CONFIG_FORCE_PROTOS          1

#if __STDC__ || defined(c_plusplus) || defined(__cplusplus) || LAM_CONFIG_FORCE_PROTOS
#define LAM_WANT_PROTOS 1
#else
#define LAM_WANT_PROTOS 0
#endif

/*
 * Use to select if definitely want to zero out memory before using it.
 * This affects lower layers of message passing API, where purify, bcheck,
 * and other memory-checking debuggers will sometimes complain about
 * "read from uninitialized" and the like, when the code actually shows
 * that it is ok.  That is, LAM will function correctly with or without
 * this flag -- this flag only affects what purify/bcheck/etc. will report.
 * Note that there will be slightly more overhead in message passing if
 * this flag is enabled.
 */
#define LAM_DISINFECT                    0
#if LAM_DISINFECT
#include <string.h>
#define LAM_ZERO_ME(a)                   memset(&(a), 0, sizeof((a)));
#else
#define LAM_ZERO_ME(a)
#endif

/*
 * Keep the compilers that were chosen in configure for use in the
 * wrapper compilers hcc, hcp, and hf77.  The C++ compiler is defined
 * in tools/hcc/hcp.in
 */

#define LAM_CC "cc"
#define LAM_F77 "f77"

/*
 * Find out the right type for the option length parameter to
 * getsockopt() , and the length parameter in recvfrom().  #$%#%&#
 * AIX!!!
 */
#define LAM_SOCK_OPTLEN_T	int
#define LAM_RECVFROM_LEN_T	int

/*
 * Values that are necessary because of our standardized acinclude.m4,
 * but not used anywhere in LAM
 */
#define LAM_CXX_STL             0
#define LAM_HAVE__PROTO         0

/*
 * Parameters for the selected RPI 
 */
#define LAM_TCPSHORTMSGLEN	65536	/* max. length tcp short msg */
#define LAM_SHMSHORTMSGLEN	8192	/* max. length shm short msg */
#define LAM_MPI_SHMPOOLSIZE	0	/* size of long message pool */
#define	LAM_MPI_SHMMAXALLOC	0	/* max allocation of shmem */

/*
 * dlo timeouts for the lamd
 */
#define LAM_TO_BOOT		60	/* boot timeout in seconds */
#define LAM_TO_DLO_ACK		1	/* ack timeout in seconds */
#define LAM_TO_DLO_IDLE		120	/* idle timeout  */

/*
 * What remote agent program do we want?
 */
#define LAM_RSH                 "bogusness"
#define LAM_RSH_NEED_MINUSMINUS 0

/*
 * System libraries
 */
#define LAM_SYSLIBS             "bogusness"
#define LAM_HBIND               "bogusness"

/*
 * $#%^#$^#$%^ HP-UX fortran!!!!
 */
#define LAM_FLIBPATH            "bogusness"

/*
 * RPI flags
 */
#define LAM_RPI_REAL_CFLAGS     "bogusness"
#define LAM_RPI_REAL_LDFLAGS    "bogusness"
#define LAM_RPI_FAKE_CFLAGS     "bogusness"
#define LAM_RPI_FAKE_LDFLAGS    "bogusness"


/*
 * What do we do to rm
 */
#define LAM_RM                  "bogusness"

@BOTTOM@

/*
 * Grumble.  AC_C_BIGENDIAN #defines WORDS_BIGENDIAN to 1 if we're on
 * a big endian machine.  But it leaves it undefined if we're on a
 * little endian machine (same for HAVE_YIELD).  This causes "gcc
 * -Wundef" to complain when we use "#if WORDS_BIGENDIAN".  So #define
 * it here to be 0 if it isn't already defined.
 */
#ifndef WORDS_BIGENDIAN
#define WORDS_BIGENDIAN          0
#endif
#ifndef HAVE_YIELD
#define HAVE_YIELD		 0
#endif

/*
 * In some places, we need to swap the endian (particularly in IMPI)
 */
#if LAM_WANT_IMPI
#if WORDS_BIGENDIAN
#define LAM_SWAP_ENDIAN(x, y)
#else
#define LAM_SWAP_ENDIAN(x, y) lam_swap_endian(x, y)
#endif
#endif

/*
 * Some compilers complain when sizeof(long double) == sizeof(double)
 * Example: gcc/linux 2.95.2 on alpha (64 bit)
 */
#if LAM_SIZEOF_DOUBLE == LAM_SIZEOF_LONG_DOUBLE
typedef double LAM_LONG_DOUBLE;
#else
typedef long double LAM_LONG_DOUBLE;
#endif


/* 
 * For one reason or another (not worth listing here), autoheader
 * isn't smart enough to copy these lines automatically.  Hence, we
 * put them under @BOTTOM@
 */

/*
 * Some OS's are missing prototypes */
#define LAM_HAVE_snprintf_PROTO		0
#define LAM_HAVE_gethostname_PROTO	0

/*
 * If we don't have the gethostname proto, make it
 */
#if !LAM_HAVE_gethostname_PROTO
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
int gethostname(char *name, int namelen);
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
#endif

/* 
 * Define as 1 if broken.
 * Can't find an OS that's broken these days, but let's keep it here
 * just to be safe.
 */
#define LAM_BROKEN_SET_INET_SO_BUFSIZES 0
#define LAM_BROKEN_SET_UNIX_SO_BUFSIZES 0

/*
 * GER define
 *
 * per-process-pair minimum envelope slots
 */
#define MPI_GER                 8

/*
 * See if we can use "const" or not
 */
#define CONST                           const

/* 
 * Define as 1 if floating point is IEEE.
 */
#define HAVE_IEEE_FP			1

/*

 * Provide a cast to go from an int to a (void*), or empty if
 * sizeof(void*) == sizeof(int).  This is necessary on arches where we
 * need to first promote an int up to an integer type of the same size
 * as (void*), and then cast that to (void*), eg., Alpha Linux.
 *
 * Weird logic here so that we avoid the cast whenever possible -- so
 * we end up duplicating the "no cast" case.  For example, if we only
 * had to no cast case at the end, if we are on a architecture where
 * sizeof(int) == sizeof(long) == sizeof(void*) (e.g., Solaris 2.6),
 * we'll always end up casting through long.  Icky.  
 */
#if LAM_SIZEOF_INT == LAM_SIZEOF_VOID_P
#define LAM_INT_TO_VOID_P
#elif LAM_SIZEOF_VOID_P == LAM_SIZEOF_LONG
#define LAM_INT_TO_VOID_P (long)
#elif LAM_SIZEOF_VOID_P == LAM_SIZEOF_LONG_LONG
#define LAM_INT_TO_VOID_P (long long)
#else
#define LAM_INT_TO_VOID_P
#endif 


/*
 * prototypes
 */
#ifndef __ARGS
#if LAM_WANT_PROTOS
#define __ARGS(a)	a
#else
#define __ARGS(a)	()
#endif
#endif

#endif	/* _LAM_CONFIG_H */