Re: [hpx-users] CUDA with HPX

2018-04-03 Thread Ivan Kostov
Hi,

replacing the optional.hpp file worked and now it's 
compiling to 66%. Now it says:


[ 33%] Building NVCC (Device) object 
CMakeFiles/cuda_copy_exe.dir/cuda_copy_exe_generated_data_copy.cu.o
[ 66%] Building NVCC intermediate link file 
CMakeFiles/cuda_copy_exe.dir/cuda_copy_exe_intermediate_link.o

nvcc fatal   : 'true -gencode arch=compute_50,code=sm_50': 
expected true or false

CMakeFiles/cuda_copy_exe.dir/build.make:68: recipe for 
target 
'CMakeFiles/cuda_copy_exe.dir/cuda_copy_exe_intermediate_link.o' 
failed
make[2]: *** 
[CMakeFiles/cuda_copy_exe.dir/cuda_copy_exe_intermediate_link.o] 
Error 1
CMakeFiles/Makefile2:67: recipe for target 
'CMakeFiles/cuda_copy_exe.dir/all' failed
make[1]: *** [CMakeFiles/cuda_copy_exe.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2


Best  regards,
Ivan



On Thu, 29 Mar 2018 08:05:48 -0500
  "Hartmut Kaiser"  wrote:
> 
>> > 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_2044_-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).
> 
> Please see 
>https://github.com/STEllAR-GROUP/hpx/pull/3268 for a 
>possible
> fix.
> 
> Regards Hartmut
> ---
> http://boost-spirit.com
> http://stellar.cct.lsu.edu
> 
> 
> 
> ___
> hpx-users mailing list
> hpx-users@stellar.cct.lsu.edu
> https://mail.cct.lsu.edu/mailman/listinfo/hpx-users

___
hpx-users mailing list
hpx-users@stellar.cct.lsu.edu
https://mail.cct.lsu.edu/mailman/listinfo/hpx-users


Re: [hpx-users] CUDA with HPX

2018-03-29 Thread Hartmut Kaiser

> > 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_2044_-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).

Please see https://github.com/STEllAR-GROUP/hpx/pull/3268 for a possible
fix.

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



___
hpx-users mailing list
hpx-users@stellar.cct.lsu.edu
https://mail.cct.lsu.edu/mailman/listinfo/hpx-users


Re: [hpx-users] CUDA with HPX

2018-03-29 Thread Hartmut Kaiser
> 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_2044_-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" <hartmut.kai...@gmail.com> 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: hpx-users-boun...@stellar.cct.lsu.edu
> >>[mailto:hpx-users-
> >> boun...@stellar.cct.lsu.edu] On Behalf Of Ivan Kostov
> >> Sent: Wednesday, March 28, 2018 9:14 AM
> >> To: hpx-users@stellar.cct.lsu.edu
> >> 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
> >>
> >>
> &g

Re: [hpx-users] CUDA with HPX

2018-03-29 Thread Ivan Kostov
Hi,

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_2044_-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?

Best regards,
Ivan


On Wed, 28 Mar 2018 09:24:08 -0500
  "Hartmut Kaiser" <hartmut.kai...@gmail.com> 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: hpx-users-boun...@stellar.cct.lsu.edu 
>>[mailto:hpx-users-
>> boun...@stellar.cct.lsu.edu] On Behalf Of Ivan Kostov
>> Sent: Wednesday, March 28, 2018 9:14 AM
>> To: hpx-users@stellar.cct.lsu.edu
>> 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 <gent...@gmx.de> 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:
>> >>
>> &g

Re: [hpx-users] CUDA with HPX

2018-03-28 Thread Hartmut Kaiser
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: hpx-users-boun...@stellar.cct.lsu.edu [mailto:hpx-users-
> boun...@stellar.cct.lsu.edu] On Behalf Of Ivan Kostov
> Sent: Wednesday, March 28, 2018 9:14 AM
> To: hpx-users@stellar.cct.lsu.edu
> 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 <gent...@gmx.de> 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>"
> >> 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>]"
> >> (163): here
> >>  instantiation of class
> >> "std::iterator_traits<_Iterator> [with
> >> _Iterator=std::unique_ptr<hpx::parcelset::locality::impl_base,
> >> std::default_delete>]"
> >> /usr/local/include/hpx/traits/is_iterator.hpp(43): here
> >>  instantiation of class
> >> "hpx::traits::detail::is_iterator [with
> >> T=std::unique_ptr<hpx::parcelset::locality::impl_base,
> >> std::default_delete>]"
> >> /usr/local/include/hpx/traits/is_iterator.hpp(49): here
> >>  instantiation of class
> >> "hpx::traits::is_iterator<Iter, Enable> [with It

