1
1

usnic: show_help if we can't create the connectivity map file

QA ran across the case where the user can't write to the target
directory for the connectivity map file.  In this case, we silently
continued.  They requested that we at least warn in this case.

Fixes Cisco bug CSCup62821

Reviewed by Dave Goodell

cmr=v1.8.2:reviewer=ompi-rm1.8

This commit was SVN r32283.
Этот коммит содержится в:
Jeff Squyres 2014-07-22 20:50:59 +00:00
родитель 74852b4d21
Коммит ac2621debf
2 изменённых файлов: 23 добавлений и 1 удалений

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

@ -10,6 +10,10 @@
#include "ompi_config.h"
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "opal/util/show_help.h"
#include "btl_usnic.h"
#include "btl_usnic_util.h"
@ -246,7 +250,15 @@ void ompi_btl_usnic_connectivity_map(void)
fp = fopen(filename, "w");
if (NULL == fp) {
/* JMS abort? */
char dirname[PATH_MAX];
getcwd(dirname, sizeof(dirname));
dirname[sizeof(dirname) - 1] = '\0';
opal_show_help("help-mpi-btl-usnic.txt", "cannot write to map file",
true,
ompi_process_info.nodename,
filename,
dirname,
strerror(errno), errno);
return;
}

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

@ -282,3 +282,13 @@ may exist for other peer pairs, too.
NOTE: You can set the MCA param btl_usnic_show_route_failures to 0 to
disable this warning.
#
[cannot write to map file]
WARNING: The usnic BTL was unable to open the requested output
connectivity map file. Your job will continue, but this output
connectivity map file will not be written.
Local server: %s
Output map file: %s
Working directory: %s
Error: %s (%d)