Sierra Toolkit  Version of the Day
FeatureTest.hpp
1 #ifndef STK_UTIL_UTIL_FeatureTest_h
2 # define STK_UTIL_UTIL_FeatureTest_h
3 
4 // #include <boost/config.hpp>
5 
93 
94 // Platform/operating system based features and bugs
95 #if defined(REDS) // Redstorm
96 # define SIERRA_SETVBUF_OUTPUT 1
97 # define SIERRA_DIAG_ENDL_NOFLUSH
98 # define SIERRA_SRAND_PARALLEL_IO_BUG
99 # define SIERRA_HEAP_INFO
100 # define SIERRA_MEMORY_INFO
101 # define SIERRA_USER_SHUTDOWN_SIGNAL SIGUSR1
102 # define SIERRA_SHUTDOWN_SIGNAL SIGTERM
103 
104 #elif defined(_CRAYXE) // Cray
105 # define SIERRA_SETVBUF_OUTPUT 1
106 # define SIERRA_DIAG_ENDL_NOFLUSH
107 # define SIERRA_SRAND_PARALLEL_IO_BUG
108 # define SIERRA_HEAP_INFO
109 # define SIERRA_MEMORY_INFO
110 # define SIERRA_SHUTDOWN_SIGNAL SIGTERM
111 # define SIERRA_USER_SHUTDOWN_SIGNAL SIGURG
112 
113 #elif defined(__sun) // sass8000/sass9000
114 # define SIERRA_HEAP_INFO
115 # define SIERRA_MEMORY_INFO
116 # define SIERRA_MPI_ABORT_SIGNAL SIGTERM
117 # define SIERRA_USER_SHUTDOWN_SIGNAL SIGHUP
118 
119 #elif defined(__linux__) // Generic linux
120 # define SIERRA_USE_PLATFORM_DEMANGLER
121 # define SIERRA_HEAP_INFO
122 # define SIERRA_MEMORY_INFO
123 # define SIERRA_MPI_ABORT_SIGNAL SIGTERM
124 # define SIERRA_USER_SHUTDOWN_SIGNAL SIGUSR1
125 
126 #elif defined(__APPLE__) // MacOS
127 # define SIERRA_USE_PLATFORM_DEMANGLER
128 # define SIERRA_HEAP_INFO
129 # define SIERRA_MEMORY_INFO
130 # define SIERRA_MPI_ABORT_SIGNAL SIGTERM
131 # define SIERRA_USER_SHUTDOWN_SIGNAL SIGUSR1
132 
133 #else // Unknown platform
134 # warning Could not determine platform/operating system
135 #endif
136 
137 
138 // Compiler/runtime specific features and bugs
139 
140 #if defined(__xlC__) // IBM compiler
141 # if __xlC__ < 0x0800
142 # define SIERRA_TEMPLATE_FUNCTION_SELECT_BUG
143 # endif
144 # define SIERRA_TYPE_INFO_BEFORE_EQUALITY_BUG
145 # define SIERRA_AUTO_PTR_ASSIGNMENT_BUG
146 
147 #elif defined(__sun) || defined(__SUNPRO_CC) // Sun spro compiler
148 # define SIERRA_MPI_ALLREDUCE_USER_FUNCTION_BUG
149 
150 #elif defined(__INTEL_COMPILER) // Intel compiler
151 # if __INTEL_COMPILER/100 == 10 && defined(__ia64) // Version 10 Intel compiler on ia64
152 # define SIERRA_IA64_OPTIMIZER_FIX
153 # elif __INTEL_COMPILER/100 == 11 && defined(__ia64) // Version 11 Intel compiler on ia64
154 # define SIERRA_IA64_OPTIMIZER_FIX
155 # elif __INTEL_COMPILER/100 >= 12 && defined(__ia64) // Version 12+ Intel compiler on ia64
156 # define SIERRA_IA64_OPTIMIZER_WARN
157 # endif
158 
159 #elif defined(__PGI) // PGI compiler
160 
161 #elif defined(_CRAYC) // CRAY compiler
162 
163 #elif defined(__APPLE_CC__) // Apple compiler
164 
165 #elif defined(__PATHSCALE__) // Pathscale compiler
166 # if (__GNUC__ > 3) || defined(PATHSCALE_GNU4) // Only with gcc3 front-end
167 # define NO_SIERRA_TEMPLATE_CALL_BUG
168 # else
169 # define SIERRA_TEMPLATE_CALL_BUG
170 # endif
171 
172 #elif defined(__GNUC__) // GNU compiler, do this last since *every* compiler thinks its gcc
173 # if __GNUC__ == 3 && __GNUC_MINOR__ < 4
174 # define SIERRA_TEMPLATE_CALL_BUG
175 # endif
176 
177 #else // Unknown compiler
178 # warning Could not determine compiler/runtime
179 #endif
180 
184 
185 #endif // STK_UTIL_UTIL_FeatureTest_h