Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Source/ablastr/utils/UsedInputsFile.H
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ namespace ablastr::utils
* Only the AMReX IOProcessor writes.
*
* @param filename the name of the text file to write
* @param verbose print information about the file location to stdout
*/
void
write_used_inputs_file (std::string const & filename);
write_used_inputs_file (std::string const & filename, bool verbose=true);
}

#endif // ABLASTR_USED_INPUTS_FILE_H
12 changes: 9 additions & 3 deletions Source/ablastr/utils/UsedInputsFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,20 @@
#include <AMReX_ParmParse.H>
#include <AMReX_Print.H>

#include <ios>
#include <ostream>
#include <string>


void
ablastr::utils::write_used_inputs_file (std::string const & filename)
ablastr::utils::write_used_inputs_file (std::string const & filename, bool verbose)
{
amrex::Print() << "For full input parameters, see the file: " << filename << "\n\n";
if (filename.empty() || filename == "/dev/null") {
return;
}

if (verbose) {
amrex::Print() << "For full input parameters, see the file: " << filename << "\n\n";
}

if (amrex::ParallelDescriptor::IOProcessor()) {
std::ofstream jobInfoFile;
Expand Down
Loading