00001 #ifdef __TPM_STANDALONE__
00002
00003 #ifndef _TPM_STANDALONE_H_
00004 #define _TPM_STANDALONE_H_
00005
00006
00007
00008
00009
00010 #include <stdio.h>
00011 #include <stdlib.h>
00012 #include <unistd.h>
00013
00014 #ifdef __cplusplus
00015 # define CMI_EXTERN extern "C"
00016 #else
00017 # define CMI_EXTERN
00018 #endif
00019
00020 extern int _tpm_numpes;
00021 extern int _tpm_numthreads;
00022
00023 #define CmiAssert(c)
00024 #define CmiAbort(m) fprintf(stderr, "%s", m); exit(1)
00025 #define CmiNumPes() _tpm_numpes
00026 #define CmiNumPesGlobal() _tpm_numpes
00027 #define CmiMyNodeSize() _tpm_numthreads
00028 #define CmiNodeOf(i) i
00029 #define CmiNodeFirst(i) i
00030 #define CmiNumPartitions() 1
00031 #define CmiMyPartition() 0
00032 #define CmiGetPeGlobal(pe,part) pe
00033 #define CmiGetNodeGlobal(node,part) node
00034 #define CmiNumCores() sysconf(_SC_NPROCESSORS_ONLN)
00035
00036 typedef int CmiNodeLock;
00037 #define CmiCreateLock() 1
00038 #define CmiLock(l)
00039 #define CmiUnlock(l)
00040
00041 #define _MEMCHECK(ptr)
00042
00043 #endif
00044
00045 #endif