[mvapich-discuss] Build issues with CUDA and hwloc

Vladimir Florinski vaf0001 at uah.edu
Fri Oct 14 16:00:03 EDT 2016


The configure line was

configure --with-device=ch3:mrail --with-rdma=gen2 --with-pmi=pmi2
--with-pm=slurm --enable-g=dbg --enable-debuginfo --enable-cuda
--with-cuda=/usr/local/cuda

I could have added the library to the path, as you have suggested, but
chose instead to remove the lines containing "hwloc" from Makefile.am and
configure.ac. This way the system library is used during the build. It
might be a good idea to add a switch to allow something like this.


All the best,


On Fri, Oct 14, 2016 at 1:48 PM, Hari Subramoni <subramoni.1 at osu.edu> wrote:

> Hello Vladimir,
>
> Could you please let us know the configure command you used?
>
> From the error message I guess that the libcudart library is not installed
> in the default system path. I would suggest adding the path to LDFLAGS.
> Something like this...
>
> LDFLAGS=-L/usr/local/lib -lcuda -L/opt/cuda/8.0/lib64 -lcudart -lgdsync
> -lrt -lstdc++ -Wl,-rpath,/opt/cuda/8.0/lib64 -Wl,-rpath,/usr/local/lib'
>
> MVAPICH2 relies on HWLOC for process to core mapping. We added HWLOC to
> MVAPICH2 to ensure that all MVAPICH2 functionalities work irrespective of
> what is available on the system.
>
> Regards,
> Hari.
>
> On Fri, Oct 14, 2016 at 1:16 PM, Vladimir Florinski <vaf0001 at uah.edu>
> wrote:
>
>> This is with mvapich2-2.2. When building with CUDA, the configure script
>> in contrib/hwloc fails because the compiler is not passed the
>> -L/path/to/libcudart option. Here is the relevant fragment of the
>> config.log:
>>
>>
>> configure:4222: checking whether the C compiler works
>> configure:4244: gcc -O2 -g -pipe -Wall -Werror=format-security
>> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
>> --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/
>> redhat/redhat-hardened-cc1 -m64 -mtune=generic
>> -I/usr/local/cuda/include   -I/home/vladimir/rpmbuild/BUILD/mvapich2-2.2/src/mpl/include
>> -I/home/vladimir/rpmbuild/BUILD/mvapich2-2.2/src/mpl/incl
>> ude -I/home/vladimir/rpmbuild/BUILD/mvapich2-2.2/src/openpa/src
>> -I/home/vladimir/rpmbuild/BUILD/mvapich2-2.2/src/openpa/src -D_REENTRANT
>> -I/home/vladimir/rpmbuild/BUILD/mvapich2-2.2/src/mpi/rom
>> io/include -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld
>> conftest.c -lcudart -lcuda -libmad -lrdmacm -libumad -libverbs -ldl -lrt
>> -lpmi2 -lpthread   >&5
>> /usr/bin/ld: cannot find -lcudart
>> collect2: error: ld returned 1 exit status
>> configure:4248: $? = 1
>> configure:4286: result: no
>> configure: failed program was:
>> | /* confdefs.h */
>> | #define PACKAGE_NAME "hwloc"
>> | #define PACKAGE_TARNAME "hwloc"
>> | #define PACKAGE_VERSION "1.11.2rc2-git"
>> | #define PACKAGE_STRING "hwloc 1.11.2rc2-git"
>> | #define PACKAGE_BUGREPORT "http://www.open-mpi.org/projects/hwloc/"
>> | #define PACKAGE_URL ""
>> | #define PACKAGE "hwloc"
>> | #define VERSION "1.11.2rc2-git"
>> | /* end confdefs.h.  */
>> |
>> | int
>> | main ()
>> | {
>> |
>> |   ;
>> |   return 0;
>> | }
>> configure:4291: error: in `/home/vladimir/rpmbuild/BUILD
>> /mvapich2-2.2/contrib/hwloc':
>> configure:4293: error: C compiler cannot create executables
>>
>> I also wonder why mvapich has to build hwloc in the first place. That is
>> a common library that usually comes with the OS.
>>
>>
>>
>>
>> --
>> Vladimir Florinski
>>
>> _______________________________________________
>> mvapich-discuss mailing list
>> mvapich-discuss at cse.ohio-state.edu
>> http://mailman.cse.ohio-state.edu/mailman/listinfo/mvapich-discuss
>>
>>
>


-- 
Vladimir Florinski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cse.ohio-state.edu/pipermail/mvapich-discuss/attachments/20161014/ebf8d0a2/attachment.html>


More information about the mvapich-discuss mailing list