* more merges from the trunk, mainly to make "make dist" work correctly.
This commit was SVN r4944.
Этот коммит содержится в:
родитель
40d6ec1271
Коммит
c854ae0edb
@ -14,8 +14,8 @@
|
|||||||
|
|
||||||
include $(top_srcdir)/config/Makefile.options
|
include $(top_srcdir)/config/Makefile.options
|
||||||
|
|
||||||
SUBDIRS = config include etc src
|
SUBDIRS = config include etc src
|
||||||
EXTRA_DIST = README INSTALL VERSION Doxyfile
|
EXTRA_DIST = README INSTALL VERSION Doxyfile LICENSE
|
||||||
|
|
||||||
dist-hook:
|
dist-hook:
|
||||||
csh config/distscript.csh $(PACKAGE)-$(OMPI_VERSION) $(OMPI_VERSION)
|
csh config/distscript.csh $(PACKAGE)-$(OMPI_VERSION) $(OMPI_VERSION)
|
||||||
|
@ -1,6 +1,55 @@
|
|||||||
This file contains information on merging the branches/tim tree into the
|
This file contains information on merging the branches/tim tree into the
|
||||||
trunk.
|
trunk.
|
||||||
|
|
||||||
|
UPDATE MERGE 5:
|
||||||
|
|
||||||
|
svn merge -r4937:4943 svn+ssh://svn.open-mpi.org/l/svn/ompi/branches/tim .
|
||||||
|
U test/mca/Makefile.am
|
||||||
|
D test/mca/pcm/run_tests
|
||||||
|
D test/mca/pcm/Makefile.am
|
||||||
|
D test/mca/pcm/base/test1_out_std
|
||||||
|
D test/mca/pcm/base/sched_comm.c
|
||||||
|
D test/mca/pcm/base/test2_out_std
|
||||||
|
D test/mca/pcm/base/run_tests
|
||||||
|
D test/mca/pcm/base/build_env.c
|
||||||
|
D test/mca/pcm/base/Makefile.am
|
||||||
|
D test/mca/pcm/base
|
||||||
|
D test/mca/pcm
|
||||||
|
D test/mca/pcm
|
||||||
|
D test/mca/llm/run_tests
|
||||||
|
D test/mca/llm/Makefile.am
|
||||||
|
D test/mca/llm/base/testfile
|
||||||
|
D test/mca/llm/base/test1_out_std
|
||||||
|
D test/mca/llm/base/test2_out_std
|
||||||
|
D test/mca/llm/base/run_tests
|
||||||
|
D test/mca/llm/base/parse_hostfile.c
|
||||||
|
D test/mca/llm/base/Makefile.am
|
||||||
|
D test/mca/llm/base
|
||||||
|
D test/mca/llm
|
||||||
|
D test/mca/llm
|
||||||
|
U test/Makefile.am
|
||||||
|
D test/include/run_tests
|
||||||
|
D test/include/Makefile.am
|
||||||
|
D test/include/atomic.c
|
||||||
|
D test/include
|
||||||
|
D test/include
|
||||||
|
U include/Makefile.am
|
||||||
|
U src/mca/oob/Makefile.am
|
||||||
|
U src/mca/ns/base/Makefile.am
|
||||||
|
U src/mca/rmaps/base/Makefile.am
|
||||||
|
U src/mca/ras/base/Makefile.am
|
||||||
|
U src/mca/gpr/Makefile.am
|
||||||
|
U src/mca/soh/Makefile.am
|
||||||
|
U src/mca/rml/oob/Makefile.am
|
||||||
|
U src/mca/rml/Makefile.am
|
||||||
|
D src/mca/pls/bproc_seed/pls_bproc_seed_config.h
|
||||||
|
D src/mca/pls/bproc_proxy/pls_bproc_proxy_config.h
|
||||||
|
U src/mca/ptl/gm/src/Makefile.am
|
||||||
|
Skipped missing target: 'src/mca/ptl/gm/src/ptl_gm_addr.h'
|
||||||
|
C configure.ac
|
||||||
|
U Makefile.am
|
||||||
|
|
||||||
|
|
||||||
UPDATE MERGE 4:
|
UPDATE MERGE 4:
|
||||||
|
|
||||||
svn merge -r4933:4937 svn+ssh://svn.open-mpi.org/l/svn/ompi/branches/tim .
|
svn merge -r4933:4937 svn+ssh://svn.open-mpi.org/l/svn/ompi/branches/tim .
|
||||||
|
11
configure.ac
11
configure.ac
@ -1613,16 +1613,5 @@ AC_CONFIG_FILES([
|
|||||||
src/tools/wrappers/Makefile
|
src/tools/wrappers/Makefile
|
||||||
|
|
||||||
src/asm/test/Makefile
|
src/asm/test/Makefile
|
||||||
|
|
||||||
test/support/Makefile
|
|
||||||
test/util/Makefile
|
|
||||||
test/class/Makefile
|
|
||||||
test/include/Makefile
|
|
||||||
test/rte/Makefile
|
|
||||||
test/dps/Makefile
|
|
||||||
test/mca/gpr/Makefile
|
|
||||||
test/mca/ns/Makefile
|
|
||||||
test/mca/rds/Makefile
|
|
||||||
test/runtime/Makefile
|
|
||||||
])
|
])
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
include $(top_srcdir)/config/Makefile.options
|
include $(top_srcdir)/config/Makefile.options
|
||||||
|
|
||||||
dist_include_HEADERS = \
|
dist_include_HEADERS = \
|
||||||
|
orte_config.h \
|
||||||
ompi_config_bottom.h \
|
ompi_config_bottom.h \
|
||||||
ompi_stdint.h \
|
ompi_stdint.h \
|
||||||
mpi.h
|
mpi.h
|
||||||
|
@ -19,7 +19,8 @@ DIST_SUBDIRS = base $(MCA_gpr_ALL_SUBDIRS)
|
|||||||
|
|
||||||
# Source code files
|
# Source code files
|
||||||
|
|
||||||
headers = gpr.h
|
headers = gpr.h \
|
||||||
|
gpr_types.h
|
||||||
|
|
||||||
# Conditionally install the header files
|
# Conditionally install the header files
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@ libmca_ns_base_la_SOURCES = \
|
|||||||
ns_base_close.c \
|
ns_base_close.c \
|
||||||
ns_base_select.c \
|
ns_base_select.c \
|
||||||
ns_base_open.c \
|
ns_base_open.c \
|
||||||
|
ns_base_nds.h \
|
||||||
ns_base_nds.c \
|
ns_base_nds.c \
|
||||||
ns_base_nds_env.c \
|
ns_base_nds_env.c \
|
||||||
ns_base_nds_pipe.c \
|
ns_base_nds_pipe.c \
|
||||||
|
@ -20,7 +20,8 @@ DIST_SUBDIRS = base $(MCA_oob_ALL_SUBDIRS)
|
|||||||
|
|
||||||
# Source code files
|
# Source code files
|
||||||
|
|
||||||
headers = oob.h
|
headers = oob.h \
|
||||||
|
oob_types.h
|
||||||
|
|
||||||
# Conditionally install the header files
|
# Conditionally install the header files
|
||||||
|
|
||||||
|
@ -1,91 +0,0 @@
|
|||||||
/* pls_bproc_proxy_config.h. Generated by configure. */
|
|
||||||
/* pls_bproc_proxy_config.h.in. Generated from configure.ac by autoheader. */
|
|
||||||
|
|
||||||
/* -*- c -*-
|
|
||||||
*
|
|
||||||
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
||||||
* All rights reserved.
|
|
||||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
||||||
* All rights reserved.
|
|
||||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
||||||
* University of Stuttgart. All rights reserved.
|
|
||||||
* $COPYRIGHT$
|
|
||||||
*
|
|
||||||
* Additional copyrights may follow
|
|
||||||
*
|
|
||||||
* $HEADER$
|
|
||||||
*
|
|
||||||
* Open MPI configuation header file.
|
|
||||||
* MCA pls: bproc_proxy component
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef MCA_pls_bproc_proxy_CONFIG_H
|
|
||||||
#define MCA_pls_bproc_proxy_CONFIG_H
|
|
||||||
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
|
||||||
#define HAVE_DLFCN_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
|
||||||
#define HAVE_INTTYPES_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <memory.h> header file. */
|
|
||||||
#define HAVE_MEMORY_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdint.h> header file. */
|
|
||||||
#define HAVE_STDINT_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
|
||||||
#define HAVE_STDLIB_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <strings.h> header file. */
|
|
||||||
#define HAVE_STRINGS_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <string.h> header file. */
|
|
||||||
#define HAVE_STRING_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
|
||||||
#define HAVE_SYS_STAT_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
|
||||||
#define HAVE_SYS_TYPES_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <unistd.h> header file. */
|
|
||||||
#define HAVE_UNISTD_H 1
|
|
||||||
|
|
||||||
/* Whether the bproc_proxy pls is the default pls or not */
|
|
||||||
#define MCA_pls_bproc_proxy_DEFAULT 0
|
|
||||||
|
|
||||||
/* OMPI architecture string */
|
|
||||||
#define OMPI_ARCH "i686-pc-linux-gnu"
|
|
||||||
|
|
||||||
/* OMPI underlying C compiler */
|
|
||||||
#define OMPI_CC "gcc"
|
|
||||||
|
|
||||||
/* Whether we have bproc support or not */
|
|
||||||
#define OMPI_HAVE_BPROC 1
|
|
||||||
|
|
||||||
/* Define to the address where bug reports for this package should be sent. */
|
|
||||||
#define PACKAGE_BUGREPORT ""
|
|
||||||
|
|
||||||
/* Define to the full name of this package. */
|
|
||||||
#define PACKAGE_NAME ""
|
|
||||||
|
|
||||||
/* Define to the full name and version of this package. */
|
|
||||||
#define PACKAGE_STRING ""
|
|
||||||
|
|
||||||
/* Define to the one symbol short name of this package. */
|
|
||||||
#define PACKAGE_TARNAME ""
|
|
||||||
|
|
||||||
/* Define to the version of this package. */
|
|
||||||
#define PACKAGE_VERSION ""
|
|
||||||
|
|
||||||
/* Define to 1 if you have the ANSI C header files. */
|
|
||||||
/* #undef STDC_HEADERS */
|
|
||||||
|
|
||||||
/* Enable GNU extensions on systems that have them. */
|
|
||||||
#ifndef _GNU_SOURCE
|
|
||||||
# define _GNU_SOURCE 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* _MCA_pls_bproc_proxy_CONFIG_H */
|
|
@ -1,91 +0,0 @@
|
|||||||
/* pls_bproc_seed_config.h. Generated by configure. */
|
|
||||||
/* pls_bproc_seed_config.h.in. Generated from configure.ac by autoheader. */
|
|
||||||
|
|
||||||
/* -*- c -*-
|
|
||||||
*
|
|
||||||
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
||||||
* All rights reserved.
|
|
||||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
||||||
* All rights reserved.
|
|
||||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
||||||
* University of Stuttgart. All rights reserved.
|
|
||||||
* $COPYRIGHT$
|
|
||||||
*
|
|
||||||
* Additional copyrights may follow
|
|
||||||
*
|
|
||||||
* $HEADER$
|
|
||||||
*
|
|
||||||
* Open MPI configuation header file.
|
|
||||||
* MCA pls: bproc_seed component
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef MCA_pls_bproc_seed_CONFIG_H
|
|
||||||
#define MCA_pls_bproc_seed_CONFIG_H
|
|
||||||
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
|
||||||
#define HAVE_DLFCN_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
|
||||||
#define HAVE_INTTYPES_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <memory.h> header file. */
|
|
||||||
#define HAVE_MEMORY_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdint.h> header file. */
|
|
||||||
#define HAVE_STDINT_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
|
||||||
#define HAVE_STDLIB_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <strings.h> header file. */
|
|
||||||
#define HAVE_STRINGS_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <string.h> header file. */
|
|
||||||
#define HAVE_STRING_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
|
||||||
#define HAVE_SYS_STAT_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
|
||||||
#define HAVE_SYS_TYPES_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <unistd.h> header file. */
|
|
||||||
#define HAVE_UNISTD_H 1
|
|
||||||
|
|
||||||
/* Whether the bproc_seed pls is the default pls or not */
|
|
||||||
#define MCA_pls_bproc_seed_DEFAULT 0
|
|
||||||
|
|
||||||
/* OMPI architecture string */
|
|
||||||
#define OMPI_ARCH "i686-pc-linux-gnu"
|
|
||||||
|
|
||||||
/* OMPI underlying C compiler */
|
|
||||||
#define OMPI_CC "gcc"
|
|
||||||
|
|
||||||
/* Whether we have bproc support or not */
|
|
||||||
#define OMPI_HAVE_BPROC 1
|
|
||||||
|
|
||||||
/* Define to the address where bug reports for this package should be sent. */
|
|
||||||
#define PACKAGE_BUGREPORT ""
|
|
||||||
|
|
||||||
/* Define to the full name of this package. */
|
|
||||||
#define PACKAGE_NAME ""
|
|
||||||
|
|
||||||
/* Define to the full name and version of this package. */
|
|
||||||
#define PACKAGE_STRING ""
|
|
||||||
|
|
||||||
/* Define to the one symbol short name of this package. */
|
|
||||||
#define PACKAGE_TARNAME ""
|
|
||||||
|
|
||||||
/* Define to the version of this package. */
|
|
||||||
#define PACKAGE_VERSION ""
|
|
||||||
|
|
||||||
/* Define to 1 if you have the ANSI C header files. */
|
|
||||||
/* #undef STDC_HEADERS */
|
|
||||||
|
|
||||||
/* Enable GNU extensions on systems that have them. */
|
|
||||||
#ifndef _GNU_SOURCE
|
|
||||||
# define _GNU_SOURCE 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* _MCA_pls_bproc_seed_CONFIG_H */
|
|
@ -29,6 +29,5 @@ libmca_ptl_gm_la_SOURCES = \
|
|||||||
ptl_gm_priv.c \
|
ptl_gm_priv.c \
|
||||||
ptl_gm_proc.c \
|
ptl_gm_proc.c \
|
||||||
ptl_gm_proc.h \
|
ptl_gm_proc.h \
|
||||||
ptl_gm_req.h \
|
|
||||||
ptl_gm_sendfrag.c \
|
ptl_gm_sendfrag.c \
|
||||||
ptl_gm_sendfrag.h
|
ptl_gm_sendfrag.h
|
||||||
|
@ -31,6 +31,7 @@ libmca_ras_base_la_SOURCES = \
|
|||||||
$(headers) \
|
$(headers) \
|
||||||
ras_base_alloc.c \
|
ras_base_alloc.c \
|
||||||
ras_base_close.c \
|
ras_base_close.c \
|
||||||
|
ras_base_node.h \
|
||||||
ras_base_node.c \
|
ras_base_node.c \
|
||||||
ras_base_open.c \
|
ras_base_open.c \
|
||||||
ras_base_select.c
|
ras_base_select.c
|
||||||
|
@ -30,6 +30,7 @@ headers = \
|
|||||||
libmca_rmaps_base_la_SOURCES = \
|
libmca_rmaps_base_la_SOURCES = \
|
||||||
$(headers) \
|
$(headers) \
|
||||||
rmaps_base_close.c \
|
rmaps_base_close.c \
|
||||||
|
rmaps_base_map.h \
|
||||||
rmaps_base_map.c \
|
rmaps_base_map.c \
|
||||||
rmaps_base_open.c \
|
rmaps_base_open.c \
|
||||||
rmaps_base_select.c
|
rmaps_base_select.c
|
||||||
|
@ -20,7 +20,8 @@ DIST_SUBDIRS = base $(MCA_rml_ALL_SUBDIRS)
|
|||||||
|
|
||||||
# Source code files
|
# Source code files
|
||||||
|
|
||||||
headers = rml.h
|
headers = rml.h \
|
||||||
|
rml_types.h
|
||||||
|
|
||||||
# Conditionally install the header files
|
# Conditionally install the header files
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
include $(top_ompi_srcdir)/config/Makefile.options
|
include $(top_ompi_srcdir)/config/Makefile.options
|
||||||
|
|
||||||
sources = \
|
sources = \
|
||||||
|
rml_oob.h \
|
||||||
rml_oob.c \
|
rml_oob.c \
|
||||||
rml_oob_component.c
|
rml_oob_component.c
|
||||||
|
|
||||||
|
@ -19,7 +19,8 @@ DIST_SUBDIRS = base $(MCA_soh_ALL_SUBDIRS)
|
|||||||
|
|
||||||
# Source code files
|
# Source code files
|
||||||
|
|
||||||
headers = soh.h
|
headers = soh.h \
|
||||||
|
soh_types.h
|
||||||
|
|
||||||
# Conditionally install the header files
|
# Conditionally install the header files
|
||||||
|
|
||||||
|
@ -14,7 +14,4 @@
|
|||||||
|
|
||||||
include $(top_srcdir)/config/Makefile.options
|
include $(top_srcdir)/config/Makefile.options
|
||||||
|
|
||||||
SUBDIRS = support class util threads mca rte
|
SUBDIRS = support util class rte dps mca runtime
|
||||||
# JMS Temporary hack to make "make dist" work. The directories mentioned
|
|
||||||
# here will eventually moved into SUBDIRS.
|
|
||||||
DIST_SUBDIRS = $(SUBDIRS) include
|
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
# -*- makefile -*-
|
|
||||||
#
|
|
||||||
# Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
||||||
# All rights reserved.
|
|
||||||
# Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
||||||
# All rights reserved.
|
|
||||||
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
||||||
# University of Stuttgart. All rights reserved.
|
|
||||||
# $COPYRIGHT$
|
|
||||||
#
|
|
||||||
# Additional copyrights may follow
|
|
||||||
#
|
|
||||||
# $HEADER$
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(top_srcdir)/config/Makefile.options
|
|
||||||
AM_CPPFLAGS = -I$(top_srcdir)/test/support -DOMPI_ENABLE_DEBUG_OVERRIDE=1
|
|
||||||
|
|
||||||
noinst_PROGRAMS = \
|
|
||||||
atomic
|
|
||||||
|
|
||||||
atomic_SOURCES = atomic.c
|
|
||||||
atomic_LDADD = \
|
|
||||||
$(top_builddir)/src/libmpi.la \
|
|
||||||
$(top_builddir)/test/support/libsupport.la
|
|
||||||
atomic_DEPENDENCIES = $(atomic_LDADD)
|
|
@ -1,355 +0,0 @@
|
|||||||
#include "ompi_config.h"
|
|
||||||
#include <assert.h>
|
|
||||||
#include <getopt.h>
|
|
||||||
#ifdef HAVE_PTHREAD_H
|
|
||||||
#include <pthread.h>
|
|
||||||
#endif
|
|
||||||
#include <stdarg.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#include "support.h"
|
|
||||||
|
|
||||||
#include "include/sys/atomic.h"
|
|
||||||
|
|
||||||
/* default options */
|
|
||||||
|
|
||||||
int nreps = 100;
|
|
||||||
int nthreads = 2;
|
|
||||||
int enable_verbose = 0;
|
|
||||||
int enable_64_bit_tests = 0;
|
|
||||||
|
|
||||||
volatile uint32_t vol32;
|
|
||||||
uint32_t val32;
|
|
||||||
uint32_t old32;
|
|
||||||
uint32_t new32;
|
|
||||||
|
|
||||||
#ifdef ENABLE_64_BIT
|
|
||||||
volatile uint64_t vol64;
|
|
||||||
uint64_t val64;
|
|
||||||
uint64_t old64;
|
|
||||||
uint64_t new64;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
volatile int volint;
|
|
||||||
int valint;
|
|
||||||
int oldint;
|
|
||||||
int newint;
|
|
||||||
|
|
||||||
volatile void *volptr;
|
|
||||||
void *oldptr;
|
|
||||||
void *newptr;
|
|
||||||
|
|
||||||
|
|
||||||
static void help(void)
|
|
||||||
{
|
|
||||||
printf("Usage: threadtest [flags]\n"
|
|
||||||
"\n"
|
|
||||||
" Flags may be any of\n"
|
|
||||||
#ifdef ENABLE_64_BIT
|
|
||||||
" -l do 64-bit tests\n"
|
|
||||||
#endif
|
|
||||||
" -r NREPS number of repetitions\n"
|
|
||||||
" -t NTRHEADS number of threads\n"
|
|
||||||
" -v verbose output\n"
|
|
||||||
" -h print this info\n" "\n"
|
|
||||||
" Numbers may be postfixed with 'k' or 'm'\n\n");
|
|
||||||
|
|
||||||
#ifndef ENABLE_64_BIT
|
|
||||||
printf(" 64-bit tests are not enabled in this build of the tests\n\n");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
exit(EXIT_SUCCESS);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void usage(void)
|
|
||||||
{
|
|
||||||
fprintf(stderr,
|
|
||||||
"Usage: threadtest [flags]\n" " threadtest -h\n");
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void verbose(const char *fmt, ...)
|
|
||||||
{
|
|
||||||
if (enable_verbose) {
|
|
||||||
va_list ap;
|
|
||||||
va_start(ap, fmt);
|
|
||||||
vfprintf(stderr, fmt, ap);
|
|
||||||
va_end(ap);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static int str2size(char *str)
|
|
||||||
{
|
|
||||||
int size;
|
|
||||||
char mod[32];
|
|
||||||
|
|
||||||
switch (sscanf(str, "%d%1[mMkK]", &size, mod)) {
|
|
||||||
case 1:
|
|
||||||
return (size);
|
|
||||||
case 2:
|
|
||||||
switch (*mod) {
|
|
||||||
case 'm':
|
|
||||||
case 'M':
|
|
||||||
return (size << 20);
|
|
||||||
case 'k':
|
|
||||||
case 'K':
|
|
||||||
return (size << 10);
|
|
||||||
default:
|
|
||||||
return (size);
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void *thread_main(void *arg)
|
|
||||||
{
|
|
||||||
int rank = (int) arg;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
verbose("thread-%d: Hello\n", rank);
|
|
||||||
|
|
||||||
/* thread tests */
|
|
||||||
|
|
||||||
for (i = 0; i < nreps; i++) {
|
|
||||||
ompi_atomic_add_32(&val32, 5);
|
|
||||||
#ifdef ENABLE_64_BIT
|
|
||||||
if (enable_64_bit_tests) {
|
|
||||||
ompi_atomic_add_64(&val64, 5);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
ompi_atomic_add_int(&valint, 5);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (void *) (rank + 1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
int c;
|
|
||||||
int tid;
|
|
||||||
pthread_t *th;
|
|
||||||
|
|
||||||
/* option processing */
|
|
||||||
|
|
||||||
test_init("atomic operations");
|
|
||||||
|
|
||||||
while ((c = getopt(argc, argv, "hlr:t:v")) != -1) {
|
|
||||||
switch (c) {
|
|
||||||
case 'h':
|
|
||||||
help();
|
|
||||||
break;
|
|
||||||
case 'l':
|
|
||||||
#ifdef ENABLE_64_BIT
|
|
||||||
enable_64_bit_tests = 1;
|
|
||||||
#else
|
|
||||||
usage();
|
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
case 'r':
|
|
||||||
if ((nreps = str2size(optarg)) <= 0) {
|
|
||||||
usage();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 't':
|
|
||||||
if ((nthreads = str2size(optarg)) <= 0) {
|
|
||||||
usage();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'v':
|
|
||||||
enable_verbose = 1;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
usage();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (optind != argc) {
|
|
||||||
usage();
|
|
||||||
}
|
|
||||||
|
|
||||||
verbose("main: %s\n", argv[0]);
|
|
||||||
verbose("main: nthreads = %d\n", nthreads);
|
|
||||||
verbose("main: nreps = %d\n", nreps);
|
|
||||||
|
|
||||||
/* first test single-threaded functionality */
|
|
||||||
|
|
||||||
/* -- cmpset 32-bit tests -- */
|
|
||||||
|
|
||||||
vol32 = 42, old32 = 42, new32 = 50;
|
|
||||||
test_verify("atomic", ompi_atomic_cmpset_32(&vol32, old32, new32) == 1);
|
|
||||||
test_verify("atomic", vol32 == new32);
|
|
||||||
|
|
||||||
vol32 = 42, old32 = 420, new32 = 50;
|
|
||||||
test_verify("atomic", ompi_atomic_cmpset_32(&vol32, old32, new32) == 0);
|
|
||||||
test_verify("atomic", vol32 == 42);
|
|
||||||
|
|
||||||
vol32 = 42, old32 = 42, new32 = 50;
|
|
||||||
test_verify("atomic", ompi_atomic_cmpset_acq_32(&vol32, old32, new32) == 1);
|
|
||||||
test_verify("atomic", vol32 == new32);
|
|
||||||
|
|
||||||
vol32 = 42, old32 = 420, new32 = 50;
|
|
||||||
test_verify("atomic", ompi_atomic_cmpset_acq_32(&vol32, old32, new32) == 0);
|
|
||||||
test_verify("atomic", vol32 == 42);
|
|
||||||
|
|
||||||
vol32 = 42, old32 = 42, new32 = 50;
|
|
||||||
test_verify("atomic", ompi_atomic_cmpset_rel_32(&vol32, old32, new32) == 1);
|
|
||||||
test_verify("atomic", vol32 == new32);
|
|
||||||
|
|
||||||
vol32 = 42, old32 = 420, new32 = 50;
|
|
||||||
test_verify("atomic", ompi_atomic_cmpset_rel_32(&vol32, old32, new32) == 0);
|
|
||||||
test_verify("atomic", vol32 == 42);
|
|
||||||
|
|
||||||
/* -- cmpset 64-bit tests -- */
|
|
||||||
|
|
||||||
#ifdef ENABLE_64_BIT
|
|
||||||
if (enable_64_bit_tests) {
|
|
||||||
vol64 = 42, old64 = 42, new64 = 50;
|
|
||||||
test_verify("atomic", ompi_atomic_cmpset_64(&vol64, old64, new64) == 1);
|
|
||||||
test_verify("atomic", vol64 == new64);
|
|
||||||
|
|
||||||
vol64 = 42, old64 = 420, new64 = 50;
|
|
||||||
test_verify("atomic", ompi_atomic_cmpset_64(&vol64, old64, new64) == 0);
|
|
||||||
test_verify("atomic", vol64 == 42);
|
|
||||||
|
|
||||||
vol64 = 42, old64 = 42, new64 = 50;
|
|
||||||
test_verify("atomic", ompi_atomic_cmpset_acq_64(&vol64, old64, new64) == 1);
|
|
||||||
test_verify("atomic", vol64 == new64);
|
|
||||||
|
|
||||||
vol64 = 42, old64 = 420, new64 = 50;
|
|
||||||
test_verify("atomic", ompi_atomic_cmpset_acq_64(&vol64, old64, new64) == 0);
|
|
||||||
test_verify("atomic", vol64 == 42);
|
|
||||||
|
|
||||||
vol64 = 42, old64 = 42, new64 = 50;
|
|
||||||
test_verify("atomic", ompi_atomic_cmpset_rel_64(&vol64, old64, new64) == 1);
|
|
||||||
test_verify("atomic", vol64 == new64);
|
|
||||||
|
|
||||||
vol64 = 42, old64 = 420, new64 = 50;
|
|
||||||
test_verify("atomic", ompi_atomic_cmpset_rel_64(&vol64, old64, new64) == 0);
|
|
||||||
test_verify("atomic", vol64 == 42);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
/* -- cmpset int tests -- */
|
|
||||||
|
|
||||||
volint = 42, oldint = 42, newint = 50;
|
|
||||||
test_verify("atomic", ompi_atomic_cmpset_int(&volint, oldint, newint) == 1);
|
|
||||||
test_verify("atomic", volint == newint);
|
|
||||||
|
|
||||||
volint = 42, oldint = 420, newint = 50;
|
|
||||||
test_verify("atomic", ompi_atomic_cmpset_int(&volint, oldint, newint) == 0);
|
|
||||||
test_verify("atomic", volint == 42);
|
|
||||||
|
|
||||||
volint = 42, oldint = 42, newint = 50;
|
|
||||||
test_verify("atomic", ompi_atomic_cmpset_acq_int(&volint, oldint, newint) == 1);
|
|
||||||
test_verify("atomic", volint == newint);
|
|
||||||
|
|
||||||
volint = 42, oldint = 420, newint = 50;
|
|
||||||
test_verify("atomic", ompi_atomic_cmpset_acq_int(&volint, oldint, newint) == 0);
|
|
||||||
test_verify("atomic", volint == 42);
|
|
||||||
|
|
||||||
volint = 42, oldint = 42, newint = 50;
|
|
||||||
test_verify("atomic", ompi_atomic_cmpset_rel_int(&volint, oldint, newint) == 1);
|
|
||||||
test_verify("atomic", volint == newint);
|
|
||||||
|
|
||||||
volint = 42, oldint = 420, newint = 50;
|
|
||||||
test_verify("atomic", ompi_atomic_cmpset_rel_int(&volint, oldint, newint) == 0);
|
|
||||||
test_verify("atomic", volint == 42);
|
|
||||||
|
|
||||||
|
|
||||||
/* -- cmpset ptr tests -- */
|
|
||||||
|
|
||||||
volptr = (void *) 42, oldptr = (void *) 42, newptr = (void *) 50;
|
|
||||||
test_verify("atomic", ompi_atomic_cmpset_ptr(&volptr, oldptr, newptr) == 1);
|
|
||||||
test_verify("atomic", volptr == newptr);
|
|
||||||
|
|
||||||
volptr = (void *) 42, oldptr = (void *) 420, newptr = (void *) 50;
|
|
||||||
test_verify("atomic", ompi_atomic_cmpset_ptr(&volptr, oldptr, newptr) == 0);
|
|
||||||
test_verify("atomic", volptr == (void *) 42);
|
|
||||||
|
|
||||||
volptr = (void *) 42, oldptr = (void *) 42, newptr = (void *) 50;
|
|
||||||
test_verify("atomic", ompi_atomic_cmpset_acq_ptr(&volptr, oldptr, newptr) == 1);
|
|
||||||
test_verify("atomic", volptr == newptr);
|
|
||||||
|
|
||||||
volptr = (void *) 42, oldptr = (void *) 420, newptr = (void *) 50;
|
|
||||||
test_verify("atomic", ompi_atomic_cmpset_acq_ptr(&volptr, oldptr, newptr) == 0);
|
|
||||||
test_verify("atomic", volptr == (void *) 42);
|
|
||||||
|
|
||||||
volptr = (void *) 42, oldptr = (void *) 42, newptr = (void *) 50;
|
|
||||||
test_verify("atomic", ompi_atomic_cmpset_rel_ptr(&volptr, oldptr, newptr) == 1);
|
|
||||||
test_verify("atomic", volptr == newptr);
|
|
||||||
|
|
||||||
volptr = (void *) 42, oldptr = (void *) 420, newptr = (void *) 50;
|
|
||||||
test_verify("atomic", ompi_atomic_cmpset_rel_ptr(&volptr, oldptr, newptr) == 0);
|
|
||||||
test_verify("atomic", volptr == (void *) 42);
|
|
||||||
|
|
||||||
/* -- add_32 tests -- */
|
|
||||||
|
|
||||||
val32 = 42;
|
|
||||||
test_verify("atomic", ompi_atomic_add_32(&val32, 5) == (42 + 5));
|
|
||||||
test_verify("atomic", (42 + 5) == val32);
|
|
||||||
|
|
||||||
/* -- add_64 tests -- */
|
|
||||||
#ifdef ENABLE_64_BIT
|
|
||||||
if (enable_64_bit_tests) {
|
|
||||||
val64 = 42;
|
|
||||||
test_verify("atomic", ompi_atomic_add_64(&val64, 5) == (42 + 5));
|
|
||||||
test_verify("atomic", (42 + 5) == val64);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
/* -- add_int tests -- */
|
|
||||||
|
|
||||||
valint = 42;
|
|
||||||
test_verify("atomic", ompi_atomic_add_int(&valint, 5) == (42 + 5));
|
|
||||||
test_verify("atomic", (42 + 5) == valint);
|
|
||||||
|
|
||||||
|
|
||||||
/* threaded tests */
|
|
||||||
|
|
||||||
val32 = 0;
|
|
||||||
#ifdef ENABLE_64_BIT
|
|
||||||
val64 = 0ul;
|
|
||||||
#endif
|
|
||||||
valint = 0;
|
|
||||||
|
|
||||||
/* -- create the thread set -- */
|
|
||||||
|
|
||||||
th = (pthread_t *) malloc(nthreads * sizeof(pthread_t));
|
|
||||||
if (!th) {
|
|
||||||
perror("malloc");
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
for (tid = 0; tid < nthreads; tid++) {
|
|
||||||
if (pthread_create(&th[tid], NULL, thread_main, (void *) tid) != 0) {
|
|
||||||
perror("pthread_create");
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -- wait for the thread set to finish -- */
|
|
||||||
|
|
||||||
for (tid = 0; tid < nthreads; tid++) {
|
|
||||||
void *thread_return;
|
|
||||||
|
|
||||||
if (pthread_join(th[tid], &thread_return) != 0) {
|
|
||||||
perror("pthread_join");
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
verbose("main: thread %d returned %d\n", tid, (int) thread_return);
|
|
||||||
}
|
|
||||||
free(th);
|
|
||||||
|
|
||||||
test_verify("atomic", val32 == (5 * nthreads * nreps));
|
|
||||||
#ifdef ENABLE_64_BIT
|
|
||||||
if (enable_64_bit_tests) {
|
|
||||||
test_verify("atomic", val64 == (5 * nthreads * nreps));
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
test_verify("atomic", valint == (5 * nthreads * nreps));
|
|
||||||
|
|
||||||
return test_finalize();
|
|
||||||
}
|
|
@ -1,50 +0,0 @@
|
|||||||
#! /bin/csh -f
|
|
||||||
# Name
|
|
||||||
# ====
|
|
||||||
# run script for include tests
|
|
||||||
|
|
||||||
# Arguements
|
|
||||||
# ==========
|
|
||||||
#
|
|
||||||
# test_list = no args or "all" runs all tests
|
|
||||||
# or
|
|
||||||
# atomic runs atomic tests
|
|
||||||
|
|
||||||
# Usage
|
|
||||||
#
|
|
||||||
# =====
|
|
||||||
# To invoke this script, enter either
|
|
||||||
# run_tests
|
|
||||||
# with no arguments to run all tests, or
|
|
||||||
# run_tests <test_name>
|
|
||||||
|
|
||||||
umask 007
|
|
||||||
|
|
||||||
if ("x$1" == "x") then
|
|
||||||
./atomic
|
|
||||||
else
|
|
||||||
foreach target ($argv)
|
|
||||||
switch ($target)
|
|
||||||
case "all":
|
|
||||||
./atomic
|
|
||||||
breaksw
|
|
||||||
case "atomic"
|
|
||||||
./$target
|
|
||||||
breaksw
|
|
||||||
case "help"
|
|
||||||
echo "correct use: "
|
|
||||||
echo " run_tests help (this message)"
|
|
||||||
echo " run_tests all (to run all include tests)"
|
|
||||||
echo "or run_tests <atomic>"
|
|
||||||
break
|
|
||||||
default
|
|
||||||
echo "There is no program <$target> to run"
|
|
||||||
echo "correct use: "
|
|
||||||
echo " run_tests help (this message)"
|
|
||||||
echo " run_tests all (to run all include tests)"
|
|
||||||
echo "or run_tests <atomic>"
|
|
||||||
break
|
|
||||||
endsw
|
|
||||||
end
|
|
||||||
|
|
||||||
endif
|
|
@ -14,4 +14,4 @@
|
|||||||
|
|
||||||
include $(top_srcdir)/config/Makefile.options
|
include $(top_srcdir)/config/Makefile.options
|
||||||
|
|
||||||
SUBDIRS = oob llm pcm ns gpr
|
SUBDIRS = ns gpr rds
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
# -*- makefile -*-
|
|
||||||
#
|
|
||||||
# Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
||||||
# All rights reserved.
|
|
||||||
# Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
||||||
# All rights reserved.
|
|
||||||
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
||||||
# University of Stuttgart. All rights reserved.
|
|
||||||
# $COPYRIGHT$
|
|
||||||
#
|
|
||||||
# Additional copyrights may follow
|
|
||||||
#
|
|
||||||
# $HEADER$
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(top_srcdir)/config/Makefile.options
|
|
||||||
|
|
||||||
SUBDIRS = base
|
|
@ -1,27 +0,0 @@
|
|||||||
# -*- makefile -*-
|
|
||||||
#
|
|
||||||
# Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
||||||
# All rights reserved.
|
|
||||||
# Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
||||||
# All rights reserved.
|
|
||||||
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
||||||
# University of Stuttgart. All rights reserved.
|
|
||||||
# $COPYRIGHT$
|
|
||||||
#
|
|
||||||
# Additional copyrights may follow
|
|
||||||
#
|
|
||||||
# $HEADER$
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(top_srcdir)/config/Makefile.options
|
|
||||||
AM_CPPFLAGS = -I$(top_srcdir)/test/support -DOMPI_ENABLE_DEBUG_OVERRIDE=1
|
|
||||||
|
|
||||||
noinst_PROGRAMS = \
|
|
||||||
parse_hostfile
|
|
||||||
|
|
||||||
parse_hostfile_SOURCES = \
|
|
||||||
parse_hostfile.c
|
|
||||||
parse_hostfile_LDADD = \
|
|
||||||
$(top_builddir)/src/libmpi.la \
|
|
||||||
$(top_builddir)/test/support/libsupport.la
|
|
||||||
parse_hostfile_DEPENDENCIES = $(parse_hostfile_LDADD)
|
|
@ -1,122 +0,0 @@
|
|||||||
/* -*- C -*-
|
|
||||||
*
|
|
||||||
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
||||||
* All rights reserved.
|
|
||||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
||||||
* All rights reserved.
|
|
||||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
||||||
* University of Stuttgart. All rights reserved.
|
|
||||||
* $COPYRIGHT$
|
|
||||||
*
|
|
||||||
* Additional copyrights may follow
|
|
||||||
*
|
|
||||||
* $HEADER$
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "ompi_config.h"
|
|
||||||
#include "support.h"
|
|
||||||
|
|
||||||
#include "class/ompi_object.h"
|
|
||||||
#include "class/ompi_list.h"
|
|
||||||
#include "mca/llm/base/base.h"
|
|
||||||
#include "mca/llm/base/base_internal.h"
|
|
||||||
|
|
||||||
static char *cmd1_str="diff ./test1_out ./test1_out_std";
|
|
||||||
static char *cmd2_str="diff ./test2_out ./test2_out_std";
|
|
||||||
|
|
||||||
extern void mca_llm_base_setup(void);
|
|
||||||
|
|
||||||
|
|
||||||
int
|
|
||||||
main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
ompi_list_t *hostlist;
|
|
||||||
mca_llm_base_hostfile_node_t *node;
|
|
||||||
ompi_rte_valuepair_t *valpair;
|
|
||||||
ompi_list_item_t *nodeitem, *valpairitem;
|
|
||||||
FILE *test1_out=NULL; /* output file for first test */
|
|
||||||
FILE *test2_out=NULL; /* output file for second test */
|
|
||||||
int result; /* result of system call */
|
|
||||||
|
|
||||||
test_init("parse_hostfile_t");
|
|
||||||
|
|
||||||
/* setup the llm */
|
|
||||||
mca_llm_base_setup();
|
|
||||||
|
|
||||||
/* Open output files for the tests */
|
|
||||||
test1_out = fopen("./test1_out", "w+" );
|
|
||||||
if( test1_out == NULL ) {
|
|
||||||
printf("can't open test 1 output file\n");
|
|
||||||
exit(-1);
|
|
||||||
}
|
|
||||||
test2_out = fopen("./test2_out", "w+" );
|
|
||||||
if( test2_out == NULL ) {
|
|
||||||
printf("can't open test 2 output file\n");
|
|
||||||
exit(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* test 1 - test base_parse_hostfile */
|
|
||||||
hostlist = mca_llm_base_parse_hostfile("testfile");
|
|
||||||
assert(hostlist != NULL);
|
|
||||||
|
|
||||||
fprintf(test1_out,"Original hostfile\n");
|
|
||||||
|
|
||||||
for (nodeitem = ompi_list_get_first(hostlist);
|
|
||||||
nodeitem != ompi_list_get_end(hostlist);
|
|
||||||
nodeitem = ompi_list_get_next(nodeitem)) {
|
|
||||||
|
|
||||||
node = (mca_llm_base_hostfile_node_t*) nodeitem;
|
|
||||||
fprintf(test1_out, "\t%s %d\n", node->hostname, node->count);
|
|
||||||
|
|
||||||
for (valpairitem = ompi_list_get_first(node->info);
|
|
||||||
valpairitem != ompi_list_get_end(node->info);
|
|
||||||
valpairitem = ompi_list_get_next(valpairitem)) {
|
|
||||||
valpair = (ompi_rte_valuepair_t*) valpairitem;
|
|
||||||
fprintf(test1_out, "\t\t%s = %s\n", valpair->key, valpair->value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fclose( test1_out );
|
|
||||||
|
|
||||||
/* See if the file matches the test standard */
|
|
||||||
result = system( cmd1_str );
|
|
||||||
if( result == 0 ) {
|
|
||||||
test_success();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
test_failure( "parse_hostfile test1 failed" );
|
|
||||||
}
|
|
||||||
|
|
||||||
/* test 2 */
|
|
||||||
mca_llm_base_collapse_resources(hostlist);
|
|
||||||
fprintf(test2_out, "Compressed hostfile\n");
|
|
||||||
|
|
||||||
for (nodeitem = ompi_list_get_first(hostlist);
|
|
||||||
nodeitem != ompi_list_get_end(hostlist);
|
|
||||||
nodeitem = ompi_list_get_next(nodeitem)) {
|
|
||||||
|
|
||||||
node = (mca_llm_base_hostfile_node_t*) nodeitem;
|
|
||||||
fprintf(test2_out, "\t%s %d\n", node->hostname, node->count);
|
|
||||||
|
|
||||||
for (valpairitem = ompi_list_get_first(node->info);
|
|
||||||
valpairitem != ompi_list_get_end(node->info);
|
|
||||||
valpairitem = ompi_list_get_next(valpairitem)) {
|
|
||||||
valpair = (ompi_rte_valuepair_t*) valpairitem;
|
|
||||||
fprintf(test2_out, "\t\t%s = %s\n", valpair->key, valpair->value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fclose( test2_out );
|
|
||||||
|
|
||||||
/* See if the file matches the test standard */
|
|
||||||
result = system( cmd2_str );
|
|
||||||
if( result == 0 ) {
|
|
||||||
test_success();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
test_failure( "parse_hostfile test2 failed" );
|
|
||||||
}
|
|
||||||
|
|
||||||
OBJ_RELEASE(hostlist);
|
|
||||||
|
|
||||||
test_finalize();
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -1,50 +0,0 @@
|
|||||||
#! /bin/csh -f
|
|
||||||
# Name
|
|
||||||
# ====
|
|
||||||
# run for mca llm base tests
|
|
||||||
|
|
||||||
# Arguements
|
|
||||||
# ==========
|
|
||||||
#
|
|
||||||
# test_list = no args runs all tests
|
|
||||||
# or
|
|
||||||
# parse_hostfile runs ompi llm base parse_hostfile tests
|
|
||||||
|
|
||||||
# Usage
|
|
||||||
#
|
|
||||||
# =====
|
|
||||||
# To invoke this script, enter either
|
|
||||||
# run
|
|
||||||
# with no arguments to run all tests, or
|
|
||||||
# run <test_name>
|
|
||||||
|
|
||||||
umask 007
|
|
||||||
|
|
||||||
if ("x$1" == "x") then
|
|
||||||
./parse_hostfile;
|
|
||||||
else
|
|
||||||
foreach target ($argv)
|
|
||||||
switch ($target)
|
|
||||||
case "all"
|
|
||||||
./parse_hostfile
|
|
||||||
breaksw
|
|
||||||
case "parse_hostfile":
|
|
||||||
./$target
|
|
||||||
breaksw
|
|
||||||
case "help":
|
|
||||||
echo "correct use: "
|
|
||||||
echo " run_tests help (this message)"
|
|
||||||
echo " run_tests all (to run all class tests)"
|
|
||||||
echo "or run_tests < parse_hostfile >"
|
|
||||||
break
|
|
||||||
breaksw
|
|
||||||
default:
|
|
||||||
echo "There is no test program <$target> to run."
|
|
||||||
echo " run_tests all (to run all class tests)"
|
|
||||||
echo "or run_tests < parse_hostfile >"
|
|
||||||
break
|
|
||||||
endsw
|
|
||||||
end
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
|||||||
Original hostfile
|
|
||||||
host1.example.com 1
|
|
||||||
key = val
|
|
||||||
host2.example.com 3
|
|
||||||
user = anju
|
|
||||||
string = "I am a string"
|
|
||||||
host3.example.com 1
|
|
||||||
192.168.1.1 1
|
|
||||||
192.168.2.1 4
|
|
||||||
user = brbarret
|
|
||||||
string = "Go away"
|
|
||||||
host2.example.com 2
|
|
||||||
user = bbarrett
|
|
||||||
host3.example.com 2
|
|
||||||
host4.example.com 2
|
|
||||||
user = bbarrett
|
|
||||||
foo = bar
|
|
||||||
host4.example.com 5
|
|
||||||
user = bbarrett
|
|
||||||
bar = foo
|
|
||||||
host5.example.com 1
|
|
||||||
foo = bar
|
|
||||||
host5.example.com 1
|
|
||||||
bar = foo
|
|
@ -1,21 +0,0 @@
|
|||||||
Compressed hostfile
|
|
||||||
host1.example.com 1
|
|
||||||
key = val
|
|
||||||
host2.example.com 3
|
|
||||||
user = anju
|
|
||||||
string = "I am a string"
|
|
||||||
host3.example.com 3
|
|
||||||
192.168.1.1 1
|
|
||||||
192.168.2.1 4
|
|
||||||
user = brbarret
|
|
||||||
string = "Go away"
|
|
||||||
host2.example.com 2
|
|
||||||
user = bbarrett
|
|
||||||
host4.example.com 7
|
|
||||||
user = bbarrett
|
|
||||||
foo = bar
|
|
||||||
user = bbarrett
|
|
||||||
bar = foo
|
|
||||||
host5.example.com 2
|
|
||||||
foo = bar
|
|
||||||
bar = foo
|
|
@ -1,11 +0,0 @@
|
|||||||
host1.example.com key = val
|
|
||||||
host2.example.com count = 3 user = anju string = "I am a string"
|
|
||||||
host3.example.com count = 1
|
|
||||||
192.168.1.1
|
|
||||||
192.168.2.1 count = 4 user=brbarret string="Go away"
|
|
||||||
host2.example.com count = 2 user = bbarrett
|
|
||||||
host3.example.com count = 2
|
|
||||||
host4.example.com count = 2 user = bbarrett foo = bar
|
|
||||||
host4.example.com count = 5 user = bbarrett bar = foo
|
|
||||||
host5.example.com foo = bar
|
|
||||||
host5.example.com bar = foo
|
|
@ -1,57 +0,0 @@
|
|||||||
#! /bin/csh -f
|
|
||||||
# Name
|
|
||||||
# ====
|
|
||||||
# run script for mca llm tests
|
|
||||||
|
|
||||||
# Arguements
|
|
||||||
# ==========
|
|
||||||
#
|
|
||||||
# test_list = no args runs all tests
|
|
||||||
# or
|
|
||||||
# base runs ompi llm base tests
|
|
||||||
|
|
||||||
# Usage
|
|
||||||
#
|
|
||||||
# =====
|
|
||||||
# To invoke this script, enter either
|
|
||||||
# run_tests
|
|
||||||
# with no arguments to run all tests, or
|
|
||||||
# run_tests <test_name>
|
|
||||||
|
|
||||||
umask 007
|
|
||||||
|
|
||||||
if ("x$1" == "x") then
|
|
||||||
cd base;
|
|
||||||
./run_tests;
|
|
||||||
cd ..;
|
|
||||||
else
|
|
||||||
foreach target ($argv)
|
|
||||||
switch ($target)
|
|
||||||
case "all":
|
|
||||||
cd base;
|
|
||||||
./run_tests;
|
|
||||||
cd ..;
|
|
||||||
breaksw
|
|
||||||
case "base":
|
|
||||||
cd $target;
|
|
||||||
./run_tests;
|
|
||||||
cd ..;
|
|
||||||
breaksw
|
|
||||||
case "help":
|
|
||||||
echo "correct use: "
|
|
||||||
echo " run_tests help (this message)"
|
|
||||||
echo " run_tests (to run all mca llm tests)"
|
|
||||||
echo "or run_tests < base >"
|
|
||||||
break;
|
|
||||||
breaksw
|
|
||||||
default:
|
|
||||||
echo "There is no part of mca llm named <$target>"
|
|
||||||
echo "correct use: "
|
|
||||||
echo " run_tests (to run all mca llm tests)"
|
|
||||||
echo "or run_tests < base >"
|
|
||||||
break;
|
|
||||||
endsw
|
|
||||||
end
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
|||||||
# -*- makefile -*-
|
|
||||||
#
|
|
||||||
# Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
||||||
# All rights reserved.
|
|
||||||
# Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
||||||
# All rights reserved.
|
|
||||||
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
||||||
# University of Stuttgart. All rights reserved.
|
|
||||||
# $COPYRIGHT$
|
|
||||||
#
|
|
||||||
# Additional copyrights may follow
|
|
||||||
#
|
|
||||||
# $HEADER$
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(top_srcdir)/config/Makefile.options
|
|
||||||
|
|
||||||
SUBDIRS = base
|
|
@ -1,40 +0,0 @@
|
|||||||
# -*- makefile -*-
|
|
||||||
#
|
|
||||||
# Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
||||||
# All rights reserved.
|
|
||||||
# Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
||||||
# All rights reserved.
|
|
||||||
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
||||||
# University of Stuttgart. All rights reserved.
|
|
||||||
# $COPYRIGHT$
|
|
||||||
#
|
|
||||||
# Additional copyrights may follow
|
|
||||||
#
|
|
||||||
# $HEADER$
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(top_srcdir)/config/Makefile.options
|
|
||||||
AM_CPPFLAGS = -I$(top_srcdir)/test/support -DOMPI_ENABLE_DEBUG_OVERRIDE=1
|
|
||||||
|
|
||||||
EXTRA_DIST = \
|
|
||||||
test1_out_std \
|
|
||||||
test2_out_std
|
|
||||||
|
|
||||||
noinst_PROGRAMS = \
|
|
||||||
build_env \
|
|
||||||
sched_comm
|
|
||||||
|
|
||||||
build_env_SOURCES = \
|
|
||||||
build_env.c
|
|
||||||
build_env_LDADD = \
|
|
||||||
$(top_builddir)/src/libmpi.la \
|
|
||||||
$(top_builddir)/test/support/libsupport.la
|
|
||||||
build_env_DEPENDENCIES = $(build_env_LDADD)
|
|
||||||
|
|
||||||
sched_comm_SOURCES = \
|
|
||||||
sched_comm.c
|
|
||||||
sched_comm_LDADD = \
|
|
||||||
$(top_builddir)/src/libmpi.la \
|
|
||||||
$(top_builddir)/test/support/libsupport.la
|
|
||||||
sched_comm_DEPENDENCIES = $(sched_comm_LDADD)
|
|
||||||
|
|
@ -1,71 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
||||||
* All rights reserved.
|
|
||||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
||||||
* All rights reserved.
|
|
||||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
||||||
* University of Stuttgart. All rights reserved.
|
|
||||||
* $COPYRIGHT$
|
|
||||||
*
|
|
||||||
* Additional copyrights may follow
|
|
||||||
*
|
|
||||||
* $HEADER$
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include "ompi_config.h"
|
|
||||||
#include "support.h"
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#include "mca/pcm/base/base.h"
|
|
||||||
#include "util/argv.h"
|
|
||||||
|
|
||||||
char *env[] = {
|
|
||||||
"ENV0=",
|
|
||||||
"OMPI_MCA_CONFIG_FOO=blah",
|
|
||||||
"ENV1=blah blah blah",
|
|
||||||
"FOO_OMPI_MCA_BLAH=hi there",
|
|
||||||
"ENV2=foo bar is fun",
|
|
||||||
"ENV3=123",
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
int
|
|
||||||
main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
int len = 0;
|
|
||||||
char ** out = NULL;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
test_init("sched_comm_t");
|
|
||||||
|
|
||||||
len = ompi_argv_count(env);
|
|
||||||
if (len != 6) {
|
|
||||||
test_failure( "ompi_argv_count(env) failed" );
|
|
||||||
} else {
|
|
||||||
test_success();
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = mca_pcm_base_build_base_env(env, &out);
|
|
||||||
if (OMPI_SUCCESS != ret) {
|
|
||||||
test_failure("mca_pcm_base_build_base_env");
|
|
||||||
} else {
|
|
||||||
test_success();
|
|
||||||
}
|
|
||||||
|
|
||||||
len = ompi_argv_count(out);
|
|
||||||
if (len != 1) {
|
|
||||||
printf("out:\n");
|
|
||||||
for (i = 0 ; out[i] != NULL ; ++i) {
|
|
||||||
printf("\t%s\n", out[i]);
|
|
||||||
}
|
|
||||||
test_failure("ompi_argv_count(out)");
|
|
||||||
} else {
|
|
||||||
test_success();
|
|
||||||
}
|
|
||||||
|
|
||||||
test_finalize();
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -1,57 +0,0 @@
|
|||||||
#! /bin/csh -f
|
|
||||||
# Name
|
|
||||||
# ====
|
|
||||||
# run for mca pcm base tests
|
|
||||||
|
|
||||||
# Arguements
|
|
||||||
# ==========
|
|
||||||
#
|
|
||||||
# test_list = no args runs all tests
|
|
||||||
# or
|
|
||||||
# sched_comm runs ompi pcm base sched_comm tests
|
|
||||||
# build_env runs ompi pcm base build_env tests
|
|
||||||
|
|
||||||
# Usage
|
|
||||||
#
|
|
||||||
# =====
|
|
||||||
# To invoke this script, enter either
|
|
||||||
# run
|
|
||||||
# with no arguments to run all tests, or
|
|
||||||
# run <test_name>
|
|
||||||
|
|
||||||
umask 007
|
|
||||||
|
|
||||||
if ("x$1" == "x") then
|
|
||||||
./sched_comm;
|
|
||||||
./build_env
|
|
||||||
else
|
|
||||||
foreach target ($argv)
|
|
||||||
switch ($target)
|
|
||||||
case "all"
|
|
||||||
./sched_comm;
|
|
||||||
./build_env
|
|
||||||
breaksw
|
|
||||||
case "sched_comm":
|
|
||||||
./sched_comm;
|
|
||||||
breaksw
|
|
||||||
case "build_env":
|
|
||||||
./build_env
|
|
||||||
breaksw
|
|
||||||
case "help":
|
|
||||||
echo "correct use: "
|
|
||||||
echo " run_tests help (this message)"
|
|
||||||
echo " run_tests all (to run all mca pcm base tests)"
|
|
||||||
echo "or run_tests < sched_comm | build_env >"
|
|
||||||
break
|
|
||||||
breaksw
|
|
||||||
default
|
|
||||||
echo "No test named <$target> available to run"
|
|
||||||
echo "correct use: "
|
|
||||||
echo " run_tests all (to run all mca pcm base tests)"
|
|
||||||
echo "or run_tests < sched_comm | build_env >"
|
|
||||||
break
|
|
||||||
endsw
|
|
||||||
end
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
@ -1,117 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
||||||
* All rights reserved.
|
|
||||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
||||||
* All rights reserved.
|
|
||||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
||||||
* University of Stuttgart. All rights reserved.
|
|
||||||
* $COPYRIGHT$
|
|
||||||
*
|
|
||||||
* Additional copyrights may follow
|
|
||||||
*
|
|
||||||
* $HEADER$
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include "ompi_config.h"
|
|
||||||
#include "support.h"
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#include "runtime/runtime_types.h"
|
|
||||||
#include "mca/pcm/base/base.h"
|
|
||||||
|
|
||||||
static char *cmd1_str="diff ./test1_out ./test1_out_std";
|
|
||||||
static char *cmd2_str="diff ./test2_out ./test2_out_std";
|
|
||||||
|
|
||||||
char *env[] = {
|
|
||||||
"ENV1=blah blah blah",
|
|
||||||
"ENV2=foo bar is fun",
|
|
||||||
"ENV3=123",
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
int
|
|
||||||
main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
ompi_rte_node_schedule_t *schedout, *schedin;
|
|
||||||
FILE *test1_out=NULL; /* output file for first test */
|
|
||||||
FILE *test2_out=NULL; /* output file for second test */
|
|
||||||
FILE *test2_in = NULL;
|
|
||||||
int result; /* result of system call */
|
|
||||||
int jobid = 123;
|
|
||||||
int out_num_procs = 5;
|
|
||||||
int in_num_procs = 5;
|
|
||||||
|
|
||||||
test_init("sched_comm_t");
|
|
||||||
|
|
||||||
/* Open output files for the tests */
|
|
||||||
test1_out = fopen("./test1_out", "w+" );
|
|
||||||
if( test1_out == NULL ) {
|
|
||||||
printf("can't open test 1 output file\n");
|
|
||||||
exit(-1);
|
|
||||||
}
|
|
||||||
test2_out = fopen("./test2_out", "w+" );
|
|
||||||
if( test2_out == NULL ) {
|
|
||||||
printf("can't open test 2 output file\n");
|
|
||||||
exit(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
schedout = OBJ_NEW(ompi_rte_node_schedule_t);
|
|
||||||
schedout->argv = argv;
|
|
||||||
schedout->argc = argc;
|
|
||||||
schedout->env = env;
|
|
||||||
schedout->cwd = "/foo/bar/baz";
|
|
||||||
|
|
||||||
result = mca_pcm_base_send_schedule(test1_out, jobid, schedout,
|
|
||||||
out_num_procs);
|
|
||||||
if (result != OMPI_SUCCESS) {
|
|
||||||
test_failure("send_schedule failed");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
fclose( test1_out );
|
|
||||||
|
|
||||||
/* See if the file matches the test standard */
|
|
||||||
result = system( cmd1_str );
|
|
||||||
if( result == 0 ) {
|
|
||||||
test_success();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
test_failure( "sched_comm test1 failed" );
|
|
||||||
}
|
|
||||||
|
|
||||||
/* test 2 */
|
|
||||||
schedin = OBJ_NEW(ompi_rte_node_schedule_t);
|
|
||||||
|
|
||||||
test2_in = fopen("./test1_out", "r");
|
|
||||||
|
|
||||||
result = mca_pcm_base_recv_schedule(test2_in, &jobid, schedin,
|
|
||||||
&in_num_procs);
|
|
||||||
if (result != OMPI_SUCCESS) {
|
|
||||||
test_failure("recv_schedule failed");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
mca_pcm_base_send_schedule(test2_out, jobid, schedin, in_num_procs);
|
|
||||||
if (result != OMPI_SUCCESS) {
|
|
||||||
test_failure("send_schedule (2) failed");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
fclose( test2_out );
|
|
||||||
|
|
||||||
/* See if the file matches the test standard */
|
|
||||||
result = system( cmd2_str );
|
|
||||||
if( result == 0 ) {
|
|
||||||
test_success();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
test_failure( "sched_comm test2 failed" );
|
|
||||||
}
|
|
||||||
|
|
||||||
OBJ_RELEASE(schedin);
|
|
||||||
OBJ_RELEASE(schedout);
|
|
||||||
|
|
||||||
test_finalize();
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
@MCA_PCM@
|
|
||||||
1
|
|
||||||
123
|
|
||||||
1
|
|
||||||
73 /Users/brbarret/research/ompi/nodelist/test/mca/pcm/base/.libs/sched_comm
|
|
||||||
3
|
|
||||||
19 ENV1=blah blah blah
|
|
||||||
19 ENV2=foo bar is fun
|
|
||||||
8 ENV3=123
|
|
||||||
12 /foo/bar/baz
|
|
||||||
5
|
|
||||||
@MCA_PCM_END@
|
|
@ -1,12 +0,0 @@
|
|||||||
@MCA_PCM@
|
|
||||||
1
|
|
||||||
123
|
|
||||||
1
|
|
||||||
73 /Users/brbarret/research/ompi/nodelist/test/mca/pcm/base/.libs/sched_comm
|
|
||||||
3
|
|
||||||
19 ENV1=blah blah blah
|
|
||||||
19 ENV2=foo bar is fun
|
|
||||||
8 ENV3=123
|
|
||||||
12 /foo/bar/baz
|
|
||||||
5
|
|
||||||
@MCA_PCM_END@
|
|
@ -1,57 +0,0 @@
|
|||||||
#! /bin/csh -f
|
|
||||||
# Name
|
|
||||||
# ====
|
|
||||||
# run script for mca pcm tests
|
|
||||||
|
|
||||||
# Arguements
|
|
||||||
# ==========
|
|
||||||
#
|
|
||||||
# test_list = no args runs all tests
|
|
||||||
# or
|
|
||||||
# base runs ompi pcm base tests
|
|
||||||
|
|
||||||
# Usage
|
|
||||||
#
|
|
||||||
# =====
|
|
||||||
# To invoke this script, enter either
|
|
||||||
# run_tests
|
|
||||||
# with no arguments to run all tests, or
|
|
||||||
# run_tests <test_name>
|
|
||||||
|
|
||||||
umask 007
|
|
||||||
|
|
||||||
if ("x$1" == "x") then
|
|
||||||
cd base;
|
|
||||||
./run_tests;
|
|
||||||
cd ..;
|
|
||||||
else
|
|
||||||
foreach target ($argv)
|
|
||||||
switch ($target)
|
|
||||||
case "all":
|
|
||||||
cd base;
|
|
||||||
./run_tests;
|
|
||||||
cd ..;
|
|
||||||
breaksw
|
|
||||||
case "base":
|
|
||||||
cd $target;
|
|
||||||
./run_tests;
|
|
||||||
cd ..;
|
|
||||||
breaksw
|
|
||||||
case "help":
|
|
||||||
echo "correct use: "
|
|
||||||
echo " run_tests help (this message)"
|
|
||||||
echo " run_tests (to run all mca pcm tests)"
|
|
||||||
echo "or run_tests < base >"
|
|
||||||
break;
|
|
||||||
breaksw
|
|
||||||
default:
|
|
||||||
echo "There is no part of mca pcm named <$target>"
|
|
||||||
echo "correct use: "
|
|
||||||
echo " run_tests (to run all mca pcm tests)"
|
|
||||||
echo "or run_tests < base >"
|
|
||||||
break;
|
|
||||||
endsw
|
|
||||||
end
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
Загрузка…
x
Ссылка в новой задаче
Block a user