Procedures

ProcedureLocationProcedure TypeDescription
add_flops pic_flop_recorder Subroutine

Add an int64 variable which contains the FLOPs we use int64 since we might reach very large FLOP counts

Read more…
blas_asum pic_blas_interfaces Interface

this is the interface for the BLAS ASUM routines, it will call SASUM, DASUM, SCASUM, DZASUM Usage: result = blas_asum(x, incx) where x is the input vector, incx is the increment.

Read more…
blas_axpy pic_blas_interfaces Interface

explicit interface for BLAS AXPY routines

Read more…
blas_copy pic_blas_interfaces Interface

explicit interface for BLAS COPY routines

Read more…
blas_dot pic_blas_interfaces Interface

explicit interface for BLAS DOT routines

Read more…
blas_gemm pic_blas_interfaces Interface

explicit interface for BLAS GEMM routines

Read more…
blas_gemv pic_blas_interfaces Interface

explicit interface for BLAS GEMV routines

Read more…
blas_iamax pic_blas_interfaces Interface

explicit interface for BLAS IAMAX routines

Read more…
blas_scal pic_blas_interfaces Interface

explicit interface for BLAS SCAL routines

Read more…
char_decrease_ord_sort pic_sorting_ord_sort Subroutine
char_decrease_sort pic_sorting_sort Subroutine
char_increase_ord_sort pic_sorting_ord_sort Subroutine
char_increase_sort pic_sorting_sort Subroutine
char_ord_sort pic_sorting_ord_sort Subroutine
char_sort pic_sorting_sort Subroutine
char_sort_index_default pic_sorting_sort_index Subroutine
char_sort_index_low pic_sorting_sort_index Subroutine
close_log_file pic_logger Subroutine

Close the log file, needs to be called at the end of the program

Read more…
configuration pic_logger Subroutine

Get the current logger verbosity configuration

Read more…
configure pic_logger Subroutine

Configure the logger to be a certain verbosity level

Read more…
configure_file_output pic_logger Subroutine

Configure the logger to file to be a certain verbosity level

Read more…
copy pic_array Interface

copy provides a blas-less implementation of xcopy where x is (i,s,d) icopy, scopy, dcopy if you built pic with BLAS use the copy interface provided there, I will not beat BLAS copy is implemented for (int32, int64, sp, dp) for 1 and 2d arrays of the same types

Read more…
copy_matrix_dp pic_array Subroutine
copy_matrix_int32 pic_array Subroutine
copy_matrix_int64 pic_array Subroutine
copy_matrix_sp pic_array Subroutine
copy_vector_dp pic_array Subroutine
copy_vector_int32 pic_array Subroutine
copy_vector_int64 pic_array Subroutine
copy_vector_sp pic_array Subroutine
debug pic_logger Subroutine

Log a message that will only be printed at the debug level of verbosity

Read more…
dp_decrease_ord_sort pic_sorting_ord_sort Subroutine
dp_decrease_sort pic_sorting_sort Subroutine
dp_increase_ord_sort pic_sorting_ord_sort Subroutine
dp_increase_sort pic_sorting_sort Subroutine
dp_ord_sort pic_sorting_ord_sort Subroutine
dp_radix_sort pic_sorting_radix_sort Subroutine
dp_sort pic_sorting_sort Subroutine
dp_sort_index_default pic_sorting_sort_index Subroutine
dp_sort_index_low pic_sorting_sort_index Subroutine
dummy_work pic_test_helpers Subroutine

this subroutine runs a random dgemm to create work so that timers and other testing utils work nicely

Read more…
error pic_logger Subroutine

Log a message that will only be printed at the error of verbosity

Read more…
fill pic_array Interface

fill provides a generic interface to assing a value alpha of types (int32, int64, sp, dp) as defined in pic_types.F90 The inteface supports filling 1d and 2d arrays of the specified variables

Read more…
fill_matrix_dp pic_array Subroutine
fill_matrix_int32 pic_array Subroutine
fill_matrix_int64 pic_array Subroutine
fill_matrix_sp pic_array Subroutine
fill_vector_dp pic_array Subroutine
fill_vector_int32 pic_array Subroutine
fill_vector_int64 pic_array Subroutine
fill_vector_sp pic_array Subroutine
flop_rate_add_flops pic_flop_rate Subroutine

add flops to the flop rate type, this will add the flops to the flop recorder Usage: call my_flop_rate%add_flops(1000)

Read more…
flop_rate_get_flop_rate pic_flop_rate Function

get the flop rate in GFLOP/s, this will calculate the flop rate based on the number of flops and the elapsed time

Read more…
flop_rate_get_flops pic_flop_rate Function

get the number of flops recorded in the flop rate type

Read more…
flop_rate_get_time pic_flop_rate Function

get the elapsed time in seconds from the timer contained in the flop rate type

Read more…
flop_rate_report pic_flop_rate Subroutine

report the flop rate, this will print the flop rate in GFLOP/s

Read more…
flop_rate_reset pic_flop_rate Subroutine

reset the flop rate type, this will reset the timer and the flop recorder

Read more…
flop_rate_start_time pic_flop_rate Subroutine

Calls the start method for the timer contained in the flop rate type

Read more…
flop_rate_stop_time pic_flop_rate Subroutine

Calls the stop method for the timer contained in the flop rate type

Read more…
get_first_arg_from_command_line pic_command_line Function

get the first argument from the command line, this is expected to be a filename

Read more…
get_flops pic_flop_recorder Function

Get the int64 number of FLOPs we currently have in the counter

Read more…
get_precision pic_string Function

Get the current precision for real numbers

get_precision pic_string Interface

Obtain the current precision being used to print variables to strings

Read more…
get_threading_mode pic_array Function

get the current threading mode for the array routines Usage: mode = get_threading_mode()

get_threading_mode pic_array Interface

get_threading_mode returns the current threading mode for the array routines Usage: mode = get_threading_mode()

info pic_logger Subroutine

Log a message that will only be printed at the info level of verbosity

Read more…
int32_decrease_ord_sort pic_sorting_ord_sort Subroutine
int32_decrease_sort pic_sorting_sort Subroutine
int32_increase_ord_sort pic_sorting_ord_sort Subroutine
int32_increase_sort pic_sorting_sort Subroutine
int32_ord_sort pic_sorting_ord_sort Subroutine
int32_radix_sort pic_sorting_radix_sort Subroutine
int32_sort pic_sorting_sort Subroutine
int32_sort_index_default pic_sorting_sort_index Subroutine
int32_sort_index_low pic_sorting_sort_index Subroutine
int64_decrease_ord_sort pic_sorting_ord_sort Subroutine
int64_decrease_sort pic_sorting_sort Subroutine
int64_increase_ord_sort pic_sorting_ord_sort Subroutine
int64_increase_sort pic_sorting_sort Subroutine
int64_ord_sort pic_sorting_ord_sort Subroutine
int64_radix_sort pic_sorting_radix_sort Subroutine
int64_sort pic_sorting_sort Subroutine
int64_sort_index_default pic_sorting_sort_index Subroutine
int64_sort_index_low pic_sorting_sort_index Subroutine
is_equal pic_test_helpers Interface

The is equal interface is used to circumvent the fact that Fortran, rightfully, complains about comparing two reals without involving a tolerance, i.e. if(a == b) since there is no guarantee that the two reals are exactly equal due to floating point precision issues. The functions are defined as elemental

Read more…
is_equal_dp pic_test_helpers Function
is_equal_sp pic_test_helpers Function
is_sorted pic_array Interface

is_sorted provides a simple way to checking if a 1d array is sorted it is implemented for int32, int64, sp, and dp datatypes. The default is to check if an array is sorted in ascending fashion.

Read more…
is_sorted_char pic_array Function
is_sorted_dp pic_array Function
is_sorted_int32 pic_array Function
is_sorted_int64 pic_array Function
is_sorted_sp pic_array Function
log pic_logger Subroutine

internal subroutines that processes the message and filters it according to the verbosity level set by the user or the default this is a private subroutine so it is not exposed to the user

optional_char pic_optional_value Function
optional_dp pic_optional_value Function
optional_int32 pic_optional_value Function
optional_int64 pic_optional_value Function
optional_logical pic_optional_value Function
optional_sp pic_optional_value Function
ord_sort pic_sorting_ord_sort Interface

The generic subroutine interface implementing the ORD_SORT algorithm, a translation to Fortran 2008, of the "Rust" sort algorithm found in slice.rs https://github.com/rust-lang/rust/blob/90eb44a5897c39e3dff9c7e48e3973671dcd9496/src/liballoc/slice.rs#L2159 ORD_SORT is a hybrid stable comparison algorithm combining merge sort, and insertion sort.

Read more…
pad pic_string Function

function to pad a string with a certain number of characters for nice printing

pad pic_string Interface

adds a number X of spaces to the left of a “string” whcih is just a collection of characters. Mostly used for nice printing

Read more…
performance pic_logger Subroutine

Log a message that will only be printed at the performance of verbosity

Read more…
pic_asum pic_blas_interfaces Interface

general interface of the BLAS ASUM routines, will call SASUM, DASUM, SCASUM, DZASUM

Read more…
pic_axpy pic_blas_interfaces Interface

general interface of the BLAS AXPY routines, will call SAXPY, DAXPY, CAXPY, ZAXPY

Read more…
pic_caxpy pic_blas_interfaces Subroutine

interface for single precision complex AXPY

pic_ccopy pic_blas_interfaces Subroutine

interface for single precision complex copy

pic_cdotc pic_blas_interfaces Function

interface for single precision complex dot product

pic_comm_finalize pic_mpi Subroutine

finalize the MPI library

pic_comm_init pic_mpi Subroutine

initilalize the MPI library and get the size and rank variables

pic_copy pic_blas_interfaces Interface

general interface of the BLAS COPY routines, will call SCOPY, DCOPY, CCOPY, ZCOPY

Read more…
pic_cscal pic_blas_interfaces Subroutine

interface for single precision complex scaling

pic_dasum pic_blas_interfaces Function

interface for double precision absolute sum

pic_daxpy pic_blas_interfaces Subroutine

interface for double precision AXPY

pic_dcopy pic_blas_interfaces Subroutine

interface for double precision copy

pic_ddot pic_blas_interfaces Function

interface for double precision dot product

pic_dgemm pic_blas_interfaces Subroutine

interface for single precision matrix multiplication

pic_dgemv pic_blas_interfaces Subroutine

interface for double precision matrix-vector multiplication

pic_dot pic_blas_interfaces Interface

general interface of the BLAS DOT routines, will call SDOT, DDOT, CDOTC, ZDOTC

Read more…
pic_dscal pic_blas_interfaces Subroutine

interface for double precision scaling

pic_dzasum pic_blas_interfaces Function

interface for double precision complex absolute sum

pic_gemm pic_blas_interfaces Interface

general interface of the BLAS GEMM routines, will call SGEMM, DGEMM, CGEMM, ZGEMM

Read more…
pic_gemv pic_blas_interfaces Interface

general interface of the BLAS GEMV routines, will call SGEMV, DGEMV, CGEMV, ZGEMV

Read more…
pic_iamax pic_blas_interfaces Interface

general interface of the BLAS IAMAX routines, will call ISAMAX, IDAMAX, ICAMAX, IZAMAX

Read more…
pic_icamax pic_blas_interfaces Function

interface for single precision complex index of maximum absolute value

pic_idamax pic_blas_interfaces Function

interface for double precision index of maximum absolute value

pic_isamax pic_blas_interfaces Function

interface for single precision index of maximum absolute value

pic_izamax pic_blas_interfaces Function

interface for double precision complex index of maximum absolute value

pic_optional pic_optional_value Interface
pic_print_array pic_array Interface

Generic interface for printing arrays of different types

Read more…
pic_print_banner pic Subroutine

