1
1

Make some error messages more helpful

This commit was SVN r25209.
Этот коммит содержится в:
Rolf vandeVaart 2011-09-29 16:32:46 +00:00
родитель bb9e73232a
Коммит 3d8c6b83a9
2 изменённых файлов: 43 добавлений и 7 удалений

Просмотреть файл

@ -71,18 +71,33 @@ void mca_common_cuda_init(void)
mca_common_cuda_warning = OPAL_INT_TO_BOOL(value);
/* Check to see if this process is running in a CUDA context. If
* so, all is good. If not, then disable CUDA support. */
* so, all is good. If not, then disable registration of memory. */
res = cuCtxGetCurrent(&cuContext);
if (CUDA_SUCCESS != res) {
if (mca_common_cuda_warning) {
orte_show_help("help-mpi-common-cuda.txt", "cuCtxGetCurrent failed",
true, res);
/* Check for the not initialized error since we can make suggestions to
* user for this error. */
if (CUDA_ERROR_NOT_INITIALIZED == res) {
orte_show_help("help-mpi-common-cuda.txt", "cuCtxGetCurrent failed not initialized",
true);
} else {
orte_show_help("help-mpi-common-cuda.txt", "cuCtxGetCurrent failed",
true, res);
}
}
mca_common_cuda_enabled = false;
mca_common_cuda_register_memory = false;
} else if ((CUDA_SUCCESS == res) && (NULL == cuContext)) {
if (mca_common_cuda_warning) {
orte_show_help("help-mpi-common-cuda.txt", "cuCtxGetCurrent returned NULL",
true);
}
mca_common_cuda_enabled = false;
mca_common_cuda_register_memory = false;
initialized = true;
return;
} else {
/* All is good. mca_common_cuda_register_memory will retain its original
* value. Normally, that is 1, but the user can override it to disable
* registration of the internal buffers. */
mca_common_cuda_enabled = true;
opal_output_verbose(20, mca_common_cuda_output,
"CUDA: cuCtxGetCurrent succeeded");

Просмотреть файл

@ -7,11 +7,32 @@
#
# $HEADER$
#
[cuCtxGetCurrent failed not initialized]
WARNING: The call to cuCtxGetCurrent() failed while attempting to register
internal memory with the CUDA environment. The program will continue to run,
but the performance of GPU memory transfers may be reduced. This failure
indicates that the CUDA environment is not yet initialized. To eliminate
this warning, ensure that CUDA is initialized prior to calling MPI_Init.
NOTE: You can turn off this warning by setting the MCA parameter
mpi_common_cuda_warning to 0.
#
[cuCtxGetCurrent failed]
WARNING: The call to cuCtxGetCurrent() failed while initializing the
CUDA support. Support for CUDA registered memory is disabled.
WARNING: The call to cuCtxGetCurrent() failed while attempting to register
internal memory with the CUDA environment. The program will continue to run,
but the performance of GPU memory transfers may be reduced.
cuCtxGetCurrent return value: %d
NOTE: You can turn off this warning by setting the MCA parameter
mpi_common_cuda_warning to 0.
#
[cuCtxGetCurrent returned NULL]
WARNING: The call to cuCtxGetCurrent() failed while attempting to register
internal memory with the CUDA environment. The program will continue to run,
but the performance of GPU memory transfers may be reduced. This failure
indicates that there is no CUDA context yet. To eliminate this warning,
ensure that there is a CUDA context prior to calling MPI_Init.
NOTE: You can turn off this warning by setting the MCA parameter
mpi_common_cuda_warning to 0.
#