I'm trying to build a CUDA kernel into OpenMPI (because I'm experimenting 
with an Allreduce collective with data in GPU buffers, and I want the GPU 
to do the reduction).

This involves writing a '.cu' file, and compiling this to '.o' with the 
NVIDIA CUDA compiler 'nvcc'; and also writing some of OpenMPI in C++ to 
interface with the CUDA kernel.

I've revised the Makefile.am in the relevant directory to look like (there 
is more, but this is the relevant section)
sources = \
        coll_ibm.h \
        coll_ibm_component.c \
        coll_ibm_module.c \
        coll_ibm_allgather.c \
        coll_ibm_allgatherv.c \
        coll_ibm_allreduce.c \
        coll_ibm_alltoall.c \
        coll_ibm_alltoallv.c \
        coll_ibm_barrier.c \
        coll_ibm_bcast.c \
        coll_ibm_exscan.c \
        coll_ibm_gather.c \
        coll_ibm_gatherv.c \
        coll_ibm_reduce.c \
        coll_ibm_reduce_scatter.c \
        coll_ibm_reduce_scatter_block.c \
        coll_ibm_scan.c \
        coll_ibm_scatter.c \
        coll_ibm_scatterv.c \
        allreduce_overlap.cc \
        comm_gpu.cu

SUFFIXES = .cu

comm_gpu.lo: comm_gpu.cu
        /usr/local/cuda/bin/nvcc -gencode arch=compute_60,code=sm_60 
-lcuda -O3 --compiler-options "-O2 -fopenmp -mcpu=power8 -fPIC" -c 
comm_gpu.cu
        mv comm_gpu.o comm_gpu.lo


The C++ compile runs OK; but the attempt to run 'nvcc' is ignored; the 
build completed, but no comm_gpu.lo is generated, and as far as I can 
tell, the library for this directory is built without the comm_gpu.lo 
object.

What do I need to put in the Makefile.am to get this to build properly ?

T J (Chris) Ward, IBM Research. 
Scalable Data-Centric Computing - Active Storage Fabrics - IBM System 
BlueGene 
IBM United Kingdom Ltd., Hursley Park, Winchester, Hants, SO21 2JN 
011-44-1962-818679 
LinkedIn https://www.linkedin.com/profile/view?id=60628729 
ResearchGate https://www.researchgate.net/profile/T_Ward2 

IBM System BlueGene Research 
IBM System BlueGene Marketing 

IBM Resources for Global Servants 
IBM Branded Products IBM Branded Swag 


UNIX in the Cloud - Find A Place Where There's Room To Grow, with the 
original Open Standard. Free Trial Here Today 
New Lamps For Old - Diskless Remote Boot Linux from National Center for 
High-Performance Computing, Taiwan 

Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
_______________________________________________
devel mailing list
devel@lists.open-mpi.org
https://rfd.newmexicoconsortium.org/mailman/listinfo/devel

Reply via email to