my cool banner, work in progress

pic_sasum pic_blas_interfaces Function

interface for single precision absolute sum

pic_saxpy pic_blas_interfaces Subroutine

interface for single precision AXPY

pic_scal pic_blas_interfaces Interface

general interface of the BLAS SCAL routines, will call SSCAL, DSCAL, CSCAL, ZSCAL

Read more…
pic_scasum pic_blas_interfaces Function

interface for single precision complex absolute sum

pic_scopy pic_blas_interfaces Subroutine

interface for single precision copy

pic_scramble_array pic_array Interface
pic_sdot pic_blas_interfaces Function

interface for single precision dot product

pic_sgemm pic_blas_interfaces Subroutine

interface for single precision matrix multiplication

pic_sgemv pic_blas_interfaces Subroutine

interface for single precision matrix-vector multiplication

pic_sscal pic_blas_interfaces Subroutine

interface for single precision scaling

pic_sum pic_array Interface

pic_sum provides a threaded alternative to the sum(array) Fortran intrinsic which will be too slow for large sizes of vectors and matrices. Note that this provides the total sum. As opposed to the blas alternative XASUM which does the absolute sum

Read more…
pic_transpose pic_array Interface

pic_transpose provides a blas-less, threaded alternative to the Fortran transpose intrinsic which will be slow for large matrix sizes. pic_transpose does not assume symmetric matrices

Read more…
pic_zaxpy pic_blas_interfaces Subroutine

interface for double precision complex AXPY

pic_zcopy pic_blas_interfaces Subroutine

interface for double precision complex copy

pic_zdotc pic_blas_interfaces Function

interface for double precision complex dot product

pic_zgemm pic_blas_interfaces Subroutine

interface for single precision matrix multiplication

pic_zscal pic_blas_interfaces Subroutine

interface for double precision complex scaling

print_3d_tensor_dp pic_array Subroutine

Print a 3D tensor of values

print_3d_tensor_int32 pic_array Subroutine

Print a 3D tensor of values

print_3d_tensor_int64 pic_array Subroutine

Print a 3D tensor of values

print_3d_tensor_sp pic_array Subroutine

Print a 3D tensor of values

print_asterisk_row pic_output_helpers Subroutine

prints a convenient row of asterisks of length n

print_matrix_dp pic_array Subroutine

print a matrix of values

print_matrix_int32 pic_array Subroutine

print a matrix of values

print_matrix_int64 pic_array Subroutine

print a matrix of values

print_matrix_sp pic_array Subroutine

print a matrix of values

print_packed_matrix_dp pic_array Subroutine

Print a packed lower triangular matrix of values

print_packed_matrix_int32 pic_array Subroutine

Print a packed lower triangular matrix of values

print_packed_matrix_int64 pic_array Subroutine

Print a packed lower triangular matrix of values

print_packed_matrix_sp pic_array Subroutine

Print a packed lower triangular matrix of values

print_vector_dp pic_array Subroutine

print a vector of values

print_vector_int32 pic_array Subroutine

print a vector of values

print_vector_int64 pic_array Subroutine

print a vector of values

print_vector_sp pic_array Subroutine

print a vector of values

radix_sort pic_sorting_radix_sort Interface

The generic subroutine interface implementing the LSD radix sort algorithm, see https://en.wikipedia.org/wiki/Radix_sort for more details. It is always O(N) in sorting random data, but need a O(N) buffer. (Specification)

radix_sort_u32_helper pic_sorting_radix_sort Subroutine
radix_sort_u64_helper pic_sorting_radix_sort Subroutine
reset_flop_counter pic_flop_recorder Subroutine

Resets the flop counter to 0_int64

Read more…
scramble_array_character pic_array Subroutine
scramble_array_dp pic_array Subroutine
scramble_array_int32 pic_array Subroutine
scramble_array_int64 pic_array Subroutine
scramble_array_sp pic_array Subroutine
set_brackets pic_array Subroutine

Set brackets based on output format type

set_precision pic_string Subroutine

