cuda: add option to remove warning about missing libcuda.
Signed-off-by: Sylvain Jeaugey <sjeaugey@nvidia.com>
Этот коммит содержится в:
родитель
385d91bbd2
Коммит
4eb75623ef
@ -429,8 +429,10 @@ int mca_common_cuda_stage_one_init(void)
|
||||
|
||||
if (true != stage_one_init_passed) {
|
||||
errmsg = opal_argv_join(errmsgs, '\n');
|
||||
opal_show_help("help-mpi-common-cuda.txt", "dlopen failed", true,
|
||||
errmsg);
|
||||
if (opal_warn_on_missing_libcuda) {
|
||||
opal_show_help("help-mpi-common-cuda.txt", "dlopen failed", true,
|
||||
errmsg);
|
||||
}
|
||||
opal_cuda_support = 0;
|
||||
}
|
||||
opal_argv_free(errmsgs);
|
||||
|
@ -166,7 +166,7 @@ The library attempted to open the following supporting CUDA libraries,
|
||||
but each of them failed. CUDA-aware support is disabled.
|
||||
%s
|
||||
If you are not interested in CUDA-aware support, then run with
|
||||
--mca mpi_cuda_support 0 to suppress this message. If you are interested
|
||||
--mca opal_warn_on_missing_libcuda 0 to suppress this message. If you are interested
|
||||
in CUDA-aware support, then try setting LD_LIBRARY_PATH to the location
|
||||
of libcuda.so.1 to get passed this issue.
|
||||
#
|
||||
|
@ -61,6 +61,7 @@ bool opal_timing_overhead = true;
|
||||
|
||||
bool opal_built_with_cuda_support = OPAL_INT_TO_BOOL(OPAL_CUDA_SUPPORT);
|
||||
bool opal_cuda_support = false;
|
||||
bool opal_warn_on_missing_libcuda = true;
|
||||
#if OPAL_ENABLE_FT_CR == 1
|
||||
bool opal_base_distill_checkpoint_ready = false;
|
||||
#endif
|
||||
@ -245,6 +246,16 @@ int opal_register_params(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
opal_warn_on_missing_libcuda = true;
|
||||
ret = mca_base_var_register ("opal", "opal", NULL, "warn_on_missing_libcuda",
|
||||
"Whether to print a message when CUDA support is enabled but libcuda is not found",
|
||||
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
|
||||
OPAL_INFO_LVL_3, MCA_BASE_VAR_SCOPE_ALL_EQ,
|
||||
&opal_warn_on_missing_libcuda);
|
||||
if (0 > ret) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Leave pinned parameter */
|
||||
opal_leave_pinned = -1;
|
||||
ret = mca_base_var_register("ompi", "mpi", NULL, "leave_pinned",
|
||||
|
@ -48,6 +48,11 @@ OPAL_DECLSPEC extern bool opal_built_with_cuda_support;
|
||||
* */
|
||||
OPAL_DECLSPEC extern bool opal_cuda_support;
|
||||
|
||||
/**
|
||||
* * Whether we want to warn the user when libcuda is missing.
|
||||
* */
|
||||
OPAL_DECLSPEC extern bool opal_warn_on_missing_libcuda;
|
||||
|
||||
/**
|
||||
* Whether to use the "leave pinned" protocol or not (0 = no, 1 = yes,
|
||||
* -1 = determine at runtime).
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user