Commit 5d359402 authored by Andreas Marek's avatar Andreas Marek

Rename the procedures to store, load, and print

parent e65de0e4
......@@ -153,9 +153,9 @@ module elpa_api
elpa_solve_tridiagonal_d, & !< matrix
elpa_solve_tridiagonal_f
procedure(print_all_parameters_i), deferred, public :: print_all_parameters !< method to print all parameters
procedure(save_all_parameters_i), deferred, public :: save_all_parameters !< method to save all parameters
procedure(load_all_parameters_i), deferred, public :: load_all_parameters !< method to save all parameters
procedure(print_settings_i), deferred, public :: print_settings !< method to print all parameters
procedure(store_settings_i), deferred, public :: store_settings !< method to save all parameters
procedure(load_settings_i), deferred, public :: load_settings !< method to save all parameters
#ifdef ENABLE_AUTOTUNING
! Auto-tune
procedure(elpa_autotune_setup_i), deferred, public :: autotune_setup !< method to prepare the ELPA autotuning
......@@ -252,27 +252,27 @@ module elpa_api
end function
end interface
!> \brief abstract definition of the print_all_parameters method
!> \brief abstract definition of the print_settings method
!> Parameters
!> \details
!> \param self class(elpa_t): the ELPA object
!> Prints all the elpa parameters
abstract interface
subroutine print_all_parameters_i(self)
subroutine print_settings_i(self)
import elpa_t
implicit none
class(elpa_t), intent(inout) :: self
end subroutine
end interface
!> \brief abstract definition of the save_all_parameters method
!> \brief abstract definition of the store_settings method
!> Parameters
!> \details
!> \param self class(elpa_t): the ELPA object
!> \param file_name string, the name of the file where to save the parameters
!> Saves all the elpa parameters
abstract interface
subroutine save_all_parameters_i(self, file_name)
subroutine store_settings_i(self, file_name)
import elpa_t
implicit none
class(elpa_t), intent(inout) :: self
......@@ -280,14 +280,14 @@ module elpa_api
end subroutine
end interface
!> \brief abstract definition of the load_all_parameters method
!> \brief abstract definition of the load_settings method
!> Parameters
!> \details
!> \param self class(elpa_t): the ELPA object
!> \param file_name string, the name of the file from which to load the parameters
!> Loads all the elpa parameters
abstract interface
subroutine load_all_parameters_i(self, file_name)
subroutine load_settings_i(self, file_name)
import elpa_t
implicit none
class(elpa_t), intent(inout) :: self
......
......@@ -155,9 +155,9 @@ module elpa_impl
procedure, private :: elpa_transform_back_generalized_fc
#endif
procedure, public :: print_all_parameters => elpa_print_all_parameters
procedure, public :: save_all_parameters => elpa_save_all_parameters
procedure, public :: load_all_parameters => elpa_load_all_parameters
procedure, public :: print_settings => elpa_print_settings
procedure, public :: store_settings => elpa_store_settings
procedure, public :: load_all_settings => elpa_load_settings
#ifdef ENABLE_AUTOTUNING
procedure, public :: autotune_setup => elpa_autotune_setup
procedure, public :: autotune_step => elpa_autotune_step
......@@ -1106,12 +1106,12 @@ module elpa_impl
!> \brief function to print all the parameters, that have been set
!> Parameters
!> \param self class(elpa_impl_t) the allocated ELPA object
subroutine elpa_print_all_parameters(self)
subroutine elpa_print_settings(self)
implicit none
class(elpa_impl_t), intent(inout) :: self
if (elpa_index_print_all_parameters_c(self%index, c_null_char) /= 1) then
stop "This should not happen (in elpa_print_all_parameters())"
if (elpa_index_print_settings_c(self%index, c_null_char) /= 1) then
stop "This should not happen (in elpa_print_settings())"
endif
end subroutine
......@@ -1119,13 +1119,13 @@ module elpa_impl
!> Parameters
!> \param self class(elpa_impl_t) the allocated ELPA object
!> \param file_name string, the name of the file where to save the parameters
subroutine elpa_save_all_parameters(self, file_name)
subroutine elpa_store_settings(self, file_name)
implicit none
class(elpa_impl_t), intent(inout) :: self
character(*), intent(in) :: file_name
if (elpa_index_print_all_parameters_c(self%index, file_name // c_null_char) /= 1) then
stop "This should not happen (in elpa_save_all_parameters())"
if (elpa_index_print_settings_c(self%index, file_name // c_null_char) /= 1) then
stop "This should not happen (in elpa_store_settings())"
endif
end subroutine
......@@ -1133,13 +1133,13 @@ module elpa_impl
!> Parameters
!> \param self class(elpa_impl_t) the allocated ELPA object
!> \param file_name string, the name of the file from which to load the parameters
subroutine elpa_load_all_parameters(self, file_name)
subroutine elpa_load_settings(self, file_name)
implicit none
class(elpa_impl_t), intent(inout) :: self
character(*), intent(in) :: file_name
if (elpa_index_load_all_parameters_c(self%index, file_name // c_null_char) /= 1) then
stop "This should not happen (in elpa_load_all_parameters())"
if (elpa_index_load_settings_c(self%index, file_name // c_null_char) /= 1) then
stop "This should not happen (in elpa_load_settings())"
endif
end subroutine
......
// This file is part of ELPA.
settings// This file is part of ELPA.
//
// The ELPA library was originally created by the ELPA consortium,
// consisting of the following organizations:
......@@ -1303,7 +1303,7 @@ const char STRUCTURE_PARAMETERS[] = "* Parameters describing structure of the co
const char EXPLICIT_PARAMETERS[] = "* Parameters explicitly set by the user:\n";
const char DEFAULT_PARAMETERS[] = "* Parameters with default or environment value:\n";
int elpa_index_print_all_parameters(elpa_index_t index, char *file_name) {
int elpa_index_print_settings(elpa_index_t index, char *file_name) {
const int LEN =10000;
char out_structure[LEN], out_set[LEN], out_defaults[LEN], out_nowhere[LEN], buff[100];
char (*out)[LEN];
......@@ -1331,7 +1331,7 @@ int elpa_index_print_all_parameters(elpa_index_t index, char *file_name) {
if(output_to_file) {
f = fopen(file_name, "w");
if(f == NULL){
fprintf(stderr, "Cannot open file %s in elpa_index_print_all_parameters\n", file_name);
fprintf(stderr, "Cannot open file %s in elpa_index_print_settings\n", file_name);
return 0;
}
}
......@@ -1349,7 +1349,7 @@ int elpa_index_print_all_parameters(elpa_index_t index, char *file_name) {
return 1;
}
int elpa_index_load_all_parameters(elpa_index_t index, char *file_name) {
int elpa_index_load_settings(elpa_index_t index, char *file_name) {
const int LEN = 1000;
char line[LEN], s[LEN];
int n;
......
......@@ -437,8 +437,8 @@ int elpa_index_print_autotune_parameters(elpa_index_t index, int autotune_level,
/*
!f> interface
!f> function elpa_index_print_all_parameters_c(index, file_name) result(success) &
!f> bind(C, name="elpa_index_print_all_parameters")
!f> function elpa_index_print_settings_c(index, file_name) result(success) &
!f> bind(C, name="elpa_index_print_settings")
!f> import c_int, c_ptr, c_char
!f> type(c_ptr), intent(in), value :: index
!f> character(kind=c_char), intent(in) :: file_name(*)
......@@ -447,12 +447,12 @@ int elpa_index_print_autotune_parameters(elpa_index_t index, int autotune_level,
!f> end interface
!f>
*/
int elpa_index_print_all_parameters(elpa_index_t index, char* filename);
int elpa_index_print_settings(elpa_index_t index, char* filename);
/*
!f> interface
!f> function elpa_index_load_all_parameters_c(index, file_name) result(success) &
!f> bind(C, name="elpa_index_load_all_parameters")
!f> function elpa_index_load_settings_c(index, file_name) result(success) &
!f> bind(C, name="elpa_index_load_settings")
!f> import c_int, c_ptr, c_char
!f> type(c_ptr), intent(in), value :: index
!f> character(kind=c_char), intent(in) :: file_name(*)
......@@ -461,7 +461,7 @@ int elpa_index_print_all_parameters(elpa_index_t index, char* filename);
!f> end interface
!f>
*/
int elpa_index_load_all_parameters(elpa_index_t index, char* filename);
int elpa_index_load_settings(elpa_index_t index, char* filename);
/*
!f> interface
......
......@@ -604,7 +604,7 @@ program test
! print all parameters
call e%print_all_parameters()
call e%print_settings()
#ifdef TEST_ALL_KERNELS
call e%timer_start(elpa_int_value_to_string(KERNEL_KEY, kernel))
......
......@@ -219,8 +219,8 @@ program test
do while (e%autotune_step(tune_state))
iter=iter+1
write(iter_string,'(I5.5)') iter
!call e%print_all_parameters()
!call e%save_all_parameters("saved_parameters_"//trim(iter_string)//".txt")
!call e%print_settings()
!call e%store_settings("saved_parameters_"//trim(iter_string)//".txt")
call e%timer_start("eigenvectors: iteration "//trim(iter_string))
call e%eigenvectors(a, ev, z, error)
call e%timer_stop("eigenvectors: iteration "//trim(iter_string))
......
......@@ -190,19 +190,19 @@ program test
assert_elpa_ok(e1%setup())
call e1%save_all_parameters("initial_parameters.txt")
call e1%store_settings("initial_parameters.txt")
! try to load parameters into another object
e2 => elpa_allocate()
call set_basic_params(e2, na, nev, na_rows, na_cols, my_prow, my_pcol)
call e2%load_all_parameters("initial_parameters.txt")
call e2%load_settings("initial_parameters.txt")
assert_elpa_ok(e2%setup())
if(myid == 0) print *, "parameters of e1"
call e1%print_all_parameters()
call e1%print_settings()
if(myid == 0) print *, ""
if(myid == 0) print *, "parameters of e2"
call e2%print_all_parameters()
call e2%print_settings()
e_ptr => e2
......@@ -214,8 +214,8 @@ program test
do while (e_ptr%autotune_step(tune_state))
iter=iter+1
write(iter_string,'(I5.5)') iter
call e_ptr%print_all_parameters()
call e_ptr%save_all_parameters("saved_parameters_"//trim(iter_string)//".txt")
call e_ptr%print_settings()
call e_ptr%store_settings("saved_parameters_"//trim(iter_string)//".txt")
call e_ptr%timer_start("eigenvectors: iteration "//trim(iter_string))
call e_ptr%eigenvectors(a, ev, z, error)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment