Merge pull request #667 from rhc54/topic/cudaext
Add CUDA MPI extension for Rolf - because @jsquyres said it was OKAY
Этот коммит содержится в:
Коммит
d01f37c063
24
ompi/mpiext/cuda/Makefile.am
Обычный файл
24
ompi/mpiext/cuda/Makefile.am
Обычный файл
@ -0,0 +1,24 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2004-2009 The Trustees of Indiana University and Indiana
|
||||||
|
# University Research and Technology
|
||||||
|
# Corporation. All rights reserved.
|
||||||
|
# Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
|
||||||
|
# Copyright (c) 2015 NVIDIA, Inc. All rights reserved
|
||||||
|
# $COPYRIGHT$
|
||||||
|
#
|
||||||
|
# Additional copyrights may follow
|
||||||
|
#
|
||||||
|
# $HEADER$
|
||||||
|
#
|
||||||
|
|
||||||
|
# This Makefile is not traversed during a normal "make all" in an OMPI
|
||||||
|
# build. It *is* traversed during "make dist", however. So you can
|
||||||
|
# put EXTRA_DIST targets in here.
|
||||||
|
#
|
||||||
|
# You can also use this as a convenience for building this MPI
|
||||||
|
# extension (i.e., "make all" in this directory to invoke "make all"
|
||||||
|
# in all the subdirectories).
|
||||||
|
|
||||||
|
SUBDIRS = c
|
||||||
|
|
||||||
|
EXTRA_DIST = README.txt
|
10
ompi/mpiext/cuda/README.txt
Обычный файл
10
ompi/mpiext/cuda/README.txt
Обычный файл
@ -0,0 +1,10 @@
|
|||||||
|
# Copyright (c) 2015 NVIDIA, Inc. All rights reserved.
|
||||||
|
|
||||||
|
$COPYRIGHT$
|
||||||
|
|
||||||
|
Rolf Vandervart
|
||||||
|
|
||||||
|
|
||||||
|
This extension provides a blah blah blah
|
||||||
|
|
||||||
|
See MPIx_CUDA_SUPPORT(3) for more details.
|
41
ompi/mpiext/cuda/c/MPIx_CUDA_SUPPORT.3in
Обычный файл
41
ompi/mpiext/cuda/c/MPIx_CUDA_SUPPORT.3in
Обычный файл
@ -0,0 +1,41 @@
|
|||||||
|
.\" Copyright 2007-2010 Oracle and/or its affiliates. All rights reserved.
|
||||||
|
.\" Copyright (c) 1996 Thinking Machines Corporation
|
||||||
|
.\" Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
|
||||||
|
.\" Copyright (c) 2015 NVIDIA, Inc. All rights reserved.
|
||||||
|
.TH MPIx_CUDA_SUPPORT 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#"
|
||||||
|
.SH NAME
|
||||||
|
\fBMPIx_CUDA_SUPPORT\fP \- Obtain prettyprint strings of processor affinity information for this process
|
||||||
|
|
||||||
|
.SH SYNTAX
|
||||||
|
.ft R
|
||||||
|
.SH C Syntax
|
||||||
|
.nf
|
||||||
|
#include <mpi.h>
|
||||||
|
#include <mpi-ext.h>
|
||||||
|
|
||||||
|
int MPIx_CUDA_SUPPORT(void)
|
||||||
|
.fi
|
||||||
|
.SH Fortran Syntax
|
||||||
|
There is no Fortran binding for this function.
|
||||||
|
.
|
||||||
|
.SH C++ Syntax
|
||||||
|
There is no C++ binding for this function.
|
||||||
|
.
|
||||||
|
.SH INPUT PARAMETERS
|
||||||
|
.ft R
|
||||||
|
.
|
||||||
|
.SH OUTPUT PARAMETERS
|
||||||
|
.ft R
|
||||||
|
.TP 1i
|
||||||
|
|
||||||
|
.SH DESCRIPTION
|
||||||
|
.ft R
|
||||||
|
|
||||||
|
.SH Examples
|
||||||
|
.ft R
|
||||||
|
|
||||||
|
.SH See Also
|
||||||
|
.ft R
|
||||||
|
.nf
|
||||||
|
JeffIsAToad(1)
|
||||||
|
.fi
|
45
ompi/mpiext/cuda/c/Makefile.am
Обычный файл
45
ompi/mpiext/cuda/c/Makefile.am
Обычный файл
@ -0,0 +1,45 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2004-2009 The Trustees of Indiana University and Indiana
|
||||||
|
# University Research and Technology
|
||||||
|
# Corporation. All rights reserved.
|
||||||
|
# Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved.
|
||||||
|
# Copyright (c) 2015 NVIDIA, Inc. All rights reserved.
|
||||||
|
# $COPYRIGHT$
|
||||||
|
#
|
||||||
|
# Additional copyrights may follow
|
||||||
|
#
|
||||||
|
# $HEADER$
|
||||||
|
#
|
||||||
|
|
||||||
|
# This file builds the C bindings for MPI extensions. It must be
|
||||||
|
# present in all MPI extensions.
|
||||||
|
|
||||||
|
# We must set these #defines so that the inner OMPI MPI prototype
|
||||||
|
# header files do the Right Thing.
|
||||||
|
AM_CPPFLAGS = -DOMPI_PROFILE_LAYER=0 -DOMPI_COMPILING_FORTRAN_WRAPPERS=1
|
||||||
|
|
||||||
|
include $(top_srcdir)/Makefile.ompi-rules
|
||||||
|
|
||||||
|
# Convenience libtool library that will be slurped up into libmpi.la.
|
||||||
|
noinst_LTLIBRARIES = libmpiext_cuda.la
|
||||||
|
|
||||||
|
# This is where the top-level header file (that is included in
|
||||||
|
# <mpi-ext.h>) must be installed.
|
||||||
|
ompidir = $(ompiincludedir)/ompi/mpiext/cuda/c
|
||||||
|
|
||||||
|
# This is the header file that is installed.
|
||||||
|
ompi_HEADERS = mpiext_cuda.h
|
||||||
|
|
||||||
|
# Sources for the convenience libtool library. Other than the one
|
||||||
|
# header file, all source files in the extension have no file naming
|
||||||
|
# conventions.
|
||||||
|
libmpiext_cuda_la_SOURCES = \
|
||||||
|
$(ompi_HEADERS) \
|
||||||
|
mpiext_cuda.c
|
||||||
|
libmpiext_cuda_la_LDFLAGS = -module -avoid-version
|
||||||
|
|
||||||
|
# Man page installation
|
||||||
|
nodist_man_MANS = MPIx_CUDA_SUPPORT.3
|
||||||
|
|
||||||
|
# Man page sources
|
||||||
|
EXTRA_DIST = $(nodist_man_MANS:.3=.3in)
|
26
ompi/mpiext/cuda/c/mpiext_cuda.c
Обычный файл
26
ompi/mpiext/cuda/c/mpiext_cuda.c
Обычный файл
@ -0,0 +1,26 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2004-2009 The Trustees of Indiana University and Indiana
|
||||||
|
* University Research and Technology
|
||||||
|
* Corporation. All rights reserved.
|
||||||
|
* Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
|
||||||
|
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
|
||||||
|
* Copyright (c) 2012 Los Alamos National Security, LLC. All rights
|
||||||
|
* reserved.
|
||||||
|
* Copyright (c) 2015 NVIDIA, Inc. All rights reserved.
|
||||||
|
* $COPYRIGHT$
|
||||||
|
*
|
||||||
|
* Additional copyrights may follow
|
||||||
|
*
|
||||||
|
* $HEADER$
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "ompi_config.h"
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
int MPIx_CUDA_SUPPORT(void)
|
||||||
|
{
|
||||||
|
return OPAL_ERR_NOT_SUPPORTED;
|
||||||
|
}
|
15
ompi/mpiext/cuda/c/mpiext_cuda.h
Обычный файл
15
ompi/mpiext/cuda/c/mpiext_cuda.h
Обычный файл
@ -0,0 +1,15 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2004-2009 The Trustees of Indiana University.
|
||||||
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
|
||||||
|
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
|
||||||
|
* Copyright (c) 2015 NVIDIA, Inc. All rights reserved.
|
||||||
|
* $COPYRIGHT$
|
||||||
|
*
|
||||||
|
* Additional copyrights may follow
|
||||||
|
*
|
||||||
|
* $HEADER$
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
OMPI_DECLSPEC int MPIx_CUDA_SUPPORT(void);
|
41
ompi/mpiext/cuda/configure.m4
Обычный файл
41
ompi/mpiext/cuda/configure.m4
Обычный файл
@ -0,0 +1,41 @@
|
|||||||
|
# -*- shell-script -*-
|
||||||
|
#
|
||||||
|
# Copyright (c) 2004-2010 The Trustees of Indiana University.
|
||||||
|
# All rights reserved.
|
||||||
|
# Copyright (c) 2012-2015 Cisco Systems, Inc. All rights reserved.
|
||||||
|
# Copyright (c) 2015 Intel, Inc. All rights reserved.
|
||||||
|
# $COPYRIGHT$
|
||||||
|
#
|
||||||
|
# Additional copyrights may follow
|
||||||
|
#
|
||||||
|
# $HEADER$
|
||||||
|
#
|
||||||
|
|
||||||
|
# OMPI_MPIEXT_cuda_CONFIG([action-if-found], [action-if-not-found])
|
||||||
|
# -----------------------------------------------------------
|
||||||
|
AC_DEFUN([OMPI_MPIEXT_cuda_CONFIG],[
|
||||||
|
AC_CONFIG_FILES([ompi/mpiext/cuda/Makefile])
|
||||||
|
AC_CONFIG_FILES([ompi/mpiext/cuda/c/Makefile])
|
||||||
|
|
||||||
|
OPAL_VAR_SCOPE_PUSH([ompi_mpi_ext_cuda_happy])
|
||||||
|
|
||||||
|
# If we don't want FT, don't compile this extention
|
||||||
|
AS_IF([test "$ENABLE_cuda" = "1" || \
|
||||||
|
test "$ENABLE_EXT_ALL" = "1"],
|
||||||
|
[ompi_mpi_ext_cuda_happy=1],
|
||||||
|
[ompi_mpi_ext_cuda_happy=0])
|
||||||
|
|
||||||
|
AS_IF([test "$ompi_mpi_ext_cuda_happy" = "1" && \
|
||||||
|
test "$CUDA_SUPPORT" = "1"],
|
||||||
|
[$1],
|
||||||
|
[ # Error if the user specifically asked for this extension,
|
||||||
|
# but we can't build it.
|
||||||
|
AS_IF([test "$ENABLE_cuda" = "1"],
|
||||||
|
[AC_MSG_WARN([Requested "cuda" MPI extension, but cannot build it])
|
||||||
|
AC_MSG_WARN([because cuda support is not enabled.])
|
||||||
|
AC_MSG_WARN([Try again with --with-cuda])
|
||||||
|
AC_MSG_ERROR([Cannot continue])])
|
||||||
|
$2])
|
||||||
|
|
||||||
|
OPAL_VAR_SCOPE_POP
|
||||||
|
])
|
Загрузка…
x
Ссылка в новой задаче
Block a user