-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix: Remove MPI wtime in profiler (#317)
Updated `SUNProfiler` to note rely on `MPI_WTime`. Fixes #312 --------- Co-authored-by: David Gardner <[email protected]>
- Loading branch information
Showing
25 changed files
with
687 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* ----------------------------------------------------------------- | ||
* Programmer: Cody J. Balos @ LLNL | ||
* ----------------------------------------------------------------- | ||
* SUNDIALS Copyright Start | ||
* Copyright (c) 2002-2023, Lawrence Livermore National Security | ||
* and Southern Methodist University. | ||
* All rights reserved. | ||
* | ||
* See the top-level LICENSE and NOTICE files for details. | ||
* | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
* SUNDIALS Copyright End | ||
* -----------------------------------------------------------------*/ | ||
|
||
#ifndef _SUNDIALS_PROFILER_HPP | ||
#define _SUNDIALS_PROFILER_HPP | ||
|
||
#include <cstring> | ||
#include <sundials/sundials_config.h> | ||
#include <sundials/sundials_profiler.h> | ||
|
||
#if defined(SUNDIALS_BUILD_WITH_PROFILING) && defined(SUNDIALS_CALIPER_ENABLED) | ||
#define SUNDIALS_CXX_MARK_FUNCTION(projobj) CALI_CXX_MARK_FUNCTION | ||
#elif defined(SUNDIALS_BUILD_WITH_PROFILING) | ||
#define SUNDIALS_CXX_MARK_FUNCTION(profobj) \ | ||
sundials::ProfilerMarkScope __ProfilerMarkScope(profobj, __func__) | ||
#else | ||
#define SUNDIALS_CXX_MARK_FUNCTION(profobj) | ||
#endif | ||
|
||
namespace sundials { | ||
/* Convenience class for C++ codes. | ||
Allows for simpler profiler statements using C++ scoping rules. */ | ||
class ProfilerMarkScope | ||
{ | ||
public: | ||
ProfilerMarkScope(SUNProfiler prof, const char* name) | ||
{ | ||
prof_ = prof; | ||
name_ = name; | ||
SUNProfiler_Begin(prof_, name_); | ||
} | ||
|
||
~ProfilerMarkScope() { SUNProfiler_End(prof_, name_); } | ||
|
||
private: | ||
SUNProfiler prof_; | ||
const char* name_; | ||
}; | ||
} // namespace sundials | ||
|
||
#endif /* SUNDIALS_PROFILER_HPP */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.