From 375162c69326bf030b0169159f704dcd38903817 Mon Sep 17 00:00:00 2001 From: Samuel Gutierrez Date: Mon, 28 Nov 2011 23:41:19 +0000 Subject: [PATCH] this commit fixes a few things. 1. silence warning in common sm. 2. remove unneeded config code in common sm. 3. move opal_shmem_base_close to a better place in opal_finalize. 4. fix opal_path_nfs output. This commit was SVN r25518. --- ompi/mca/common/sm/common_sm.c | 2 +- ompi/mca/common/sm/configure.m4 | 16 +--------------- opal/mca/shmem/mmap/shmem_mmap_module.c | 3 +-- opal/runtime/opal_finalize.c | 8 ++++---- 4 files changed, 7 insertions(+), 22 deletions(-) diff --git a/ompi/mca/common/sm/common_sm.c b/ompi/mca/common/sm/common_sm.c index b163694137..f7ef20dd81 100644 --- a/ompi/mca/common/sm/common_sm.c +++ b/ompi/mca/common/sm/common_sm.c @@ -138,7 +138,7 @@ attach_and_init(const char *file_name, * seg_num_procs_attached_and_inited. this value is used by * opal_shmem_unlink. */ - opal_atomic_add_size_t(&map->module_seg->seg_num_procs_inited, 1); + (void)opal_atomic_add_size_t(&map->module_seg->seg_num_procs_inited, 1); opal_atomic_wmb(); return map; diff --git a/ompi/mca/common/sm/configure.m4 b/ompi/mca/common/sm/configure.m4 index 366cda3601..515d513fbd 100644 --- a/ompi/mca/common/sm/configure.m4 +++ b/ompi/mca/common/sm/configure.m4 @@ -20,25 +20,11 @@ # $HEADER$ # -# MCA_common_sm_POST_CONFIG([should_build]) -# ------------------------------------------ -AC_DEFUN([MCA_ompi_common_sm_POST_CONFIG], [ - AM_CONDITIONAL([COMMON_SM_BUILD_WINDOWS], - [test $1 -eq 1 -a "x$common_sm_build_windows" = "x1"]) -])dnl - # MCA_ompi_common_sm_CONFIG([action-if-can-compile], # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_ompi_common_sm_CONFIG], [ AC_CONFIG_FILES([ompi/mca/common/sm/Makefile]) - - # Are we building on Windows? - AC_CHECK_FUNC(CreateFileMapping, - [common_sm_build_windows=1], - [common_sm_build_windows=0]) - AC_DEFINE_UNQUOTED([MCA_COMMON_SM_WINDOWS], - [$common_sm_build_windows], - [Whether we have shared memory support for Windows or not]) + $1 ])dnl diff --git a/opal/mca/shmem/mmap/shmem_mmap_module.c b/opal/mca/shmem/mmap/shmem_mmap_module.c index 0e96e0ada9..b47d743a6d 100644 --- a/opal/mca/shmem/mmap/shmem_mmap_module.c +++ b/opal/mca/shmem/mmap/shmem_mmap_module.c @@ -243,7 +243,6 @@ segment_create(opal_shmem_ds_t *ds_buf, size_t size) { int rc = OPAL_SUCCESS; - char *tmp_fn = NULL; char *real_file_name = NULL; pid_t my_pid = getpid(); /* the real size of the shared memory segment. this includes enough space @@ -312,7 +311,7 @@ segment_create(opal_shmem_ds_t *ds_buf, gethostname(hn, MAXHOSTNAMELEN - 1); hn[MAXHOSTNAMELEN - 1] = '\0'; opal_show_help("help-opal-shmem-mmap.txt", "mmap on nfs", 1, hn, - tmp_fn); + real_file_name); } if (-1 == (ds_buf->seg_id = open(real_file_name, O_CREAT | O_RDWR, 0600))) { int err = errno; diff --git a/opal/runtime/opal_finalize.c b/opal/runtime/opal_finalize.c index 1c2fca3372..e3dad9ff71 100644 --- a/opal/runtime/opal_finalize.c +++ b/opal/runtime/opal_finalize.c @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2010 Los Alamos National Security, LLC. + * Copyright (c) 2010-2011 Los Alamos National Security, LLC. * All rights reserved. * $COPYRIGHT$ * @@ -126,9 +126,6 @@ opal_finalize(void) opal_compress_base_close(); #endif - /* close the shmem framework */ - opal_shmem_base_close(); - opal_progress_finalize(); opal_event_base_close(); @@ -150,6 +147,9 @@ opal_finalize(void) /* close the carto framework */ opal_carto_base_close(); + + /* close the shmem framework */ + opal_shmem_base_close(); /* close the hwloc framework */ opal_hwloc_base_close();