Set the precision for real numbers

set_precision pic_string Interface

This routine overrides the default dp precision used for printing strings in the to_string function, the default is : integer(default_int), parameter :: default_dp_precision = 12

Read more…
set_threading_mode pic_array Subroutine

set the threading mode for the array routines, this will set the use_threaded variable to true or false depending on the input

Read more…
set_threading_mode pic_array Interface

set_threading sets the threading mode for the array routines this will set the use_threaded variable to true or false depending on the input Usage: call set_threading_mode(.true.) or call set_threading_mode(.false.)

sort pic_sorting_sort Interface

The generic subroutine interface implementing the SORT algorithm, based on the introsort of David Musser. (Specification)

sort_index pic_sorting_sort_index Interface

The generic subroutine interface implementing the SORT_INDEX algorithm, based on the "Rust" sort algorithm found in slice.rs https://github.com/rust-lang/rust/blob/90eb44a5897c39e3dff9c7e48e3973671dcd9496/src/liballoc/slice.rs#L2159 but modified to return an array of indices that would provide a stable sort of the rank one ARRAY input.

Read more…
sp_decrease_ord_sort pic_sorting_ord_sort Subroutine
sp_decrease_sort pic_sorting_sort Subroutine
sp_increase_ord_sort pic_sorting_ord_sort Subroutine
sp_increase_sort pic_sorting_sort Subroutine
sp_ord_sort pic_sorting_ord_sort Subroutine
sp_radix_sort pic_sorting_radix_sort Subroutine
sp_sort pic_sorting_sort Subroutine
sp_sort_index_default pic_sorting_sort_index Subroutine
sp_sort_index_low pic_sorting_sort_index Subroutine
sum_matrix_dp pic_array Function
sum_matrix_int32 pic_array Function
sum_matrix_int64 pic_array Function
sum_matrix_sp pic_array Function
sum_vector_dp pic_array Function
sum_vector_int32 pic_array Function
sum_vector_int64 pic_array Function
sum_vector_sp pic_array Function
timer_get_elapsed_time pic_timer Function

Returns the elapsed time as a real(dp) variable

Read more…
timer_print_time pic_timer Subroutine

Prints the elapsed time at the time of calling

Read more…
timer_start pic_timer Subroutine

starts the timer. If OMP is enabled, it will use omp_get_wtime() if not, it will use Fortran’s system_clock

Read more…
timer_stop pic_timer Subroutine

stop the timer. If OMP is enabled, it will use omp_get_wtime() if not, it will use Fortran’s system_clock

Read more…
to_string pic_string Interface

converts a variable of type (int32, int64, sp, dp, char, logical) to a “string” which is just a collecting of chars.

Read more…
to_string_char pic_string Function

transform a character to a string

to_string_dp pic_string Function

transform a real(dp) to a string

to_string_int32 pic_string Function

transform an int32 to a string

to_string_int64 pic_string Function

transform an int64 to a string

to_string_logical pic_string Function

tranform a logical to a string either true or false

to_string_matrix_dp pic_string Function
to_string_matrix_int32 pic_string Function
to_string_matrix_int64 pic_string Function
to_string_matrix_sp pic_string Function
to_string_sp pic_string Function

transform a real(sp) to a string

to_string_vector_dp pic_string Function
to_string_vector_int32 pic_string Function
to_string_vector_int64 pic_string Function
to_string_vector_sp pic_string Function
to_upper pic_string Function
to_upper pic_string Interface

takes a character variable and transforms it to uppercase

Read more…
transpose_matrix_dp pic_array Subroutine
transpose_matrix_int32 pic_array Subroutine
transpose_matrix_int64 pic_array Subroutine
transpose_matrix_sp pic_array Subroutine
verbose pic_logger Subroutine

Log a message that will only be printed at the verbose level of verbosity

Read more…
warning pic_logger Subroutine

Log a message that will only be printed at the warning level of verbosity

Read more…
write_log_line pic_logger Subroutine

Internal subroutine that will write the message to the log no interface to the public