Commit 3574cf85 authored by Andreas Marek's avatar Andreas Marek
Browse files

If matrix is already banded, make sure that bandwidth is >=2, otherwise abort

parent 495db217
......@@ -215,7 +215,7 @@ static const elpa_index_int_entry_t int_entries[] = {
INT_PARAMETER_ENTRY("num_process_rows", "Number of process row number in the 2D domain decomposition", NULL, PRINT_STRUCTURE),
INT_PARAMETER_ENTRY("num_process_cols", "Number of process column number in the 2D domain decomposition", NULL, PRINT_STRUCTURE),
INT_PARAMETER_ENTRY("num_processes", "Total number of processes", NULL, PRINT_STRUCTURE),
INT_PARAMETER_ENTRY("bandwidth", "If specified, a band matrix with this bandwidth is expected as input; bandwidth must be multiply of nblk", bw_is_valid, PRINT_YES),
INT_PARAMETER_ENTRY("bandwidth", "If specified, a band matrix with this bandwidth is expected as input; bandwidth must be multiply of nblk and at least 2", bw_is_valid, PRINT_YES),
INT_ANY_ENTRY("mpi_comm_rows", "Communicator for inter-row communication", PRINT_NO),
INT_ANY_ENTRY("mpi_comm_cols", "Communicator for inter-column communication", PRINT_NO),
INT_ANY_ENTRY("mpi_comm_parent", "Parent communicator", PRINT_NO),
......@@ -903,7 +903,7 @@ static int bw_is_valid(elpa_index_t index, int n, int new_value) {
}
na = elpa_index_get_int_value(index, "na", NULL);
return (0 <= new_value) && (new_value < na);
return (2 <= new_value) && (new_value < na);
}
static int output_build_config_is_valid(elpa_index_t index, int n, int new_value) {
......
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