#1548: stdout redirection in multithreading scenario ---------------------------------+------------------------------------------ Reporter: gzheng@… | Owner: Type: defect | Status: new Priority: major | Milestone: Component: Cactus | Version: development version Keywords: stdout redirection | ---------------------------------+------------------------------------------ Current stdout redirection scheme implemented in CommandLine.c:CCTKi_CommandLineFinished() (which redirects stdout to a file or /dev/null based on myproc) does not work on multithreaded MPI (e.g AMPI), because it redirects all output (from all threads in a process). That is, all MPI ranks in a process will be mistakenly directly to one file, or if redirecting to /dev/null, there will be simply no output.
It may be possible to implement a cctk_printf function, which checks myproc and manage the output for each thread.