Re: [hpx-users] CUDA with HPX

2018-03-28 Thread Ivan Kostov
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_copy_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  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> std::default_delete>" 
>> has no member "iterator_category"
>>detected during:
>>  instantiation of class 
>> "std::__iterator_traits<_Iterator, void> [with 
>> _Iterator=std::unique_ptr> std::default_delete>]"
>> (163): here
>>  instantiation of class 
>> "std::iterator_traits<_Iterator> [with 
>> _Iterator=std::unique_ptr> std::default_delete>]"
>> /usr/local/include/hpx/traits/is_iterator.hpp(43): here
>>  instantiation of class 
>> "hpx::traits::detail::is_iterator [with 
>> T=std::unique_ptr> std::default_delete>]"
>> /usr/local/include/hpx/traits/is_iterator.hpp(49): here
>>  instantiation of class 
>> "hpx::traits::is_iterator [with Iter=const 
>> std::unique_ptr> std::default_delete> 
>> &, 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> std::default_delete>" 
>> has no member "value_type"
>>detected during:
>>  instantiation of class 
>> "std::__iterator_traits<_Iterator, void> [with 
>> _Iterator=std::unique_ptr> std::default_delete>]"
>> (163): here
>>  instantiation of class 
>> "std::iterator_traits<_Iterator> [with 
>> _Iterator=std::unique_ptr> std::default_delete>]"
>> /usr/local/include/hpx/traits/is_iterator.hpp(43): here
>>  instantiation of class 
>> "hpx::traits::detail::is_iterator [with 
>> T=std::unique_ptr> std::default_delete>]"
>> /usr/local/include/hpx/traits/is_iterator.hpp(49): here
>>  instantiation of class 
>> "hpx::traits::is_iterator [with Iter=const 
>> std::unique_ptr> std::default_delete> 
>> &, 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> std::default_delete>" 
>> has no member "difference_type"
>> 
>> 

Re: [hpx-users] CUDA with HPX

2018-03-27 Thread Andreas Schäfer
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 std::default_delete>" 
> has no member "iterator_category"
>detected during:
>  instantiation of class 
> "std::__iterator_traits<_Iterator, void> [with 
> _Iterator=std::unique_ptr std::default_delete>]"
> (163): here
>  instantiation of class 
> "std::iterator_traits<_Iterator> [with 
> _Iterator=std::unique_ptr std::default_delete>]"
> /usr/local/include/hpx/traits/is_iterator.hpp(43): here
>  instantiation of class 
> "hpx::traits::detail::is_iterator [with 
> T=std::unique_ptr std::default_delete>]"
> /usr/local/include/hpx/traits/is_iterator.hpp(49): here
>  instantiation of class 
> "hpx::traits::is_iterator [with Iter=const 
> std::unique_ptr std::default_delete> 
> &, 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 std::default_delete>" 
> has no member "value_type"
>detected during:
>  instantiation of class 
> "std::__iterator_traits<_Iterator, void> [with 
> _Iterator=std::unique_ptr std::default_delete>]"
> (163): here
>  instantiation of class 
> "std::iterator_traits<_Iterator> [with 
> _Iterator=std::unique_ptr std::default_delete>]"
> /usr/local/include/hpx/traits/is_iterator.hpp(43): here
>  instantiation of class 
> "hpx::traits::detail::is_iterator [with 
> T=std::unique_ptr std::default_delete>]"
> /usr/local/include/hpx/traits/is_iterator.hpp(49): here
>  instantiation of class 
> "hpx::traits::is_iterator [with Iter=const 
> std::unique_ptr std::default_delete> 
> &, 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 std::default_delete>" 
> 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
> hpx-users@stellar.cct.lsu.edu
> 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!


signature.asc
Description: Digital signature
___
hpx-users mailing list

[hpx-users] CUDA with HPX

2018-03-27 Thread Ivan Kostov
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" 
has no member "iterator_category"
   detected during:
 instantiation of class 
"std::__iterator_traits<_Iterator, void> [with 
_Iterator=std::unique_ptr]"
(163): here
 instantiation of class 
