|
8 | 8 |
|
9 | 9 | #define MAX_INFO_STRING_LENGTH 1024
|
10 | 10 |
|
11 |
| -int get_compiler_info( char **info_str ) { |
| 11 | +int get_compiler_info( char *info_str ) { |
12 | 12 | /* For compiler predfined macros used for identification see
|
13 | 13 | * http://predef.sourceforge.net/precomp.html
|
14 | 14 | */
|
15 | 15 |
|
16 | 16 | /* Cray compiler */
|
17 | 17 | #if defined(_CRAYC)
|
18 |
| - sprintf( *info_str, "Cray %d.%d", _RELEASE, _RELEASE_MINOR ); |
| 18 | + sprintf( info_str, "Cray %d.%d", _RELEASE, _RELEASE_MINOR ); |
19 | 19 | #endif
|
20 | 20 |
|
21 | 21 | /* GNU compiler */
|
22 | 22 | #if defined(__GNUC__)
|
23 | 23 | # if defined(__GNUC_PATCHLEVEL__)
|
24 |
| - sprintf( *info_str, "GNU %d.%d.%d", __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__ ); |
| 24 | + sprintf( info_str, "GNU %d.%d.%d", __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__ ); |
25 | 25 | # else
|
26 |
| - sprintf( *info_str, "GNU %d.%d", __GNUC__, __GNUC_MINOR__ ); |
| 26 | + sprintf( info_str, "GNU %d.%d", __GNUC__, __GNUC_MINOR__ ); |
27 | 27 | # endif
|
28 | 28 |
|
29 | 29 | /* Intel compiler */
|
30 | 30 | #elif defined(__INTEL_COMPILER)
|
31 | 31 | int version = (int) __INTEL_COMPILER / 100;
|
32 | 32 | int revision = ((int)__INTEL_COMPILER % 100) / 10;
|
33 | 33 | int patch = (int) __INTEL_COMPILER % 10;
|
34 |
| - sprintf( *info_str, "Intel %d.%d.%d", version, revision, patch ); |
| 34 | + sprintf( info_str, "Intel %d.%d.%d", version, revision, patch ); |
35 | 35 |
|
36 | 36 | /* PGI compiler */
|
37 | 37 | #elif defined(__PGI)
|
38 |
| - sprintf( *info_str, "PGI" ); |
| 38 | + sprintf( info_str, "PGI" ); |
39 | 39 |
|
40 | 40 | /* Sun compiler */
|
41 | 41 | #elif defined(__SUNPRO_C)
|
42 | 42 | int version = (__SUNPRO_C >> 12) & 0xf;
|
43 | 43 | int revision_digit1 = (__SUNPRO_C >> 8) & 0xf;
|
44 | 44 | int revision_digit2 = (__SUNPRO_C >> 4) & 0xf;
|
45 | 45 | int patch = (__SUNPRO_C >> 0 ) & 0xf;
|
46 |
| - sprintf( *info_str, "Sun %d.%d%d.%d", version, revision_digit1, revision_digit2, patch ); |
| 46 | + sprintf( info_str, "Sun %d.%d%d.%d", version, revision_digit1, revision_digit2, patch ); |
47 | 47 |
|
48 | 48 | /* unknown */
|
49 | 49 | #else
|
50 |
| - sprintf( *info_str, "unknown" ); |
| 50 | + sprintf( info_str, "unknown" ); |
51 | 51 | #endif
|
52 | 52 |
|
53 | 53 | return 0;
|
54 | 54 | }
|
55 | 55 |
|
56 | 56 | #if defined(MPI_VERSION)
|
57 | 57 |
|
58 |
| -int get_mpi_info(char **info_str) { |
| 58 | +int get_mpi_info(char *info_str) { |
59 | 59 | #if defined(MVAPICH2)
|
60 |
| - sprintf(*info_str, "MVAPICH2"); |
| 60 | + sprintf( info_str, "MVAPICH2"); |
61 | 61 | #elif defined(OPEN_MPI)
|
62 |
| - sprintf(*info_str, "Open MPI"); |
| 62 | + sprintf( info_str, "Open MPI"); |
63 | 63 | #elif defined(I_MPI_VERSION)
|
64 |
| - sprintf(*info_str, "Intel MPI"); |
| 64 | + sprintf( info_str, "Intel MPI"); |
65 | 65 | #elif defined(CRAY_MPI)
|
66 |
| - sprintf(*info_str, "Cray MPI"); |
| 66 | + sprintf( info_str, "Cray MPI"); |
67 | 67 | #elif defined(MPICH)
|
68 |
| - sprintf(*info_str, "MPICH"); |
| 68 | + sprintf( info_str, "MPICH"); |
69 | 69 | #else
|
70 |
| - sprintf(*info_str, "unknown"); |
| 70 | + sprintf( info_str, "unknown"); |
71 | 71 | #endif
|
72 | 72 | return 0;
|
73 | 73 | }
|
74 | 74 |
|
75 | 75 | #endif
|
76 | 76 |
|
77 | 77 |
|
78 |
| -int get_compile_time( char **info_str ) { |
79 |
| - sprintf( *info_str, "%s %s", __DATE__, __TIME__ ); |
| 78 | +int get_compile_time( char *info_str ) { |
| 79 | + sprintf( info_str, "%s %s", __DATE__, __TIME__ ); |
80 | 80 | return 0;
|
81 | 81 | }
|
82 | 82 |
|
83 | 83 |
|
84 |
| -int get_timestamp ( char **info_str ) { |
| 84 | +int get_timestamp ( char *info_str ) { |
85 | 85 | time_t t;
|
86 | 86 | struct tm *ts;
|
87 | 87 | t = time(NULL);
|
88 | 88 | ts = localtime(&t);
|
89 |
| - sprintf( *info_str, "D%d-%d-%d T%d:%d:%d", |
| 89 | + sprintf( info_str, "D%d-%d-%d T%d:%d:%d", |
90 | 90 | ts->tm_mday, ts->tm_mon + 1, ts->tm_year + 1900,
|
91 | 91 | ts->tm_hour, ts->tm_min, ts->tm_sec );
|
92 | 92 | return 0;
|
93 | 93 | }
|
94 | 94 |
|
95 | 95 |
|
96 |
| -int get_host( char **info_str ) { |
| 96 | +int get_host( char *info_str ) { |
97 | 97 | char hostname[1024];
|
98 | 98 | hostname[1023] = '\0';
|
99 | 99 | gethostname(hostname, 1023 );
|
100 |
| - sprintf( *info_str, "%s", hostname ); |
| 100 | + sprintf( info_str, "%s", hostname ); |
101 | 101 | return 0;
|
102 | 102 | }
|
103 | 103 |
|
|
0 commit comments