mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-17 15:27:06 +01:00
Output reports max number of digits
This commit is contained in:
@ -30,6 +30,7 @@ directory
|
|||||||
#define GRID_BITWISE_H
|
#define GRID_BITWISE_H
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include <cfloat>
|
||||||
#include <bitset>
|
#include <bitset>
|
||||||
#include <climits>
|
#include <climits>
|
||||||
#include <Config.h>
|
#include <Config.h>
|
||||||
|
@ -120,13 +120,14 @@ class ReproducibilityState {
|
|||||||
bitwise_xor(sumarray[thread], repr.th_states[repr.n_call][thread],xors);
|
bitwise_xor(sumarray[thread], repr.th_states[repr.n_call][thread],xors);
|
||||||
// OR all words
|
// OR all words
|
||||||
unsigned char res = 0;
|
unsigned char res = 0;
|
||||||
|
xors[0]=1;
|
||||||
for (int w = 0; w < words; w++) res = res | xors[w];
|
for (int w = 0; w < words; w++) res = res | xors[w];
|
||||||
if ( res ) {
|
if ( res ) {
|
||||||
std::cout << GridLogMessage << "Reproducibility failure report" << std::endl;
|
std::cout << GridLogMessage << "Reproducibility failure report" << std::endl;
|
||||||
grid->PrintRankInfo();
|
grid->PrintRankInfo();
|
||||||
std::cout << "Call: "<< repr.n_call << " Thread: " << thread << std::endl;
|
std::cout << "Call: "<< repr.n_call << " Thread: " << thread << std::endl;
|
||||||
std::cout << "Size of states: " << repr.th_states.size() << std::endl;
|
std::cout << "Size of states: " << repr.th_states.size() << std::endl;
|
||||||
std::cout << std::setprecision(15) << std::scientific;
|
std::cout << std::setprecision(GRID_REAL_DIGITS+1) << std::scientific;
|
||||||
std::cout << "Saved partial sum : " << repr.th_states[repr.n_call][thread] << std::endl;
|
std::cout << "Saved partial sum : " << repr.th_states[repr.n_call][thread] << std::endl;
|
||||||
std::cout << "Current partial sum: " << sumarray[thread] << std::endl;
|
std::cout << "Current partial sum: " << sumarray[thread] << std::endl;
|
||||||
std::cout << "Saved state " << std::endl; show_binaryrep(repr.th_states[repr.n_call][thread]);
|
std::cout << "Saved state " << std::endl; show_binaryrep(repr.th_states[repr.n_call][thread]);
|
||||||
|
@ -60,6 +60,13 @@ directory
|
|||||||
#include "Grid_neon.h"
|
#include "Grid_neon.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef GRID_DEFAULT_PRECISION_SINGLE
|
||||||
|
#define GRID_REAL_DIGITS FLT_DIG
|
||||||
|
#endif
|
||||||
|
#ifdef GRID_DEFAULT_PRECISION_DOUBLE
|
||||||
|
#define GRID_REAL_DIGITS DBL_DIG
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Grid {
|
namespace Grid {
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
|
Reference in New Issue
Block a user