|
The Open FUSION Toolkit 1.0.0-beta6
Modeling tools for plasma and fusion research and engineering
|
Base environment functions and aliases for Open FUSION Toolkit.
Data Types | |
| interface | oft_abort_callback |
| Prototype for abort callback to override usual abort process. More... | |
| type | oft_env_type |
| Dummy shadow type for Fox XML node. More... | |
| interface | oft_mpi_max |
| Perform a MAX reduction over all processors. More... | |
| interface | oft_mpi_sum |
| Perform a SUM/AND reduction over all processors. More... | |
| interface | oft_random_number |
| Need docs. More... | |
| interface | oft_set_signal_handlers |
| Interface for setting UNIX signal handlers in "oft_local.c". More... | |
Functions/Subroutines | |
| pure subroutine | find_orient_listn (oflag, list, n) |
| Apply an orientation transform to a n-value array. | |
| real(r8) function | linterp (x, y, n, xx, extrap) |
| Perform linear 1-D interpolation of function F(x) | |
| subroutine | linterp_facs (x, n, xx, inds, facs, extrap) |
| Compute coefficients for linear 1-D interpolation of function F(x) | |
| subroutine | oft_abort (error_str, sname, fname) |
| Graceful abort for Open FUSION Toolkit. | |
| pure logical function | oft_debug_print (level) |
| Output control for debug messages. | |
| subroutine | oft_decrease_indent |
| Decrease length of global indent string by 2. | |
| subroutine | oft_finalize () |
| Finalize Open FUSION Toolkit environment. | |
| subroutine | oft_increase_indent |
| Increase length of global indent string by 2. | |
| subroutine | oft_init (nthreads) |
| Initializes Open FUSION Toolkit run environment. | |
| logical function | oft_mpi_and (a) |
| logical scalar implementation of global AND (SUM) reduction | |
| subroutine | oft_mpi_barrier (ierr) |
| Wrapper for MPI_BARRIER with MPI_COMM_WORLD to enable communication profiling. | |
| logical function | oft_mpi_check_reqs (n, req) |
| Helper to check all requests from completion. | |
| integer(i4) function, private | oft_mpi_maxi (a) |
| integer(i4) scalar implementation of global MAX reduction | |
| integer(i8) function, dimension(n) | oft_mpi_maxi8a (a, n) |
| integer(i8) array implementation of element-wise global MAX reduction | |
| integer(i4) function, dimension(n), private | oft_mpi_maxia (a, n) |
| integer(i4) array implementation of element-wise global MAX reduction | |
| real(i8) function, private | oft_mpi_maxr (a) |
| real(r8) scalar implementation of global MAX reduction | |
| real(r8) function, dimension(n), private | oft_mpi_maxra (a, n) |
| real(r8) array implementation of element-wise global MAX reduction | |
| complex(r8) function, private | oft_mpi_sumc (a) |
| complex(c8) scalar implementation of global SUM reduction | |
| complex(c8) function, dimension(n), private | oft_mpi_sumca (a, n) |
| complex(c8) array implementation of element-wise global SUM reduction | |
| integer(i4) function, private | oft_mpi_sumi4 (a) |
| integer(i4) scalar implementation of global SUM reduction | |
| integer(i4) function, dimension(n), private | oft_mpi_sumi4a (a, n) |
| integer(i4) array implementation of element-wise global SUM reduction | |
| integer(i8) function, private | oft_mpi_sumi8 (a) |
| integer(i8) scalar implementation of global SUM reduction | |
| integer(i8) function, dimension(n), private | oft_mpi_sumi8a (a, n) |
| integer(i8) array implementation of element-wise global SUM reduction | |
| real(r8) function, private | oft_mpi_sumr (a) |
| real(r8) scalar implementation of global SUM reduction | |
| real(r8) function, dimension(n), private | oft_mpi_sumra (a, n) |
| real(r8) array implementation of element-wise global SUM reduction | |
| subroutine | oft_mpi_waitall (n, req, ierr) |
| Wrapper for MPI_WAITALL to enable communication profiling. | |
| subroutine | oft_mpi_waitany (n, req, j, ierr) |
| Wrapper for MPI_WAITANY to enable communication profiling. | |
| pure logical function | oft_pm_print () |
| Output control for performance messages. | |
| subroutine | oft_prof_print |
| Print some basic profiling information. | |
| subroutine | oft_prof_reset |
| Reset all profiling counters. | |
| subroutine | oft_profile_start () |
| Activate profiling. | |
| subroutine | oft_random_number_c8 (array, n) |
| Complex implementation of toolkit random_number function. | |
| subroutine, private | oft_random_number_r8 (array, n) |
| Real implementation of toolkit random_number function. | |
| subroutine | oft_stack_print () |
| Print the current contents of the stack. | |
| subroutine | oft_stack_reset |
| Reset the stack. | |
| pure subroutine | oft_thread_slice (tid, nthreads, length, i1, i2) |
| Get thread ownership range for even spacing. | |
| subroutine | oft_warn (error_str) |
| Graceful warning printing for Open FUSION Toolkit. | |
| pure subroutine | orient_list2 (oflag, list) |
| Apply an orientation transform to a 2 value array. | |
| pure subroutine | orient_listn (oflag, list, n) |
| Apply an orientation transform to a n-value array. | |
| pure subroutine | orient_listn_inv (oflag, list, n) |
| Apply an orientation transform to a n-value array. | |
Variables | |
| integer(i8), dimension(4) | comm_times = 0 |
| Times for blocking communications. | |
| procedure(oft_abort_callback), pointer | oft_abort_cb |
| Abort callback for graceful abort in Python interface. | |
| type(oft_env_type) | oft_env |
| Global container for environment information. | |
| character(len=:), allocatable | oft_indent |
| Indentation string for status messages. | |
| integer(i4) | oft_mpi_c4 =MPI_COMPLEX8 |
| MPI_COMPLEX8 alias. | |
| integer(i4) | oft_mpi_c8 =MPI_COMPLEX16 |
| MPI_COMPLEX16 alias. | |
| integer(i4) | oft_mpi_char =MPI_CHARACTER |
| MPI_CHAR alias. | |
| integer(i4) | oft_mpi_i4 =MPI_INTEGER4 |
| MPI_INT4 alias. | |
| integer(i4) | oft_mpi_i8 =MPI_INTEGER8 |
| MPI_INT8 alias. | |
| integer(i4) | oft_mpi_logical =MPI_LOGICAL |
| MPI_LOGICAL alias. | |
| integer(i4) | oft_mpi_r4 =MPI_REAL8 |
| MPI_REAL4 alias. | |
| integer(i4) | oft_mpi_r8 =MPI_REAL8 |
| MPI_REAL8 alias. | |
| logical, private | oft_prof_enabled = .FALSE. |
| Enable profiling? | |
| logical | oft_stack_disabled = .FALSE. |
| Disable debug/profiling stack. | |
| integer(i4), dimension(24), parameter | oft_test_seed = [430470439, -303393496, -476850581, -964913795, 995391627, 84909391, -586395292, -2070086573, -1010035798, 1012650827, 325297911, 701378007, 392909068, 379156631, 484729024, -292308758, -1669043581, 142231192, 708877466, -1255634259, 593274827, -561530186, -934579426, 900810854] |
| integer(i4) | oft_tid = 0 |
| ID of current thread. | |
| real(r8), private | start_time |
| Time that run began. | |
| logical | use_petsc = .FALSE. |
| Use PETSc as linear algebra backend. | |
| pure subroutine find_orient_listn | ( | integer(i4), intent(out) | oflag, |
| integer(i4), dimension(n), intent(in) | list, | ||
| integer(i4), intent(in) | n | ||
| ) |
Apply an orientation transform to a n-value array.
| [out] | oflag | Orientation flag |
| [in] | list | Array for orientation [n] |
| [in] | n | Length of array |
| real(r8) function linterp | ( | real(r8), dimension(n), intent(in) | x, |
| real(r8), dimension(n), intent(in) | y, | ||
| integer(i4), intent(in) | n, | ||
| real(r8), intent(in) | xx, | ||
| integer(i4), intent(in), optional | extrap | ||
| ) |
Perform linear 1-D interpolation of function F(x)
x be sorted lowest to highest. extrap=0 or invalid value for extrap) | [in] | x | Paramaterizing array \( x_i \) [n] |
| [in] | y | Function values \( F(x_i) \) [n] |
| [in] | xx | Location to perform interpolation |
| [in] | n | Length of function parameterization |
| [in] | extrap | Extrapolation mode (0: none, 1: constant, 2: linear) |
| subroutine linterp_facs | ( | real(r8), dimension(n), intent(in) | x, |
| integer(i4), intent(in) | n, | ||
| real(r8), intent(in) | xx, | ||
| integer(i4), dimension(2), intent(out) | inds, | ||
| real(r8), dimension(2), intent(out) | facs, | ||
| integer(i4), intent(in), optional | extrap | ||
| ) |
Compute coefficients for linear 1-D interpolation of function F(x)
x be sorted lowest to highest. | [in] | x | Paramaterizing array \( x_i \) [n] |
| [in] | xx | Location to perform interpolation |
| [in] | n | Length of function parameterization |
| [out] | inds | Indices of points bounding subinterval (-1 -> error) |
| [out] | facs | Interpolation factors for point in inds(2) |
| [in] | extrap | Extrapolation mode (0: none, 1: constant, 2: linear) |
| subroutine oft_abort | ( | character(len=*), intent(in) | error_str, |
| character(len=*), intent(in) | sname, | ||
| character(len=*), intent(in) | fname | ||
| ) |
Graceful abort for Open FUSION Toolkit.
Also calls MPI_ABORT/STOP
| [in] | error_str | Error string |
| [in] | sname | Source subroutine name |
| [in] | fname | Source file name |
| pure logical function oft_debug_print | ( | integer(i4), intent(in) | level | ) |
Output control for debug messages.
| [in] | level | Threshold debugging level |
| subroutine oft_decrease_indent |
Decrease length of global indent string by 2.
| subroutine oft_finalize |
Finalize Open FUSION Toolkit environment.
Also calls PetscFinalize/MPI_FINALIZE
| subroutine oft_increase_indent |
Increase length of global indent string by 2.
| subroutine oft_init | ( | integer(i4), intent(in), optional | nthreads | ) |
Initializes Open FUSION Toolkit run environment.
Also calls MPI_INIT
| [in] | nthreads | Number for threads to use (negative for default) |
| logical function oft_mpi_and | ( | logical, intent(in) | a | ) |
logical scalar implementation of global AND (SUM) reduction
| [in] | a | Local value for AND |
| subroutine oft_mpi_barrier | ( | integer(i4), intent(out) | ierr | ) |
Wrapper for MPI_BARRIER with MPI_COMM_WORLD to enable communication profiling.
| [out] | ierr | Error flag |
| logical function oft_mpi_check_reqs | ( | integer(i4), intent(in) | n, |
| integer(i4), dimension(n), intent(inout) | req | ||
| ) |
Helper to check all requests from completion.
| [in] | n | Number of requests |
| [in,out] | req | Array of requests |
integer(i4) scalar implementation of global MAX reduction
| [in] | a | Local value for MAX |
| integer(i8) function, dimension(n) oft_mpi_maxi8a | ( | integer(i8), dimension(n), intent(in) | a, |
| integer(i4), intent(in) | n | ||
| ) |
integer(i8) array implementation of element-wise global MAX reduction
| [in] | a | Local values for MAX [n] |
| [in] | n | Length of array for reduction |
|
private |
integer(i4) array implementation of element-wise global MAX reduction
| [in] | a | Local values for MAX [n] |
| [in] | n | Length of array for reduction |
real(r8) scalar implementation of global MAX reduction
| [in] | a | Local value for MAX |
|
private |
real(r8) array implementation of element-wise global MAX reduction
| [in] | a | Local values for MAX [n] |
| [in] | n | Length of array for reduction |
complex(c8) scalar implementation of global SUM reduction
| [in] | a | Local value for SUM |
|
private |
complex(c8) array implementation of element-wise global SUM reduction
| [in] | a | Local values for SUM [n] |
| [in] | n | Length of array for reduction |
integer(i4) scalar implementation of global SUM reduction
| [in] | a | Local value for SUM |
|
private |
integer(i4) array implementation of element-wise global SUM reduction
| [in] | a | Local values for SUM [n] |
| [in] | n | Length of array for reduction |
integer(i8) scalar implementation of global SUM reduction
| [in] | a | Local value for SUM |
|
private |
integer(i8) array implementation of element-wise global SUM reduction
| [in] | a | Local values for SUM [n] |
| [in] | n | Length of array for reduction |
real(r8) scalar implementation of global SUM reduction
| [in] | a | Local value for SUM |
|
private |
real(r8) array implementation of element-wise global SUM reduction
| [in] | a | Local values for SUM [n] |
| [in] | n | Length of array for reduction |
| subroutine oft_mpi_waitall | ( | integer(i4), intent(in) | n, |
| integer(i4), dimension(n), intent(inout) | req, | ||
| integer(i4), intent(out) | ierr | ||
| ) |
Wrapper for MPI_WAITALL to enable communication profiling.
| [in] | n | Number of requests |
| [in,out] | req | Array of requests |
| [out] | ierr | Error flag |
| subroutine oft_mpi_waitany | ( | integer(i4), intent(in) | n, |
| integer(i4), dimension(n), intent(inout) | req, | ||
| integer(i4), intent(out) | j, | ||
| integer(i4), intent(out) | ierr | ||
| ) |
Wrapper for MPI_WAITANY to enable communication profiling.
| [in] | n | Number of requests |
| [in,out] | req | Array of requests |
| [out] | j | Next completed request |
| [out] | ierr | Error flag |
| pure logical function oft_pm_print |
Output control for performance messages.
| subroutine oft_prof_print |
Print some basic profiling information.
| subroutine oft_prof_reset |
Reset all profiling counters.
| subroutine oft_profile_start |
Activate profiling.
| subroutine oft_random_number_c8 | ( | complex(c8), dimension(n), intent(out) | array, |
| integer(i4), intent(in) | n | ||
| ) |
Complex implementation of toolkit random_number function.
| [out] | array | Array to set with random values [n] |
| [in] | n | Length of array |
|
private |
Real implementation of toolkit random_number function.
| [out] | array | Array to set with random values [n] |
| [in] | n | Length of array |
| subroutine oft_stack_print |
Print the current contents of the stack.
| subroutine oft_stack_reset |
Reset the stack.
| pure subroutine oft_thread_slice | ( | integer(i4), intent(in) | tid, |
| integer(i4), intent(in) | nthreads, | ||
| integer(i4), intent(in) | length, | ||
| integer(i4), intent(out) | i1, | ||
| integer(i4), intent(out) | i2 | ||
| ) |
Get thread ownership range for even spacing.
| [in] | tid | Thread index (0-indexed) |
| [in] | nthreads | Total number of threads |
| [in] | length | Length of range to partition |
| [out] | i1 | Start of ownership range (1-indexed) |
| [out] | i2 | End of ownership range (1-indexed) |
| subroutine oft_warn | ( | character(len=*) | error_str | ) |
Graceful warning printing for Open FUSION Toolkit.
| pure subroutine orient_list2 | ( | integer(i4), intent(in) | oflag, |
| integer(i4), dimension(2), intent(inout) | list | ||
| ) |
Apply an orientation transform to a 2 value array.
list([1,2]) = list([1,2]) if oflag>0 list([1,2]) = list([2,1]) if oflag<0
| [in] | oflag | Orientation flag |
| [in,out] | list | Array for orientation [2] |
| pure subroutine orient_listn | ( | integer(i4), intent(in) | oflag, |
| integer(i4), dimension(n), intent(inout) | list, | ||
| integer(i4), intent(in) | n | ||
| ) |
Apply an orientation transform to a n-value array.
| [in] | oflag | Orientation flag |
| [in,out] | list | Array for orientation [n] |
| [in] | n | Length of array |
| pure subroutine orient_listn_inv | ( | integer(i4), intent(in) | oflag, |
| integer(i4), dimension(n), intent(inout) | list, | ||
| integer(i4), intent(in) | n | ||
| ) |
Apply an orientation transform to a n-value array.
| [in] | oflag | Orientation flag |
| [in,out] | list | Array for orientation [n] |
| [in] | n | Length of array |
| integer(i8), dimension(4) comm_times = 0 |
Times for blocking communications.
| procedure(oft_abort_callback), pointer oft_abort_cb |
Abort callback for graceful abort in Python interface.
| type(oft_env_type) oft_env |
Global container for environment information.
| character(len=:), allocatable oft_indent |
Indentation string for status messages.
| integer(i4) oft_mpi_c4 =MPI_COMPLEX8 |
MPI_COMPLEX8 alias.
| integer(i4) oft_mpi_c8 =MPI_COMPLEX16 |
MPI_COMPLEX16 alias.
| integer(i4) oft_mpi_char =MPI_CHARACTER |
MPI_CHAR alias.
| integer(i4) oft_mpi_i4 =MPI_INTEGER4 |
MPI_INT4 alias.
| integer(i4) oft_mpi_i8 =MPI_INTEGER8 |
MPI_INT8 alias.
| integer(i4) oft_mpi_logical =MPI_LOGICAL |
MPI_LOGICAL alias.
| integer(i4) oft_mpi_r4 =MPI_REAL8 |
MPI_REAL4 alias.
| integer(i4) oft_mpi_r8 =MPI_REAL8 |
MPI_REAL8 alias.
|
private |
Enable profiling?
| logical oft_stack_disabled = .FALSE. |
Disable debug/profiling stack.
| integer(i4), dimension(24), parameter oft_test_seed = [430470439, -303393496, -476850581, -964913795, 995391627, 84909391, -586395292, -2070086573, -1010035798, 1012650827, 325297911, 701378007, 392909068, 379156631, 484729024, -292308758, -1669043581, 142231192, 708877466, -1255634259, 593274827, -561530186, -934579426, 900810854] |
| integer(i4) oft_tid = 0 |
ID of current thread.
|
private |
Time that run began.
| logical use_petsc = .FALSE. |
Use PETSc as linear algebra backend.