> so specifying the architecture worked, but now a different
> problem occurs.
> 
> 
> /usr/local/include/hpx/util/optional.hpp(244): error:
> statement may not appear in a constexpr function
> 
> /usr/local/include/hpx/util/optional.hpp(246): error: a
> constexpr function must contain exactly one return
> statement
> 
> 2 errors detected in the compilation of
> "/tmp/tmpxft_00002044_00000000-4_data_copy.cpp4.ii".
> CMake Error at
> cuda_copy_exe_generated_data_copy.cu.o.cmake:279
> (message):
>    Error generating file
> 
> /home/kostov/Projects/Tests/data_copy/build/CMakeFiles/cuda_copy_exe.dir//
> ./cuda_copy_exe_generated_data_copy.cu.o
> 
> 
> Any idea what could be causing this?

This is another example of how broken the CUDA compiler is. Could you create
a ticket for this please? We need to fix this in optional.hpp.
As a workaround please replace constexpr on the function it complains about
with HPX_CXX14_CONSTEXPR (or remove the 'constexpr' altogether).

HTH
Regards Hartmut
---------------
http://boost-spirit.com
http://stellar.cct.lsu.edu

> 
> Best regards,
> Ivan
> 
> 
> On Wed, 28 Mar 2018 09:24:08 -0500
>   "Hartmut Kaiser" <[email protected]> wrote:
> > compute_sm20 is just the fallback used if nothing else
> >is specified. You can
> > add a -DHPX_WITH_CUDA_ARCH=compute_sm50 to you cmake
> >configure command line
> > to specify the architecture you need.
> >
> > Regards Hartmut
> > ---------------
> > http://boost-spirit.com
> > http://stellar.cct.lsu.edu
> >
> >
> >> -----Original Message-----
> >> From: [email protected]
> >>[mailto:hpx-users-
> >> [email protected]] On Behalf Of Ivan Kostov
> >> Sent: Wednesday, March 28, 2018 9:14 AM
> >> To: [email protected]
> >> Subject: Re: [hpx-users] CUDA with HPX
> >>
> >> Hallo Andreas,
> >>
> >> so we did end up upgrading the OS and now I'm running
> >>CUDA
> >> 9.1. Now I have the following error:
> >>
> >> nvcc fatal   : Unsupported gpu architecture 'compute_20'
> >>
> >> which is gone as of CUDA 9. I tried to set it within my
> >> cmake file with
> >>
> >> set( CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode
> >> arch=compute_50,code=sm_50")
> >>
> >> which is the highest, supported by my GPU (GPX 750 Ti),
> >> but it still didn't work. Here is the whole error
> >>message
> >>
> >>
> >> /usr/bin/nvcc -M -D__CUDACC__
> >> /home/kostov/Projects/Masterarbeit/Tests/data_copy/data_copy.cu
> >> -o
> >>
> /home/kostov/Projects/Masterarbeit/Tests/data_copy/build/CMakeFiles/cuda_c
> >> opy_exe.dir//cuda_copy_exe_generated_data_copy.cu.o.NVCC-depend
> >> -ccbin /usr/bin/cc -m64
> >> -DHPX_APPLICATION_NAME=cuda_copy_exe
> >> -DHPX_APPLICATION_STRING=\"cuda_copy_exe\"
> >> -DHPX_PREFIX=\"/usr/local\" -DHPX_APPLICATION_EXPORTS
> >> -Xcompiler
> >> ,\"-D_MWAITXINTRIN_H_INCLUDED\",\"-D_FORCE_INLINES\",\"-
> >> D__STRICT_ANSI__\",\"-g\"
> >> -w -gencode=arch=compute_20,code=sm_20 -std=c++11
> >> --expt-relaxed-constexpr --expt-extended-lambda
> >> --default-stream per-thread -lcudadevrt -rdc=true
> >>-gencode
> >> arch=compute_50,code=sm_50 -DNVCC -I/usr/local/include
> >> -I/usr/local/include/hpx/external -I/usr/include
> >> nvcc fatal   : Unsupported gpu architecture 'compute_20'
> >>
> >>
> >> and my cmake file
> >>
> >>
> >> cmake_minimum_required(VERSION 3.3)
> >> project(hpxvr CXX)
> >>
> >> set(CMAKE_CXX_STANDARD 14)
> >> set(CMAKE_CXX_STANDARD_REQUIRED ON)
> >>
> >> set(HPX_IGNORE_COMPILER_COMPATIBILITY ON)
> >>
> >> find_package(HPX REQUIRED)
> >>
> >> include_directories(${HPX_INCLUDE_DIR})
> >>
> >> set( CMAKE_CXX_FLAGS "-D_MWAITXINTRIN_H_INCLUDED
> >> -D_FORCE_INLINES -D__STRICT_ANSI__")
> >> set( CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode
> >> arch=compute_50,code=sm_50")
> >>
> >> add_hpx_executable(cuda_copy
> >>      ESSENTIAL
> >>      SOURCES data_copy.cu
> >> )
> >>
> >>
> >> Is HPX maybe setting the architecture to compute_20?
> >>
> >> Best regards,
> >> Ivan
> >>
> >>
> >>
> >> On Tue, 27 Mar 2018 15:43:48 +0200
> >>   Andreas Schäfer <[email protected]> wrote:
> >> > Ivan,
> >> >
> >> > could you retest this with CUDA 9.1? Version 7.5 is
> >> >really old and I
> >> > don't think it works well with modern C++. I don't
> >>think
> >> >you have to
> >> > re-install the whole OS, you could alternatively just
> >> >download CUDA
> >> > and install it manually.
> >> >
> >> > Thanks!
> >> > -Andreas
> >> >
> >> >
> >> > On 14:22 Tue 27 Mar     , Ivan Kostov wrote:
> >> >> Hi,
> >> >>
> >> >> I am trying to understand how HPX Compute works with
> >> >>CUDA
> >> >> and wanted to compile the
> >> >> examples/compute/cuda/data_copy.cu example.
> >> >>Unfortunately,
> >> >> I'm getting the following error:
> >> >>
> >> >>
> >>/usr/include/c++/5/bits/stl_iterator_base_types.h(154):
> >> >> error: class
> >> >> "std::unique_ptr<hpx::parcelset::locality::impl_base,
> >> >>
> >>std::default_delete<hpx::parcelset::locality::impl_base>>"
> >> >> has no member "iterator_category"
> >> >>            detected during:
> >> >>              instantiation of class
> >> >> "std::__iterator_traits<_Iterator, void> [with
> >> >>
> >>_Iterator=std::unique_ptr<hpx::parcelset::locality::impl_base,
> >> >>
> >>std::default_delete<hpx::parcelset::locality::impl_base>>]"
> >> >> (163): here
> >> >>              instantiation of class
> >> >> "std::iterator_traits<_Iterator> [with
> >> >>
> >>_Iterator=std::unique_ptr<hpx::parcelset::locality::impl_base,
> >> >>
> >>std::default_delete<hpx::parcelset::locality::impl_base>>]"
> >> >> /usr/local/include/hpx/traits/is_iterator.hpp(43):
> >>here
> >> >>              instantiation of class
> >> >> "hpx::traits::detail::is_iterator<T> [with
> >> >>
> >>T=std::unique_ptr<hpx::parcelset::locality::impl_base,
> >> >>
> >>std::default_delete<hpx::parcelset::locality::impl_base>>]"
> >> >> /usr/local/include/hpx/traits/is_iterator.hpp(49):
> >>here
> >> >>              instantiation of class
> >> >> "hpx::traits::is_iterator<Iter, Enable> [with
> >>Iter=const
> >> >> std::unique_ptr<hpx::parcelset::locality::impl_base,
> >> >>
> >>std::default_delete<hpx::parcelset::locality::impl_base>>
> >> >> &, Enable=void]"
> >> >>
> >>/usr/local/include/hpx/runtime/parcelset/locality.hpp(150):
> >> >> here
> >> >>
> >> >>
> >>/usr/include/c++/5/bits/stl_iterator_base_types.h(155):
> >> >> error: class
> >> >> "std::unique_ptr<hpx::parcelset::locality::impl_base,
> >> >>
> >>std::default_delete<hpx::parcelset::locality::impl_base>>"
> >> >> has no member "value_type"
> >> >>            detected during:
> >> >>              instantiation of class
> >> >> "std::__iterator_traits<_Iterator, void> [with
> >> >>
> >>_Iterator=std::unique_ptr<hpx::parcelset::locality::impl_base,
> >> >>
> >>std::default_delete<hpx::parcelset::locality::impl_base>>]"
> >> >> (163): here
> >> >>              instantiation of class
> >> >> "std::iterator_traits<_Iterator> [with
> >> >>
> >>_Iterator=std::unique_ptr<hpx::parcelset::locality::impl_base,
> >> >>
> >>std::default_delete<hpx::parcelset::locality::impl_base>>]"
> >> >> /usr/local/include/hpx/traits/is_iterator.hpp(43):
> >>here
> >> >>              instantiation of class
> >> >> "hpx::traits::detail::is_iterator<T> [with
> >> >>
> >>T=std::unique_ptr<hpx::parcelset::locality::impl_base,
> >> >>
> >>std::default_delete<hpx::parcelset::locality::impl_base>>]"
> >> >> /usr/local/include/hpx/traits/is_iterator.hpp(49):
> >>here
> >> >>              instantiation of class
> >> >> "hpx::traits::is_iterator<Iter, Enable> [with
> >>Iter=const
> >> >> std::unique_ptr<hpx::parcelset::locality::impl_base,
> >> >>
> >>std::default_delete<hpx::parcelset::locality::impl_base>>
> >> >> &, Enable=void]"
> >> >>
> >>/usr/local/include/hpx/runtime/parcelset/locality.hpp(150):
> >> >> here
> >> >>
> >> >>
> >>/usr/include/c++/5/bits/stl_iterator_base_types.h(156):
> >> >> error: class
> >> >> "std::unique_ptr<hpx::parcelset::locality::impl_base,
> >> >>
> >>std::default_delete<hpx::parcelset::locality::impl_base>>"
> >> >> has no member "difference_type"
> >> >> ....
> >> >>
> >> >> and it continues like this for a while.
> >> >>
> >> >> I am running an Ubuntu 16.04, gcc 5.4.0., cuda 7.5.17
> >> >>
> >> >> this is the cmake file i used to compile the example
> >> >>
> >> >> cmake_minimum_required(VERSION 3.3)
> >> >> project(hpxvr CXX)
> >> >>
> >> >> set(CMAKE_CXX_STANDARD 14)
> >> >> set(CMAKE_CXX_STANDARD_REQUIRED ON)
> >> >>
> >> >> set(HPX_IGNORE_COMPILER_COMPATIBILITY ON)
> >> >>
> >> >> find_package(HPX REQUIRED)
> >> >>
> >> >> include_directories(${HPX_INCLUDE_DIR})
> >> >>
> >> >> set( CMAKE_CXX_FLAGS "-D_MWAITXINTRIN_H_INCLUDED
> >> >> -D_FORCE_INLINES -D__STRICT_ANSI__")
> >> >>
> >> >> add_hpx_executable(cuda_copy_expl
> >> >>      ESSENTIAL
> >> >>      SOURCES data_copy.cu
> >> >> )
> >> >>
> >> >> I used to have another two error messages
> >> >>
> >> >>
> >>/usr/lib/gcc/x86_64-linux-gnu/5/include/mwaitxintrin.h(36):
> >> >> error: identifier "__builtin_ia32_monitorx" is
> >>undefined
> >> >>
> >> >>
> >>/usr/lib/gcc/x86_64-linux-gnu/5/include/mwaitxintrin.h(42):
> >> >> error: identifier "__builtin_ia32_mwaitx" is
> >>undefined
> >> >>
> >> >> which were solved using this workaround -
> >> >> https://github.com/NVIDIA/nccl/issues/29
> >> >>
> >> >> As a last case solution we could upgrade to Ubuntu 17
> >> >>and
> >> >> hope that the problem resolves itself with newer CUDA
> >> >> versions, but would rather remain on Ubuntu 16. Do
> >>you
> >> >> have any solution ideas that could help?
> >> >>
> >> >> Best regards,
> >> >> Ivan
> >> >>
> >> >>
> >> >>
> >> >> _______________________________________________
> >> >> hpx-users mailing list
> >> >> [email protected]
> >> >> https://mail.cct.lsu.edu/mailman/listinfo/hpx-users
> >> >>
> >> >
> >> > --
> >> >
> >>==========================================================
> >> > Andreas Schäfer
> >> >
> >> > HPC and Supercomputing for Computer Simulations
> >> > LibGeoDecomp project lead, http://www.libgeodecomp.org
> >> >
> >> > PGP/GPG key via keyserver
> >> >
> >> > I'm an SRE @ Google, this is a private account though.
> >> > All mails are my own and not Google's.
> >> >
> >>==========================================================
> >> >
> >> > (\___/)
> >> > (+'.'+)
> >> > (")_(")
> >> > This is Bunny. Copy and paste Bunny into your
> >> > signature to help him gain world domination!
> >>
> >> _______________________________________________
> >> hpx-users mailing list
> >> [email protected]
> >> https://mail.cct.lsu.edu/mailman/listinfo/hpx-users
> >
> > _______________________________________________
> > hpx-users mailing list
> > [email protected]
> > https://mail.cct.lsu.edu/mailman/listinfo/hpx-users

_______________________________________________
hpx-users mailing list
[email protected]
https://mail.cct.lsu.edu/mailman/listinfo/hpx-users

Reply via email to