Skip to content

Commit

Permalink
Add MPI_Wtime() in MPIWrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
bikashkanungo committed Jan 5, 2024
1 parent 85231a6 commit 59734ab
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/utils/MPIWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <utils/Exceptions.h>
#include <utils/MemoryTransfer.h>
#include <complex>
#include <ctime>
namespace dftefe
{
namespace utils
Expand Down Expand Up @@ -219,6 +220,12 @@ namespace dftefe
return ::MPI_Finalized(flag);
}

double
MPIWtime(void)
{
return ::MPI_Wtime();
}

bool
MPIErrIsSuccess(int errCode)
{
Expand Down Expand Up @@ -475,6 +482,12 @@ namespace dftefe
return MPISuccess;
}

double
MPIWtime(void)
{
return std::time(nullptr);
}

bool
MPIErrIsSuccess(int errCode)
{
Expand Down
3 changes: 3 additions & 0 deletions src/utils/MPIWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@ namespace dftefe
int
MPIFinalize(void);

double
MPIWtime(void);

int
MPIFinalized(int *flag);

Expand Down

0 comments on commit 59734ab

Please sign in to comment.