kspaceFirstOrder3D-OMP  1.2
The C++ implementation of the k-wave toolbox for the time-domain simulation of acoustic wave fields in 3D
OutputMessagesLinux.h
Go to the documentation of this file.
1 /**
2  * @file OutputMessagesLinux.h
3  *
4  * @author Jiri Jaros \n
5  * Faculty of Information Technology \n
6  * Brno University of Technology \n
7  * jarosjir@fit.vutbr.cz
8  *
9  * @brief The header file containing all linux specific messages going to the standard output.
10  *
11  * @version kspaceFirstOrder3D 2.16
12  *
13  * @date 30 August 2017, 11:39 (created) \n
14  * 04 September 2017, 10:46 (revised)
15  *
16  * @copyright Copyright (C) 2017 Jiri Jaros and Bradley Treeby.
17  *
18  * This file is part of the C++ extension of the [k-Wave Toolbox](http://www.k-wave.org).
19  *
20  * This file is part of the k-Wave. k-Wave is free software: you can redistribute it and/or modify it under the terms
21  * of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the
22  * License, or (at your option) any later version.
23  *
24  * k-Wave is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
25  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
26  * more details.
27  *
28  * You should have received a copy of the GNU Lesser General Public License along with k-Wave.
29  * If not, see [http://www.gnu.org/licenses/](http://www.gnu.org/licenses/).
30  */
31 
32 #ifndef OUTPUT_MESSAGES_LINUX_H
33 #define OUTPUT_MESSAGES_LINUX_H
34 
35 /**
36  * @brief Datatype for output messages.
37  * @details Datatype for output messages.
38  */
39 using OutputMessage = const std::string;
40 
41 
42 //------------------------------------------------- Common outputs ---------------------------------------------------//
43 /// Output message - first separator
45  = "┌───────────────────────────────────────────────────────────────┐\n";
46 /// Output message - separator
48  = "├───────────────────────────────────────────────────────────────┤\n";
49 /// Output message -last separator
51  = "└───────────────────────────────────────────────────────────────┘\n";
52 
53 /// Output message - new line
55  = "\n";
56 /// Output message - Done with two spaces.
58  = " Done │\n";
59 /// Output message - finish line without done
61  = " │\n";
62 /// Output message - failed message
64  = "Failed │\n" ;
65 /// Output message - vertical line
67  = "│";
68 
69 /// Output message
71  = "│ %s │\n";
72 /// Output message
74  = "│ Number of CPU threads: %9lu │\n";
75 /// Output message
77  = "├───────────────────────────────────────────────────────────────┤\n"
78  "│ Simulation details │\n"
79  "├───────────────────────────────────────────────────────────────┤\n";
80 /// Output message
82  = "├───────────────────────────────────────────────────────────────┤\n"
83  "│ Initialization │\n"
84  "├───────────────────────────────────────────────────────────────┤\n";
85 
86 /// Output message
88  = "├───────────────────────────────────────────────────────────────┤\n"
89  "│ Computational resources │\n"
90  "├───────────────────────────────────────────────────────────────┤\n";
91 /// Output message
93  = "├───────────────────────────────────────────────────────────────┤\n"
94  "│ Simulation │\n"
95  "├──────────┬────────────────┬──────────────┬────────────────────┤\n"
96  "│ Progress │ Elapsed time │ Time to go │ Est. finish time │\n"
97  "├──────────┼────────────────┼──────────────┼────────────────────┤\n";
98 /// Output message
100  = "├───────────────────────────────────────────────────────────────┤\n"
101  "│ Checkpointing │\n"
102  "├───────────────────────────────────────────────────────────────┤\n";
103 
104 /// Output message
106  = "├───────────────────────────────────────────────────────────────┤\n"
107  "│ Summary │\n"
108  "├───────────────────────────────────────────────────────────────┤\n";
109 ///Output message
111  = "├───────────────────────────────────────────────────────────────┤\n"
112  "│ End of computation │\n"
113  "└───────────────────────────────────────────────────────────────┘\n";
114 
115 ///Output message
117  = "│ Elapsed time: %11.2fs │\n";
118 ///Output message
120  = "│ Recovered from time step: %8ld │\n";
121 ///Output message
123  = "│ Peak memory in use: %8luMB │\n";
124 ///Output message
126  = "│ Total execution time: %8.2fs │\n";
127 ///Output message
129  = "│ This leg execution time: %8.2fs │\n";
130 
131 
132 ///Output message
134  = "│ Reading simulation configuration: ";
135 ///Output message
137  = "│ Domain dimensions: %42s │\n";
138 ///Output message
140  = "%lu x %lu x %lu";
141 
142 
143 ///Output message
145  = "│ Simulation time steps: %9lu │\n";
146 ///Output message
148  = "│ Sensor mask type: Index │\n";
149 ///Output message
151  = "│ Sensor mask type: Cuboid │\n";
152 ///Output message
154  = "│ Git hash: %s │\n";
155 
156 ///Output message
158  = "kspaceFirstOrder3D-OMP v1.2";
159 
160 ///Output message
162  = "│ FFT plans creation: ";
163 ///Output message
165  = "│ Pre-processing phase: ";
166 ///Output message
168  = "│ Data loading: ";
169 ///Output message
171  = "│ Memory allocation: ";
172 ///Output message
174  = "│ Current host memory in use: %8luMB │\n";
175 
176 ///Output message
178  ="│ %2li%c │ %9.3fs │ %9.3fs │ %02i/%02i/%02i %02i:%02i:%02i │\n";
179 ///Output message
181  = "├──────────┴────────────────┴──────────────┴────────────────────┤\n";
182 ///Output message
184  = "└──────────┴────────────────┴──────────────┴────────────────────┘\n";
185 
186 ///Output message
188  = "│ Number of time steps completed: %10u │\n";
189 ///Output message
191  = "│ Creating checkpoint: ";
192 ///Output message
194  = "│ Sampled data post-processing: ";
195 ///Output message
197  = "│ + Storing checkpoint data: ";
198 ///Output message
200  = "│ + Storing FFTW wisdom: ";
201 ///Output message
203  = "│ Loading FFTW wisdom: ";
204 ///Output message
206  = "│ + Storing sensor data: ";
207 ///Output message
209  = "│ + Reading input file: ";
210 ///Output message
212  = "│ + Reading checkpoint file: ";
213 ///Output message
215  = "│ + Reading output file: ";
216 ///Output message
218  = "│ + Creating output file: ";
219 
220 ///Output message
222  = "Input file: ";
223 ///Output message
225  = "Output file: ";
226 ///Output message
228  = "Check file: ";
229 ///Output message
231  = "│ Checkpoint interval: %8lus │\n";
232 ///Output message
234  = "│ Compression level: %8lu │\n";
235 ///Output message
237  = "│ Print progress interval: %8lu%% │\n";
238 ///Output message
240  = "│ Benchmark time steps: %8lu │\n";
241 ///Output message
243  = "├───────────────────────────────────────────────────────────────┤\n"
244  "│ Sampling flags │\n"
245  "├───────────────────────────────────────────────────────────────┤\n";
246 ///Output message
248  = "│ Sampling begins at time step: %8lu │\n";
249 ///Output message
251  = "│ Copy sensor mask to output file: Yes │\n";
252 
253 
254 
255 //------------------------------------------------ Print code version ------------------------------------------------//
256 /// Print version output message
258  = "│ Build information │\n"
259  "├───────────────────────────────────────────────────────────────┤\n"
260  "│ Build number: kspaceFirstOrder3D v2.16 │\n"
261  "│ Build date: %*.*s │\n"
262  "│ Build time: %*.*s │\n";
263 
264 /// Print version output message
266  = "│ Git hash: %s │\n";
267 
268 /// Print version output message
270  = "│ Operating system: Linux x64 │\n";
271 /// Print version output message
273  = "│ Operating system: Windows x64 │\n";
274 /// Print version output message
276  = "│ Operating system: Mac OS X x64 │\n";
277 
278 /// Print version output message
280  = "│ Compiler name: GNU C++ %.19s │\n";
281 /// Print version output message
283  = "│ Compiler name: Intel C++ %d │\n";
284 /// Print version output message
286  = "│ Compiler name: Visual Studio C++ %d │\n";
287 
288 /// Print version output message
290  = "│ Instruction set: Intel AVX 2 │\n";
291 /// Print version output message
293  = "│ Instruction set: Intel AVX │\n";
294 /// Print version output message
296  = "│ Instruction set: Intel SSE 4.2 │\n";
297 /// Print version output message
299  = "│ Instruction set: Intel SSE 4.1 │\n";
300 /// Print version output message
302  = "│ Instruction set: Intel SSE 3 │\n";
303 /// Print version output message
305  = "│ Instruction set: Intel SSE 2 │\n";
306 
307 /// Print version output message
309  = "├───────────────────────────────────────────────────────────────┤\n"
310  "│ Contact email: jarosjir@fit.vutbr.cz │\n"
311  "│ Contact web: http://www.k-wave.org │\n"
312  "├───────────────────────────────────────────────────────────────┤\n"
313  "│ Copyright (C) 2017 Jiri Jaros and Bradley Treeby │\n"
314  "└───────────────────────────────────────────────────────────────┘\n";
315 
316 
317 
318 //----------------------------------------------------- Usage --------------------------------------------------------//
319 /// Usage massage
321  = "│ Usage │\n"
322  "├───────────────────────────────────────────────────────────────┤\n"
323  "│ Mandatory parameters │\n"
324  "├───────────────────────────────────────────────────────────────┤\n"
325  "│ -i <file_name> │ HDF5 input file │\n"
326  "│ -o <file_name> │ HDF5 output file │\n"
327  "├───────────────────────────────┴───────────────────────────────┤\n"
328  "│ Optional parameters │\n"
329  "├───────────────────────────────┬───────────────────────────────┤\n";
330 
331 /// Usage massage
333  = "│ -r <interval_in_%%> │ Progress print interval │\n"
334  "│ │ (default = %2ld%%) │\n"
335  "│ -c <compression_level> │ Compression level <0,9> │\n"
336  "│ │ (default = %1ld) │\n"
337  "│ --benchmark <time_steps> │ Run only a specified number │\n"
338  "│ │ of time steps │\n"
339  "│ --verbose <level> │ Level of verbosity <0,2> │\n"
340  "│ │ 0 - basic, 1 - advanced, │\n"
341  "│ │ 2 - full │\n"
342  "│ │ (default = basic) │\n"
343  "│ -h, --help │ Print help │\n"
344  "│ --version │ Print version and build info │\n"
345  "├───────────────────────────────┼───────────────────────────────┤\n"
346  "│ --checkpoint_file <file_name> │ HDF5 checkpoint file │\n"
347  "│ --checkpoint_interval <sec> │ Checkpoint after a given │\n"
348  "│ │ number of seconds │\n"
349  "├───────────────────────────────┴───────────────────────────────┤\n"
350  "│ Output flags │\n"
351  "├───────────────────────────────┬───────────────────────────────┤\n"
352  "│ -p │ Store acoustic pressure │\n"
353  "│ │ (default output flag) │\n"
354  "│ │ (the same as --p_raw) │\n"
355  "│ --p_raw │ Store raw time series of p │\n"
356  "│ --p_rms │ Store rms of p │\n"
357  "│ --p_max │ Store max of p │\n"
358  "│ --p_min │ Store min of p │\n"
359  "│ --p_max_all │ Store max of p (whole domain) │\n"
360  "│ --p_min_all │ Store min of p (whole domain) │\n"
361  "│ --p_final │ Store final pressure field │\n"
362  "├───────────────────────────────┼───────────────────────────────┤\n"
363  "│ -u │ Store ux, uy, uz │\n"
364  "│ │ (the same as --u_raw) │\n"
365  "│ --u_raw │ Store raw time series of │\n"
366  "│ │ ux, uy, uz │\n"
367  "│ --u_non_staggered_raw │ Store non-staggered raw time │\n"
368  "│ │ series of ux, uy, uz │\n"
369  "│ --u_rms │ Store rms of ux, uy, uz │\n"
370  "│ --u_max │ Store max of ux, uy, uz │\n"
371  "│ --u_min │ Store min of ux, uy, uz │\n"
372  "│ --u_max_all │ Store max of ux, uy, uz │\n"
373  "│ │ (whole domain) │\n"
374  "│ --u_min_all │ Store min of ux, uy, uz │\n"
375  "│ │ (whole domain) │\n"
376  "│ --u_final │ Store final acoustic velocity │\n"
377  "├───────────────────────────────┼───────────────────────────────┤\n"
378  "│ -s <time_step> │ When data collection begins │\n"
379  "│ │ (default = 1) │\n"
380  "└───────────────────────────────┴───────────────────────────────┘\n";
381 
382 /// Usage massage
384  = "│ -t <num_threads> │ Number of CPU threads │\n"
385  "│ │ (default = %2d) │\n";
386 
387 #endif /* OUTPUT_MESSAGES_LINUX_H */
OutputMessage kOutFmtUsagePart2
Usage massage.
OutputMessage kOutFmtUsagePart1
Usage massage.
OutputMessage kOutFmtSSE3
Print version output message.
OutputMessage kOutFmtLoadingFftwWisdom
Output message.
OutputMessage kOutFmtLegExecutionTime
Output message.
OutputMessage kOutFmtCreatingCheckpoint
Output message.
OutputMessage kOutFmtNewLine
Output message - new line.
OutputMessage kOutFmtVerticalLine
Output message - vertical line.
OutputMessage kOutFmtReadingConfiguration
Output message.
OutputMessage kOutFmtNumberOfThreads
Output message.
OutputMessage kOutFmtReadingOutputFile
Output message.
OutputMessage kOutFmtCompResourcesHeader
Output message.
OutputMessage kOutFmtSimulatoinFinalSeparator
Output message.
OutputMessage kOutFmtFailed
Output message - failed message.
OutputMessage kOutFmtElapsedTime
Output message.
OutputMessage kOutFmtRecoveredFrom
Output message.
OutputMessage kOutFmtPreProcessing
Output message.
OutputMessage kOutFmtDataLoading
Output message.
OutputMessage kOutFmtSimulationDetailsTitle
Output message.
OutputMessage kOutFmtSummaryHeader
Output message.
OutputMessage kOutFmtCheckpointInterval
Output message.
OutputMessage kOutFmtSimulationEndSeparator
Output message.
OutputMessage kOutFmtFirstSeparator
Output message - first separator.
OutputMessage kOutFmtStoringFftwWisdom
Output message.
OutputMessage kOutFmtInitializationHeader
Output message.
OutputMessage kOutFmtSensorMaskIndex
Output message.
const std::string OutputMessage
Datatype for output messages.
OutputMessage kOutFmtMemoryUsage
Output message.
OutputMessage kOutFmtBenchmarkTimeStep
Output message.
OutputMessage kOutFmtSSE2
Print version output message.
OutputMessage kOutFmtIntelCompiler
Print version output message.
OutputMessage kOutFmtBuildNoDataTime
Print version output message.
OutputMessage kOutFmtDomainSize
Output message.
OutputMessage kOutFmtSimulatoinLenght
Output message.
OutputMessage kOutFmtStoringCheckpointData
Output message.
OutputMessage kOutFmtCheckpointHeader
Output message.
OutputMessage kOutFmtCheckpointFile
Output message.
OutputMessage kOutFmtOutputFile
Output message.
OutputMessage kOutFmtTotalExecutionTime
Output message.
OutputMessage kOutFmtDomainSizeFormat
Output message.
OutputMessage kOutFmtVersionGitHash
Print version output message.
OutputMessage kOutFmtKWaveVersion
Output message.
OutputMessage kOutFmtPostProcessing
Output message.
OutputMessage kOutFmtCheckpointTimeSteps
Output message.
OutputMessage kOutFmtMacOsBuild
Print version output message.
OutputMessage kOutFmtFftPlans
Output message.
OutputMessage kOutFmtSamplingStartsAt
Output message.
OutputMessage kOutFmtSimulationProgress
Output message.
OutputMessage kOutFmtCurrentMemory
Output message.
OutputMessage kOutFmtCompressionLevel
Output message.
OutputMessage kOutFmtSimulationHeader
Output message.
OutputMessage kOutFmtWindowsBuild
Print version output message.
OutputMessage kOutFmtSensorMaskCuboid
Output message.
OutputMessage kOutFmtGitHashLeft
Output message.
OutputMessage kOutFmtVisualStudioCompiler
Print version output message.
OutputMessage kOutFmtAVX2
Print version output message.
OutputMessage kOutFmtCreatingOutputFile
Output message.
OutputMessage kOutFmtSamplingFlags
Output message.
OutputMessage kOutFmtLastSeparator
Output message -last separator.
OutputMessage kOutFmtInputFile
Output message.
OutputMessage kOutFmtCopySensorMask
Output message.
OutputMessage kOutFmtSSE42
Print version output message.
OutputMessage kOutFmtReadingInputFile
Output message.
OutputMessage kOutFmtPrintProgressIntrerval
Output message.
OutputMessage kOutFmtCodeName
Output message.
OutputMessage kOutFmtLinuxBuild
Print version output message.
OutputMessage kOutFmtEndOfSimulation
Output message.
OutputMessage kOutFmtReadingCheckpointFile
Output message.
OutputMessage kOutFmtSeparator
Output message - separator.
OutputMessage kOutFmtStoringSensorData
Output message.
OutputMessage kOutFmtUsageThreads
Usage massage.
OutputMessage kOutFmtMemoryAllocation
Output message.
OutputMessage kOutFmtSSE41
Print version output message.
OutputMessage kOutFmtGnuCompiler
Print version output message.
OutputMessage kOutFmtLicense
Print version output message.
OutputMessage kOutFmtNoDone
Output message - finish line without done.
OutputMessage kOutFmtDone
Output message - Done with two spaces.
OutputMessage kOutFmtAVX
Print version output message.