It's hard to tell without complete makefile example. Could you please post a minimal reprocase?
Note specifically for OpenMPI there is a tricky workaround. You can use nvcc as mpicc compiler by exporting OMPI_CC=nvcc and wrapping out incompatible compiler options. Kind regards, - Dmitry Mikushin. 2017-01-27 17:14 GMT+03:00 Chris Ward <t...@uk.ibm.com>: > 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 <+44%201962%20818679> > LinkedIn **https://www.linkedin.com/profile/view?id=60628729* > <https://www.linkedin.com/profile/view?id=60628729> > * ResearchGate **https://www.researchgate.net/profile/T_Ward2* > <https://www.researchgate.net/profile/T_Ward2> > > *IBM System BlueGene Research* <http://www.research.ibm.com/bluegene/> > *IBM System BlueGene Marketing* > <http://www-03.ibm.com/systems/deepcomputing/bluegene/> > > *IBM Resources for Global Servants* <http://hurgsa.ibm.com/~tjcw/Compete/> > *IBM Branded Products* <http://www.ibm.com/shop> *IBM Branded Swag* > <http://ibmlogogear.com/default.aspx> > <http://www.ibm.com/developerworks/linux/library/l-bluegene/index.html> > > UNIX in the Cloud - Find A Place Where There's Room To Grow, with the > original Open Standard. *Free Trial Here Today* > <http://sdf.lonestar.org/index.cgi?telnet> > New Lamps For Old - *Diskless Remote Boot Linux* > <http://drbl.sourceforge.net/> from *National Center for High-Performance > Computing, Taiwan* <http://www.nchc.org.tw/en/> > > 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 >
_______________________________________________ devel mailing list devel@lists.open-mpi.org https://rfd.newmexicoconsortium.org/mailman/listinfo/devel