Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
gha3mi committed Apr 22, 2024
1 parent 2e3ed44 commit 2db5dde
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ fortime = {git="https://github.com/gha3mi/fortime.git"}

### Measuring elapsed time (system_clock)

To measure the elapsed wall-clock time, use the following:

```fortran
use fortime
type(timer) :: t
Expand All @@ -37,8 +35,6 @@ call t%timer_write(file_name) ! Optionally, write the result to a file

### Measuring elapsed time (date_and_time)

To measure the elapsed wall-clock time, use the following:

```fortran
use fortime
type(timer) :: t
Expand All @@ -52,8 +48,6 @@ call t%dtimer_write(file_name) ! Optionally, write the result to a file

### Measuring CPU time (cpu_time)

To measure the CPU time consumed by your code, use these functions:

```fortran
use fortime
type(timer) :: t
Expand All @@ -67,8 +61,6 @@ call t%ctimer_write(file_name) ! Optionally, write the result to a file

### Measuring OpenMP time (omp_get_wtime)

If your code includes OpenMP parallelization, you can measure the time taken by the parallel regions using:

```fortran
use fortime
type(timer) :: t
Expand All @@ -80,12 +72,10 @@ call t%otimer_stop(nloops, message, print) ! nloops, message and print are optio
call t%otimer_write(file_name) ! Optionally, write the result to a file
```

**Note:** Ensure you compile with the `-DUSE_OMP` option when using the OpenMP timer.
**Note:** Compile with the `-DUSE_OMP` option when using the OpenMP timer.

### Measuring MPI time (mpi_wtime)

When using MPI (Message Passing Interface), you can measure the time taken by your MPI processes using:

```fortran
use fortime
type(timer) :: t
Expand All @@ -97,7 +87,7 @@ call t%mtimer_stop(nloops, message, print) ! nloops, message and print are optio
call t%mtimer_write(file_name) ! Optionally, write the result to a file
```

**Note:** Don't forget to compile with the `-DUSE_MPI` option when using the MPI timer.
**Note:** Compile with the `-DUSE_MPI` option when using the MPI timer.

## Running Examples and Tests

Expand Down

0 comments on commit 2db5dde

Please sign in to comment.