Skip to content

Commit

Permalink
make debug mode run on one thread
Browse files Browse the repository at this point in the history
makes using visual debuggers much easier
  • Loading branch information
fractalsbyx committed Nov 4, 2024
1 parent d7557ba commit 44e912f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions applications/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,19 @@ variableAttributeLoader::loadPostProcessorVariableAttributes()
# include <time.h>
#endif

#ifdef DEBUG
constexpr unsigned int max_threads_per_process = 1;
#else
constexpr unsigned int max_threads_per_process = dealii::numbers::invalid_unsigned_int;
#endif

// main
int
main(int argc, char **argv)
{
dealii::Utilities::MPI::MPI_InitFinalize
mpi_initialization(argc, argv, dealii::numbers::invalid_unsigned_int);
dealii::Utilities::MPI::MPI_InitFinalize mpi_initialization(argc,
argv,
max_threads_per_process);

// Parse the command line options (if there are any) to get the name of the
// input file
Expand Down

0 comments on commit 44e912f

Please sign in to comment.