Fortran API interfaces to set the thread affinity. API interfaces to allow setting and getting thread affinity. The routines get_cpuset , set_cpu_affinity , and fms_affinity_get are defined via C routines in affinity.c.
More...
|
subroutine, public | fms_affinity_init () |
| Initialization routine for affinity handling.
|
|
subroutine, public | fms_affinity_set (component, use_hyper_thread, nthreads) |
| Routine to set affinity for a component.
|
|
integer(kind=c_int) function | get_cpuset (fsz, output, pe, debug) |
|
integer(kind=c_int) function | set_cpu_affinity (cpu) |
|
Fortran API interfaces to set the thread affinity. API interfaces to allow setting and getting thread affinity. The routines get_cpuset , set_cpu_affinity , and fms_affinity_get are defined via C routines in affinity.c.
- Author
- Rusty Benson
◆ fms_affinity_mod::get_cpuset
interface fms_affinity_mod::get_cpuset |
Private interface to retrieve this groups CPU set and it's size.
Defined in affinity.c.
Definition at line 56 of file fms_affinity.F90.
Public Member Functions |
integer(kind=c_int) function | get_cpuset (fsz, output, pe, debug) |
|
◆ fms_affinity_mod::set_cpu_affinity
interface fms_affinity_mod::set_cpu_affinity |
◆ fms_affinity_get()
◆ fms_affinity_init()
subroutine, public fms_affinity_init |
Initialization routine for affinity handling.
Definition at line 90 of file fms_affinity.F90.
◆ fms_affinity_set()
subroutine, public fms_affinity_set |
( |
character(len=*), intent(in) |
component, |
|
|
logical, intent(in) |
use_hyper_thread, |
|
|
integer, intent(in) |
nthreads |
|
) |
| |
Routine to set affinity for a component.
- Parameters
-
[in] | component | Component name |
[in] | use_hyper_thread | .TRUE. if using hyperthreads |
[in] | nthreads | Number of threads |
Definition at line 117 of file fms_affinity.F90.
◆ get_cpuset()
integer(kind=c_int) function get_cpuset |
( |
integer(kind=c_int), intent(in), value |
fsz, |
|
|
integer(kind=c_int), dimension(*), intent(inout) |
output, |
|
|
integer(kind=c_int), intent(in), value |
pe, |
|
|
logical(kind=c_bool), value |
debug |
|
) |
| |
◆ set_cpu_affinity()
integer(kind=c_int) function set_cpu_affinity |
( |
integer(kind=c_int), intent(in), value |
cpu | ) |
|
◆ affinity
logical affinity = .true. |
|
private |
◆ debug_affinity
logical debug_affinity = .false. |
|
private |
◆ debug_cpuset
logical(c_bool) debug_cpuset = .false. |
|
private |
◆ module_is_initialized
logical module_is_initialized = .FALSE. |
|
private |
◆ strict