libMesh
Public Member Functions | Private Attributes | List of all members
libMesh::LibMeshInit Class Reference

The LibMeshInit class, when constructed, initializes the dependent libraries (e.g. More...

#include <libmesh.h>

Public Member Functions

 LibMeshInit (int argc, const char *const *argv, MPI_Comm COMM_WORLD_IN=MPI_COMM_WORLD)
 Initialize the library for use, with the command line options provided. More...
 
 LibMeshInit (int argc, const char *const *argv)
 
virtual ~LibMeshInit ()
 Destructor. More...
 
const Parallel::Communicator & comm () const
 Returns the Communicator created by this libMesh object, which will be a compatibility shim if MPI is not enabled, or a wrapper for the user-input MPI_Comm if we were constructed with one, or a wrapper for MPI_COMM_WORLD by default. More...
 
Parallel::Communicator & comm ()
 

Private Attributes

Parallel::Communicator * _comm
 
vtkMPIController * _vtk_mpi_controller
 

Detailed Description

The LibMeshInit class, when constructed, initializes the dependent libraries (e.g.

MPI or PETSC) and does the command line parsing needed by libMesh. The LibMeshInit destructor closes those libraries properly.

For most users, a single LibMeshInit object should be created at the start of your main() function.

All libMesh functionality should be used only when a LibMeshInit object exists. Dependent library functionality, likewise, except in codes which manually initialize those libraries before LibMeshInit creation and finalize them after LibMeshInit destruction.

Since "it is best not to perform much more than a return rc after calling MPI_Finalize", applications which want to do anything after LibMeshInit destruction should manage MPI initialization and finalization manually.

Definition at line 83 of file libmesh.h.

Constructor & Destructor Documentation

◆ LibMeshInit() [1/2]

libMesh::LibMeshInit::LibMeshInit ( int  argc,
const char *const *  argv,
MPI_Comm  COMM_WORLD_IN = MPI_COMM_WORLD 
)

Initialize the library for use, with the command line options provided.

This will e.g. call MPI_Init if MPI is available and enabled and has not already been initialized; similar initialization may take place for Petsc, Slepc, multithreading support, libMesh Singleton objects, the libMesh::out/err IO streams, and any libMesh handlers for floating-point exceptions, signals, and/or C++ aborts.

You must create a LibMeshInit object before using any of the library functionality. This method may take an optional parameter to use a user-specified MPI communicator.

◆ LibMeshInit() [2/2]

libMesh::LibMeshInit::LibMeshInit ( int  argc,
const char *const *  argv 
)

Definition at line 336 of file libmesh.C.

341 {
342  // should _not_ be initialized already.
344 
345  // Build a command-line parser.
346  command_line = libmesh_make_unique<GetPot>(argc, argv);
347 
348  // Disable performance logging upon request
349  {
350  if (libMesh::on_command_line ("--disable-perflog"))
352  }
353 
354  // Build a task scheduler
355  {
356  // Get the requested number of threads, defaults to 1 to avoid MPI and
357  // multithreading competition. If you would like to use MPI and multithreading
358  // at the same time then (n_mpi_processes_per_node)x(n_threads) should be the
359  // number of processing cores per node.
360  std::vector<std::string> n_threads(2);
361  n_threads[0] = "--n_threads";
362  n_threads[1] = "--n-threads";
365 
367  {
368  for (auto & option : n_threads)
369  if (command_line->search(option))
370  libmesh_error_msg("Detected option " << option <<
371  " with no value. Did you forget '='?");
372 
374  }
375 
376  // If there's no threading model active, force _n_threads==1
377 #if !LIBMESH_USING_THREADS
379  {
381  libmesh_warning("Warning: You requested --n-threads>1 but no threading model is active!\n"
382  << "Forcing --n-threads==1 instead!");
383  }
384 #endif
385 
386  // Set the number of OpenMP threads to the same as the number of threads libMesh is going to use
387 #ifdef LIBMESH_HAVE_OPENMP
388  omp_set_num_threads(libMesh::libMeshPrivateData::_n_threads);
389 #endif
390 
391  task_scheduler = libmesh_make_unique<Threads::task_scheduler_init>(libMesh::n_threads());
392  }
393 
394  // Construct singletons who may be at risk of the
395  // "static initialization order fiasco"
397 
398  // Make sure the construction worked
400 
401 #if defined(LIBMESH_HAVE_MPI)
402 
403  // Allow the user to bypass MPI initialization
404  if (!libMesh::on_command_line ("--disable-mpi"))
405  {
406  // Check whether the calling program has already initialized
407  // MPI, and avoid duplicate Init/Finalize
408  int flag;
409  timpi_call_mpi(MPI_Initialized (&flag));
410 
411  if (!flag)
412  {
413  int mpi_thread_provided;
414  const int mpi_thread_requested = libMesh::n_threads() > 1 ?
415  MPI_THREAD_FUNNELED :
416  MPI_THREAD_SINGLE;
417 
418  timpi_call_mpi
419  (MPI_Init_thread (&argc, const_cast<char ***>(&argv),
420  mpi_thread_requested, &mpi_thread_provided));
421 
422  if ((libMesh::n_threads() > 1) &&
423  (mpi_thread_provided < MPI_THREAD_FUNNELED))
424  {
425  libmesh_warning("Warning: MPI failed to guarantee MPI_THREAD_FUNNELED\n"
426  << "for a threaded run.\n"
427  << "Be sure your library is funneled-thread-safe..."
428  << std::endl);
429 
430  // Ideally, if an MPI stack tells us it's unsafe for us
431  // to use threads, we shouldn't use threads.
432  // In practice, we've encountered one MPI stack (an
433  // mvapich2 configuration) that returned
434  // MPI_THREAD_SINGLE as a proper warning, two stacks
435  // that handle MPI_THREAD_FUNNELED properly, and two
436  // current stacks plus a couple old stacks that return
437  // MPI_THREAD_SINGLE but support libMesh threaded runs
438  // anyway.
439 
440  // libMesh::libMeshPrivateData::_n_threads = 1;
441  // task_scheduler = libmesh_make_unique<Threads::task_scheduler_init>(libMesh::n_threads());
442  }
443  libmesh_initialized_mpi = true;
444  }
445 
446  // Duplicate the input communicator for internal use
447  // And get a Parallel::Communicator copy too, to use
448  // as a default for that API
449  this->_comm = new Parallel::Communicator(COMM_WORLD_IN);
450 
451  libMesh::GLOBAL_COMM_WORLD = COMM_WORLD_IN;
452 
453  //MPI_Comm_set_name not supported in at least SGI MPT's MPI implementation
454  //MPI_Comm_set_name (libMesh::COMM_WORLD, "libMesh::COMM_WORLD");
455 
457  cast_int<processor_id_type>(this->comm().rank());
459  cast_int<processor_id_type>(this->comm().size());
460 
461  // Set up an MPI error handler if requested. This helps us get
462  // into a debugger with a proper stack when an MPI error occurs.
463  if (libMesh::on_command_line ("--handle-mpi-errors"))
464  {
465  timpi_call_mpi
466  (MPI_Comm_create_errhandler(libMesh_MPI_Handler, &libmesh_errhandler));
467  timpi_call_mpi
468  (MPI_Comm_set_errhandler(libMesh::GLOBAL_COMM_WORLD, libmesh_errhandler));
469  timpi_call_mpi
470  (MPI_Comm_set_errhandler(MPI_COMM_WORLD, libmesh_errhandler));
471  }
472  }
473 
474  // Could we have gotten bad values from the above calls?
475  libmesh_assert_greater (libMeshPrivateData::_n_processors, 0);
476 
477  // The cast_int already tested _processor_id>=0
478  // libmesh_assert_greater_equal (libMeshPrivateData::_processor_id, 0);
479 
480  // Let's be sure we properly initialize on every processor at once:
481  libmesh_parallel_only(this->comm());
482 
483 #else
484  this->_comm = new Parallel::Communicator(); // So comm() doesn't dereference null
485 #endif
486 
487 #if defined(LIBMESH_HAVE_PETSC)
488 
489  // Allow the user to bypass PETSc initialization
490  if (!libMesh::on_command_line ("--disable-petsc")
491 
492 #if defined(LIBMESH_HAVE_MPI)
493  // If the user bypassed MPI, we'd better be safe and assume that
494  // PETSc was built to require it; otherwise PETSc initialization
495  // dies.
496  && !libMesh::on_command_line ("--disable-mpi")
497 #endif
498  )
499  {
500  int ierr=0;
501 
502  PETSC_COMM_WORLD = libMesh::GLOBAL_COMM_WORLD;
503 
504  // Check whether the calling program has already initialized
505  // PETSc, and avoid duplicate Initialize/Finalize
506  PetscBool petsc_already_initialized;
507  ierr = PetscInitialized(&petsc_already_initialized);
508  CHKERRABORT(libMesh::GLOBAL_COMM_WORLD,ierr);
509  if (petsc_already_initialized != PETSC_TRUE)
510  libmesh_initialized_petsc = true;
511 # if defined(LIBMESH_HAVE_SLEPC)
512 
513  // If SLEPc allows us to check whether the calling program
514  // has already initialized it, we do that, and avoid
515  // duplicate Initialize/Finalize.
516  // We assume that SLEPc will handle PETSc appropriately,
517  // which it does in the versions we've checked.
518  if (!SlepcInitializeCalled)
519  {
520  ierr = SlepcInitialize (&argc, const_cast<char ***>(&argv), nullptr, nullptr);
521  CHKERRABORT(libMesh::GLOBAL_COMM_WORLD,ierr);
522  libmesh_initialized_slepc = true;
523  }
524 # else
525  if (libmesh_initialized_petsc)
526  {
527  ierr = PetscInitialize (&argc, const_cast<char ***>(&argv), nullptr, nullptr);
528  CHKERRABORT(libMesh::GLOBAL_COMM_WORLD,ierr);
529  }
530 # endif
531 #if !PETSC_RELEASE_LESS_THAN(3,3,0)
532  // Register the reference implementation of DMlibMesh
533 #if PETSC_RELEASE_LESS_THAN(3,4,0)
534  ierr = DMRegister(DMLIBMESH, PETSC_NULL, "DMCreate_libMesh", DMCreate_libMesh); CHKERRABORT(libMesh::GLOBAL_COMM_WORLD,ierr);
535 #else
536  ierr = DMRegister(DMLIBMESH, DMCreate_libMesh); CHKERRABORT(libMesh::GLOBAL_COMM_WORLD,ierr);
537 #endif
538 
539 #endif
540  }
541 #endif
542 
543 #if defined(LIBMESH_HAVE_MPI) && defined(LIBMESH_HAVE_VTK)
544  // Do MPI initialization for VTK.
545  _vtk_mpi_controller = vtkMPIController::New();
546  _vtk_mpi_controller->Initialize(&argc, const_cast<char ***>(&argv), /*initialized_externally=*/1);
547  _vtk_mpi_controller->SetGlobalController(_vtk_mpi_controller);
548 #endif
549 
550  // Re-parse the command-line arguments. Note that PETSc and MPI
551  // initialization above may have removed command line arguments
552  // that are not relevant to this application in the above calls.
553  // We don't want a false-positive by detecting those arguments.
554  //
555  // Note: this seems overly paranoid/like it should be unnecessary,
556  // plus we were doing it wrong for many years and not clearing the
557  // existing GetPot object before re-parsing the command line, so all
558  // the command line arguments appeared twice in the GetPot object...
559  command_line = libmesh_make_unique<GetPot>(argc, argv);
560 
561  // The following line is an optimization when simultaneous
562  // C and C++ style access to output streams is not required.
563  // The amount of benefit which occurs is probably implementation
564  // defined, and may be nothing. On the other hand, I have seen
565  // some IO tests where IO performance improves by a factor of two.
566  if (!libMesh::on_command_line ("--sync-with-stdio"))
567  std::ios::sync_with_stdio(false);
568 
569  // Honor the --separate-libmeshout command-line option.
570  // When this is specified, the library uses an independent ostream
571  // for libMesh::out/libMesh::err messages, and
572  // std::cout and std::cerr are untouched by any other options
573  if (libMesh::on_command_line ("--separate-libmeshout"))
574  {
575  // Redirect. We'll share streambufs with cout/cerr for now, but
576  // presumably anyone using this option will want to replace the
577  // bufs later.
578  std::ostream * newout = new std::ostream(std::cout.rdbuf());
579  libMesh::out = *newout;
580  std::ostream * newerr = new std::ostream(std::cerr.rdbuf());
581  libMesh::err = *newerr;
582  }
583 
584  // Process command line arguments for redirecting stdout/stderr.
585  bool
586  cmdline_has_redirect_stdout = libMesh::on_command_line ("--redirect-stdout"),
587  cmdline_has_redirect_output = libMesh::on_command_line ("--redirect-output");
588 
589  // The --redirect-stdout command-line option has been deprecated in
590  // favor of "--redirect-output basename".
591  if (cmdline_has_redirect_stdout)
592  libmesh_warning("The --redirect-stdout command line option has been deprecated. "
593  "Use '--redirect-output basename' instead.");
594 
595  // Honor the "--redirect-stdout" and "--redirect-output basename"
596  // command-line options. When one of these is specified, each
597  // processor sends libMesh::out/libMesh::err messages to
598  // stdout.processor.#### (default) or basename.processor.####.
599  if (cmdline_has_redirect_stdout || cmdline_has_redirect_output)
600  {
601  std::string basename = "stdout";
602 
603  // Look for following argument if using new API
604  if (cmdline_has_redirect_output)
605  {
606  // Set the cursor to the correct location in the list of command line arguments.
607  command_line->search(1, "--redirect-output");
608 
609  // Get the next option on the command line as a string.
610  std::string next_string = "";
611  next_string = command_line->next(next_string);
612 
613  // If the next string starts with a dash, we assume it's
614  // another flag and not a file basename requested by the
615  // user.
616  if (next_string.size() > 0 && next_string.find_first_of("-") != 0)
617  basename = next_string;
618  }
619 
620  std::ostringstream filename;
621  filename << basename << ".processor." << libMesh::global_processor_id();
622  _ofstream = libmesh_make_unique<std::ofstream>(filename.str().c_str());
623 
624  // Redirect, saving the original streambufs!
625  out_buf = libMesh::out.rdbuf (_ofstream->rdbuf());
626  err_buf = libMesh::err.rdbuf (_ofstream->rdbuf());
627  }
628 
629  // redirect libMesh::out to nothing on all
630  // other processors unless explicitly told
631  // not to via the --keep-cout command-line argument.
632  if (libMesh::global_processor_id() != 0)
633  if (!libMesh::on_command_line ("--keep-cout"))
634  libMesh::out.rdbuf (nullptr);
635 
636  // Similarly, the user can request to drop cerr on all non-0 ranks.
637  // By default, errors are printed on all ranks, but this can lead to
638  // interleaved/unpredictable outputs when doing parallel regression
639  // testing, which this option is designed to support.
640  if (libMesh::global_processor_id() != 0)
641  if (libMesh::on_command_line ("--drop-cerr"))
642  libMesh::err.rdbuf (nullptr);
643 
644  // Check command line to override printing
645  // of reference count information.
646  if (libMesh::on_command_line("--disable-refcount-printing"))
648 
649 #ifdef LIBMESH_ENABLE_EXCEPTIONS
650  // Set our terminate handler to write stack traces in the event of a
651  // crash
652  old_terminate_handler = std::set_terminate(libmesh_terminate_handler);
653 #endif
654 
655 
656  if (libMesh::on_command_line("--enable-fpe"))
657  libMesh::enableFPE(true);
658 
659  if (libMesh::on_command_line("--enable-segv"))
660  libMesh::enableSEGV(true);
661 
662  // The library is now ready for use
664 
665 
666  // Make sure these work. Library methods
667  // depend on these being implemented properly,
668  // so this is a good time to test them!
671 }
672 
673 
674 
676 {
677  // Every processor had better be ready to exit at the same time.
678  // This would be a libmesh_parallel_only() function, except that
679  // libmesh_parallel_only() uses libmesh_assert() which throws an
680  // exception() which causes compilers to scream about exceptions
681  // inside destructors.
682 
683  // Even if we're not doing parallel_only debugging, we don't want
684  // one processor to try to exit until all others are done working.
685  this->comm().barrier();
686 
687  // We can't delete, finalize, etc. more than once without
688  // reinitializing in between
689  libmesh_exceptionless_assert(!libMesh::closed());
690 
691  // Delete reference counted singleton(s)
693 
694  // Clear the thread task manager we started
695  task_scheduler.reset();
696 
697  // Force the \p ReferenceCounter to print
698  // its reference count information. This allows
699  // us to find memory leaks. By default the
700  // \p ReferenceCounter only prints its information
701  // when the last created object has been destroyed.
702  // That does no good if we are leaking memory!
704 
705 
706  // Print an informative message if we detect a memory leak
707  if (ReferenceCounter::n_objects() != 0)
708  {
709  libMesh::err << "Memory leak detected!"
710  << std::endl;
711 
712 #if !defined(LIBMESH_ENABLE_REFERENCE_COUNTING) || defined(NDEBUG)
713 
714  libMesh::err << "Compile in DEBUG mode with --enable-reference-counting"
715  << std::endl
716  << "for more information"
717  << std::endl;
718 #endif
719 
720  }
721 
722  // print the perflog to individual processor's file.
724 
725  // Now clear the logging object, we don't want it to print
726  // a second time during the PerfLog destructor.
728 
729  // Reconnect the output streams
730  // (don't do this, or we will get messages from objects
731  // that go out of scope after the following return)
732  //std::cout.rdbuf(std::cerr.rdbuf());
733 
734 
735  // Set the initialized() flag to false
737 
738  if (libMesh::on_command_line ("--redirect-stdout") ||
739  libMesh::on_command_line ("--redirect-output"))
740  {
741  // If stdout/stderr were redirected to files, reset them now.
742  libMesh::out.rdbuf (out_buf);
743  libMesh::err.rdbuf (err_buf);
744  }
745 
746  // If we built our own output streams, we want to clean them up.
747  if (libMesh::on_command_line ("--separate-libmeshout"))
748  {
749  delete libMesh::out.get();
750  delete libMesh::err.get();
751 
752  libMesh::out.reset(std::cout);
753  libMesh::err.reset(std::cerr);
754  }
755 
756 #ifdef LIBMESH_ENABLE_EXCEPTIONS
757  // Reset the old terminate handler; maybe the user code wants to
758  // keep doing C++ stuff after closing libMesh stuff.
759  std::set_terminate(old_terminate_handler);
760 #endif
761 
762 
763  if (libMesh::on_command_line("--enable-fpe"))
764  libMesh::enableFPE(false);
765 
766 #if defined(LIBMESH_HAVE_PETSC)
767  // Allow the user to bypass PETSc finalization
768  if (!libMesh::on_command_line ("--disable-petsc")
769 #if defined(LIBMESH_HAVE_MPI)
770  && !libMesh::on_command_line ("--disable-mpi")
771 #endif
772  )
773  {
774 # if defined(LIBMESH_HAVE_SLEPC)
775  if (libmesh_initialized_slepc)
776  SlepcFinalize();
777 # else
778  if (libmesh_initialized_petsc)
779  PetscFinalize();
780 # endif
781  }
782 #endif
783 
784 #if defined(LIBMESH_HAVE_MPI) && defined(LIBMESH_HAVE_VTK)
785  _vtk_mpi_controller->Finalize(/*finalized_externally=*/1);
786  _vtk_mpi_controller->Delete();
787 #endif
788 
789 #if defined(LIBMESH_HAVE_MPI)
790  // Allow the user to bypass MPI finalization
791  if (!libMesh::on_command_line ("--disable-mpi"))
792  {
793  this->comm().clear();
794  delete this->_comm;
795 
796  if (libmesh_initialized_mpi)
797  {
798  // We can't just libmesh_assert here because destructor,
799  // but we ought to report any errors
800  unsigned int error_code = MPI_Finalize();
801  if (error_code != MPI_SUCCESS)
802  {
803  char error_string[MPI_MAX_ERROR_STRING+1];
804  int error_string_len;
805  MPI_Error_string(error_code, error_string,
806  &error_string_len);
807  std::cerr << "Failure from MPI_Finalize():\n"
808  << error_string << std::endl;
809  }
810  }
811  }
812 #else
813  delete this->_comm;
814 #endif
815 }

References libMesh::libMeshPrivateData::_is_initialized, libMesh::libMeshPrivateData::_n_processors, libMesh::libMeshPrivateData::_n_threads, libMesh::libMeshPrivateData::_processor_id, libMesh::closed(), libMesh::command_line_value(), libMesh::PerfLog::disable_logging(), libMesh::ReferenceCounter::disable_print_counter_info(), DMCreate_libMesh(), libMesh::enableFPE(), libMesh::enableSEGV(), libMesh::err, libMesh::GLOBAL_COMM_WORLD, libMesh::global_processor_id(), libMesh::ierr, libMesh::initialized(), libMesh::libmesh_assert(), libMesh::libmesh_errhandler, libMesh_MPI_Handler(), libMesh::libmesh_terminate_handler(), libMesh::n_threads(), libMesh::old_terminate_handler, libMesh::on_command_line(), libMesh::out, libMesh::perflog, libMesh::BasicOStreamProxy< charT, traits >::rdbuf(), libMesh::remote_elem, and libMesh::Singleton::setup().

◆ ~LibMeshInit()

virtual libMesh::LibMeshInit::~LibMeshInit ( )
virtual

Destructor.

Cleans up libMesh Singleton objects, and thread manager if threading is in use. Prints reference count and performance logging information if enabled. Restores pre-LibMeshInit terminate handler and floating-point-exception handling. Finalizes any of Slepc, Petsc, and MPI which were initialized by LibMeshInit.

Member Function Documentation

◆ comm() [1/2]

Parallel::Communicator& libMesh::LibMeshInit::comm ( )
inline

Definition at line 124 of file libmesh.h.

124 { return *_comm; }

References _comm.

◆ comm() [2/2]

const Parallel::Communicator& libMesh::LibMeshInit::comm ( ) const
inline

Returns the Communicator created by this libMesh object, which will be a compatibility shim if MPI is not enabled, or a wrapper for the user-input MPI_Comm if we were constructed with one, or a wrapper for MPI_COMM_WORLD by default.

Definition at line 122 of file libmesh.h.

122 { return *_comm; }

References _comm.

Member Data Documentation

◆ _comm

Parallel::Communicator* libMesh::LibMeshInit::_comm
private

Definition at line 127 of file libmesh.h.

Referenced by comm().

◆ _vtk_mpi_controller

vtkMPIController* libMesh::LibMeshInit::_vtk_mpi_controller
private

Definition at line 133 of file libmesh.h.


The documentation for this class was generated from the following files:
libMesh::libmesh_terminate_handler
void libmesh_terminate_handler()
Definition: libmesh.C:281
libMesh::libMeshPrivateData::_processor_id
processor_id_type _processor_id
The local processor id.
Definition: libmesh.C:243
libMesh::PerfLog::clear
void clear()
Clears all the internal data and restores the data structures to a pristine state.
Definition: perf_log.C:78
libMesh::PerfLog::print_log
void print_log() const
Print the log.
Definition: perf_log.C:684
libMesh::n_threads
unsigned int n_threads()
Definition: libmesh_base.h:96
libMesh::GLOBAL_COMM_WORLD
MPI_Comm GLOBAL_COMM_WORLD
MPI Communicator used to initialize libMesh.
Definition: libmesh_common.h:222
libMesh::BasicOStreamProxy::rdbuf
streambufT * rdbuf() const
Get the associated stream buffer.
Definition: ostream_proxy.h:143
libMesh::libMeshPrivateData::_n_threads
int _n_threads
Total number of threads possible.
Definition: libmesh.C:245
libMesh::enableSEGV
void enableSEGV(bool on)
Toggle libMesh reporting of segmentation faults.
Definition: libmesh.C:868
libMesh::ierr
ierr
Definition: petsc_dm_wrapper.C:72
libMesh::Singleton::cleanup
static void cleanup()
Cleanup function.
Definition: libmesh_singleton.C:96
PetscBool
PetscTruth PetscBool
Definition: petsc_macro.h:73
libMesh::libmesh_assert
libmesh_assert(ctx)
libMesh::perflog
PerfLog perflog
A PerfLog object to log performance.
libMesh::BasicOStreamProxy::get
streamT * get()
Rather than implement every ostream/ios/ios_base function, we'll be lazy and make esoteric uses go th...
Definition: ostream_proxy.h:213
libMesh::ReferenceCounter::print_info
static void print_info(std::ostream &out=libMesh::out)
Prints the reference information, by default to libMesh::out.
Definition: reference_counter.C:87
libMesh::ReferenceCounter::n_objects
static unsigned int n_objects()
Prints the number of outstanding (created, but not yet destroyed) objects.
Definition: reference_counter.h:83
libMesh::command_line_value
T command_line_value(const std::string &, T)
Definition: libmesh.C:931
libMesh::PerfLog::disable_logging
void disable_logging()
Disables performance logging for an active object.
Definition: perf_log.h:156
libMesh::enableFPE
void enableFPE(bool on)
Toggle hardware trap floating point exceptions.
Definition: libmesh.C:822
libMesh::initialized
bool initialized()
Checks that library initialization has been done.
Definition: libmesh.C:265
libMesh::old_terminate_handler
std::terminate_handler old_terminate_handler
Definition: libmesh.C:279
libMesh::LibMeshInit::_comm
Parallel::Communicator * _comm
Definition: libmesh.h:127
libMesh::libMeshPrivateData::_is_initialized
bool _is_initialized
Flag that tells if init() has been called.
Definition: libmesh.C:246
libMesh::BasicOStreamProxy::reset
void reset(streamT &target)
Reset the proxy to point to a different target.
Definition: ostream_proxy.h:207
DMCreate_libMesh
EXTERN_C_BEGIN PETSC_EXTERN PetscErrorCode DMCreate_libMesh(DM)
Definition: petscdmlibmeshimpl.C:1170
libMesh::Singleton::setup
static void setup()
Setup function.
Definition: libmesh_singleton.C:81
libMesh::LibMeshInit::_vtk_mpi_controller
vtkMPIController * _vtk_mpi_controller
Definition: libmesh.h:133
libMesh::on_command_line
bool on_command_line(std::string arg)
Definition: libmesh.C:898
libMesh::libmesh_errhandler
MPI_Errhandler libmesh_errhandler
Definition: libmesh.C:240
libMesh::err
OStreamProxy err
libMesh::LibMeshInit::~LibMeshInit
virtual ~LibMeshInit()
Destructor.
libMesh::LibMeshInit::comm
const Parallel::Communicator & comm() const
Returns the Communicator created by this libMesh object, which will be a compatibility shim if MPI is...
Definition: libmesh.h:122
libMesh::libMeshPrivateData::_n_processors
processor_id_type _n_processors
Total number of processors used.
Definition: libmesh.C:242
libMesh::out
OStreamProxy out
libMesh::global_processor_id
processor_id_type global_processor_id()
Definition: libmesh_base.h:85
libMesh_MPI_Handler
void libMesh_MPI_Handler(MPI_Comm *, int *,...)
Definition: libmesh.C:168
libMesh::remote_elem
const RemoteElem * remote_elem
Definition: remote_elem.C:57
libMesh::ReferenceCounter::disable_print_counter_info
static void disable_print_counter_info()
Definition: reference_counter.C:106
libMesh::closed
bool closed()
Checks that the library has been closed.
Definition: libmesh.C:272