Merge with Christoph GPT checksum debug

This commit is contained in:
paboyle committed 2025-07-15 03:06:09 +00:00
1 parent a77cd50b2f
commit 41f344bbd3
17 files changed
+704 -65

No files matched your search

+16
View File
@@ -416,12 +416,28 @@ void Grid_init(int *argc,char ***argv)
} else {
FILE *fp;
std::ostringstream fname;
int rank = CartesianCommunicator::RankWorld();
int radix=64;
char* root = getenv("GRID_STDOUT_ROOT");
if (root) {
fname << root ;
mkdir(fname.str().c_str(), S_IRWXU );
fname << "/";
}
fname << (rank/radix)*radix ;
mkdir(fname.str().c_str(), S_IRWXU );
fname << "/";
fname<<"Grid.stdout.";
fname<<CartesianCommunicator::RankWorld();
fp=freopen(fname.str().c_str(),"w",stdout);
assert(fp!=(FILE *)NULL);
std::ostringstream ename;
if (root){
ename << root << "/";
}
ename << (rank/radix)*radix << "/";
ename<<"Grid.stderr.";
ename<<CartesianCommunicator::RankWorld();
fp=freopen(ename.str().c_str(),"w",stderr);