mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Stop creating file outside output_dir for parallel runs.
Only the root process did set the output_dir correctly. Others used the default. Therefore all messages logged by non-root processes did end up in the current directory even if an output_dir was passed to flow_mpi.
This commit is contained in:
@@ -339,10 +339,14 @@ namespace Opm
|
||||
{
|
||||
// Write parameters used for later reference. (only if rank is zero)
|
||||
output_to_files_ = output_cout_ && param_.getDefault("output", true);
|
||||
// Always read output_dir as it will be set unconditionally later.
|
||||
// Not doing this might cause files to be created in the current
|
||||
// directory.
|
||||
output_dir_ =
|
||||
param_.getDefault("output_dir", std::string("."));
|
||||
|
||||
if (output_to_files_) {
|
||||
// Create output directory if needed.
|
||||
output_dir_ =
|
||||
param_.getDefault("output_dir", std::string("."));
|
||||
boost::filesystem::path fpath(output_dir_);
|
||||
if (!is_directory(fpath)) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user