From 6fbbfd0f7a8384cdddb14d64f8f2d0bab5a5246c Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Tue, 29 Nov 2011 23:24:52 +0000 Subject: [PATCH] Gah! r25545 acidentally included ''waaaay'' more stuff than it was supposed to. I.e., half-baked/not complete stuff. This commit backs out all of r25545. Sorry folks! This commit was SVN r25546. The following SVN revision numbers were found above: r25545 --> open-mpi/ompi@7f9ae11fafc74d1c5f0764eecf13dd4bd3d7d47b --- ompi/config/ompi_setup_f77.m4 | 31 ------------------- ompi/mca/pml/v/pml_v_output.c | 3 +- ompi/mpi/c/get_processor_name.c | 16 ++-------- ompi/runtime/ompi_mpi_abort.c | 3 +- ompi/runtime/ompi_mpi_finalize.c | 3 +- opal/mca/base/mca_base_component_find.c | 3 +- opal/mca/base/mca_base_open.c | 3 +- opal/mca/hwloc/base/hwloc_base_open.c | 5 ++- .../memory/linux/memory_linux_ummunotify.c | 3 +- opal/mca/pstat/test/pstat_test.c | 3 +- opal/mca/shmem/mmap/shmem_mmap_module.c | 21 ++++++------- .../shmem/posix/shmem_posix_common_utils.c | 3 +- opal/mca/shmem/posix/shmem_posix_component.c | 3 +- opal/mca/shmem/posix/shmem_posix_module.c | 17 +++++----- opal/mca/shmem/sysv/shmem_sysv_module.c | 11 +++---- opal/mca/shmem/windows/shmem_windows_module.c | 13 ++++---- opal/util/Makefile.am | 4 +-- opal/util/output.c | 5 ++- opal/util/stacktrace.c | 3 +- orte/orted/orted_main.c | 3 +- orte/util/proc_info.c | 3 +- 21 files changed, 48 insertions(+), 111 deletions(-) diff --git a/ompi/config/ompi_setup_f77.m4 b/ompi/config/ompi_setup_f77.m4 index 5748f8a8ea..692a6cce05 100644 --- a/ompi/config/ompi_setup_f77.m4 +++ b/ompi/config/ompi_setup_f77.m4 @@ -143,37 +143,6 @@ else AC_LANG_POP fi -# Per #1982, on OS X, we may need some esoteric linker flags in the -# wrapper compilers. Assume that we need it for both F77 and FC flags -# (note that in an upcoming update where there will only be one -# Fortran compiler, anyway). -AC_MSG_CHECKING([to see if mpif77/mpif90 compilers need additional linker flags]) -if test $OMPI_WANT_F77_BINDINGS -eq 0; then - AC_MSG_RESULT([none (no F77 bindings)]) -else - case "$host" in - *apple-darwin*) - # Test whether -Wl,-commons,use_dylibs works; if it does, use it. - LDFLAGS_save=$LDFLAGS - LDFLAGS="$LDFLAGS -Wl,-commons,use_dylibs" - AC_LANG_PUSH(Fortran 77) - AC_LINK_IFELSE([AC_LANG_SOURCE([[ program test - integer :: i - end program]])], - [OMPI_FORTRAN_WRAPPER_FLAGS="-Wl,-commons,use_dylibs" - WRAPPER_EXTRA_FFLAGS="$WRAPPER_EXTRA_FFLAGS $OMPI_FORTRAN_WRAPPER_FLAGS" - WRAPPER_EXTRA_FCFLAGS="$WRAPPER_EXTRA_FCFLAGS $OMPI_FORTRAN_WRAPPER_FLAGS"], - [OMPI_FORTRAN_WRAPPER_FLAGS=none]) - AC_LANG_POP - LDFLAGS=$LDFLAGS_save - AC_MSG_RESULT([$OMPI_FORTRAN_WRAPPER_FLAGS]) - ;; - *) - AC_MSG_RESULT([none]) - ;; - esac -fi - AC_DEFINE_UNQUOTED(OMPI_WANT_F77_BINDINGS, $OMPI_WANT_F77_BINDINGS, [Whether we want the MPI f77 bindings or not]) AC_DEFINE_UNQUOTED(OMPI_F77, "$OMPI_F77", [OMPI underlying F77 compiler]) diff --git a/ompi/mca/pml/v/pml_v_output.c b/ompi/mca/pml/v/pml_v_output.c index 89a01b1f7c..7abd9b6ea3 100644 --- a/ompi/mca/pml/v/pml_v_output.c +++ b/ompi/mca/pml/v/pml_v_output.c @@ -10,7 +10,6 @@ #include "ompi_config.h" #include "opal/util/output.h" -#include "opal/util/gethostname.h" #include "pml_v_output.h" @@ -43,7 +42,7 @@ int pml_v_output_open(char *output, int verbosity) { lds.lds_file_suffix = output; } lds.lds_is_debugging = true; - opal_gethostname(hostname, 32); + gethostname(hostname, 32); asprintf(&lds.lds_prefix, "[%s:%05d] pml_v: ", hostname, getpid()); lds.lds_verbose_level = verbosity; mca_pml_v.output = opal_output_open(&lds); diff --git a/ompi/mpi/c/get_processor_name.c b/ompi/mpi/c/get_processor_name.c index f4804095a2..1a4a5682e0 100644 --- a/ompi/mpi/c/get_processor_name.c +++ b/ompi/mpi/c/get_processor_name.c @@ -9,25 +9,20 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2006-2011 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2006-2008 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow * * $HEADER$ */ - #include "ompi_config.h" - #include #ifdef HAVE_UNISTD_H #include #endif #include -#include "opal/util/gethostname.h" -#include "opal/util/opal_sos.h" - #include "ompi/mpi/c/bindings.h" #include "ompi/runtime/params.h" #include "ompi/communicator/communicator.h" @@ -46,9 +41,6 @@ static const char FUNC_NAME[] = "MPI_Get_processor_name"; int MPI_Get_processor_name(char *name, int *resultlen) { - int rc; - char *tmp; - OPAL_CR_NOOP_PROGRESS(); if ( MPI_PARAM_CHECK) { @@ -73,13 +65,9 @@ int MPI_Get_processor_name(char *name, int *resultlen) Guard against gethostname() returning a *really long* hostname and not null-terminating the string. The Fortran API version will pad to the right if necessary. */ - rc = opal_gethostname(&tmp); - OMPI_ERRHANDLER_CHECK(rc, MPI_COMM_WORLD, rc, FUNC_NAME); - - strncpy(name, tmp, MPI_MAX_PROCESSOR_NAME - 1); + gethostname(name, MPI_MAX_PROCESSOR_NAME - 1); name[MPI_MAX_PROCESSOR_NAME - 1] = '\0'; *resultlen = (int) strlen(name); - free(tmp); return MPI_SUCCESS; } diff --git a/ompi/runtime/ompi_mpi_abort.c b/ompi/runtime/ompi_mpi_abort.c index ee9a90ca44..4122bba619 100644 --- a/ompi/runtime/ompi_mpi_abort.c +++ b/ompi/runtime/ompi_mpi_abort.c @@ -35,7 +35,6 @@ #include "opal/mca/backtrace/backtrace.h" #include "orte/util/proc_info.h" -#include "orte/util/gethostname.h" #include "orte/runtime/runtime.h" #include "orte/runtime/orte_globals.h" #include "orte/util/name_fns.h" @@ -72,7 +71,7 @@ ompi_mpi_abort(struct ompi_communicator_t* comm, if (orte_initialized) { host = orte_process_info.nodename; } else { - opal_gethostname(hostname, sizeof(hostname)); + gethostname(hostname, sizeof(hostname)); host = hostname; } pid = getpid(); diff --git a/ompi/runtime/ompi_mpi_finalize.c b/ompi/runtime/ompi_mpi_finalize.c index e1a1540e5b..88b418ad65 100644 --- a/ompi/runtime/ompi_mpi_finalize.c +++ b/ompi/runtime/ompi_mpi_finalize.c @@ -40,7 +40,6 @@ #include "opal/mca/event/event.h" #include "opal/util/output.h" -#include "opal/util/gethostname.h" #include "opal/runtime/opal_progress.h" #include "opal/mca/maffinity/base/base.h" #include "opal/mca/base/base.h" @@ -105,7 +104,7 @@ int ompi_mpi_finalize(void) to stderr. */ char hostname[MAXHOSTNAMELEN]; pid_t pid = getpid(); - opal_gethostname(hostname, sizeof(hostname)); + gethostname(hostname, sizeof(hostname)); orte_show_help("help-mpi-runtime.txt", "mpi_finalize:invoked_multiple_times", diff --git a/opal/mca/base/mca_base_component_find.c b/opal/mca/base/mca_base_component_find.c index 4f285501e5..89aad37420 100644 --- a/opal/mca/base/mca_base_component_find.c +++ b/opal/mca/base/mca_base_component_find.c @@ -57,7 +57,6 @@ #include "opal/util/output.h" #include "opal/util/argv.h" #include "opal/util/show_help.h" -#include "opal/util/gethostname.h" #include "opal/class/opal_list.h" #include "opal/mca/mca.h" #include "opal/mca/base/base.h" @@ -211,7 +210,7 @@ int mca_base_component_find(const char *directory, const char *type, if (opal_list_get_end(found_components) == item) { char h[MAXHOSTNAMELEN]; - opal_gethostname(h, sizeof(h)); + gethostname(h, sizeof(h)); opal_show_help("help-mca-base.txt", "find-available:not-valid", true, h, type, requested_component_names[i]); diff --git a/opal/mca/base/mca_base_open.c b/opal/mca/base/mca_base_open.c index 60d73cae6b..64e790326f 100644 --- a/opal/mca/base/mca_base_open.c +++ b/opal/mca/base/mca_base_open.c @@ -31,7 +31,6 @@ #include "opal/mca/installdirs/installdirs.h" #include "opal/util/output.h" #include "opal/util/printf.h" -#include "opal/util/gethostname.h" #include "opal/mca/mca.h" #include "opal/mca/base/base.h" #include "opal/mca/base/mca_base_component_repository.h" @@ -113,7 +112,7 @@ int mca_base_open(void) } else { set_defaults(&lds); } - opal_gethostname(hostname, 64); + gethostname(hostname, 64); asprintf(&lds.lds_prefix, "[%s:%05d] ", hostname, getpid()); opal_output_reopen(0, &lds); opal_output_verbose(5, 0, "mca: base: opening components"); diff --git a/opal/mca/hwloc/base/hwloc_base_open.c b/opal/mca/hwloc/base/hwloc_base_open.c index 2e96ed06ec..3f85eb76b4 100644 --- a/opal/mca/hwloc/base/hwloc_base_open.c +++ b/opal/mca/hwloc/base/hwloc_base_open.c @@ -15,7 +15,6 @@ #include "opal/util/argv.h" #include "opal/util/output.h" #include "opal/util/show_help.h" -#include "opal/util/gethostname.h" #include "opal/mca/mca.h" #include "opal/mca/base/base.h" #include "opal/mca/base/mca_base_param.h" @@ -106,7 +105,7 @@ int opal_hwloc_base_open(void) opal_hwloc_base_map = OPAL_HWLOC_BASE_MAP_LOCAL_ONLY; } else { char hostname[32]; - opal_gethostname(hostname, sizeof(hostname)); + gethostname(hostname, sizeof(hostname)); opal_show_help("help-opal-hwloc-base.txt", "invalid policy", true, hostname, getpid(), str_value); free(str_value); @@ -137,7 +136,7 @@ int opal_hwloc_base_open(void) opal_hwloc_base_mbfa = OPAL_HWLOC_BASE_MBFA_ERROR; } else { char hostname[32]; - opal_gethostname(hostname, sizeof(hostname)); + gethostname(hostname, sizeof(hostname)); opal_show_help("help-opal-hwloc-base.txt", "invalid error action", true, hostname, getpid(), str_value); free(str_value); diff --git a/opal/mca/memory/linux/memory_linux_ummunotify.c b/opal/mca/memory/linux/memory_linux_ummunotify.c index 39031570e3..2ffdb4ca91 100644 --- a/opal/mca/memory/linux/memory_linux_ummunotify.c +++ b/opal/mca/memory/linux/memory_linux_ummunotify.c @@ -37,7 +37,6 @@ #include "opal/constants.h" #include "opal/util/output.h" #include "opal/util/show_help.h" -#include "opal/util/gethostname.h" #include "opal/mca/memory/memory.h" #include "opal/memoryhooks/memory.h" #include "opal/memoryhooks/memory_internal.h" @@ -88,7 +87,7 @@ int opal_memory_linux_ummunotify_open(void) open(DEV_UMMUNOTIFY, O_RDONLY | O_NONBLOCK); if (mca_memory_linux_component.ummunotify_fd < 0) { char hostname[HOST_NAME_MAX]; - opal_gethostname(hostname, sizeof(hostname)); + gethostname(hostname, sizeof(hostname)); if (EACCES == errno) { /* This will get a proper show_help when merged into the diff --git a/opal/mca/pstat/test/pstat_test.c b/opal/mca/pstat/test/pstat_test.c index 531be0cd6f..13ea7a4c64 100644 --- a/opal/mca/pstat/test/pstat_test.c +++ b/opal/mca/pstat/test/pstat_test.c @@ -32,7 +32,6 @@ #include #endif -#include "opal/util/gethostname.h" #include "opal/mca/base/mca_base_param.h" #include "opal/mca/pstat/pstat.h" #include "opal/mca/pstat/base/base.h" @@ -87,7 +86,7 @@ static int query(pid_t pid, } if (NULL != stats) { - opal_gethostname(hostname, 128); + gethostname(hostname, 128); strncpy(stats->node, hostname, OPAL_PSTAT_MAX_STRING_LEN); stats->pid = pid; diff --git a/opal/mca/shmem/mmap/shmem_mmap_module.c b/opal/mca/shmem/mmap/shmem_mmap_module.c index 9a8f2e7353..b47d743a6d 100644 --- a/opal/mca/shmem/mmap/shmem_mmap_module.c +++ b/opal/mca/shmem/mmap/shmem_mmap_module.c @@ -53,7 +53,6 @@ #include "opal/util/output.h" #include "opal/util/path.h" #include "opal/util/show_help.h" -#include "opal/util/gethostname.h" #include "opal/mca/base/mca_base_param.h" #include "opal/mca/shmem/shmem.h" #include "opal/mca/shmem/base/base.h" @@ -309,7 +308,7 @@ segment_create(opal_shmem_ds_t *ds_buf, */ if (opal_path_nfs(real_file_name)) { char hn[MAXHOSTNAMELEN]; - opal_gethostname(hn, MAXHOSTNAMELEN - 1); + gethostname(hn, MAXHOSTNAMELEN - 1); hn[MAXHOSTNAMELEN - 1] = '\0'; opal_show_help("help-opal-shmem-mmap.txt", "mmap on nfs", 1, hn, real_file_name); @@ -317,7 +316,7 @@ segment_create(opal_shmem_ds_t *ds_buf, if (-1 == (ds_buf->seg_id = open(real_file_name, O_CREAT | O_RDWR, 0600))) { int err = errno; char hn[MAXHOSTNAMELEN]; - opal_gethostname(hn, MAXHOSTNAMELEN - 1); + gethostname(hn, MAXHOSTNAMELEN - 1); hn[MAXHOSTNAMELEN - 1] = '\0'; opal_show_help("help-opal-shmem-mmap.txt", "sys call fail", 1, hn, "open(2)", "", strerror(err), err); @@ -328,7 +327,7 @@ segment_create(opal_shmem_ds_t *ds_buf, if (0 != ftruncate(ds_buf->seg_id, real_size)) { int err = errno; char hn[MAXHOSTNAMELEN]; - opal_gethostname(hn, MAXHOSTNAMELEN - 1); + gethostname(hn, MAXHOSTNAMELEN - 1); hn[MAXHOSTNAMELEN - 1] = '\0'; opal_show_help("help-opal-shmem-mmap.txt", "sys call fail", 1, hn, "ftruncate(2)", "", strerror(err), err); @@ -341,7 +340,7 @@ segment_create(opal_shmem_ds_t *ds_buf, ds_buf->seg_id, 0))) { int err = errno; char hn[MAXHOSTNAMELEN]; - opal_gethostname(hn, MAXHOSTNAMELEN - 1); + gethostname(hn, MAXHOSTNAMELEN - 1); hn[MAXHOSTNAMELEN - 1] = '\0'; opal_show_help("help-opal-shmem-mmap.txt", "sys call fail", 1, hn, "mmap(2)", "", strerror(err), err); @@ -391,7 +390,7 @@ out: if (0 != close(ds_buf->seg_id)) { int err = errno; char hn[MAXHOSTNAMELEN]; - opal_gethostname(hn, MAXHOSTNAMELEN - 1); + gethostname(hn, MAXHOSTNAMELEN - 1); hn[MAXHOSTNAMELEN - 1] = '\0'; opal_show_help("help-opal-shmem-mmap.txt", "sys call fail", 1, hn, "close(2)", "", strerror(err), err); @@ -426,7 +425,7 @@ segment_attach(opal_shmem_ds_t *ds_buf) 0600))) { int err = errno; char hn[MAXHOSTNAMELEN]; - opal_gethostname(hn, MAXHOSTNAMELEN - 1); + gethostname(hn, MAXHOSTNAMELEN - 1); hn[MAXHOSTNAMELEN - 1] = '\0'; opal_show_help("help-opal-shmem-mmap.txt", "sys call fail", 1, hn, "open(2)", "", strerror(err), err); @@ -438,7 +437,7 @@ segment_attach(opal_shmem_ds_t *ds_buf) ds_buf->seg_id, 0))) { int err = errno; char hn[MAXHOSTNAMELEN]; - opal_gethostname(hn, MAXHOSTNAMELEN - 1); + gethostname(hn, MAXHOSTNAMELEN - 1); hn[MAXHOSTNAMELEN - 1] = '\0'; opal_show_help("help-opal-shmem-mmap.txt", "sys call fail", 1, hn, "mmap(2)", "", strerror(err), err); @@ -456,7 +455,7 @@ segment_attach(opal_shmem_ds_t *ds_buf) if (0 != close(ds_buf->seg_id)) { int err = errno; char hn[MAXHOSTNAMELEN]; - opal_gethostname(hn, MAXHOSTNAMELEN - 1); + gethostname(hn, MAXHOSTNAMELEN - 1); hn[MAXHOSTNAMELEN - 1] = '\0'; opal_show_help("help-opal-shmem-mmap.txt", "sys call fail", 1, hn, "close(2)", "", strerror(err), err); @@ -500,7 +499,7 @@ segment_detach(opal_shmem_ds_t *ds_buf) if (0 != munmap((void *)ds_buf->seg_base_addr, ds_buf->seg_size)) { int err = errno; char hn[MAXHOSTNAMELEN]; - opal_gethostname(hn, MAXHOSTNAMELEN - 1); + gethostname(hn, MAXHOSTNAMELEN - 1); hn[MAXHOSTNAMELEN - 1] = '\0'; opal_show_help("help-opal-shmem-mmap.txt", "sys call fail", 1, hn, "munmap(2)", "", strerror(err), err); @@ -531,7 +530,7 @@ segment_unlink(opal_shmem_ds_t *ds_buf) if (-1 == unlink(ds_buf->seg_name)) { int err = errno; char hn[MAXHOSTNAMELEN]; - opal_gethostname(hn, MAXHOSTNAMELEN - 1); + gethostname(hn, MAXHOSTNAMELEN - 1); hn[MAXHOSTNAMELEN - 1] = '\0'; opal_show_help("help-opal-shmem-mmap.txt", "sys call fail", 1, hn, "unlink(2)", ds_buf->seg_name, strerror(err), err); diff --git a/opal/mca/shmem/posix/shmem_posix_common_utils.c b/opal/mca/shmem/posix/shmem_posix_common_utils.c index 206f41a588..e459e4965e 100644 --- a/opal/mca/shmem/posix/shmem_posix_common_utils.c +++ b/opal/mca/shmem/posix/shmem_posix_common_utils.c @@ -46,7 +46,6 @@ #include "opal/util/output.h" #include "opal/util/show_help.h" -#include "opal/util/gethostname.h" #include "opal/mca/shmem/base/base.h" #include "opal/mca/shmem/shmem.h" @@ -85,7 +84,7 @@ shmem_posix_shm_open(char *posix_file_name_buff, size_t size) */ else { char hn[MAXHOSTNAMELEN]; - opal_gethostname(hn, MAXHOSTNAMELEN - 1); + gethostname(hn, MAXHOSTNAMELEN - 1); hn[MAXHOSTNAMELEN - 1] = '\0'; opal_output_verbose(10, opal_shmem_base_output, "shmem_posix_shm_open: disqualifying posix because " diff --git a/opal/mca/shmem/posix/shmem_posix_component.c b/opal/mca/shmem/posix/shmem_posix_component.c index f4314da834..6e2a720fe0 100644 --- a/opal/mca/shmem/posix/shmem_posix_component.c +++ b/opal/mca/shmem/posix/shmem_posix_component.c @@ -46,7 +46,6 @@ #include "opal/constants.h" #include "opal/util/show_help.h" #include "opal/util/output.h" -#include "opal/util/gethostname.h" #include "opal/mca/shmem/base/base.h" #include "opal/mca/shmem/shmem.h" #include "shmem_posix.h" @@ -174,7 +173,7 @@ posix_runtime_query(mca_base_module_t **module, if (0 != shm_unlink(tmp_buff)) { int err = errno; char hn[MAXHOSTNAMELEN]; - opal_gethostname(hn, MAXHOSTNAMELEN - 1); + gethostname(hn, MAXHOSTNAMELEN - 1); hn[MAXHOSTNAMELEN - 1] = '\0'; opal_show_help("help-opal-shmem-posix.txt", "sys call fail", 1, hn, "shm_unlink(2)", "", strerror(err), err); diff --git a/opal/mca/shmem/posix/shmem_posix_module.c b/opal/mca/shmem/posix/shmem_posix_module.c index 4b6480d074..57828a0c89 100644 --- a/opal/mca/shmem/posix/shmem_posix_module.c +++ b/opal/mca/shmem/posix/shmem_posix_module.c @@ -48,7 +48,6 @@ #include "opal/util/output.h" #include "opal/util/path.h" #include "opal/util/show_help.h" -#include "opal/util/gethostname.h" #include "opal/mca/base/mca_base_param.h" #include "opal/mca/shmem/shmem.h" #include "opal/mca/shmem/base/base.h" @@ -206,7 +205,7 @@ segment_create(opal_shmem_ds_t *ds_buf, else if (0 != ftruncate(ds_buf->seg_id, real_size)) { int err = errno; char hn[MAXHOSTNAMELEN]; - opal_gethostname(hn, MAXHOSTNAMELEN - 1); + gethostname(hn, MAXHOSTNAMELEN - 1); hn[MAXHOSTNAMELEN - 1] = '\0'; opal_show_help("help-opal-shmem-posix.txt", "sys call fail", 1, hn, "ftruncate(2)", "", strerror(err), err); @@ -218,7 +217,7 @@ segment_create(opal_shmem_ds_t *ds_buf, ds_buf->seg_id, 0))) { int err = errno; char hn[MAXHOSTNAMELEN]; - opal_gethostname(hn, MAXHOSTNAMELEN - 1); + gethostname(hn, MAXHOSTNAMELEN - 1); hn[MAXHOSTNAMELEN - 1] = '\0'; opal_show_help("help-opal-shmem-posix.txt", "sys call fail", 1, hn, "mmap(2)", "", strerror(err), err); @@ -272,7 +271,7 @@ out: if (0 != close(ds_buf->seg_id)) { int err = errno; char hn[MAXHOSTNAMELEN]; - opal_gethostname(hn, MAXHOSTNAMELEN - 1); + gethostname(hn, MAXHOSTNAMELEN - 1); hn[MAXHOSTNAMELEN - 1] = '\0'; opal_show_help("help-opal-shmem-mmap.txt", "sys call fail", 1, hn, "close(2)", "", strerror(err), err); @@ -312,7 +311,7 @@ segment_attach(opal_shmem_ds_t *ds_buf) if (-1 == (ds_buf->seg_id = shm_open(ds_buf->seg_name, O_RDWR, 0600))) { int err = errno; char hn[MAXHOSTNAMELEN]; - opal_gethostname(hn, MAXHOSTNAMELEN - 1); + gethostname(hn, MAXHOSTNAMELEN - 1); hn[MAXHOSTNAMELEN - 1] = '\0'; opal_show_help("help-opal-shmem-posix.txt", "sys call fail", 1, hn, "open(2)", "", strerror(err), err); @@ -324,7 +323,7 @@ segment_attach(opal_shmem_ds_t *ds_buf) ds_buf->seg_id, 0))) { int err = errno; char hn[MAXHOSTNAMELEN]; - opal_gethostname(hn, MAXHOSTNAMELEN - 1); + gethostname(hn, MAXHOSTNAMELEN - 1); hn[MAXHOSTNAMELEN - 1] = '\0'; opal_show_help("help-opal-shmem-posix.txt", "sys call fail", 1, hn, "mmap(2)", "", strerror(err), err); @@ -342,7 +341,7 @@ segment_attach(opal_shmem_ds_t *ds_buf) if (0 != close(ds_buf->seg_id)) { int err = errno; char hn[MAXHOSTNAMELEN]; - opal_gethostname(hn, MAXHOSTNAMELEN - 1); + gethostname(hn, MAXHOSTNAMELEN - 1); hn[MAXHOSTNAMELEN - 1] = '\0'; opal_show_help("help-opal-shmem-mmap.txt", "sys call fail", 1, hn, "close(2)", "", strerror(err), err); @@ -386,7 +385,7 @@ segment_detach(opal_shmem_ds_t *ds_buf) if (0 != munmap(ds_buf->seg_base_addr, ds_buf->seg_size)) { int err = errno; char hn[MAXHOSTNAMELEN]; - opal_gethostname(hn, MAXHOSTNAMELEN - 1); + gethostname(hn, MAXHOSTNAMELEN - 1); hn[MAXHOSTNAMELEN - 1] = '\0'; opal_show_help("help-opal-shmem-posix.txt", "sys call fail", 1, hn, "munmap(2)", "", strerror(err), err); @@ -416,7 +415,7 @@ segment_unlink(opal_shmem_ds_t *ds_buf) if (-1 == shm_unlink(ds_buf->seg_name)) { int err = errno; char hn[MAXHOSTNAMELEN]; - opal_gethostname(hn, MAXHOSTNAMELEN - 1); + gethostname(hn, MAXHOSTNAMELEN - 1); hn[MAXHOSTNAMELEN - 1] = '\0'; opal_show_help("help-opal-shmem-posix.txt", "sys call fail", 1, hn, "shm_unlink(2)", ds_buf->seg_name, strerror(err), err); diff --git a/opal/mca/shmem/sysv/shmem_sysv_module.c b/opal/mca/shmem/sysv/shmem_sysv_module.c index 5209246b91..c40d2523e5 100644 --- a/opal/mca/shmem/sysv/shmem_sysv_module.c +++ b/opal/mca/shmem/sysv/shmem_sysv_module.c @@ -54,7 +54,6 @@ #include "opal/util/output.h" #include "opal/util/path.h" #include "opal/util/show_help.h" -#include "opal/util/gethostname.h" #include "opal/mca/base/mca_base_param.h" #include "opal/mca/shmem/shmem.h" #include "opal/mca/shmem/base/base.h" @@ -201,7 +200,7 @@ segment_create(opal_shmem_ds_t *ds_buf, IPC_CREAT | IPC_EXCL | SHM_R | SHM_W))) { int err = errno; char hn[MAXHOSTNAMELEN]; - opal_gethostname(hn, MAXHOSTNAMELEN - 1); + gethostname(hn, MAXHOSTNAMELEN - 1); hn[MAXHOSTNAMELEN - 1] = '\0'; opal_show_help("help-opal-shmem-sysv.txt", "sys call fail", 1, hn, "shmget(2)", "", strerror(err), err); @@ -212,7 +211,7 @@ segment_create(opal_shmem_ds_t *ds_buf, else if ((void *)-1 == (seg_hdrp = shmat(ds_buf->seg_id, NULL, 0))) { int err = errno; char hn[MAXHOSTNAMELEN]; - opal_gethostname(hn, MAXHOSTNAMELEN - 1); + gethostname(hn, MAXHOSTNAMELEN - 1); hn[MAXHOSTNAMELEN - 1] = '\0'; opal_show_help("help-opal-shmem-sysv.txt", "sys call fail", 1, hn, "shmat(2)", "", strerror(err), err); @@ -227,7 +226,7 @@ segment_create(opal_shmem_ds_t *ds_buf, else if (0 != shmctl(ds_buf->seg_id, IPC_RMID, NULL)) { int err = errno; char hn[MAXHOSTNAMELEN]; - opal_gethostname(hn, MAXHOSTNAMELEN - 1); + gethostname(hn, MAXHOSTNAMELEN - 1); hn[MAXHOSTNAMELEN - 1] = '\0'; opal_show_help("help-opal-shmem-sysv.txt", "sys call fail", 1, hn, "shmctl(2)", "", strerror(err), err); @@ -302,7 +301,7 @@ segment_attach(opal_shmem_ds_t *ds_buf) 0))) { int err = errno; char hn[MAXHOSTNAMELEN]; - opal_gethostname(hn, MAXHOSTNAMELEN - 1); + gethostname(hn, MAXHOSTNAMELEN - 1); hn[MAXHOSTNAMELEN - 1] = '\0'; opal_show_help("help-opal-shmem-sysv.txt", "sys call fail", 1, hn, "shmat(2)", "", strerror(err), err); @@ -347,7 +346,7 @@ segment_detach(opal_shmem_ds_t *ds_buf) if (0 != shmdt(ds_buf->seg_base_addr)) { int err = errno; char hn[MAXHOSTNAMELEN]; - opal_gethostname(hn, MAXHOSTNAMELEN - 1); + gethostname(hn, MAXHOSTNAMELEN - 1); hn[MAXHOSTNAMELEN - 1] = '\0'; opal_show_help("help-opal-shmem-sysv.txt", "sys call fail", 1, hn, "shmdt(2)", "", strerror(err), err); diff --git a/opal/mca/shmem/windows/shmem_windows_module.c b/opal/mca/shmem/windows/shmem_windows_module.c index b6a3dc80d4..d916d87289 100644 --- a/opal/mca/shmem/windows/shmem_windows_module.c +++ b/opal/mca/shmem/windows/shmem_windows_module.c @@ -45,7 +45,6 @@ #include "opal/util/output.h" #include "opal/util/path.h" #include "opal/util/show_help.h" -#include "opal/util/gethostname.h" #include "opal/mca/base/mca_base_param.h" #include "opal/mca/shmem/shmem.h" #include "opal/mca/shmem/base/base.h" @@ -363,7 +362,7 @@ out: if (0 != close(ds_buf->seg_id)) { int err = errno; char hn[MAXHOSTNAMELEN]; - opal_gethostname(hn, MAXHOSTNAMELEN - 1); + gethostname(hn, MAXHOSTNAMELEN - 1); hn[MAXHOSTNAMELEN - 1] = '\0'; opal_show_help("help-opal-shmem-windows.txt", "sys call fail", 1, hn, "close(2)", "", strerror(err), err); @@ -395,7 +394,7 @@ segment_attach(opal_shmem_ds_t *ds_buf) 0600))) { int err = errno; char hn[MAXHOSTNAMELEN]; - opal_gethostname(hn, MAXHOSTNAMELEN - 1); + gethostname(hn, MAXHOSTNAMELEN - 1); hn[MAXHOSTNAMELEN - 1] = '\0'; opal_show_help("help-opal-shmem-windows.txt", "sys call fail", 1, hn, "open(2)", "", strerror(err), err); @@ -407,7 +406,7 @@ segment_attach(opal_shmem_ds_t *ds_buf) ds_buf->seg_id, 0))) { int err = errno; char hn[MAXHOSTNAMELEN]; - opal_gethostname(hn, MAXHOSTNAMELEN - 1); + gethostname(hn, MAXHOSTNAMELEN - 1); hn[MAXHOSTNAMELEN - 1] = '\0'; opal_show_help("help-opal-shmem-windows.txt", "sys call fail", 1, hn, "mmap(2)", "", strerror(err), err); @@ -425,7 +424,7 @@ segment_attach(opal_shmem_ds_t *ds_buf) if (0 != close(ds_buf->seg_id)) { int err = errno; char hn[MAXHOSTNAMELEN]; - opal_gethostname(hn, MAXHOSTNAMELEN - 1); + gethostname(hn, MAXHOSTNAMELEN - 1); hn[MAXHOSTNAMELEN - 1] = '\0'; opal_show_help("help-opal-shmem-windows.txt", "sys call fail", 1, hn, "close(2)", "", strerror(err), err); @@ -469,7 +468,7 @@ segment_detach(opal_shmem_ds_t *ds_buf) if (0 != UnmapViewOfFile(ds_buf->seg_base_addr)) { int err = errno; char hn[MAXHOSTNAMELEN]; - opal_gethostname(hn, MAXHOSTNAMELEN - 1); + gethostname(hn, MAXHOSTNAMELEN - 1); hn[MAXHOSTNAMELEN - 1] = '\0'; opal_show_help("help-opal-shmem-windows.txt", "sys call fail", 1, hn, "munmap(2)", "", strerror(err), err); @@ -499,7 +498,7 @@ segment_unlink(opal_shmem_ds_t *ds_buf) if (-1 == unlink(ds_buf->seg_name)) { int err = errno; char hn[MAXHOSTNAMELEN]; - opal_gethostname(hn, MAXHOSTNAMELEN - 1); + gethostname(hn, MAXHOSTNAMELEN - 1); hn[MAXHOSTNAMELEN - 1] = '\0'; opal_show_help("help-opal-shmem-windows.txt", "sys call fail", 1, hn, "unlink(2)", ds_buf->seg_name, strerror(err), err); diff --git a/opal/util/Makefile.am b/opal/util/Makefile.am index 46528d34dd..1ab987e853 100644 --- a/opal/util/Makefile.am +++ b/opal/util/Makefile.am @@ -9,7 +9,7 @@ # University of Stuttgart. All rights reserved. # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. -# Copyright (c) 2007-2011 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2007-2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -41,8 +41,6 @@ headers = \ few.h \ fd.h \ fd.c \ - gethostname.c \ - gethostname.h \ if.h \ keyval_parse.h \ malloc.h \ diff --git a/opal/util/output.c b/opal/util/output.c index ec50504903..58fddc3b04 100644 --- a/opal/util/output.c +++ b/opal/util/output.c @@ -36,7 +36,6 @@ #include "opal/util/opal_environ.h" #include "opal/util/output.h" -#include "opal/util/gethostname.h" #include "opal/threads/mutex.h" #include "opal/constants.h" @@ -180,7 +179,7 @@ bool opal_output_init(void) } else { verbose.lds_want_stderr = true; } - opal_gethostname(hostname, sizeof(hostname)); + gethostname(hostname, sizeof(hostname)); asprintf(&verbose.lds_prefix, "[%s:%05d] ", hostname, getpid()); for (i = 0; i < OPAL_OUTPUT_MAX_STREAMS; ++i) { @@ -266,7 +265,7 @@ void opal_output_reopen_all(void) default_stderr_fd = -1; } - opal_gethostname(hostname, sizeof(hostname)); + gethostname(hostname, sizeof(hostname)); if( NULL != verbose.lds_prefix ) { free(verbose.lds_prefix); verbose.lds_prefix = NULL; diff --git a/opal/util/stacktrace.c b/opal/util/stacktrace.c index dd6fe953b6..502e200933 100644 --- a/opal/util/stacktrace.c +++ b/opal/util/stacktrace.c @@ -34,7 +34,6 @@ #endif #include "opal/util/stacktrace.h" -#include "opal/util/gethostname.h" #include "opal/mca/base/mca_base_param.h" #include "opal/mca/backtrace/backtrace.h" #include "opal/constants.h" @@ -462,7 +461,7 @@ int opal_util_register_stackhandlers (void) int param, i; bool complain, showed_help = false; - opal_gethostname(stacktrace_hostname, sizeof(stacktrace_hostname)); + gethostname(stacktrace_hostname, sizeof(stacktrace_hostname)); stacktrace_hostname[sizeof(stacktrace_hostname) - 1] = '\0'; /* to keep these somewhat readable, only print the machine name */ for (i = 0 ; i < (int)sizeof(stacktrace_hostname) ; ++i) { diff --git a/orte/orted/orted_main.c b/orte/orted/orted_main.c index 16a68b1c82..0dae71443b 100644 --- a/orte/orted/orted_main.c +++ b/orte/orted/orted_main.c @@ -56,7 +56,6 @@ #include "opal/util/os_path.h" #include "opal/util/printf.h" #include "opal/util/argv.h" -#include "opal/util/gethostname.h" #include "opal/runtime/opal.h" #include "opal/mca/base/mca_base_param.h" #include "opal/util/daemon_init.h" @@ -292,7 +291,7 @@ int orte_daemon(int argc, char *argv[]) * away just in case we have a problem along the way */ if (orted_globals.debug) { - opal_gethostname(hostname, 100); + gethostname(hostname, 100); fprintf(stderr, "Daemon was launched on %s - beginning to initialize\n", hostname); } diff --git a/orte/util/proc_info.c b/orte/util/proc_info.c index 1ff5e730ba..ab7c25316a 100644 --- a/orte/util/proc_info.c +++ b/orte/util/proc_info.c @@ -33,7 +33,6 @@ #include "opal/mca/base/base.h" #include "opal/mca/base/mca_base_param.h" #include "opal/util/output.h" -#include "opal/util/gethostname.h" #include "orte/util/proc_info.h" @@ -142,7 +141,7 @@ int orte_proc_info(void) orte_process_info.pid = getpid(); /* get the nodename */ - opal_gethostname(hostname, ORTE_MAX_HOSTNAME_SIZE); + gethostname(hostname, ORTE_MAX_HOSTNAME_SIZE); orte_process_info.nodename = strdup(hostname); /* get the number of nodes in the job */