This module contains the timer procedures and derived types to facilitate timing applications at runtime.
More...
|
interface | getTime_proc |
| This is the abstract interface of the setTime static type-bound procedure component of timer_type abstract type that performs the timing since a user-specified or a processor-dependent origin. More...
|
|
interface | setIdle_proc |
| This is the abstract interface of the wait static type-bound procedure component of timer_type abstract type that keeps the system waiting for the specified amount of seconds.
More...
|
|
interface | timer_type |
| This is the abstract base derived type that serves as a simple container template for other timer classes in the ParaMonte library. More...
|
|
interface | timerCPU_type |
| This is the timerCPU_type class, containing attributes and static methods for setting up a timer based on the CPU-clock, using the Fortran intrinsic cpu_time() . More...
|
|
interface | timerDAT_type |
| This is the timerDAT_type class, containing attributes and static methods for setting up a timer based on the system-clock, using the Fortran intrinsic date_and_time() . More...
|
|
interface | timerMPI_type |
| This is the timerMPI_type class, containing attributes and static methods for setting up a timer based on the MPI intrinsic MPI_Wtime() . More...
|
|
interface | timerOMP_type |
| This is the timerMPI_type class, containing attributes and static methods for setting up a timer based on the OpenMP intrinsic omp_get_wtime() . More...
|
|
interface | timerSYS_type |
| This is the timerSYS_type class, containing attributes and static methods for setting up a timer based on the system-clock, using the Fortran intrinsic system_clock() . More...
|
|
|
type(timerMPI_type) type(timerOMP_type) type(timerSYS_type) function | timer_typer () |
| This is the constructor of the timer_type class.
More...
|
|
type(timerCPU_type) function | timerCPU_typer () |
| This is the constructor of the timerCPU_type class.
More...
|
|
type(timerDAT_type) function | timerDAT_typer () |
| This is the constructor of the timerDAT_type class.
More...
|
|
type(timerMPI_type) function | timerMPI_typer () |
| This is the constructor of the timerMPI_type class.
More...
|
|
type(timerOMP_type) function | timerOMP_typer () |
| This is the constructor of the timerOMP_type class.
More...
|
|
type(timerSYS_type) function | timerSYS_typer () |
| This is the constructor of the timerSYS_type class.
More...
|
|
real(RKD) function | getTime (since) |
| Generate and return the time in units of seconds since the specified time since or since an arbitrary processor-dependent time. More...
|
|
real(RKD) function | getTimeCPU (since) |
| Generate and return the CPU time in units of seconds since the specified time since or since an arbitrary processor-dependent time. More...
|
|
real(RKD) function | getTimeDAT (since) |
| Generate and return the calendrical clock time in units of seconds since the specified time since or since the Gregorian calendrical time origin. More...
|
|
real(RKD) function | getTimeMPI (since) |
| Generate and return the MPI clock time in units of seconds since the specified time since or since an arbitrary time origin set by the MPI library. More...
|
|
real(RKD) function | getTimeOMP (since) |
| Generate and return the OpenMP clock time in units of seconds since the specified time since or since an arbitrary time origin set by the OpenMP library. More...
|
|
real(RKD) function | getTimeSYS (since) |
| Generate and return the system clock time in units of seconds since the specified time since or since an arbitrary processor-dependent time origin. More...
|
|
real(RKD) function | getResTimer () |
| Generate and return the time resolution by the build-time default timer of the ParaMonte library as used in timer_type, in units of seconds. More...
|
|
real(RKD) function | getResTimerCPU () |
| Generate and return the time resolution of the Fortran intrinsic cpu_time() , used in timerCPU_type, in units of seconds. More...
|
|
pure real(RKD) function | getResTimerDAT () |
| Generate and return the time resolution of the Fortran intrinsic date_and_time() , used in timerDAT_type, in units of seconds. More...
|
|
real(RKD) function | getResTimerMPI () |
| Generate and return the time resolution of the MPI intrinsic timer, used in timerMPI_type, in units of seconds. More...
|
|
real(RKD) function | getResTimerOMP () |
| Generate and return the time resolution of the OpenMP intrinsic timer, used in timerOMP_type, in units of seconds. More...
|
|
real(RKD) function | getResTimerSYS () |
| Generate and return the time resolution of the Fortran intrinsic system_clock() , used in timerSYS_type, in units of seconds. More...
|
|
subroutine | setIdle (seconds) |
| Set the processor in sleep mode for the input requested number of seconds via the default timer of the ParaMonte library. More...
|
|
subroutine | setIdleCPU (seconds) |
| Set the processor in sleep mode for the input requested number of seconds via the Fortran intrinsic cpu_time() . More...
|
|
subroutine | setIdleDAT (seconds) |
| Set the processor in sleep mode for the input requested number of seconds via the Fortran intrinsic date_and_time() . More...
|
|
subroutine | setIdleMPI (seconds) |
| Set the processor in sleep mode for the input requested number of seconds via the MPI intrinsic timer MPI_Wtime() . More...
|
|
subroutine | setIdleOMP (seconds) |
| Set the processor in sleep mode for the input requested number of seconds via the OpenMP intrinsic timer omp_get_wtime() . More...
|
|
subroutine | setIdleSYS (seconds) |
| Set the processor in sleep mode for the input requested number of seconds via the Fortran intrinsic system_clock() . More...
|
|
This module contains the timer procedures and derived types to facilitate timing applications at runtime.
Currently, five types of timers are available in this module in addition to a generic timer class.
-
timer_type
-
This is a generic timer class which defaults to the most appropriate timer type based on the ParaMonte library build.
-
If the ParaMonte library is built for serial applications, then timerSYS_type is used.
-
If the ParaMonte library is built for MPI-parallel applications, then timerMPI_type is used.
-
If the ParaMonte library is built for OpenMP-parallel applications, then timerOMP_type is used.
-
Use this timer class if you are not sure which timer is suitable for the task.
-
timerCPU_type
-
This timer relies on the Fortran intrinsic
cpu_time()
.
-
This timer is not ideal for timing parallel or multi-threaded applications because
cpu_time()
returns the sum of the total time spent by all processes.
-
The timing precision of the Fortran intrinsic
cpu_time()
is processor-dependent.
-
There is currently no direct way of measuring the time resolution of
cpu_time()
.
-
This module uses a simple cycling method to compute the resolution of the time returned by
cpu_time()
.
It computes the resolution as the least noticeable non-zero time difference between any two time points returned by cpu_time()
.
-
On processors with no clock, the time returned by
cpu_time()
is negative to indicate the lack of a processor clock.
The clock existence is verified only if the library is built with the preprocessor macro CHECK_ENABLED=1
.
-
timerDAT_type
-
This timer relies on the Fortran intrinsic
date_and_time()
.
-
This timer is not ideal for high resolution time measurements because the resolution is limited to milliseconds.
-
timerMPI_type
-
This timer relies on the MPI library intrinsic
mpi_wtime()
.
-
The clock time resolution is computed by calling
mpi_wtick()
.
-
This timer is ideal for high resolution (e.g., nanseconds) time measurements in distributed parallel applications.
-
This timer is available only when the ParaMonte library is built with MPI support enabled.
-
This timer requires the MPI library to have been already initialized via
mpi_init()
and not have been finalized via mpi_finalize()
.
These conditions are verified only if the library is built with the preprocessor macro CHECK_ENABLED=1
.
-
timerOMP_type
-
This timer relies on the OpenMP library intrinsic
omp_get_wtime()
.
-
The clock time resolution is computed by calling
omp_get_wtick()
.
-
This timer is ideal for high resolution time measurements in multithreaded parallel applications.
-
This timer is available only when the ParaMonte library is built with OpenMP support enabled.
-
This timer measures elapsed wall clock time in seconds.
-
The time is measured per thread.
-
No guarantee can be made that two distinct threads measure the same time.
-
Time is measured from some time in the past, which is an arbitrary time guaranteed not to change during the execution of the program.
-
timerSYS_type
-
This timer relies on the Fortran intrinsic
system_clock()
.
-
This timer can be used in most parallel or serial timing scenarios.
-
The resolution of this timer is processor-dependent.
-
Time is measured from some time in the past, which is an arbitrary time guaranteed not to change during the execution of the program.
-
The time is measured per processor.
-
On processors with no clock,
sysctem_clock()
returns a negative clock count
to indicate the lack of a processor clock.
The clock existence is verified only if the library is built with the preprocessor macro CHECK_ENABLED=1
.
- Test:
- test_pm_timer
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
-
If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
-
If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
- Copyright
- Computational Data Science Lab
- Author:
- Amir Shahmoradi, March 22, 2012, 2:21 PM, National Institute for Fusion Studies, The University of Texas Austin
real(RKD) function pm_timer::getResTimer |
Generate and return the time resolution by the build-time default timer of the ParaMonte library as used in timer_type, in units of seconds.
This function relies on either of the following lower-level module functions depending on the ParaMonte library build:
-
getResTimerMPI for MPI-enabled parallel builds of the ParaMonte library.
-
getResTimerOMP for OpenMP-enabled parallel builds of the ParaMonte library.
-
getResTimerSYS for all other parallel or serial builds of the ParaMonte library.
- Returns
resolution
: The output scalar of type real
of kind double precision RKD, containing the time resolution of the clock in units of seconds.
Possible calling interfaces ⛓
real(RKD) :: resolution
This module contains the timer procedures and derived types to facilitate timing applications at runt...
real(RKD) function getResTimer()
Generate and return the time resolution by the build-time default timer of the ParaMonte library as u...
- See also
- timer_type
Example usage ⛓
9 type(display_type) :: disp
This is a generic method of the derived type display_type with pass attribute.
This is a generic method of the derived type display_type with pass attribute.
This module contains classes and procedures for input/output (IO) or generic display operations on st...
type(display_type) disp
This is a scalar module variable an object of type display_type for general display.
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
integer, parameter LK
The default logical kind in the ParaMonte library: kind(.true.) in Fortran, kind(....
integer, parameter IK
The default integer kind in the ParaMonte library: int32 in Fortran, c_int32_t in C-Fortran Interoper...
integer, parameter RKD
The double precision real kind in Fortran mode. On most platforms, this is an 64-bit real kind.
integer, parameter SK
The default character kind in the ParaMonte library: kind("a") in Fortran, c_char in C-Fortran Intero...
Generate and return an object of type display_type.
Example Unix compile command via Intel ifort
compiler ⛓
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example Windows Batch compile command via Intel ifort
compiler ⛓
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
Example Unix / MinGW compile command via GNU gfortran
compiler ⛓
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example output ⛓
- Test:
- test_pm_timer
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
-
If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
-
If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
- Copyright
- Computational Data Science Lab
- Author:
- Amir Shahmoradi, March 22, 2012, 00:00 AM, National Institute for Fusion Studies, The University of Texas Austin
Definition at line 1261 of file pm_timer.F90.
References getResTimerMPI(), getResTimerOMP(), and getResTimerSYS().
real(RKD) function pm_timer::getResTimerCPU |
Generate and return the time resolution of the Fortran intrinsic cpu_time()
, used in timerCPU_type, in units of seconds.
See also the documentation details of pm_timer.
- Returns
resolution
: The output scalar of type real
of kind double precision RKD, containing the time resolution of the CPU clock in units of seconds.
Possible calling interfaces ⛓
real(RKD) :: resolution
real(RKD) function getResTimerCPU()
Generate and return the time resolution of the Fortran intrinsic cpu_time(), used in timerCPU_type,...
- See also
- getResTimerSYS
Example usage ⛓
9 type(display_type) :: disp
Example Unix compile command via Intel ifort
compiler ⛓
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example Windows Batch compile command via Intel ifort
compiler ⛓
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
Example Unix / MinGW compile command via GNU gfortran
compiler ⛓
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example output ⛓
- Test:
- test_pm_timer
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
-
If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
-
If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
- Copyright
- Computational Data Science Lab
- Author:
- Amir Shahmoradi, March 22, 2012, 00:00 AM, National Institute for Fusion Studies, The University of Texas Austin
Definition at line 1316 of file pm_timer.F90.
Referenced by pm_timer::timerCPU_type::timerCPU_typer().
pure real(RKD) function pm_timer::getResTimerDAT |
Generate and return the time resolution of the Fortran intrinsic date_and_time()
, used in timerDAT_type, in units of seconds.
See also the documentation details of pm_timer.
- Returns
resolution
: The output scalar of type real
of kind double precision RKD, containing the time resolution of date_and_time()
in units of seconds.
Possible calling interfaces ⛓
real(RKD) :: resolution
pure real(RKD) function getResTimerDAT()
Generate and return the time resolution of the Fortran intrinsic date_and_time(), used in timerDAT_ty...
- See also
- getResTimerSYS
Example usage ⛓
9 type(display_type) :: disp
Example Unix compile command via Intel ifort
compiler ⛓
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example Windows Batch compile command via Intel ifort
compiler ⛓
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
Example Unix / MinGW compile command via GNU gfortran
compiler ⛓
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example output ⛓
- Test:
- test_pm_timer
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
-
If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
-
If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
- Copyright
- Computational Data Science Lab
- Author:
- Amir Shahmoradi, March 22, 2012, 00:00 AM, National Institute for Fusion Studies, The University of Texas Austin
Definition at line 1373 of file pm_timer.F90.
real(RKD) function pm_timer::getResTimerMPI |
Generate and return the time resolution of the MPI intrinsic timer, used in timerMPI_type, in units of seconds.
See also the documentation details of pm_timer.
- Returns
resolution
: The output scalar of type real
of kind double precision RKD, containing the time resolution of mpi_wtime()
in units of seconds.
Possible calling interfaces ⛓
real(RKD) :: resolution
real(RKD) function getResTimerMPI()
Generate and return the time resolution of the MPI intrinsic timer, used in timerMPI_type,...
- Warning
- This procedure exists only if the library is built with the preprocessor macro
MPI_ENABLED=1
.
- See also
- getResTimerSYS
Example usage ⛓
8 type(display_type) :: disp
11#if defined MPI_VERSION
20 call disp%show(
"The MPI timer is unavailable, because this example has not been linked with an MPI library.")
Example Unix compile command via Intel ifort
compiler ⛓
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example Windows Batch compile command via Intel ifort
compiler ⛓
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
Example Unix / MinGW compile command via GNU gfortran
compiler ⛓
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example output ⛓ 1The MPI timer is unavailable, because this example has not been linked with an MPI library.
- Test:
- test_pm_timer
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
-
If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
-
If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
- Copyright
- Computational Data Science Lab
- Author:
- Amir Shahmoradi, March 22, 2012, 00:00 AM, National Institute for Fusion Studies, The University of Texas Austin
Definition at line 1424 of file pm_timer.F90.
Referenced by getResTimer().
real(RKD) function pm_timer::getResTimerOMP |
Generate and return the time resolution of the OpenMP intrinsic timer, used in timerOMP_type, in units of seconds.
See also the documentation details of pm_timer.
- Returns
resolution
: The output scalar of type real
of kind double precision RKD, containing the time resolution of mpi_wtime()
in units of seconds.
Possible calling interfaces ⛓
real(RKD) :: resolution
real(RKD) function getResTimerOMP()
Generate and return the time resolution of the OpenMP intrinsic timer, used in timerOMP_type,...
- Warning
- This procedure exists only if the library is built with the preprocessor macro
OMP_ENABLED=1
.
- See also
- getResTimerSYS
Example usage ⛓
8 type(display_type) :: disp
20 call disp%show(
"The OMP timer is unavailable, because this example has not been linked with an OpenMP library.")
Example Unix compile command via Intel ifort
compiler ⛓
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example Windows Batch compile command via Intel ifort
compiler ⛓
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
Example Unix / MinGW compile command via GNU gfortran
compiler ⛓
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example output ⛓ 1The OMP timer is unavailable, because this example has not been linked with an OpenMP library.
- Test:
- test_pm_timer
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
-
If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
-
If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
- Copyright
- Computational Data Science Lab
- Author:
- Amir Shahmoradi, March 22, 2012, 00:00 AM, National Institute for Fusion Studies, The University of Texas Austin
Definition at line 1477 of file pm_timer.F90.
Referenced by getResTimer().
real(RKD) function pm_timer::getResTimerSYS |
Generate and return the time resolution of the Fortran intrinsic system_clock()
, used in timerSYS_type, in units of seconds.
See also the documentation details of pm_timer.
- Returns
resolution
: The output scalar of type real
of kind double precision RKD, containing the time resolution of the system clock in units of seconds.
Possible calling interfaces ⛓
real(RKD) :: resolution
real(RKD) function getResTimerSYS()
Generate and return the time resolution of the Fortran intrinsic system_clock(), used in timerSYS_typ...
- See also
- timerSYS_type
Example usage ⛓
9 type(display_type) :: disp
Example Unix compile command via Intel ifort
compiler ⛓
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example Windows Batch compile command via Intel ifort
compiler ⛓
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
Example Unix / MinGW compile command via GNU gfortran
compiler ⛓
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example output ⛓
- Test:
- test_pm_timer
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
-
If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
-
If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
- Copyright
- Computational Data Science Lab
- Author:
- Amir Shahmoradi, March 22, 2012, 00:00 AM, National Institute for Fusion Studies, The University of Texas Austin
Definition at line 1528 of file pm_timer.F90.
Referenced by getResTimer(), and pm_timer::timerSYS_type::timerSYS_typer().
real(RKD) function pm_timer::getTime |
( |
real(RKD), intent(in), optional |
since | ) |
|
Generate and return the time in units of seconds since the specified time since
or since an arbitrary processor-dependent time.
This function relies on either of the following lower-level module functions depending on the ParaMonte library build:
-
getTimeMPI for MPI-enabled parallel builds of the ParaMonte library.
-
getTimeOMP for OpenMP-enabled parallel builds of the ParaMonte library.
-
getTimeSYS for all other parallel or serial builds of the ParaMonte library.
- Parameters
-
[in] | since | : The input scalar of type real of kind double precision RKD representing the time origin (epoch) in seconds.
(optional. If not present, its value is processor-dependent but constant at runtime.) |
- Returns
timeInSec
: The output scalar of type real
of kind double precision RKD, containing the time in seconds since a specified time since
or since an arbitrary processor-dependent time.
Possible calling interfaces ⛓
real(RKD) :: timeInSec
logical(LK) :: failed
real(RKD) function getTime(since)
Generate and return the time in units of seconds since the specified time since or since an arbitrary...
- See also
- timer_type
Example usage ⛓
12 type(display_type) :: disp
18 call disp%show(
"call setIdle(seconds = 0.1_RKD)")
subroutine setIdle(seconds)
Set the processor in sleep mode for the input requested number of seconds via the default timer of th...
Example Unix compile command via Intel ifort
compiler ⛓
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example Windows Batch compile command via Intel ifort
compiler ⛓
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
Example Unix / MinGW compile command via GNU gfortran
compiler ⛓
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example output ⛓
- Test:
- test_pm_timer
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
-
If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
-
If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
- Copyright
- Computational Data Science Lab
- Author:
- Amir Shahmoradi, March 22, 2012, 00:00 AM, National Institute for Fusion Studies, The University of Texas Austin
Definition at line 858 of file pm_timer.F90.
References getTimeMPI(), getTimeOMP(), and getTimeSYS().
real(RKD) function pm_timer::getTimeCPU |
( |
real(RKD), intent(in), optional |
since | ) |
|
Generate and return the CPU time in units of seconds since the specified time since
or since an arbitrary processor-dependent time.
See also the documentation details of pm_timer.
- Parameters
-
[in] | since | : The input scalar of type real of kind double precision RKD representing the time origin (epoch) in seconds.
(optional. If not present, its value is processor-dependent but constant at runtime.) |
- Returns
timeInSec
: The output scalar of type real
of kind double precision RKD, containing the time in seconds since a specified time since
or since an arbitrary processor-dependent time.
Possible calling interfaces ⛓
real(RKD) :: timeInSec
logical(LK) :: failed
real(RKD) function getTimeCPU(since)
Generate and return the CPU time in units of seconds since the specified time since or since an arbit...
- See also
- timerCPU_type
Example usage ⛓
12 type(display_type) :: disp
16 call disp%show(
"since = getTimeCPU()")
18 call disp%show(
"call setIdleCPU(seconds = 0.1_RKD)")
subroutine setIdleCPU(seconds)
Set the processor in sleep mode for the input requested number of seconds via the Fortran intrinsic c...
Example Unix compile command via Intel ifort
compiler ⛓
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example Windows Batch compile command via Intel ifort
compiler ⛓
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
Example Unix / MinGW compile command via GNU gfortran
compiler ⛓
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example output ⛓
- Test:
- test_pm_timer
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
-
If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
-
If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
- Copyright
- Computational Data Science Lab
- Author:
- Amir Shahmoradi, March 22, 2012, 00:00 AM, National Institute for Fusion Studies, The University of Texas Austin
Definition at line 918 of file pm_timer.F90.
Referenced by setIdleCPU().
real(RKD) function pm_timer::getTimeDAT |
( |
real(RKD), intent(in), optional |
since | ) |
|
Generate and return the calendrical clock time in units of seconds since the specified time since
or since the Gregorian calendrical time origin.
See also the documentation details of pm_timer.
- Parameters
-
[in] | since | : The input scalar of type real of kind double precision RKD representing the time origin (epoch) in seconds.
(optional. If not present, its value is the Gregorian calendrical time origin.) |
- Returns
timeInSec
: The output scalar of type real
of kind double precision RKD, containing the time in seconds since the specified time origin.
Possible calling interfaces ⛓
real(RKD) :: timeInSec
real(RKD) function getTimeDAT(since)
Generate and return the calendrical clock time in units of seconds since the specified time since or ...
- See also
- timerDAT_type
Example usage ⛓
12 type(display_type) :: disp
16 call disp%show(
"since = getTimeDAT()")
18 call disp%show(
"call setIdleDAT(seconds = 0.1_RKD)")
subroutine setIdleDAT(seconds)
Set the processor in sleep mode for the input requested number of seconds via the Fortran intrinsic d...
Example Unix compile command via Intel ifort
compiler ⛓
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example Windows Batch compile command via Intel ifort
compiler ⛓
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
Example Unix / MinGW compile command via GNU gfortran
compiler ⛓
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example output ⛓
- Test:
- test_pm_timer
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
-
If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
-
If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
- Copyright
- Computational Data Science Lab
- Author:
- Amir Shahmoradi, March 22, 2012, 00:00 AM, National Institute for Fusion Studies, The University of Texas Austin
Definition at line 973 of file pm_timer.F90.
References pm_kind::IK, pm_kind::RKD, and pm_dateTime::SECONDS_PER_DAY.
Referenced by setIdleDAT().
real(RKD) function pm_timer::getTimeMPI |
( |
real(RKD), intent(in), optional |
since | ) |
|
Generate and return the MPI clock time in units of seconds since the specified time since
or since an arbitrary time origin set by the MPI library.
See also the documentation details of pm_timer.
- Parameters
-
[in] | since | : The input scalar of type real of kind double precision RKD representing the time origin (epoch) in seconds.
(optional. If not present, its value is an arbitrary time origin set by the MPI library.) |
- Returns
timeInSec
: The output scalar of type real
of kind double precision RKD, containing the time in seconds since the specified time origin.
Possible calling interfaces ⛓
real(RKD) :: timeInSec
real(RKD) function getTimeMPI(since)
Generate and return the MPI clock time in units of seconds since the specified time since or since an...
- Warning
- This procedure exists only if the library is built with the preprocessor macro
MPI_ENABLED=1
.
- See also
- timerMPI_type
Example usage ⛓
10 type(display_type) :: disp
13#if defined MPI_VERSION
18 call disp%show(
"since = getTimeMPI()")
20 call disp%show(
"call setIdleMPI(seconds = 0.1_RKD)")
27 call disp%show(
"The MPI timer is unavailable, because this example has not been linked with an MPI library.")
subroutine setIdleMPI(seconds)
Set the processor in sleep mode for the input requested number of seconds via the MPI intrinsic timer...
Example Unix compile command via Intel ifort
compiler ⛓
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example Windows Batch compile command via Intel ifort
compiler ⛓
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
Example Unix / MinGW compile command via GNU gfortran
compiler ⛓
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example output ⛓ 1The MPI timer is unavailable, because this example has not been linked with an MPI library.
- Test:
- test_pm_timer
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
-
If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
-
If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
- Copyright
- Computational Data Science Lab
- Author:
- Amir Shahmoradi, March 22, 2012, 00:00 AM, National Institute for Fusion Studies, The University of Texas Austin
Definition at line 1036 of file pm_timer.F90.
References pm_kind::IK, and pm_kind::RKD.
Referenced by getTime(), and setIdleMPI().
real(RKD) function pm_timer::getTimeOMP |
( |
real(RKD), intent(in), optional |
since | ) |
|
Generate and return the OpenMP clock time in units of seconds since the specified time since
or since an arbitrary time origin set by the OpenMP library.
See also the documentation details of pm_timer.
- Parameters
-
[in] | since | : The input scalar of type real of kind double precision RKD representing the time origin (epoch) in seconds.
(optional. If not present, its value is an arbitrary time origin set by the OpenMP library.) |
- Returns
timeInSec
: The output scalar of type real
of kind double precision RKD, containing the time in seconds since the specified time origin.
Possible calling interfaces ⛓
real(RKD) :: timeInSec
real(RKD) function getTimeOMP(since)
Generate and return the OpenMP clock time in units of seconds since the specified time since or since...
- Warning
- This procedure exists only if the library is built with the preprocessor macro
OMP_ENABLED=1
.
- See also
- timerOMP_type
Example usage ⛓
10 type(display_type) :: disp
18 call disp%show(
"since = getTimeOMP()")
20 call disp%show(
"call setIdleOMP(seconds = 0.1_RKD)")
27 call disp%show(
"The OMP timer is unavailable, because this example has not been linked with an OpenMP library.")
subroutine setIdleOMP(seconds)
Set the processor in sleep mode for the input requested number of seconds via the OpenMP intrinsic ti...
Example Unix compile command via Intel ifort
compiler ⛓
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example Windows Batch compile command via Intel ifort
compiler ⛓
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
Example Unix / MinGW compile command via GNU gfortran
compiler ⛓
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example output ⛓ 1The OMP timer is unavailable, because this example has not been linked with an OpenMP library.
- Test:
- test_pm_timer
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
-
If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
-
If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
- Copyright
- Computational Data Science Lab
- Author:
- Amir Shahmoradi, March 22, 2012, 00:00 AM, National Institute for Fusion Studies, The University of Texas Austin
Definition at line 1097 of file pm_timer.F90.
References pm_kind::IK, and pm_kind::RKD.
Referenced by getTime(), and setIdleOMP().
real(RKD) function pm_timer::getTimeSYS |
( |
real(RKD), intent(in), optional |
since | ) |
|
Generate and return the system clock time in units of seconds since the specified time since
or since an arbitrary processor-dependent time origin.
See also the documentation details of pm_timer.
- Parameters
-
[in] | since | : The input scalar of type real of kind double precision RKD representing the time origin (epoch) in seconds.
(optional. If not present, its value is processor-dependent but constant at runtime.) |
- Returns
timeInSec
: The output scalar of type real
of kind double precision RKD, containing the time in seconds since a processor-defined origin of time.
Possible calling interfaces ⛓
real(RKD) :: timeInSec
real(RKD) function getTimeSYS(since)
Generate and return the system clock time in units of seconds since the specified time since or since...
- See also
- timerSYS_type
Example usage ⛓
12 type(display_type) :: disp
16 call disp%show(
"since = getTimeSYS()")
18 call disp%show(
"call setIdleSYS(seconds = 0.1_RKD)")
subroutine setIdleSYS(seconds)
Set the processor in sleep mode for the input requested number of seconds via the Fortran intrinsic s...
Example Unix compile command via Intel ifort
compiler ⛓
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example Windows Batch compile command via Intel ifort
compiler ⛓
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
Example Unix / MinGW compile command via GNU gfortran
compiler ⛓
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example output ⛓
- Test:
- test_pm_timer
- Todo:
- Normal Priority: The performance of this procedure could be improved by avoiding the unnecessary retrieval of the count rate and computing its inverse to get the period (which is fixed in the entire runtime).
This requires redefining this procedure as a type-bound procedure of a parent timer type.
However, preliminary benchmarks indicate that the division (instead of multiplication) slows down the computation by at most 25 percent. On modern architecture, the extra cost is likely on the of 25 CPU cycles, approximately 25 nanoseconds. This is likely negligible in most practical scenarios. Here is a benchmark script for the cost of division vs. multiplication,
implicit none
double precision :: t0, t1, x(2), summ
integer :: v0(8), v1(8)
integer :: i
call cpu_time(t0)
do i = 1, 10**7
call random_number(x)
summ = summ + x(2) * x(1)
end do
call cpu_time(t1)
print *, summ, "prod", t1 - t0
summ = 0.d0
call cpu_time(t0)
do i = 1, 10**7
call random_number(x)
summ = summ + x(2) / x(1)
end do
call cpu_time(t1)
print *, summ, t1 - t0
end
The above code yields highly similar time costs for multiplication vs. division operation in most benchmarks.
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
-
If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
-
If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
- Copyright
- Computational Data Science Lab
- Author:
- Amir Shahmoradi, March 22, 2012, 00:00 AM, National Institute for Fusion Studies, The University of Texas Austin
Definition at line 1198 of file pm_timer.F90.
Referenced by getTime(), and setIdleSYS().
subroutine pm_timer::setIdle |
( |
real(RKD), intent(in) |
seconds | ) |
|
Set the processor in sleep mode for the input requested number of seconds via the default timer of the ParaMonte library.
This function relies on either of the following lower-level module functions depending on the ParaMonte library build:
-
setIdleMPI for MPI-enabled parallel builds of the ParaMonte library.
-
setIdleOMP for OpenMP-enabled parallel builds of the ParaMonte library.
-
setIdleSYS for all other parallel or serial builds of the ParaMonte library.
- Parameters
-
[in] | seconds | : The input scalar of type real of kind double precision RKD representing the number of seconds to put the system into sleep. |
Possible calling interfaces ⛓
- See also
- setIdleCPU
setIdleDAT
setIdleMPI
setIdleOMP
setIdleSYS
getTimeCPU
getTimeDAT
getTimeMPI
getTimeOMP
getTimeSYS
Example usage ⛓
12 type(display_type) :: disp
18 call disp%show(
"call setIdle(seconds = 0.2_RKD)")
Example Unix compile command via Intel ifort
compiler ⛓
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example Windows Batch compile command via Intel ifort
compiler ⛓
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
Example Unix / MinGW compile command via GNU gfortran
compiler ⛓
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example output ⛓
- Test:
- test_pm_timer
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
-
If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
-
If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
- Copyright
- Computational Data Science Lab
- Author:
- Amir Shahmoradi, March 22, 2012, 00:00 AM, National Institute for Fusion Studies, The University of Texas Austin
Definition at line 1593 of file pm_timer.F90.
References pm_kind::RKD, setIdleMPI(), setIdleOMP(), and setIdleSYS().
subroutine pm_timer::setIdleCPU |
( |
real(RKD), intent(in) |
seconds | ) |
|
Set the processor in sleep mode for the input requested number of seconds via the Fortran intrinsic cpu_time()
.
- Parameters
-
[in] | seconds | : The input scalar of type real of kind double precision RKD representing the number of seconds to put the system into sleep. |
Possible calling interfaces ⛓
- Warning
- If the system does not possess a clock, the results are unpredictable and the procedure may enter an indefinite loop.
However, this condition rarely occurs and can be readily check only once on each new platform before a production run.
The lack of a system clock will lead to runtime error only if the library is built with the preprocessor macro CHECK_ENABLED=1
.
- See also
- setIdleCPU
setIdleDAT
setIdleMPI
setIdleOMP
setIdleSYS
getTimeCPU
getTimeDAT
getTimeMPI
getTimeOMP
getTimeSYS
Example usage ⛓
12 type(display_type) :: disp
16 call disp%show(
"since = getTimeCPU()")
18 call disp%show(
"call setIdleCPU(seconds = 0.1_RKD)")
Example Unix compile command via Intel ifort
compiler ⛓
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example Windows Batch compile command via Intel ifort
compiler ⛓
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
Example Unix / MinGW compile command via GNU gfortran
compiler ⛓
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example output ⛓
- Test:
- test_pm_timer
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
-
If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
-
If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
- Copyright
- Computational Data Science Lab
- Author:
- Amir Shahmoradi, March 22, 2012, 00:00 AM, National Institute for Fusion Studies, The University of Texas Austin
Definition at line 1658 of file pm_timer.F90.
References getTimeCPU(), and pm_kind::RKD.
subroutine pm_timer::setIdleDAT |
( |
real(RKD), intent(in) |
seconds | ) |
|
Set the processor in sleep mode for the input requested number of seconds via the Fortran intrinsic date_and_time()
.
- Parameters
-
[in] | seconds | : The input scalar of type real of kind double precision RKD representing the number of seconds to put the system into sleep. |
Possible calling interfaces ⛓
- Warning
- If the system does not possess a clock, the results are unpredictable and the procedure may enter an indefinite loop.
However, this condition rarely occurs and can be readily check only once on each new platform before a production run.
The lack of a system clock will lead to runtime error only if the library is built with the preprocessor macro CHECK_ENABLED=1
.
- See also
- setIdleCPU
setIdleDAT
setIdleMPI
setIdleOMP
setIdleSYS
getTimeCPU
getTimeDAT
getTimeMPI
getTimeOMP
getTimeSYS
Example usage ⛓
12 type(display_type) :: disp
16 call disp%show(
"since = getTimeDAT()")
18 call disp%show(
"call setIdleDAT(seconds = 0.2_RKD)")
Example Unix compile command via Intel ifort
compiler ⛓
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example Windows Batch compile command via Intel ifort
compiler ⛓
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
Example Unix / MinGW compile command via GNU gfortran
compiler ⛓
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example output ⛓
- Test:
- test_pm_timer
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
-
If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
-
If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
- Copyright
- Computational Data Science Lab
- Author:
- Amir Shahmoradi, March 22, 2012, 00:00 AM, National Institute for Fusion Studies, The University of Texas Austin
Definition at line 1721 of file pm_timer.F90.
References getTimeDAT(), and pm_kind::RKD.
subroutine pm_timer::setIdleMPI |
( |
real(RKD), intent(in) |
seconds | ) |
|
Set the processor in sleep mode for the input requested number of seconds via the MPI intrinsic timer MPI_Wtime()
.
- Parameters
-
[in] | seconds | : The input scalar of type real of kind double precision RKD representing the number of seconds to put the system into sleep. |
Possible calling interfaces ⛓
- Warning
- This procedure exists only if the library is built with the preprocessor macro
MPI_ENABLED=1
.
-
Calling this procedure requires the MPI library to have been initialized and not finalized.
This condition is verified only if the library is built with the preprocessor macro CHECK_ENABLED=1
.
- See also
- setIdleCPU
setIdleDAT
setIdleMPI
setIdleOMP
setIdleSYS
getTimeCPU
getTimeDAT
getTimeMPI
getTimeOMP
getTimeSYS
Example usage ⛓
9 type(display_type) :: disp
12#if defined MPI_VERSION
18 call disp%show(
"since = getTimeMPI()")
20 call disp%show(
"call setIdleMPI(seconds = 0.2_RKD)")
27 call disp%show(
"The MPI timer is unavailable, because this example has not been linked with an MPI library.")
Example Unix compile command via Intel ifort
compiler ⛓
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example Windows Batch compile command via Intel ifort
compiler ⛓
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
Example Unix / MinGW compile command via GNU gfortran
compiler ⛓
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example output ⛓ 1The MPI timer is unavailable, because this example has not been linked with an MPI library.
- Test:
- test_pm_timer
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
-
If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
-
If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
- Copyright
- Computational Data Science Lab
- Author:
- Amir Shahmoradi, March 22, 2012, 00:00 AM, National Institute for Fusion Studies, The University of Texas Austin
Definition at line 1787 of file pm_timer.F90.
References getTimeMPI(), and pm_kind::RKD.
Referenced by setIdle().
subroutine pm_timer::setIdleOMP |
( |
real(RKD), intent(in) |
seconds | ) |
|
Set the processor in sleep mode for the input requested number of seconds via the OpenMP intrinsic timer omp_get_wtime()
.
- Parameters
-
[in] | seconds | : The input scalar of type real of kind double precision RKD representing the number of seconds to put the system into sleep. |
Possible calling interfaces ⛓
- Warning
- This procedure exists only if the library is built with the preprocessor macro
OMP_ENABLED=1
.
- See also
- setIdleCPU
setIdleDAT
setIdleMPI
setIdleOMP
setIdleSYS
getTimeCPU
getTimeDAT
getTimeMPI
getTimeOMP
getTimeSYS
Example usage ⛓
8 type(display_type) :: disp
17 call disp%show(
"since = getTimeOMP()")
19 call disp%show(
"call setIdleOMP(seconds = 0.2_RKD)")
26 call disp%show(
"The OMP timer is unavailable, because this example has not been linked with an OpenMP library.")
Example Unix compile command via Intel ifort
compiler ⛓
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example Windows Batch compile command via Intel ifort
compiler ⛓
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
Example Unix / MinGW compile command via GNU gfortran
compiler ⛓
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example output ⛓ 1The OMP timer is unavailable, because this example has not been linked with an OpenMP library.
- Test:
- test_pm_timer
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
-
If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
-
If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
- Copyright
- Computational Data Science Lab
- Author:
- Amir Shahmoradi, March 22, 2012, 00:00 AM, National Institute for Fusion Studies, The University of Texas Austin
Definition at line 1850 of file pm_timer.F90.
References getTimeOMP(), and pm_kind::RKD.
Referenced by setIdle().
subroutine pm_timer::setIdleSYS |
( |
real(RKD), intent(in) |
seconds | ) |
|
Set the processor in sleep mode for the input requested number of seconds via the Fortran intrinsic system_clock()
.
- Parameters
-
[in] | seconds | : The input scalar of type real of kind double precision RKD representing the number of seconds to put the system into sleep. |
Possible calling interfaces ⛓
- Warning
- If the system does not possess a clock, the results are unpredictable and the procedure may enter an indefinite loop.
However, this condition rarely occurs and can be readily check only once on each new platform before a production run.
The lack of a system clock will lead to runtime error only if the library is built with the preprocessor macro CHECK_ENABLED=1
.
- See also
- setIdleCPU
setIdleDAT
setIdleMPI
setIdleOMP
setIdleSYS
getTimeCPU
getTimeDAT
getTimeMPI
getTimeOMP
getTimeSYS
Example usage ⛓
12 type(display_type) :: disp
16 call disp%show(
"since = getTimeSYS()")
18 call disp%show(
"call setIdleSYS(seconds = 0.2_RKD)")
Example Unix compile command via Intel ifort
compiler ⛓
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example Windows Batch compile command via Intel ifort
compiler ⛓
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
Example Unix / MinGW compile command via GNU gfortran
compiler ⛓
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example output ⛓
- Test:
- test_pm_timer
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
-
If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
-
If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
- Copyright
- Computational Data Science Lab
- Author:
- Amir Shahmoradi, March 22, 2012, 00:00 AM, National Institute for Fusion Studies, The University of Texas Austin
Definition at line 1914 of file pm_timer.F90.
References getTimeSYS(), and pm_kind::RKD.
Referenced by setIdle().
This is the constructor of the timer_type class.
Upon return, the constructor initializes all components of the timer object.
See also the documentation details of pm_timer.
- Returns
timer
: The output scalar object of class timer_type.
Specifically, the output of type,
-
timerMPI_type if the ParaMonte library is built with preprocessor macro
MPI_ENABLED
defined.
-
timerOMP_type if the ParaMonte library is built with preprocessor macro
OMP_ENABLED
defined.
-
timerSYS_type if the ParaMonte library is built is serial mode.
Possible calling interfaces ⛓
class(timer_type), allocatable :: timer
This is the abstract base derived type that serves as a simple container template for other timer cla...
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
-
If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
-
If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
- Copyright
- Computational Data Science Lab
- Author:
- Amir Shahmoradi, March 22, 2012, 00:00 AM, National Institute for Fusion Studies, The University of Texas Austin
Definition at line 556 of file pm_timer.F90.
This is the constructor of the timerCPU_type class.
Upon return, the constructor initializes all components of the timer object.
See also the documentation details of pm_timer.
- Returns
timer
: The output scalar object of class timerCPU_type.
Possible calling interfaces ⛓
type(timerCPU_type) :: timer
This is the timerCPU_type class, containing attributes and static methods for setting up a timer base...
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
-
If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
-
If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
- Copyright
- Computational Data Science Lab
- Author:
- Amir Shahmoradi, March 22, 2012, 00:00 AM, National Institute for Fusion Studies, The University of Texas Austin
Definition at line 601 of file pm_timer.F90.
This is the constructor of the timerDAT_type class.
Upon return, the constructor initializes all components of the timer object.
See also the documentation details of pm_timer.
Possible calling interfaces ⛓
type(timerDAT_type) :: timer
This is the timerDAT_type class, containing attributes and static methods for setting up a timer base...
- Returns
timer
: The output scalar object of class timerDAT_type.
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
-
If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
-
If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
- Copyright
- Computational Data Science Lab
- Author:
- Amir Shahmoradi, March 22, 2012, 00:00 AM, National Institute for Fusion Studies, The University of Texas Austin
Definition at line 641 of file pm_timer.F90.
This is the constructor of the timerMPI_type class.
Upon return, the constructor initializes all components of the timer object.
See also the documentation details of pm_timer.
Possible calling interfaces ⛓
type(timerMPI_type) :: timer
This is the timerMPI_type class, containing attributes and static methods for setting up a timer base...
- Returns
timer
: The output scalar object of class timerMPI_type.
- Warning
- This constructor requires the MPI library to have been initialized and not finalized.
This condition is verified only if the library is built with the preprocessor macro CHECK_ENABLED=1
.
-
This constructor is available only if the library is built with the preprocessor macro
MPI_ENABLED=1
.
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
-
If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
-
If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
- Copyright
- Computational Data Science Lab
- Author:
- Amir Shahmoradi, March 22, 2012, 02:51 AM, National Institute for Fusion Studies, The University of Texas Austin
Definition at line 689 of file pm_timer.F90.
This is the constructor of the timerOMP_type class.
Upon return, the constructor initializes all components of the timer object.
See also the documentation details of pm_timer.
Possible calling interfaces ⛓
type(timerOMP_type) :: timer
This is the timerMPI_type class, containing attributes and static methods for setting up a timer base...
- Returns
timer
: The output scalar object of class timerOMP_type.
- Warning
- This constructor is available only if the library is built with the preprocessor macro
OMP_ENABLED=1
.
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
-
If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
-
If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
- Copyright
- Computational Data Science Lab
- Author:
- Amir Shahmoradi, March 22, 2012, 00:00 AM, National Institute for Fusion Studies, The University of Texas Austin
Definition at line 753 of file pm_timer.F90.
This is the constructor of the timerSYS_type class.
Upon return, the constructor initializes all components of the timer object.
See also the documentation details of pm_timer.
Possible calling interfaces ⛓
type(timerSYS_type) :: timer
This is the timerSYS_type class, containing attributes and static methods for setting up a timer base...
- Returns
timer
: The output scalar object of class timerSYS_type.
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
-
If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
-
If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
- Copyright
- Computational Data Science Lab
- Author:
- Amir Shahmoradi, March 22, 2012, 03:00 AM, National Institute for Fusion Studies, The University of Texas Austin
Definition at line 795 of file pm_timer.F90.