Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
elpa
elpa
Commits
deadeaf7
Commit
deadeaf7
authored
Mar 23, 2021
by
Andreas Marek
Browse files
Add verbose flag to api
parent
3d87fe1f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/elpa_index.c
View file @
deadeaf7
...
...
@@ -137,6 +137,7 @@ static int nev_is_valid(elpa_index_t index, int n, int new_value);
static
int
bw_is_valid
(
elpa_index_t
index
,
int
n
,
int
new_value
);
static
int
output_build_config_is_valid
(
elpa_index_t
index
,
int
n
,
int
new_value
);
static
int
gpu_is_valid
(
elpa_index_t
index
,
int
n
,
int
new_value
);
static
int
verbose_is_valid
(
elpa_index_t
index
,
int
n
,
int
new_value
);
static
int
skewsymmetric_is_valid
(
elpa_index_t
index
,
int
n
,
int
new_value
);
static
int
is_positive
(
elpa_index_t
index
,
int
n
,
int
new_value
);
...
...
@@ -211,6 +212,8 @@ static const elpa_index_int_entry_t int_entries[] = {
INT_ANY_ENTRY
(
"mpi_comm_cols"
,
"Communicator for inter-column communication"
,
PRINT_NO
),
INT_ANY_ENTRY
(
"mpi_comm_parent"
,
"Parent communicator"
,
PRINT_NO
),
INT_ANY_ENTRY
(
"blacs_context"
,
"BLACS context"
,
PRINT_NO
),
INT_ENTRY
(
"verbose"
,
"ELPA API prints verbose messages"
,
0
,
ELPA_AUTOTUNE_NOT_TUNABLE
,
ELPA_AUTOTUNE_DOMAIN_ANY
,
\
cardinality_bool
,
enumerate_identity
,
verbose_is_valid
,
NULL
,
PRINT_YES
),
//#ifdef REDISTRIBUTE_MATRIX
INT_ENTRY
(
"internal_nblk"
,
"Internally used block size of scalapack block-cyclic distribution"
,
0
,
ELPA_AUTOTUNE_FAST
,
ELPA_AUTOTUNE_DOMAIN_ANY
,
\
internal_nblk_cardinality
,
internal_nblk_enumerate
,
internal_nblk_is_valid
,
NULL
,
PRINT_YES
),
...
...
@@ -360,8 +363,10 @@ FOR_ALL_TYPES(IMPLEMENT_FIND_ENTRY)
if (elpa_##TYPE##_value_to_string(TYPE##_entries[n].base.name, *value, &value_string) == ELPA_OK) { \
if (!(index->TYPE##_options.notified[n] & notify_flag)) { \
if (elpa_index_is_printing_mpi_rank(index)) { \
if (elpa_index_int_value_is_set(index, "verbose")) { \
fprintf(stderr, "ELPA: %s '%s' is set to %s due to environment variable %s\n", \
error_string, TYPE##_entries[n].base.name, value_string, env_variable); \
} \
} \
index->TYPE##_options.notified[n] |= notify_flag; \
} \
...
...
@@ -861,6 +866,10 @@ static int gpu_is_valid(elpa_index_t index, int n, int new_value) {
return
new_value
==
0
||
new_value
==
1
;
}
static
int
verbose_is_valid
(
elpa_index_t
index
,
int
n
,
int
new_value
)
{
return
new_value
==
0
||
new_value
==
1
;
}
static
int
skewsymmetric_is_valid
(
elpa_index_t
index
,
int
n
,
int
new_value
)
{
return
new_value
==
0
||
new_value
==
1
;
}
...
...
@@ -1572,6 +1581,8 @@ int elpa_index_is_printing_mpi_rank(elpa_index_t index)
process_id
=
elpa_index_get_int_value
(
index
,
"process_id"
,
NULL
);
return
(
process_id
==
0
);
}
printf
(
"Warning: process_id not set, printing on all MPI ranks. This can happen with legacy API."
);
if
(
elpa_index_int_value_is_set
(
index
,
"verbose"
))
{
printf
(
"Warning: process_id not set, printing on all MPI ranks. This can happen with legacy API."
);
}
return
1
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment