Cloudy
Spectral Synthesis Code for Astrophysics
Loading...
Searching...
No Matches
cpu.h
Go to the documentation of this file.
1/* This file is part of Cloudy and is copyright (C)1978-2025 by Gary J. Ferland and
2 * others. For conditions of distribution and use see copyright notice in license.txt */
3
4#ifndef CPU_H_
5#define CPU_H_
6
8
9#define UNUSED /*@unused@*/
10#ifdef __GNUC__
11#undef UNUSED
12#define UNUSED __attribute__ ((unused)) /*@unused@*/
13#endif
14
16#ifndef INT8_MAX
17# define INT8_MAX 127
18#endif
19#ifndef INT8_MIN
20# define INT8_MIN (-INT8_MAX - 1)
21#endif
22
23#if SCHAR_MAX == INT8_MAX
24 typedef signed char int8;
25#else
26# error "failed to define int8, please report this to gary@uky.edu"
27#endif
28
29#ifndef UINT8_MAX
30# define UINT8_MAX 255
31#endif
32
33#if UCHAR_MAX == UINT8_MAX
34 typedef unsigned char uint8;
35#else
36# error "failed to define uint8, please report this to gary@uky.edu"
37#endif
38
39#ifndef INT16_MAX
40# define INT16_MAX 32767
41#endif
42#ifndef INT16_MIN
43# define INT16_MIN (-INT16_MAX - 1)
44#endif
45
46#if SHRT_MAX == INT16_MAX
47 typedef short int int16;
48#elif INT_MAX == INT16_MAX
49 typedef int int16;
50#else
51# error "failed to define int16, please report this to gary@uky.edu"
52#endif
53
54#ifndef UINT16_MAX
55# define UINT16_MAX 65535
56#endif
57
58#if USHRT_MAX == UINT16_MAX
59 typedef unsigned short int uint16;
60#elif UINT_MAX == UINT16_MAX
61 typedef unsigned int uint16;
62#else
63# error "failed to define uint16, please report this to gary@uky.edu"
64#endif
65
66#ifndef INT32_MAX
67# define INT32_MAX 2147483647L
68#endif
69#ifndef INT32_MIN
70# define INT32_MIN (-INT32_MAX - 1)
71#endif
72
73#if INT_MAX == INT32_MAX
74 typedef int int32;
75#elif LONG_MAX == INT32_MAX
76 typedef long int int32;
77#else
78# error "failed to define int32, please report this to gary@uky.edu"
79#endif
80
81#ifndef UINT32_MAX
82# define UINT32_MAX 4294967295UL
83#endif
84
85#if UINT_MAX == UINT32_MAX
86 typedef unsigned int uint32;
87#elif ULONG_MAX == UINT32_MAX
88 typedef unsigned long int uint32;
89#else
90# error "failed to define uint32, please report this to gary@uky.edu"
91#endif
92
93#ifndef INT64_MAX
94# define INT64_MAX 9223372036854775807LL
95#endif
96#ifndef INT64_MIN
97# define INT64_MIN (-INT64_MAX - 1)
98#endif
99
100#if LONG_MAX == INT64_MAX
101 typedef long int int64;
102#elif LLONG_MAX == INT64_MAX
103 typedef long long int int64;
104#else
105# error "failed to define int64, please report this to gary@uky.edu"
106#endif
107
108#ifndef UINT64_MAX
109# define UINT64_MAX 18446744073709551615ULL
110#endif
111
112#if ULONG_MAX == UINT64_MAX
113 typedef unsigned long int uint64;
114#elif ULLONG_MAX == UINT64_MAX
115 typedef unsigned long long int uint64;
116#else
117# error "failed to define uint64, please report this to gary@uky.edu"
118#endif
119
120#ifdef __AVX__
121# ifdef __AVX512F__
122# define CD_ALIGN 64
123# else
124# define CD_ALIGN 32
125# endif
126#else
127# define CD_ALIGN 16
128#endif
129
130#ifdef _MSC_VER
131// posix_memalign not defined on windows
132inline int posix_memalign(void **p, size_t a, size_t s)
133{
134 *p = _aligned_malloc(s, a);
135 return ( *p == NULL ) ? errno : 0;
136}
137
138inline void posix_memalign_free(void *p)
139{
140 _aligned_free(p);
141}
142#else
143inline void posix_memalign_free(void *p)
144{
145 free(p);
146}
147#endif
148
170#ifdef cray
171#ifndef __cray
172#define __cray 1
173#endif
174#endif
175
177#ifdef __x86_64
178#ifndef __amd64
179#define __amd64 1
180#endif
181#endif
182
183#if defined(_ARCH_PPC) || defined(__POWERPC__) || defined(__powerpc__) || defined(PPC)
184#ifndef __ppc__
185#define __ppc__ 1
186#endif
187#endif
188
194#if defined(unix) || defined(__unix__)
195#ifndef __unix
196#define __unix 1
197#endif
198#endif
199
200#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
201#define __AnyBSD__ 1
202#endif
203
205#if defined(linux) || defined(__linux)
206#ifndef __linux__
207#define __linux__ 1
208#endif
209#endif
210
212#ifdef __ECC
213#ifndef __ICC
214#define __ICC __ECC
215#endif
216#endif
217
219#undef __GNUC_EXCL__
220#if defined(__GNUC__) && ! ( defined(__ICC) || defined(__PATHSCALE__) || defined(__OPENCC__) || defined(__clang__) )
221#define __GNUC_EXCL__ 1
222#endif
223
224#undef SIGNAL_HANDLER
225#if defined(__linux) || defined(__APPLE__) || (defined(__CYGWIN__) && !defined(__CYGWIN32__))
226#define SIGNAL_HANDLER 1
227#endif
228
229/* safe, small, numbers for the float and double */
232/*FLT_MAX is 3.40e38 on wintel, so BIGFLOAT is 3.40e36 */
233const realnum BIGFLOAT = numeric_limits<realnum>::max()/realnum(100.f);
235const realnum SMALLFLOAT = numeric_limits<realnum>::min()*realnum(100.f);
236
238const double BIGDOUBLE = DBL_MAX/100.;
239const double SMALLDOUBLE = DBL_MIN*100.;
240
241const int STDLEN = 32;
242
259
260// the C++ openmodes below give the exact equivalent of the C modes "r", "w", "a", etc.
261// the "+" sign in the C mode has been replaced by "p", so, e.g., mode_rpb is equivalent to "r+b"
262const ios_base::openmode mode_r = ios_base::in;
263const ios_base::openmode mode_w = ios_base::out | ios_base::trunc;
264const ios_base::openmode mode_a = ios_base::out | ios_base::app;
265const ios_base::openmode mode_rp = ios_base::in | ios_base::out;
266const ios_base::openmode mode_wp = ios_base::in | ios_base::out | ios_base::trunc;
267const ios_base::openmode mode_ap = ios_base::in | ios_base::out | ios_base::app;
268
269const ios_base::openmode UNUSED mode_rb = mode_r | ios_base::binary;
270const ios_base::openmode UNUSED mode_wb = mode_w | ios_base::binary;
271const ios_base::openmode UNUSED mode_ab = mode_a | ios_base::binary;
272const ios_base::openmode UNUSED mode_rpb = mode_rp | ios_base::binary;
273const ios_base::openmode UNUSED mode_wpb = mode_wp | ios_base::binary;
274const ios_base::openmode UNUSED mode_apb = mode_ap | ios_base::binary;
275
276#include "mpi_utilities.h"
277
278void getFileList(vector<string>& results, const string& pattern);
279FILE* open_data( const string& fname, const string& mode, access_scheme scheme=AS_DEFAULT, string* rpath=nullptr );
280void open_data( fstream& stream, const string& fname, ios_base::openmode mode, access_scheme scheme=AS_DEFAULT,
281 string* rpath=nullptr );
282MPI_File open_data( const string& fname, int mode, access_scheme scheme=AS_DEFAULT, string* rpath=nullptr );
283void check_data( const string& fpath, const string& fname );
284
285/* this class is deliberately kept global so that the constructor is executed before
286 * any of the user code; this assures a correct FP environment right from the start */
288{
291 union
292 {
293 char c[4];
294 int32 i;
296
299
302
303# ifdef SIGNAL_HANDLER
304 struct sigaction p_action;
305 struct sigaction p_default;
306# endif
307
320 long n_rank;
324 vector<string> chTraceback;
328 vector<string> chSearchPath;
338 map<string,string> checksum_expct;
342 void p_assertValidPath();
345
346 void enable_traps() const;
347 static void signal_handler(int sig, siginfo_t*, void* ptr);
348
349 vector<string> p_exit_status;
350
351 //* split path into a head and tail
352 //* head: part leading up to and including the last directory separator, empty if separator absent
353 //* tail: part after the last directory separator, full path if separator absent
354 void p_splitPath( const string& path, string& head, string& tail ) const
355 {
356 auto ptr = path.rfind(p_chDirSeparator);
357 if( ptr != string::npos )
358 {
359 head = path.substr(0, ++ptr);
360 tail = path.substr(ptr);
361 }
362 else
363 {
364 head.clear();
365 tail = path;
366 }
367 }
368 void p_getPathList( const string& fname, vector<string>& PathList, access_scheme scheme, bool lgRead ) const;
369 void p_getFileList(vector<string>& results, const string& pattern, bool lgStrip) const;
370 void p_getchecksums( const string& fname );
371public:
372 t_cpu_i();
373
374 bool big_endian() const { return ( endian.i == 0x12345678 ); }
375 bool little_endian() const { return ( endian.i == 0x78563412 ); }
376
377 sys_float min_float() const { return test_float; }
378 double min_double() const { return test_double; }
379
380# ifdef SIGNAL_HANDLER
381 const struct sigaction* action() const { return &p_action; }
382 const struct sigaction* deflt() const { return &p_default; }
383# endif
384
385 void set_signal_handlers();
386
387 void set_nCPU(long n) { n_avail_CPU = n; }
388 long nCPU() const { return n_avail_CPU; }
389 void set_used_nCPU(long n) { n_use_CPU = n; }
390 long used_nCPU() const { return n_use_CPU; }
391 bool lgMPI() const { return p_lgMPI; }
392 void set_MPIMode( MPI_state mode ) { p_MPIMode = mode; }
393 MPI_state MPIMode() const { return p_MPIMode; }
394 void set_nRANK(long n) { n_rank = n; }
395 long nRANK() const { return n_rank; }
396 bool lgMaster() const { return ( n_rank == 0 ); }
397 bool lgMPI_talk() const { return lgMaster() || p_MPIMode == MS_GRID; }
398 void set_ExecName(const string& name) { p_ExecName = name; }
401 void GenerateBacktrace(void* ptr);
402 void PrintBacktrace(const string& s, bool lgPrintSeed = true);
403 const string& ExecName() const { return p_ExecName; }
404 const char *host_name() const { return HostName; }
405 void printDataPath(const string& pattern) const;
406 string chDirSeparator() const { return string(1,p_chDirSeparator); }
407 bool firstOpen() const { return ( nFileDone == 0 ); }
408 bool foundCSMismatch() const { return ( nCSMismatch > 0 ); }
409 const string& chExitStatus(exit_type s) const { return p_exit_status[s]; }
410
411 void initPath();
412 friend void getFileList(vector<string>& results, const string& pattern);
413 friend FILE* open_data( const string& fname, const string& mode, access_scheme scheme, string* rpath );
414 friend void open_data( fstream& stream, const string& fname, ios_base::openmode mode, access_scheme scheme,
415 string* rpath );
416 friend MPI_File open_data( const string& fname, int mode, access_scheme scheme, string* rpath );
417 friend void check_data( const string& fpath, const string& fname );
418
419 friend void set_NaN(sys_float &x);
420 friend void set_NaN(sys_float x[], long n);
421 friend void set_NaN(double &x);
422 friend void set_NaN(double x[], long n);
423};
424class t_cpu
425{
426 static t_cpu_i *m_i;
427public:
429 {
430 return *m_i;
431 }
432 t_cpu();
433 ~t_cpu();
434};
435// Generate a (static) instance of this variable in *every* file.
436static t_cpu cpu;
437
438// The static (class) pointer is set in the first of these. Obviously
439// this is not thread safe...
440
441// Better engineered variants are available in Alexandrescu's book;
442// better yet to reduce the number of globals and file-statics so
443// this can just be initialized at the start of main().
444
446void set_NaN(sys_float &x);
447void set_NaN(sys_float x[], /* x[n] */
448 long n);
449void set_NaN(double &x);
450void set_NaN(double x[], /* x[n] */
451 long n);
452
454bool MyIsnan(const sys_float &x);
455bool MyIsnan(const double &x);
456
457// class for detecting if two types are the same, can also be used in static_assert():
458// static_assert( SameType<decltype(var), bool>::value, "type of var must be bool" );
459template<class T1, class T2> struct SameType
460{
461 static const bool value = false;
462};
463template<class T> struct SameType<T,T>
464{
465 static const bool value = true;
466};
467
468/* Apply compiler directive saying that current routine does not
469 return as modifier, as in "NORETURN void MyExit() { ... }" */
470#ifdef _MSC_VER
471#define NORETURN __declspec(noreturn) /*@noreturn@*/
472#elif defined(__GNUC__) || ( defined(__INTEL_COMPILER) && defined(__linux__) || defined(__SUNPRO_CC) )
473#define NORETURN __attribute__ ((noreturn)) /*@noreturn@*/
474#else
475#define NORETURN /*@noreturn@*/
476#endif
477
478#define FALLTHROUGH (void)0
479#ifdef __GNUC_EXCL__
480#if (__GNUC__ >= 7)
481#undef FALLTHROUGH
482#define FALLTHROUGH __attribute__ ((fallthrough))
483#endif
484#endif
485
486#ifdef _MSC_VER
487#define ALIGNED(X) __declspec(align(X))
488#else
489#define ALIGNED(X) __attribute__ ((aligned(X)))
490#endif
491
492#define RESTRICT
493#define LIKELY(x) (x)
494#ifdef __GNUC__
495#if (__GNUC__ >= 3)
496#undef LIKELY
497#define LIKELY(x) __builtin_expect((x),1)
498#endif
499#undef RESTRICT
500#define RESTRICT __restrict
501#else
502#endif
503
504#define UNLIKELY(x) (x)
505#ifdef __GNUC__
506#if (__GNUC__ >= 3)
507#undef UNLIKELY
508#define UNLIKELY(x) __builtin_expect((x),0)
509#endif
510#endif
511
512/* Some hackery needed to test if a preprocessor macro is empty. Use as follows:
513 * #if EXPAND(SOME_DODGY_MACRO) == 1
514 * get here if SOME_DODGY_MACRO expands to empty string
515 * #endif */
516#define DO_EXPAND(VAL) VAL ## 1
517#define EXPAND(VAL) DO_EXPAND(VAL)
518
519/* Define __COMP and __COMP_VER macros for all systems */
520/* the Intel compiler */
521/* this needs to be before g++ since icc also sets __GNUC__ */
522#if defined __INTEL_COMPILER
523# define __COMP "icc"
524# define __COMP_VER __INTEL_COMPILER
525
526/* PathScale EKOPath compiler */
527/* this needs to be before g++ since pathCC also sets __GNUC__ */
528#elif defined __PATHSCALE__
529# define __COMP "pathCC"
530# define __COMP_VER __PATHCC__ * 100 + __PATHCC_MINOR__ * 10 + __PATHCC_PATCHLEVEL__
531
532/* Open64 compiler */
533/* this needs to be before g++ since openCC also sets __GNUC__ */
534#elif defined __OPENCC__
535# define __COMP "Open64"
536# if EXPAND(__OPENCC_PATCHLEVEL__) == 1
537# define __COMP_VER __OPENCC__ * 100 + __OPENCC_MINOR__ * 10
538# else
539# define __COMP_VER __OPENCC__ * 100 + __OPENCC_MINOR__ * 10 + __OPENCC_PATCHLEVEL__
540# endif
541
542/* LLVM clang++ */
543/* this needs to be before g++ since clang++ also sets __GNUC__ */
544#elif defined __clang__
545# define __COMP "clang++"
546# define __COMP_VER __clang_major__ * 100 + __clang_minor__ * 10 + __clang_patchlevel__
547
548/* g++ */
549#elif defined __GNUC__
550# define __COMP "g++"
551# if defined(__GNUC_PATCHLEVEL__)
552# define __COMP_VER (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
553# else
554# define __COMP_VER (__GNUC__ * 10000 + __GNUC_MINOR__ * 100)
555# endif
556
557#elif defined __PGI
558# define __COMP "Portland Group"
559# if defined(__PGIC__)
560# define __COMP_VER (__PGIC__ * 100 + __PGIC_MINOR__ * 10 + __PGIC_PATCHLEVEL__)
561# else
562# define __COMP_VER 0
563# endif
564
565/* SGI MIPSpro */
566/* this needs to be after g++, since g++ under IRIX also sets _COMPILER_VERSION */
567#elif defined(__sgi) && defined(_COMPILER_VERSION)
568# define __COMP "MIPSpro"
569# define __COMP_VER _COMPILER_VERSION
570
571/* HP */
572#elif defined __HP_aCC
573# define __COMP "HP aCC"
574# define __COMP_VER __HP_aCC
575
576/* DEC - this one may be broken for C++, no way to test it... */
577#elif defined __DECC
578# define __COMP "DEC CC"
579# define __COMP_VER __DECC_VER
580
581/* MS VS */
582#elif defined _MSC_VER
583# define __COMP "vs"
584# define __COMP_VER _MSC_VER
585
586/* Oracle Solaris Studio */
587#elif defined __SUNPRO_CC
588# define __COMP "Solaris Studio"
589# define __COMP_VER __SUNPRO_CC
590
591/* unknown */
592#else
593# define __COMP "unknown"
594# define __COMP_VER 0
595#endif
596
597/* ---------------------------- OS ---------------------------- */
598/* linux */
599#if defined __linux__
600# if defined __i386
601# define __OS "Linux (IA32)"
602# elif defined __amd64
603# define __OS "Linux (AMD64)"
604# elif defined __ia64
605# define __OS "Linux (IA64)"
606# elif defined __ppc__
607# define __OS "Linux (PowerPC)"
608# else
609# define __OS "Linux (other)"
610# endif
611
612/* macintosh */
613#elif defined macintosh
614# define __OS "Mac OS 9"
615
616/* macintosh */
617#elif defined __MACOSX__
618# define __OS "Mac OS X"
619
620/* apple mac, ... */
621#elif defined __APPLE__
622# define __OS "Apple MacOS"
623
624/* HP */
625#elif defined hpux
626# define __OS "HP-UX"
627
628/* Oracle Solaris */
629#elif defined __sun
630# define __OS "Solaris"
631
632/* IBM AIX */
633#elif defined _AIX
634# define __OS "AIX"
635
636/* Compaq alpha */
637#elif defined ultrix
638# define __OS "Ultrix"
639
640/* the BSD variants */
641#elif defined __FreeBSD__
642# define __OS "FreeBSD"
643
644#elif defined __NetBSD__
645# define __OS "NetBSD"
646
647#elif defined __OpenBSD__
648# define __OS "OpenBSD"
649
650/* Windows64 */
651/* this needs to be before _WIN32 since Windows64 also sets _WIN32 */
652#elif defined _WIN64
653# define __OS "Win64"
654
655/* Windows */
656#elif defined _WIN32
657# define __OS "Win32"
658
659/* Cygwin */
660#elif defined __CYGWIN__
661# define __OS "Cygwin"
662
663/* SGI */
664#elif defined __sgi
665# define __OS "IRIX"
666
667/* unknown */
668#else
669# define __OS "unknown"
670#endif
671
672/* don't perform this check when we are generating dependencies */
673#ifndef MM
674/* bomb out if the compiler does not support C++11.... */
675# if defined(__GNUC_EXCL__) && ((__GNUC__ < 4 ) || \
676 (__GNUC__ == 4 && __GNUC_MINOR__ < 8) || \
677 (__GNUC__ == 4 && __GNUC_MINOR__ == 8 && __GNUC_PATCHLEVEL__ == 0))
678# error "This version of g++ cannot compile Cloudy! Version 4.8.1 or later is required. See http://wiki.nublado.org/wiki/CompileCode for more details."
679# endif
680
681# if defined(__clang_major__) && ((__clang_major__ < 3 ) || \
682 (__clang_major__ == 3 && __clang_minor__ < 3))
683# error "This version of clang++ cannot compile Cloudy! Version 3.3 or later is required. See http://wiki.nublado.org/wiki/CompileCode for more details."
684# endif
685
686# if defined(__INTEL_COMPILER) && __INTEL_COMPILER < 1500
687# error "This version of icc cannot compile Cloudy! Version 15.0 or later is required. See http://wiki.nublado.org/wiki/CompileCode for more details."
688# endif
689
690# if defined(__SUNPRO_CC) && __SUNPRO_CC < 0x5140
691# error "This version of CC cannot compile Cloudy! Version 12.5 or later is required. See http://wiki.nublado.org/wiki/CompileCode for more details."
692# endif
693#endif
694
695#endif /* CPU_H_ */
float sys_float
Definition cddefines.h:131
#define NULL
Definition cddefines.h:116
exit_type
Definition cddefines.h:164
float realnum
Definition cddefines.h:128
Definition cpu.h:288
void disableBacktrace()
Definition cpu.h:399
void enableBacktrace()
Definition cpu.h:400
bool lgMPI_talk() const
Definition cpu.h:397
char HostName[STDLEN]
Definition cpu.h:326
bool lgPathInitialized
Definition cpu.h:340
bool firstOpen() const
Definition cpu.h:407
double test_double
Definition cpu.h:298
void printDataPath(const string &pattern) const
Definition cpu.cpp:550
int32 i
Definition cpu.h:294
bool p_suppressBacktrace
Definition cpu.h:344
bool lgMPI() const
Definition cpu.h:391
const string & chExitStatus(exit_type s) const
Definition cpu.h:409
void initPath()
Definition cpu.cpp:242
void p_getFileList(vector< string > &results, const string &pattern, bool lgStrip) const
Definition cpu.cpp:784
void p_getchecksums(const string &fname)
Definition cpu.cpp:607
void p_assertValidPath()
Definition cpu.cpp:308
const char * host_name() const
Definition cpu.h:404
sys_float min_float() const
Definition cpu.h:377
void set_nRANK(long n)
Definition cpu.h:394
void set_signal_handlers()
Definition cpu.cpp:503
char p_chDirSeparator
Definition cpu.h:332
friend void check_data(const string &fpath, const string &fname)
Definition cpu.cpp:931
bool p_lgMPI
Definition cpu.h:313
static void signal_handler(int sig, siginfo_t *, void *ptr)
Definition cpu.cpp:538
bool lgMaster() const
Definition cpu.h:396
string p_ExecName
Definition cpu.h:322
long used_nCPU() const
Definition cpu.h:390
void set_used_nCPU(long n)
Definition cpu.h:389
void GenerateBacktrace(void *ptr)
Definition cpu.cpp:1267
sys_float test_float
Definition cpu.h:297
double min_double() const
Definition cpu.h:378
bool big_endian() const
Definition cpu.h:374
union t_cpu_i::@106376237137230054305215133036150131221143322223 endian
map< string, string > checksum_expct
Definition cpu.h:338
int32 Float_SNaN_Value
Definition cpu.h:300
void set_ExecName(const string &name)
Definition cpu.h:398
friend FILE * open_data(const string &fname, const string &mode, access_scheme scheme, string *rpath)
Definition cpu.cpp:815
long nCPU() const
Definition cpu.h:388
t_cpu_i()
Definition cpu.cpp:74
bool little_endian() const
Definition cpu.h:375
void enable_traps() const
Definition cpu.cpp:324
int nFileDone
Definition cpu.h:334
void PrintBacktrace(const string &s, bool lgPrintSeed=true)
Definition cpu.cpp:1274
long nRANK() const
Definition cpu.h:395
friend void set_NaN(sys_float &x)
Definition cpu.cpp:960
void p_splitPath(const string &path, string &head, string &tail) const
Definition cpu.h:354
void set_nCPU(long n)
Definition cpu.h:387
MPI_state MPIMode() const
Definition cpu.h:393
friend void getFileList(vector< string > &results, const string &pattern)
Definition cpu.cpp:810
vector< string > p_exit_status
Definition cpu.h:349
void set_MPIMode(MPI_state mode)
Definition cpu.h:392
long n_use_CPU
Definition cpu.h:311
bool foundCSMismatch() const
Definition cpu.h:408
long n_rank
Definition cpu.h:320
vector< string > chTraceback
Definition cpu.h:324
string p_chCloudyRoot
Definition cpu.h:330
int nCSMismatch
Definition cpu.h:336
char c[4]
Definition cpu.h:293
void p_getPathList(const string &fname, vector< string > &PathList, access_scheme scheme, bool lgRead) const
Definition cpu.cpp:577
string chDirSeparator() const
Definition cpu.h:406
const string & ExecName() const
Definition cpu.h:403
long n_avail_CPU
Definition cpu.h:309
int64 Double_SNaN_Value
Definition cpu.h:301
MPI_state p_MPIMode
Definition cpu.h:318
vector< string > chSearchPath
Definition cpu.h:328
Definition cpu.h:425
~t_cpu()
Definition cpu.cpp:65
t_cpu()
Definition cpu.cpp:58
t_cpu_i & i()
Definition cpu.h:428
static t_cpu_i * m_i
Definition cpu.h:426
static t_cpu cpu
Definition cpu.h:436
const int STDLEN
Definition cpu.h:241
const realnum BIGFLOAT
Definition cpu.h:233
const ios_base::openmode mode_r
Definition cpu.h:262
const ios_base::openmode mode_a
Definition cpu.h:264
access_scheme
Definition cpu.h:257
@ AS_LOCAL_ONLY
Definition cpu.h:258
@ AS_OPTIONAL
Definition cpu.h:257
@ AS_TRY
Definition cpu.h:257
@ AS_SILENT_TRY
Definition cpu.h:257
@ AS_LOCAL_ONLY_TRY
Definition cpu.h:258
@ AS_DEFAULT
Definition cpu.h:257
void posix_memalign_free(void *p)
Definition cpu.h:143
const double BIGDOUBLE
Definition cpu.h:238
const ios_base::openmode UNUSED mode_apb
Definition cpu.h:274
bool MyIsnan(const sys_float &x)
Definition cpu.cpp:1014
const ios_base::openmode UNUSED mode_wpb
Definition cpu.h:273
void check_data(const string &fpath, const string &fname)
Definition cpu.cpp:931
const ios_base::openmode UNUSED mode_rpb
Definition cpu.h:272
const ios_base::openmode mode_rp
Definition cpu.h:265
const ios_base::openmode mode_w
Definition cpu.h:263
FILE * open_data(const string &fname, const string &mode, access_scheme scheme=AS_DEFAULT, string *rpath=nullptr)
Definition cpu.cpp:815
const ios_base::openmode UNUSED mode_rb
Definition cpu.h:269
void set_NaN(sys_float &x)
Definition cpu.cpp:960
const ios_base::openmode UNUSED mode_wb
Definition cpu.h:270
void getFileList(vector< string > &results, const string &pattern)
Definition cpu.cpp:810
const double SMALLDOUBLE
Definition cpu.h:239
const ios_base::openmode mode_wp
Definition cpu.h:266
const ios_base::openmode UNUSED mode_ab
Definition cpu.h:271
const ios_base::openmode mode_ap
Definition cpu.h:267
#define UNUSED
Definition cpu.h:9
const realnum SMALLFLOAT
Definition cpu.h:235
void * MPI_File
Definition mpi_utilities.h:74
MPI_state
Definition mpi_utilities.h:7
@ MS_GRID
Definition mpi_utilities.h:7
static const bool value
Definition cpu.h:465
Definition cpu.h:460
static const bool value
Definition cpu.h:461