|
|
@ -82,8 +82,8 @@ module trexio
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
|
|
|
|
integer, parameter :: trexio_exit_code = 4
|
|
|
|
integer, parameter :: trexio_exit_code = c_int32_t
|
|
|
|
integer, parameter :: trexio_backend = 4
|
|
|
|
integer, parameter :: trexio_backend = c_int32_t
|
|
|
|
|
|
|
|
|
|
|
|
character(kind=c_char), parameter :: TREXIO_DELIM = c_new_line
|
|
|
|
character(kind=c_char), parameter :: TREXIO_DELIM = c_new_line
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
@ -491,8 +491,8 @@ interface
|
|
|
|
subroutine trexio_string_of_error (error, string) bind(C, name='trexio_string_of_error_f')
|
|
|
|
subroutine trexio_string_of_error (error, string) bind(C, name='trexio_string_of_error_f')
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
import
|
|
|
|
import
|
|
|
|
integer (trexio_exit_code), intent(in), value :: error
|
|
|
|
integer(trexio_exit_code), intent(in), value :: error
|
|
|
|
character, intent(out) :: string(<<MAX_STRING_LENGTH()>>)
|
|
|
|
character(kind=c_char), intent(out) :: string(<<MAX_STRING_LENGTH()>>)
|
|
|
|
end subroutine trexio_string_of_error
|
|
|
|
end subroutine trexio_string_of_error
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
@ -595,9 +595,9 @@ bool trexio_has_backend(back_end_t back_end) {
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src f90 :tangle prefix_fortran.f90
|
|
|
|
#+begin_src f90 :tangle prefix_fortran.f90
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
logical function trexio_has_backend (back_end) bind(C)
|
|
|
|
logical(c_bool) function trexio_has_backend (back_end) bind(C)
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
integer(4), intent(in), value :: back_end
|
|
|
|
integer(c_int32_t), intent(in), value :: back_end
|
|
|
|
end function trexio_has_backend
|
|
|
|
end function trexio_has_backend
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
@ -966,11 +966,11 @@ trexio_open(const char* file_name, const char mode,
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src f90 :tangle prefix_fortran.f90
|
|
|
|
#+begin_src f90 :tangle prefix_fortran.f90
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
integer(8) function trexio_open_c (filename, mode, backend, rc_open) bind(C, name="trexio_open")
|
|
|
|
integer(c_int64_t) function trexio_open_c (filename, mode, backend, rc_open) bind(C, name="trexio_open")
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
import
|
|
|
|
import
|
|
|
|
character(kind=c_char), dimension(*) :: filename
|
|
|
|
character(kind=c_char), dimension(*) :: filename
|
|
|
|
character, intent(in), value :: mode
|
|
|
|
character(kind=c_char), intent(in), value :: mode
|
|
|
|
integer(trexio_backend), intent(in), value :: backend
|
|
|
|
integer(trexio_backend), intent(in), value :: backend
|
|
|
|
integer(trexio_exit_code), intent(out) :: rc_open
|
|
|
|
integer(trexio_exit_code), intent(out) :: rc_open
|
|
|
|
end function trexio_open_c
|
|
|
|
end function trexio_open_c
|
|
|
@ -1044,9 +1044,9 @@ trexio_exit_code trexio_set_one_based(trexio_t* file)
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src f90 :tangle prefix_fortran.f90
|
|
|
|
#+begin_src f90 :tangle prefix_fortran.f90
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
integer function trexio_set_one_based(trex_file) bind(C)
|
|
|
|
integer(c_int32_t) function trexio_set_one_based(trex_file) bind(C)
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(c_int64_t), intent(in), value :: trex_file
|
|
|
|
end function trexio_set_one_based
|
|
|
|
end function trexio_set_one_based
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
@ -1147,9 +1147,9 @@ trexio_close (trexio_t* file)
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src f90 :tangle prefix_fortran.f90
|
|
|
|
#+begin_src f90 :tangle prefix_fortran.f90
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
integer function trexio_close (trex_file) bind(C)
|
|
|
|
integer(c_int32_t) function trexio_close (trex_file) bind(C)
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(c_int64_t), intent(in), value :: trex_file
|
|
|
|
end function trexio_close
|
|
|
|
end function trexio_close
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
@ -1271,29 +1271,29 @@ def _inquire(file_name: str) -> bool:
|
|
|
|
example, in ~#define~ statements). More detailed description of
|
|
|
|
example, in ~#define~ statements). More detailed description of
|
|
|
|
each variable can be found below:
|
|
|
|
each variable can be found below:
|
|
|
|
|
|
|
|
|
|
|
|
| Template variable | Description | Example |
|
|
|
|
| Template variable | Description | Example |
|
|
|
|
|--------------------------------+-----------------------------------------------------+-----------------------|
|
|
|
|
|--------------------------------+-----------------------------------------------------+-------------------------------------|
|
|
|
|
| ~$group$~ | Name of the group | ~nucleus~ |
|
|
|
|
| ~$group$~ | Name of the group | ~nucleus~ |
|
|
|
|
| ~$group_num$~ | Name of the numerical attribute (scalar) | ~nucleus_num~ |
|
|
|
|
| ~$group_num$~ | Name of the numerical attribute (scalar) | ~nucleus_num~ |
|
|
|
|
| ~$group_str$~ | Name of the string attribute (scalar) | ~nucleus_point_group~ |
|
|
|
|
| ~$group_str$~ | Name of the string attribute (scalar) | ~nucleus_point_group~ |
|
|
|
|
| ~$group_dset$~ | Name of the dataset (vector/matrix/tensor) | ~nucleus_coord~ |
|
|
|
|
| ~$group_dset$~ | Name of the dataset (vector/matrix/tensor) | ~nucleus_coord~ |
|
|
|
|
| ~$group_dset_rank$~ | Rank of the dataset | ~2~ |
|
|
|
|
| ~$group_dset_rank$~ | Rank of the dataset | ~2~ |
|
|
|
|
| ~$group_dset_dim$~ | Selected dimension of the dataset | ~nucleus_num~ |
|
|
|
|
| ~$group_dset_dim$~ | Selected dimension of the dataset | ~nucleus_num~ |
|
|
|
|
| ~$group_dset_dim_list$~ | All dimensions of the dataset | ~{nucleus_num, 3}~ |
|
|
|
|
| ~$group_dset_dim_list$~ | All dimensions of the dataset | ~{nucleus_num, 3}~ |
|
|
|
|
| ~$group_dset_dtype$~ | Basic type of the dataset (int/float/char) | ~float~ |
|
|
|
|
| ~$group_dset_dtype$~ | Basic type of the dataset (int/float/char) | ~float~ |
|
|
|
|
| ~$group_dset_h5_dtype$~ | Type of the dataset in HDF5 | ~double~ |
|
|
|
|
| ~$group_dset_h5_dtype$~ | Type of the dataset in HDF5 | ~double~ |
|
|
|
|
| ~$group_dset_format_scanf$~ | Input type of the dataset in TEXT [fscanf] | ~%lf~ |
|
|
|
|
| ~$group_dset_format_scanf$~ | Input type of the dataset in TEXT [fscanf] | ~%lf~ |
|
|
|
|
| ~$group_dset_format_printf$~ | Output type of the dataset in TEXT [fprintf] | ~%24.16e~ |
|
|
|
|
| ~$group_dset_format_printf$~ | Output type of the dataset in TEXT [fprintf] | ~%24.16e~ |
|
|
|
|
| ~$group_dset_dtype_default$~ | Default datatype of the dataset [C] | ~double/int32_t~ |
|
|
|
|
| ~$group_dset_dtype_default$~ | Default datatype of the dataset [C] | ~double/int32_t~ |
|
|
|
|
| ~$group_dset_dtype_single$~ | Single precision datatype of the dataset [C] | ~float/int32_t~ |
|
|
|
|
| ~$group_dset_dtype_single$~ | Single precision datatype of the dataset [C] | ~float/int32_t~ |
|
|
|
|
| ~$group_dset_dtype_double$~ | Double precision datatype of the dataset [C] | ~double/int64_t~ |
|
|
|
|
| ~$group_dset_dtype_double$~ | Double precision datatype of the dataset [C] | ~double/int64_t~ |
|
|
|
|
| ~$group_dset_f_dtype_default$~ | Default datatype of the dataset [Fortran] | ~real(8)/integer(4)~ |
|
|
|
|
| ~$group_dset_f_dtype_default$~ | Default datatype of the dataset [Fortran] | ~real(c_double)/integer(c_int32_t)~ |
|
|
|
|
| ~$group_dset_f_dtype_single$~ | Single precision datatype of the dataset [Fortran] | ~real(4)/integer(4)~ |
|
|
|
|
| ~$group_dset_f_dtype_single$~ | Single precision datatype of the dataset [Fortran] | ~real(c_float)/integer(c_int32_t)~ |
|
|
|
|
| ~$group_dset_f_dtype_double$~ | Double precision datatype of the dataset [Fortran] | ~real(8)/integer(8)~ |
|
|
|
|
| ~$group_dset_f_dtype_double$~ | Double precision datatype of the dataset [Fortran] | ~real(c_double)/integer(c_int64_t)~ |
|
|
|
|
| ~$group_dset_f_dims$~ | Dimensions in Fortran | ~(:,:)~ |
|
|
|
|
| ~$group_dset_f_dims$~ | Dimensions in Fortran | ~(:,:)~ |
|
|
|
|
| ~$group_dset_py_dtype$~ | Standard datatype of the dataset [Python] | ~float/int~ |
|
|
|
|
| ~$group_dset_py_dtype$~ | Standard datatype of the dataset [Python] | ~float/int~ |
|
|
|
|
| ~$default_prec$~ | Default precision for read/write without suffix [C] | ~64/32~ |
|
|
|
|
| ~$default_prec$~ | Default precision for read/write without suffix [C] | ~64/32~ |
|
|
|
|
| ~$is_index$~ | Expands to ~true~ if dataset has a type ~index~ [C] | ~true/false~ |
|
|
|
|
| ~$is_index$~ | Expands to ~true~ if dataset has a type ~index~ [C] | ~true/false~ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Some of the aforementioned template variables with ~group_dset~ prefix are duplicated with ~group_num~ prefix,
|
|
|
|
Some of the aforementioned template variables with ~group_dset~ prefix are duplicated with ~group_num~ prefix,
|
|
|
@ -1546,9 +1546,9 @@ trexio_has_$group_num$ (trexio_t* const file)
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src f90 :tangle write_attr_num_64_front_fortran.f90
|
|
|
|
#+begin_src f90 :tangle write_attr_num_64_front_fortran.f90
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
integer function trexio_write_$group_num$_64 (trex_file, num) bind(C)
|
|
|
|
integer(c_int32_t) function trexio_write_$group_num$_64 (trex_file, num) bind(C)
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(c_int64_t), intent(in), value :: trex_file
|
|
|
|
$group_num_f_dtype_double$, intent(in), value :: num
|
|
|
|
$group_num_f_dtype_double$, intent(in), value :: num
|
|
|
|
end function trexio_write_$group_num$_64
|
|
|
|
end function trexio_write_$group_num$_64
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
@ -1556,9 +1556,9 @@ end interface
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src f90 :tangle read_attr_num_64_front_fortran.f90
|
|
|
|
#+begin_src f90 :tangle read_attr_num_64_front_fortran.f90
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
integer function trexio_read_$group_num$_64 (trex_file, num) bind(C)
|
|
|
|
integer(c_int32_t) function trexio_read_$group_num$_64 (trex_file, num) bind(C)
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(c_int64_t), intent(in), value :: trex_file
|
|
|
|
$group_num_f_dtype_double$, intent(out) :: num
|
|
|
|
$group_num_f_dtype_double$, intent(out) :: num
|
|
|
|
end function trexio_read_$group_num$_64
|
|
|
|
end function trexio_read_$group_num$_64
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
@ -1566,9 +1566,9 @@ end interface
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src f90 :tangle write_attr_num_32_front_fortran.f90
|
|
|
|
#+begin_src f90 :tangle write_attr_num_32_front_fortran.f90
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
integer function trexio_write_$group_num$_32 (trex_file, num) bind(C)
|
|
|
|
integer(c_int32_t) function trexio_write_$group_num$_32 (trex_file, num) bind(C)
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(c_int64_t), intent(in), value :: trex_file
|
|
|
|
$group_num_f_dtype_single$, intent(in), value :: num
|
|
|
|
$group_num_f_dtype_single$, intent(in), value :: num
|
|
|
|
end function trexio_write_$group_num$_32
|
|
|
|
end function trexio_write_$group_num$_32
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
@ -1576,9 +1576,9 @@ end interface
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src f90 :tangle read_attr_num_32_front_fortran.f90
|
|
|
|
#+begin_src f90 :tangle read_attr_num_32_front_fortran.f90
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
integer function trexio_read_$group_num$_32 (trex_file, num) bind(C)
|
|
|
|
integer(c_int32_t) function trexio_read_$group_num$_32 (trex_file, num) bind(C)
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(c_int64_t), intent(in), value :: trex_file
|
|
|
|
$group_num_f_dtype_single$, intent(out) :: num
|
|
|
|
$group_num_f_dtype_single$, intent(out) :: num
|
|
|
|
end function trexio_read_$group_num$_32
|
|
|
|
end function trexio_read_$group_num$_32
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
@ -1586,9 +1586,9 @@ end interface
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src f90 :tangle write_attr_num_def_front_fortran.f90
|
|
|
|
#+begin_src f90 :tangle write_attr_num_def_front_fortran.f90
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
integer function trexio_write_$group_num$ (trex_file, num) bind(C)
|
|
|
|
integer(c_int32_t) function trexio_write_$group_num$ (trex_file, num) bind(C)
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(c_int64_t), intent(in), value :: trex_file
|
|
|
|
$group_num_f_dtype_default$, intent(in), value :: num
|
|
|
|
$group_num_f_dtype_default$, intent(in), value :: num
|
|
|
|
end function trexio_write_$group_num$
|
|
|
|
end function trexio_write_$group_num$
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
@ -1596,9 +1596,9 @@ end interface
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src f90 :tangle read_attr_num_def_front_fortran.f90
|
|
|
|
#+begin_src f90 :tangle read_attr_num_def_front_fortran.f90
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
integer function trexio_read_$group_num$ (trex_file, num) bind(C)
|
|
|
|
integer(c_int32_t) function trexio_read_$group_num$ (trex_file, num) bind(C)
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(c_int64_t), intent(in), value :: trex_file
|
|
|
|
$group_num_f_dtype_default$, intent(out) :: num
|
|
|
|
$group_num_f_dtype_default$, intent(out) :: num
|
|
|
|
end function trexio_read_$group_num$
|
|
|
|
end function trexio_read_$group_num$
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
@ -1606,9 +1606,9 @@ end interface
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src f90 :tangle has_attr_num_front_fortran.f90
|
|
|
|
#+begin_src f90 :tangle has_attr_num_front_fortran.f90
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
integer function trexio_has_$group_num$ (trex_file) bind(C)
|
|
|
|
integer(c_int32_t) function trexio_has_$group_num$ (trex_file) bind(C)
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(c_int64_t), intent(in), value :: trex_file
|
|
|
|
end function trexio_has_$group_num$
|
|
|
|
end function trexio_has_$group_num$
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
@ -2209,9 +2209,9 @@ trexio_has_$group_dset$ (trexio_t* const file)
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src f90 :tangle write_dset_data_64_front_fortran.f90
|
|
|
|
#+begin_src f90 :tangle write_dset_data_64_front_fortran.f90
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
integer function trexio_write_$group_dset$_64 (trex_file, dset) bind(C)
|
|
|
|
integer(c_int32_t) function trexio_write_$group_dset$_64 (trex_file, dset) bind(C)
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(c_int64_t), intent(in), value :: trex_file
|
|
|
|
$group_dset_f_dtype_double$, intent(in) :: dset$group_dset_f_dims$
|
|
|
|
$group_dset_f_dtype_double$, intent(in) :: dset$group_dset_f_dims$
|
|
|
|
end function trexio_write_$group_dset$_64
|
|
|
|
end function trexio_write_$group_dset$_64
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
@ -2219,9 +2219,9 @@ end interface
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src f90 :tangle read_dset_data_64_front_fortran.f90
|
|
|
|
#+begin_src f90 :tangle read_dset_data_64_front_fortran.f90
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
integer function trexio_read_$group_dset$_64 (trex_file, dset) bind(C)
|
|
|
|
integer(c_int32_t) function trexio_read_$group_dset$_64 (trex_file, dset) bind(C)
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(c_int64_t), intent(in), value :: trex_file
|
|
|
|
$group_dset_f_dtype_double$, intent(out) :: dset$group_dset_f_dims$
|
|
|
|
$group_dset_f_dtype_double$, intent(out) :: dset$group_dset_f_dims$
|
|
|
|
end function trexio_read_$group_dset$_64
|
|
|
|
end function trexio_read_$group_dset$_64
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
@ -2229,9 +2229,9 @@ end interface
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src f90 :tangle write_dset_data_32_front_fortran.f90
|
|
|
|
#+begin_src f90 :tangle write_dset_data_32_front_fortran.f90
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
integer function trexio_write_$group_dset$_32 (trex_file, dset) bind(C)
|
|
|
|
integer(c_int32_t) function trexio_write_$group_dset$_32 (trex_file, dset) bind(C)
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(c_int64_t), intent(in), value :: trex_file
|
|
|
|
$group_dset_f_dtype_single$, intent(in) :: dset$group_dset_f_dims$
|
|
|
|
$group_dset_f_dtype_single$, intent(in) :: dset$group_dset_f_dims$
|
|
|
|
end function trexio_write_$group_dset$_32
|
|
|
|
end function trexio_write_$group_dset$_32
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
@ -2239,9 +2239,9 @@ end interface
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src f90 :tangle read_dset_data_32_front_fortran.f90
|
|
|
|
#+begin_src f90 :tangle read_dset_data_32_front_fortran.f90
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
integer function trexio_read_$group_dset$_32 (trex_file, dset) bind(C)
|
|
|
|
integer(c_int32_t) function trexio_read_$group_dset$_32 (trex_file, dset) bind(C)
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(c_int64_t), intent(in), value :: trex_file
|
|
|
|
$group_dset_f_dtype_single$, intent(out) :: dset$group_dset_f_dims$
|
|
|
|
$group_dset_f_dtype_single$, intent(out) :: dset$group_dset_f_dims$
|
|
|
|
end function trexio_read_$group_dset$_32
|
|
|
|
end function trexio_read_$group_dset$_32
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
@ -2249,9 +2249,9 @@ end interface
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src f90 :tangle write_dset_data_def_front_fortran.f90
|
|
|
|
#+begin_src f90 :tangle write_dset_data_def_front_fortran.f90
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
integer function trexio_write_$group_dset$ (trex_file, dset) bind(C)
|
|
|
|
integer(c_int32_t) function trexio_write_$group_dset$ (trex_file, dset) bind(C)
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(c_int64_t), intent(in), value :: trex_file
|
|
|
|
$group_dset_f_dtype_default$, intent(in) :: dset$group_dset_f_dims$
|
|
|
|
$group_dset_f_dtype_default$, intent(in) :: dset$group_dset_f_dims$
|
|
|
|
end function trexio_write_$group_dset$
|
|
|
|
end function trexio_write_$group_dset$
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
@ -2259,9 +2259,9 @@ end interface
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src f90 :tangle read_dset_data_def_front_fortran.f90
|
|
|
|
#+begin_src f90 :tangle read_dset_data_def_front_fortran.f90
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
integer function trexio_read_$group_dset$ (trex_file, dset) bind(C)
|
|
|
|
integer(c_int32_t) function trexio_read_$group_dset$ (trex_file, dset) bind(C)
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(c_int64_t), intent(in), value :: trex_file
|
|
|
|
$group_dset_f_dtype_default$, intent(out) :: dset$group_dset_f_dims$
|
|
|
|
$group_dset_f_dtype_default$, intent(out) :: dset$group_dset_f_dims$
|
|
|
|
end function trexio_read_$group_dset$
|
|
|
|
end function trexio_read_$group_dset$
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
@ -2269,9 +2269,9 @@ end interface
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src f90 :tangle has_dset_data_front_fortran.f90
|
|
|
|
#+begin_src f90 :tangle has_dset_data_front_fortran.f90
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
integer function trexio_has_$group_dset$ (trex_file) bind(C)
|
|
|
|
integer(c_int32_t) function trexio_has_$group_dset$ (trex_file) bind(C)
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(c_int64_t), intent(in), value :: trex_file
|
|
|
|
end function trexio_has_$group_dset$
|
|
|
|
end function trexio_has_$group_dset$
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
@ -2818,82 +2818,82 @@ trexio_has_$group_dset$ (trexio_t* const file)
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src f90 :tangle write_dset_sparse_front_fortran.f90
|
|
|
|
#+begin_src f90 :tangle write_dset_sparse_front_fortran.f90
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
integer function trexio_write_$group_dset$ (trex_file, &
|
|
|
|
integer(c_int32_t) function trexio_write_$group_dset$ (trex_file, &
|
|
|
|
offset_file, buffer_size, &
|
|
|
|
offset_file, buffer_size, &
|
|
|
|
index_sparse, value_sparse) bind(C)
|
|
|
|
index_sparse, value_sparse) bind(C)
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(c_int64_t), intent(in), value :: trex_file
|
|
|
|
integer(8), intent(in), value :: offset_file
|
|
|
|
integer(c_int64_t), intent(in), value :: offset_file
|
|
|
|
integer(8), intent(in), value :: buffer_size
|
|
|
|
integer(c_int64_t), intent(in), value :: buffer_size
|
|
|
|
integer(4), intent(in) :: index_sparse(*)
|
|
|
|
integer(c_int32_t), intent(in) :: index_sparse(*)
|
|
|
|
double precision, intent(in) :: value_sparse(*)
|
|
|
|
real(c_double), intent(in) :: value_sparse(*)
|
|
|
|
end function trexio_write_$group_dset$
|
|
|
|
end function trexio_write_$group_dset$
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
integer function trexio_write_safe_$group_dset$ (trex_file, &
|
|
|
|
integer(c_int32_t) function trexio_write_safe_$group_dset$ (trex_file, &
|
|
|
|
offset_file, buffer_size, &
|
|
|
|
offset_file, buffer_size, &
|
|
|
|
index_sparse, index_size, &
|
|
|
|
index_sparse, index_size, &
|
|
|
|
value_sparse, value_size) bind(C)
|
|
|
|
value_sparse, value_size) bind(C)
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(c_int64_t), intent(in), value :: trex_file
|
|
|
|
integer(8), intent(in), value :: offset_file
|
|
|
|
integer(c_int64_t), intent(in), value :: offset_file
|
|
|
|
integer(8), intent(in), value :: buffer_size
|
|
|
|
integer(c_int64_t), intent(in), value :: buffer_size
|
|
|
|
integer(4), intent(in) :: index_sparse(*)
|
|
|
|
integer(c_int32_t), intent(in) :: index_sparse(*)
|
|
|
|
integer(8), intent(in), value :: index_size
|
|
|
|
integer(c_int64_t), intent(in), value :: index_size
|
|
|
|
double precision, intent(in) :: value_sparse(*)
|
|
|
|
real(c_double), intent(in) :: value_sparse(*)
|
|
|
|
integer(8), intent(in), value :: value_size
|
|
|
|
integer(c_int64_t), intent(in), value :: value_size
|
|
|
|
end function trexio_write_safe_$group_dset$
|
|
|
|
end function trexio_write_safe_$group_dset$
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src f90 :tangle read_dset_sparse_front_fortran.f90
|
|
|
|
#+begin_src f90 :tangle read_dset_sparse_front_fortran.f90
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
integer function trexio_read_$group_dset$ (trex_file, &
|
|
|
|
integer(c_int32_t) function trexio_read_$group_dset$ (trex_file, &
|
|
|
|
offset_file, buffer_size, &
|
|
|
|
offset_file, buffer_size, &
|
|
|
|
index_sparse, value_sparse) bind(C)
|
|
|
|
index_sparse, value_sparse) bind(C)
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(c_int64_t), intent(in), value :: trex_file
|
|
|
|
integer(8), intent(in), value :: offset_file
|
|
|
|
integer(c_int64_t), intent(in), value :: offset_file
|
|
|
|
integer(8), intent(inout) :: buffer_size
|
|
|
|
integer(c_int64_t), intent(inout) :: buffer_size
|
|
|
|
integer(4), intent(out) :: index_sparse(*)
|
|
|
|
integer(c_int32_t), intent(out) :: index_sparse(*)
|
|
|
|
double precision, intent(out) :: value_sparse(*)
|
|
|
|
real(c_double), intent(out) :: value_sparse(*)
|
|
|
|
end function trexio_read_$group_dset$
|
|
|
|
end function trexio_read_$group_dset$
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
integer function trexio_read_safe_$group_dset$ (trex_file, &
|
|
|
|
integer(c_int32_t) function trexio_read_safe_$group_dset$ (trex_file, &
|
|
|
|
offset_file, buffer_size, &
|
|
|
|
offset_file, buffer_size, &
|
|
|
|
index_sparse, index_size, &
|
|
|
|
index_sparse, index_size, &
|
|
|
|
value_sparse, value_size) bind(C)
|
|
|
|
value_sparse, value_size) bind(C)
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(c_int64_t), intent(in), value :: trex_file
|
|
|
|
integer(8), intent(in), value :: offset_file
|
|
|
|
integer(c_int64_t), intent(in), value :: offset_file
|
|
|
|
integer(8), intent(inout) :: buffer_size
|
|
|
|
integer(c_int64_t), intent(inout) :: buffer_size
|
|
|
|
integer(4), intent(out) :: index_sparse(*)
|
|
|
|
integer(c_int32_t), intent(out) :: index_sparse(*)
|
|
|
|
integer(8), intent(in), value :: index_size
|
|
|
|
integer(c_int64_t), intent(in), value :: index_size
|
|
|
|
double precision, intent(out) :: value_sparse(*)
|
|
|
|
real(c_double), intent(out) :: value_sparse(*)
|
|
|
|
integer(8), intent(in), value :: value_size
|
|
|
|
integer(c_int64_t), intent(in), value :: value_size
|
|
|
|
end function trexio_read_safe_$group_dset$
|
|
|
|
end function trexio_read_safe_$group_dset$
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src f90 :tangle read_dset_sparse_size_front_fortran.f90
|
|
|
|
#+begin_src f90 :tangle read_dset_sparse_size_front_fortran.f90
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
integer function trexio_read_$group_dset$_size (trex_file, &
|
|
|
|
integer(c_int32_t) function trexio_read_$group_dset$_size (trex_file, &
|
|
|
|
size_max) bind(C)
|
|
|
|
size_max) bind(C)
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(c_int64_t), intent(in), value :: trex_file
|
|
|
|
integer(8), intent(out) :: size_max
|
|
|
|
integer(c_int64_t), intent(out) :: size_max
|
|
|
|
end function trexio_read_$group_dset$_size
|
|
|
|
end function trexio_read_$group_dset$_size
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src f90 :tangle has_dset_sparse_front_fortran.f90
|
|
|
|
#+begin_src f90 :tangle has_dset_sparse_front_fortran.f90
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
integer function trexio_has_$group_dset$ (trex_file) bind(C)
|
|
|
|
integer(c_int32_t) function trexio_has_$group_dset$ (trex_file) bind(C)
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(c_int64_t), intent(in), value :: trex_file
|
|
|
|
end function trexio_has_$group_dset$
|
|
|
|
end function trexio_has_$group_dset$
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
@ -3389,31 +3389,31 @@ trexio_has_$group_dset$ (trexio_t* const file)
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src f90 :tangle write_dset_str_front_fortran.f90
|
|
|
|
#+begin_src f90 :tangle write_dset_str_front_fortran.f90
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
integer function trexio_write_$group_dset$_low (trex_file, dset, max_str_len) bind(C)
|
|
|
|
integer(c_int32_t) function trexio_write_$group_dset$_low (trex_file, dset, max_str_len) bind(C)
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(c_int64_t), intent(in), value :: trex_file
|
|
|
|
character, intent(in) :: dset(*)
|
|
|
|
character(kind=c_char), intent(in) :: dset(*)
|
|
|
|
integer(4), intent(in), value :: max_str_len
|
|
|
|
integer(c_int32_t), intent(in), value :: max_str_len
|
|
|
|
end function trexio_write_$group_dset$_low
|
|
|
|
end function trexio_write_$group_dset$_low
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src f90 :tangle read_dset_str_front_fortran.f90
|
|
|
|
#+begin_src f90 :tangle read_dset_str_front_fortran.f90
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
integer function trexio_read_$group_dset$_low (trex_file, dset, max_str_len) bind(C)
|
|
|
|
integer(c_int32_t) function trexio_read_$group_dset$_low (trex_file, dset, max_str_len) bind(C)
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(c_int64_t), intent(in), value :: trex_file
|
|
|
|
character, intent(out) :: dset(*)
|
|
|
|
character(kind=c_char), intent(out) :: dset(*)
|
|
|
|
integer(4), intent(in), value :: max_str_len
|
|
|
|
integer(c_int32_t), intent(in), value :: max_str_len
|
|
|
|
end function trexio_read_$group_dset$_low
|
|
|
|
end function trexio_read_$group_dset$_low
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src f90 :tangle has_dset_str_front_fortran.f90
|
|
|
|
#+begin_src f90 :tangle has_dset_str_front_fortran.f90
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
integer function trexio_has_$group_dset$ (trex_file) bind(C)
|
|
|
|
integer(c_int32_t) function trexio_has_$group_dset$ (trex_file) bind(C)
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(c_int64_t), intent(in), value :: trex_file
|
|
|
|
end function trexio_has_$group_dset$
|
|
|
|
end function trexio_has_$group_dset$
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
@ -3421,8 +3421,8 @@ end interface
|
|
|
|
#+begin_src f90 :tangle helper_read_dset_str_front_fortran.fh_90
|
|
|
|
#+begin_src f90 :tangle helper_read_dset_str_front_fortran.fh_90
|
|
|
|
integer function trexio_read_$group_dset$ (trex_file, dset, max_str_len)
|
|
|
|
integer function trexio_read_$group_dset$ (trex_file, dset, max_str_len)
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(4), intent(in), value :: max_str_len
|
|
|
|
integer(4), intent(in), value :: max_str_len
|
|
|
|
character(len=*), intent(inout) :: dset(*)
|
|
|
|
character(len=*), intent(inout) :: dset(*)
|
|
|
|
|
|
|
|
|
|
|
|
character, allocatable :: str_compiled(:)
|
|
|
|
character, allocatable :: str_compiled(:)
|
|
|
@ -3452,7 +3452,7 @@ end interface
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(4), intent(in), value :: max_str_len
|
|
|
|
integer(4), intent(in), value :: max_str_len
|
|
|
|
character(len=*), intent(in) :: dset(*)
|
|
|
|
character(len=*), intent(in) :: dset(*)
|
|
|
|
|
|
|
|
|
|
|
|
character(len=:), allocatable :: str_compiled
|
|
|
|
character(len=:), allocatable :: str_compiled
|
|
|
|
integer(8) :: $group_dset_dim$
|
|
|
|
integer(8) :: $group_dset_dim$
|
|
|
@ -3705,33 +3705,33 @@ trexio_has_$group_str$ (trexio_t* const file)
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src f90 :tangle write_attr_str_front_fortran.f90
|
|
|
|
#+begin_src f90 :tangle write_attr_str_front_fortran.f90
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
integer function trexio_write_$group_str$_c (trex_file, str, max_str_len) &
|
|
|
|
integer(c_int32_t) function trexio_write_$group_str$_c (trex_file, str, max_str_len) &
|
|
|
|
bind(C, name="trexio_write_$group_str$")
|
|
|
|
bind(C, name="trexio_write_$group_str$")
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(c_int64_t), intent(in), value :: trex_file
|
|
|
|
character, intent(in) :: str(*)
|
|
|
|
character(kind=c_char), intent(in) :: str(*)
|
|
|
|
integer(4), intent(in), value :: max_str_len
|
|
|
|
integer(c_int32_t), intent(in), value :: max_str_len
|
|
|
|
end function trexio_write_$group_str$_c
|
|
|
|
end function trexio_write_$group_str$_c
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src f90 :tangle read_attr_str_front_fortran.f90
|
|
|
|
#+begin_src f90 :tangle read_attr_str_front_fortran.f90
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
integer function trexio_read_$group_str$_c (trex_file, str, max_str_len) &
|
|
|
|
integer(c_int32_t) function trexio_read_$group_str$_c (trex_file, str, max_str_len) &
|
|
|
|
bind(C, name="trexio_read_$group_str$")
|
|
|
|
bind(C, name="trexio_read_$group_str$")
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(c_int64_t), intent(in), value :: trex_file
|
|
|
|
character, intent(out) :: str(*)
|
|
|
|
character(kind=c_char), intent(out) :: str(*)
|
|
|
|
integer(4), intent(in), value :: max_str_len
|
|
|
|
integer(c_int32_t), intent(in), value :: max_str_len
|
|
|
|
end function trexio_read_$group_str$_c
|
|
|
|
end function trexio_read_$group_str$_c
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src f90 :tangle has_attr_str_front_fortran.f90
|
|
|
|
#+begin_src f90 :tangle has_attr_str_front_fortran.f90
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
integer function trexio_has_$group_str$ (trex_file) bind(C)
|
|
|
|
integer(c_int32_t) function trexio_has_$group_str$ (trex_file) bind(C)
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(c_int64_t), intent(in), value :: trex_file
|
|
|
|
end function trexio_has_$group_str$
|
|
|
|
end function trexio_has_$group_str$
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
@ -3754,7 +3754,7 @@ end interface
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(8), intent(in), value :: trex_file
|
|
|
|
integer(4), intent(in), value :: max_str_len
|
|
|
|
integer(4), intent(in), value :: max_str_len
|
|
|
|
character(len=*), intent(in) :: str
|
|
|
|
character(len=*), intent(in) :: str
|
|
|
|
|
|
|
|
|
|
|
|
character(len=len_trim(str)+1) :: str_c
|
|
|
|
character(len=len_trim(str)+1) :: str_c
|
|
|
|
|
|
|
|
|
|
|
@ -3864,7 +3864,7 @@ contains
|
|
|
|
character, intent(in), value :: mode
|
|
|
|
character, intent(in), value :: mode
|
|
|
|
integer(trexio_backend), intent(in), value :: backend
|
|
|
|
integer(trexio_backend), intent(in), value :: backend
|
|
|
|
integer(trexio_exit_code), intent(out) :: rc_open
|
|
|
|
integer(trexio_exit_code), intent(out) :: rc_open
|
|
|
|
character(len=len_trim(filename)+1) :: filename_c
|
|
|
|
character(len=len_trim(filename)+1) :: filename_c
|
|
|
|
integer(trexio_exit_code) :: rc
|
|
|
|
integer(trexio_exit_code) :: rc
|
|
|
|
|
|
|
|
|
|
|
|
filename_c = trim(filename) // c_null_char
|
|
|
|
filename_c = trim(filename) // c_null_char
|
|
|
@ -3910,7 +3910,7 @@ contains
|
|
|
|
integer, intent(in), value :: max_len_str ! maximum length of a string in an array
|
|
|
|
integer, intent(in), value :: max_len_str ! maximum length of a string in an array
|
|
|
|
character(len=*), intent(in) :: str_array(*)
|
|
|
|
character(len=*), intent(in) :: str_array(*)
|
|
|
|
character(len=:), allocatable, intent(out) :: str_res
|
|
|
|
character(len=:), allocatable, intent(out) :: str_res
|
|
|
|
integer :: i
|
|
|
|
integer(8) :: i
|
|
|
|
|
|
|
|
|
|
|
|
str_res = ''
|
|
|
|
str_res = ''
|
|
|
|
do i = 1, max_num_str
|
|
|
|
do i = 1, max_num_str
|
|
|
@ -3928,18 +3928,16 @@ contains
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
|
|
|
|
integer(8), intent(in), value :: max_num_str ! number of elements in strign array
|
|
|
|
integer(8), intent(in), value :: max_num_str ! number of elements in strign array
|
|
|
|
integer, intent(in), value :: max_len_str ! maximum length of a string in an array
|
|
|
|
integer, intent(in), value :: max_len_str ! maximum length of a string in an array
|
|
|
|
character, intent(in) :: str_flat(*)
|
|
|
|
character, intent(in) :: str_flat(*)
|
|
|
|
character(len=*), intent(inout) :: str_array(*)
|
|
|
|
character(len=*), intent(inout) :: str_array(*)
|
|
|
|
|
|
|
|
|
|
|
|
character(len=max_len_str) :: tmp_str
|
|
|
|
character(len=max_len_str) :: tmp_str
|
|
|
|
integer :: i, j, k, ind, offset
|
|
|
|
integer(8) :: len_flat, i, j, k, ind
|
|
|
|
integer(8) :: len_flat
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
len_flat = (max_len_str+1)*max_num_str + 1
|
|
|
|
len_flat = (max_len_str+1)*max_num_str + 1
|
|
|
|
|
|
|
|
|
|
|
|
ind=1
|
|
|
|
ind=1
|
|
|
|
offset=1
|
|
|
|
|
|
|
|
do i=1,max_num_str
|
|
|
|
do i=1,max_num_str
|
|
|
|
k = 1
|
|
|
|
k = 1
|
|
|
|
tmp_str=''
|
|
|
|
tmp_str=''
|
|
|
@ -3952,7 +3950,6 @@ contains
|
|
|
|
k = k + 1
|
|
|
|
k = k + 1
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
str_array(i)=tmp_str
|
|
|
|
str_array(i)=tmp_str
|
|
|
|
offset=ind
|
|
|
|
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
|
|
|
|
|
|
|
|
end subroutine trexio_str2strarray
|
|
|
|
end subroutine trexio_str2strarray
|
|
|
@ -3967,8 +3964,8 @@ contains
|
|
|
|
subroutine trexio_assert(trexio_rc, check_rc, success_message)
|
|
|
|
subroutine trexio_assert(trexio_rc, check_rc, success_message)
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
|
|
|
|
integer, intent(in), value :: trexio_rc
|
|
|
|
integer, intent(in), value :: trexio_rc
|
|
|
|
integer, intent(in), value :: check_rc
|
|
|
|
integer, intent(in), value :: check_rc
|
|
|
|
character(len=*), intent(in), optional :: success_message
|
|
|
|
character(len=*), intent(in), optional :: success_message
|
|
|
|
|
|
|
|
|
|
|
|
character*(128) :: str
|
|
|
|
character*(128) :: str
|
|
|
@ -3978,7 +3975,7 @@ contains
|
|
|
|
else
|
|
|
|
else
|
|
|
|
call trexio_string_of_error(trexio_rc, str)
|
|
|
|
call trexio_string_of_error(trexio_rc, str)
|
|
|
|
print *, trim(str)
|
|
|
|
print *, trim(str)
|
|
|
|
call exit(1)
|
|
|
|
error stop 1
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
end subroutine trexio_assert
|
|
|
|
end subroutine trexio_assert
|
|
|
|