"std::iterator_traits<_Iterator> [with 
_Iterator=std::unique_ptr]"
/usr/local/include/hpx/traits/is_iterator.hpp(43): here
 instantiation of class 
"hpx::traits::detail::is_iterator [with 
T=std::unique_ptr]"
/usr/local/include/hpx/traits/is_iterator.hpp(49): here
 instantiation of class 
"hpx::traits::is_iterator [with Iter=const 
std::unique_ptr 
&, 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" 
has no member "value_type"
   detected during:
 instantiation of class 
"std::__iterator_traits<_Iterator, void> [with 
_Iterator=std::unique_ptr]"
(163): here
 instantiation of class 
"std::iterator_traits<_Iterator> [with 
_Iterator=std::unique_ptr]"
/usr/local/include/hpx/traits/is_iterator.hpp(43): here
 instantiation of class 
"hpx::traits::detail::is_iterator [with 
T=std::unique_ptr]"
/usr/local/include/hpx/traits/is_iterator.hpp(49): here
 instantiation of class 
"hpx::traits::is_iterator [with Iter=const 
std::unique_ptr 
&, 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" 
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
hpx-users@stellar.cct.lsu.edu
https://mail.cct.lsu.edu/mailman/listinfo/hpx-users


Re: [hpx-users] CUDA in HPX

2018-02-21 Thread Tim Biedert

Hi Hartmut,

thanks! I also found these examples: 
https://github.com/STEllAR-GROUP/hpx/tree/master/examples/compute


Should be a good starting point for some experiments.

Best,

Tim


On 20.02.2018 13:49, Hartmut Kaiser wrote:

Tim,


what's the correct way to use CUDA with HPX nowadays? I've seen the
HPXCL GSoC project, but apparently there is also a HPX_WITH_CUDA option
in CMake now.

I have a hard time finding clear documentation on this.

That's because there is no documentation.

CUDA support in HPX is experimental at best. We appreciate any help we can get 
improving the picture.

We have two different ways of integrating with CUDA: HPXCL and HPX.Compute.

HPXCL is a separate project providing a set of HPX components that allow to 
talk to a GPU device, even remotely. The API exposed resembles OpenCL to some 
extent, but if you look at the existing examples you should find your way 
around.

HPX.Compute is part of the main repository. It mainly consists of a very low 
level facility that allows to spawn any CUDA kernel on a local GPU device from 
your C++ code and representing this as a future you can use to synchronize the 
kernel execution with your cpu work. It also has higher level facilities that 
use this facility to implement some of the parallel algorithms (including the 
use of parallel::copy for transparent and asynchronous data transfer). 
HPX.Compute also has some allocators and executors that help managing data and 
execution locality.

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


___
hpx-users mailing list
hpx-users@stellar.cct.lsu.edu
https://mail.cct.lsu.edu/mailman/listinfo/hpx-users





smime.p7s
Description: S/MIME Cryptographic Signature
___
hpx-users mailing list
hpx-users@stellar.cct.lsu.edu
https://mail.cct.lsu.edu/mailman/listinfo/hpx-users


Re: [hpx-users] CUDA in HPX

2018-02-20 Thread Hartmut Kaiser
Tim,

> what's the correct way to use CUDA with HPX nowadays? I've seen the
> HPXCL GSoC project, but apparently there is also a HPX_WITH_CUDA option
> in CMake now.
> 
> I have a hard time finding clear documentation on this.

That's because there is no documentation.

CUDA support in HPX is experimental at best. We appreciate any help we can get 
improving the picture.

We have two different ways of integrating with CUDA: HPXCL and HPX.Compute. 

HPXCL is a separate project providing a set of HPX components that allow to 
talk to a GPU device, even remotely. The API exposed resembles OpenCL to some 
extent, but if you look at the existing examples you should find your way 
around.

HPX.Compute is part of the main repository. It mainly consists of a very low 
level facility that allows to spawn any CUDA kernel on a local GPU device from 
your C++ code and representing this as a future you can use to synchronize the 
kernel execution with your cpu work. It also has higher level facilities that 
use this facility to implement some of the parallel algorithms (including the 
use of parallel::copy for transparent and asynchronous data transfer). 
HPX.Compute also has some allocators and executors that help managing data and 
execution locality.

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


___
hpx-users mailing list
hpx-users@stellar.cct.lsu.edu
https://mail.cct.lsu.edu/mailman/listinfo/hpx-users