Silence coverity warnings, remove/ignore build product
Signed-off-by: Ralph Castain <rhc@open-mpi.org>
Этот коммит содержится в:
родитель
259d9bd4fe
Коммит
3b2390e5d5
1
.gitignore
поставляемый
1
.gitignore
поставляемый
@ -181,6 +181,7 @@ ompi/mca/io/romio314/romio/test/misc.c
|
||||
ompi/mca/io/romio314/romio/test/pfcoll_test.f
|
||||
ompi/mca/io/romio314/romio/test/runtests
|
||||
ompi/mca/io/romio314/romio/util/romioinstall
|
||||
ompi/mca/io/romio321/romio/test/syshints.c
|
||||
|
||||
ompi/mca/osc/monitoring/osc_monitoring_template_gen.h
|
||||
|
||||
|
@ -25,7 +25,7 @@ AM_FFLAGS = $(USER_FFLAGS)
|
||||
CTESTS = simple perf async coll_test coll_perf misc file_info excl large_array \
|
||||
atomicity noncontig i_noncontig noncontig_coll split_coll shared_fp \
|
||||
large_file psimple error status noncontig_coll2 aggregation1 aggregation2 \
|
||||
async-multiple ordered_fp hindexed external32 types_with_zeros darray_read syshints
|
||||
async-multiple ordered_fp hindexed external32 types_with_zeros darray_read
|
||||
FTESTS = fcoll_test fperf fmisc pfcoll_test
|
||||
|
||||
|
||||
@ -40,4 +40,3 @@ fmisc_SOURCES = fmisc.f
|
||||
pfcoll_test_SOURCES = pfcoll_test.f
|
||||
|
||||
endif BUILD_F77_TESTS
|
||||
|
||||
|
@ -1,59 +0,0 @@
|
||||
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
|
||||
/*
|
||||
* (C) 2015 by Argonne National Laboratory.
|
||||
* See COPYRIGHT in top-level directory.
|
||||
*/
|
||||
|
||||
#include <mpi.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
static void handle_error(int errcode, const char *str)
|
||||
{
|
||||
char msg[MPI_MAX_ERROR_STRING];
|
||||
int resultlen;
|
||||
MPI_Error_string(errcode, msg, &resultlen);
|
||||
fprintf(stderr, "%s: %s\n", str, msg);
|
||||
MPI_Abort(MPI_COMM_WORLD, 1);
|
||||
}
|
||||
|
||||
#define CHECK(fn) {int errcode; errcode = (fn); if (errcode != MPI_SUCCESS) handle_error(errcode, #fn); }
|
||||
|
||||
static int hint_check(MPI_Info info_used, const char * key, const char *expected) {
|
||||
char value[MPI_MAX_INFO_VAL+1];
|
||||
int flag;
|
||||
|
||||
CHECK(MPI_Info_get(info_used, key, MPI_MAX_INFO_VAL, value, &flag));
|
||||
if (strcmp(expected, value) ){
|
||||
fprintf(stderr, "expected value \"%s\" for key \"%s\" got \"%s\"\n",
|
||||
expected, key, value);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
setenv("ROMIO_HINTS", argv[1], 1);
|
||||
MPI_File fh;
|
||||
MPI_Info info_used, info_mine;
|
||||
int nr_errors=0;
|
||||
|
||||
MPI_Init(&argc, &argv);
|
||||
MPI_Info_create(&info_mine);
|
||||
MPI_Info_set(info_mine, "romio_cb_read", "disable");
|
||||
CHECK(MPI_File_open(MPI_COMM_WORLD, argv[1], MPI_MODE_RDONLY, info_mine, &fh));
|
||||
CHECK(MPI_File_get_info(fh, &info_used));
|
||||
|
||||
nr_errors += hint_check(info_used, "ind_rd_buffer_size", "49");
|
||||
nr_errors += hint_check(info_used, "romio_no_indep_rw", "true");
|
||||
|
||||
if (nr_errors == 0) printf(" No Errors\n");
|
||||
|
||||
CHECK(MPI_Info_free(&info_mine));
|
||||
CHECK(MPI_Info_free(&info_used));
|
||||
CHECK(MPI_File_close(&fh));
|
||||
MPI_Finalize();
|
||||
return nr_errors;
|
||||
}
|
@ -507,7 +507,7 @@ static int bind_to_cpuset(orte_job_t *jdata)
|
||||
char *cpu_bitmap;
|
||||
unsigned id;
|
||||
orte_local_rank_t lrank;
|
||||
hwloc_bitmap_t mycpuset;
|
||||
hwloc_bitmap_t mycpuset, tset;
|
||||
|
||||
opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
|
||||
"mca:rmaps: bind job %s to cpus %s",
|
||||
@ -541,6 +541,7 @@ static int bind_to_cpuset(orte_job_t *jdata)
|
||||
continue;
|
||||
}
|
||||
orte_show_help("help-orte-rmaps-base.txt", "rmaps:cpubind-not-supported", true, node->name);
|
||||
hwloc_bitmap_free(mycpuset);
|
||||
return ORTE_ERR_SILENT;
|
||||
}
|
||||
/* check if topology supports membind - have to be careful here
|
||||
@ -557,6 +558,7 @@ static int bind_to_cpuset(orte_job_t *jdata)
|
||||
membind_warned = true;
|
||||
} else if (OPAL_HWLOC_BASE_MBFA_ERROR == opal_hwloc_base_mbfa) {
|
||||
orte_show_help("help-orte-rmaps-base.txt", "rmaps:membind-not-supported-fatal", true, node->name);
|
||||
hwloc_bitmap_free(mycpuset);
|
||||
return ORTE_ERR_SILENT;
|
||||
}
|
||||
}
|
||||
@ -565,12 +567,14 @@ static int bind_to_cpuset(orte_job_t *jdata)
|
||||
if (NULL == root->userdata) {
|
||||
/* something went wrong */
|
||||
ORTE_ERROR_LOG(ORTE_ERR_NOT_FOUND);
|
||||
hwloc_bitmap_free(mycpuset);
|
||||
return ORTE_ERR_NOT_FOUND;
|
||||
}
|
||||
sum = (opal_hwloc_topo_data_t*)root->userdata;
|
||||
if (NULL == sum->available) {
|
||||
/* another error */
|
||||
ORTE_ERROR_LOG(ORTE_ERR_NOT_FOUND);
|
||||
hwloc_bitmap_free(mycpuset);
|
||||
return ORTE_ERR_NOT_FOUND;
|
||||
}
|
||||
/* the cpu list in sum->available has already been filtered
|
||||
@ -599,15 +603,17 @@ static int bind_to_cpuset(orte_job_t *jdata)
|
||||
/* ran out of cpus - that's an error */
|
||||
orte_show_help("help-orte-rmaps-base.txt", "rmaps:insufficient-cpus", true,
|
||||
node->name, (int)proc->local_rank, opal_hwloc_base_cpu_list);
|
||||
hwloc_bitmap_free(mycpuset);
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
/* set the bit of interest */
|
||||
hwloc_bitmap_only(mycpuset, id);
|
||||
tset = mycpuset;
|
||||
} else {
|
||||
/* bind the proc to all assigned cpus */
|
||||
mycpuset = sum->available;
|
||||
tset = sum->available;
|
||||
}
|
||||
hwloc_bitmap_list_asprintf(&cpu_bitmap, mycpuset);
|
||||
hwloc_bitmap_list_asprintf(&cpu_bitmap, tset);
|
||||
orte_set_attribute(&proc->attributes, ORTE_PROC_CPU_BITMAP, ORTE_ATTR_GLOBAL, cpu_bitmap, OPAL_STRING);
|
||||
if (NULL != cpu_bitmap) {
|
||||
free(cpu_bitmap);
|
||||
|
@ -1081,6 +1081,7 @@ void pmix_server_log_fn(opal_process_name_t *requestor,
|
||||
/* we cannot directly execute the callback here
|
||||
* as it would threadlock - so shift to somewhere
|
||||
* safe */
|
||||
rc = ORTE_SUCCESS; // unused - silence compiler warning
|
||||
ORTE_PMIX_THREADSHIFT(requestor, NULL, rc,
|
||||
NULL, NULL, lgcbfn,
|
||||
cbfunc, cbdata);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user