Skip to content

Commit

Permalink
Add logfile naming option
Browse files Browse the repository at this point in the history
  • Loading branch information
psakievich committed Jul 23, 2023
1 parent 0bffb4f commit 85de5ea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
9 changes: 7 additions & 2 deletions app/exawind/exawind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,13 @@ int main(int argc, char** argv)
if (nalu_node[i].IsMap()) {
yaml_replace_instance = nalu_node["replace"];
nalu_inpfile = nalu_node["input_file"].as<std::string>();
logfile = exawind::NaluWind::logfile_from_input_file_name(
nalu_inpfile, i);
// deal with the logfile name
if (nalu_node["logfile"]) {
logfile = nalu_node["logfile"].as<std::string>();
} else {
logfile = exawind::NaluWind::logfile_from_input_file_name(
nalu_inpfile, i);
}
} else {
nalu_inpfile = nalu_node[i].as<std::string>();
logfile = exawind::NaluWind::logfile_from_input_file_name(
Expand Down
6 changes: 1 addition & 5 deletions src/NaluWind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@ NaluWind::NaluWind(
const std::string& logfile,
const std::vector<std::string>& fnames,
TIOGA::tioga& tg)
: m_id(id)
, m_comm(comm)
, m_doc(inp_yaml)
, m_fnames(fnames)
, m_sim(m_doc)
: m_id(id), m_comm(comm), m_doc(inp_yaml), m_fnames(fnames), m_sim(m_doc)
{
auto& env = sierra::nalu::NaluEnv::self();
env.parallelCommunicator_ = comm;
Expand Down

0 comments on commit 85de5ea

Please sign in to comment.