haowu80s / cusp-library

Automatically exported from code.google.com/p/cusp-library
Apache License 2.0
0 stars 0 forks source link

Compile errors #30

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I get this compiling PETSc with the latest Thrust and Cusp:

knepley@Matthew-Knepleys-MacBook-Air:/PETSc3/petsc/petsc-dev/src/mat/impls/aij/s
eq/seqcuda$ make PETSC_DIR=/PETSc3/petsc/petsc-dev PETSC_ARCH=darwin-cuda
make PETSC_DIR=/PETSc3/petsc/petsc-dev PETSC_ARCH=darwin-cuda
nvcc -m64  -c --compiler-options="-PIC -Wall -Wwrite-strings 
-Wno-strict-aliasing -Wno-unknown-pragmas -g3   
-I/PETSc3/petsc/petsc-dev/darwin-cuda/include -I/PETSc3/petsc/petsc-dev/include 
-I/usr/local/cuda/include -I/usr/local/include -I/PETSc3/multicore/cusp/ 
-I/PETSc3/multicore/thrust/ -I/PETSc3/petsc/petsc-dev/include/mpiuni      
-D__INSDIR__=src/mat/impls/aij/seq/seqcuda/" aijcuda.cu
/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(37
): error: expected an identifier

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(45
): error: expected an identifier

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(51
): error: expected an identifier

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(54
): error: expected an identifier

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(54
): error: expected an identifier

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(58
): error: expected an identifier

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(63
): error: expected an identifier

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(63
): error: expected an identifier

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(75
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(75
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(75
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(76
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(76
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(76
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(77
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(77
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(77
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(78
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(78
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(78
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(79
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(79
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(79
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(80
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(80
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(80
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(81
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(81
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(81
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(82
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(82
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(82
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(83
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(83
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(83
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(84
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(84
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(84
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(85
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(85
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(85
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(86
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(86
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/vector_types.h(86
): error: expected either a definition or a tag name

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(124): error: "DecodeDigits" is not a function or static data 
member

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(125): error: expected a ";"

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(130): warning: this pragma must immediately precede a statement

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(184): warning: this pragma must immediately precede a statement

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(197): warning: parsing restarts here after previous syntax error

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(198): error: expected a declaration

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(199): error: expected a declaration

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(200): error: expected a declaration

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(401): error: expected an identifier

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(401): error: expected a type specifier

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(455): error: expected an identifier

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(455): error: expected a type specifier

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(501): error: expected an identifier

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(501): error: expected a type specifier

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(518): error: expected an identifier

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(518): error: expected a type specifier

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(549): error: "SwapAndScatterSm13" is not a function or static 
data member

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(550): error: expected a ";"

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(565): warning: this pragma must immediately precede a statement

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(568): warning: this pragma must immediately precede a statement

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(577): warning: this pragma must immediately precede a statement

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(579): warning: parsing restarts here after previous syntax error

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(580): error: identifier "K" is undefined

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(580): error: identifier "UNGUARDED_IO" is undefined

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(580): error: identifier "PASSES_PER_CYCLE" is undefined

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(580): error: identifier "SETS_PER_PASS" is undefined

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(580): error: identifier "PostprocessFunctor" is undefined

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(580): error: expected a declaration

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(583): error: expected a declaration

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(600): warning: this pragma must immediately precede a statement

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(605): warning: parsing restarts here after previous syntax error

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(666): error: "SwapAndScatterPairs" is not a function or static 
data member

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(667): error: expected a ";"

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(814): warning: parsing restarts here after previous syntax error

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(815): error: expected a declaration

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(822): error: expected a declaration

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(847): warning: this pragma must immediately precede a statement

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(863): warning: this pragma must immediately precede a statement

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(866): warning: this pragma must immediately precede a statement

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(875): warning: parsing restarts here after previous syntax error

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(878): error: identifier "WarpScan" is undefined

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(878): error: identifier "RADIX_DIGITS" is undefined

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(878): error: expected an identifier

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(879): error: identifier "digit_scan" is undefined

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(880): error: identifier "inclusive_total" is undefined

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(881): error: expected a type specifier

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(884): error: this operator is not allowed in an integral constant 
expression

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(884): error: identifier "my_carry" is undefined

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(887): error: expected a declaration

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(889): warning: this pragma must immediately precede a statement

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(894): warning: parsing restarts here after previous syntax error

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(896): error: explicit type is missing ("int" assumed)

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(896): error: cannot overload functions distinguished by return 
type alone

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(902): error: UpdateRanks is not a template

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(902): error: identifier "RADIX_DIGITS" is undefined

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(902): error: identifier "PASSES_PER_CYCLE" is undefined

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(902): error: identifier "SETS_PER_PASS" is undefined

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(902): error: expected a ")"

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(902): error: expected a ";"

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(911): error: SwapAndScatterSm10 is not a template

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(911): error: identifier "K" is undefined

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(911): error: identifier "V" is undefined

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(911): error: identifier "UNGUARDED_IO" is undefined

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(911): error: identifier "PostprocessFunctor" is undefined

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(912): error: expected a ")"

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(913): error: variable "ranks" has already been defined

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(920): error: expected a ";"

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(936): error: explicit type is missing ("int" assumed)

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(936): error: cannot overload functions distinguished by return 
type alone

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(938): error: expected a declaration

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(978): warning: parsing restarts here after previous syntax error

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(980): error: identifier "LOG_RAKING_THREADS_PER_PASS" is undefined

/PETSc3/multicore/thrust/thrust/detail/device/cuda/detail/b40c/radixsort_scansca
tter_kernel.h(980): error: identifier "LOG_SCAN_LANES_PER_PASS" is undefined

Original issue reported on code.google.com by knep...@gmail.com on 4 Oct 2010 at 8:27

Attachments:

GoogleCodeExporter commented 8 years ago
Hi Matt,

I've never seen this sort of error before.  Could it be that you're using 
Thrust within some extern "C" {} block?  The lines of code referenced by the 
compiler errors look pretty innocuous:
http://code.google.com/p/thrust/source/browse/thrust/detail/device/cuda/detail/b
40c/vector_types.h#37

Is there a smaller, self-contained example that reproduces the error?

Original comment by wnbell on 4 Oct 2010 at 9:15

GoogleCodeExporter commented 8 years ago
I think I found the culprit.  The #define of VecType in one of the PETSc 
headers [1] conflicts with the one in Thrust's radix sort.

Is it possible to #undef VecType at the end of this header?  If not, I suppose 
we could rename the one in Thrust. FWIW adding #undef VecType here [2] seems to 
work.

[1] 
http://petsc.cs.iit.edu/petsc/petsc-dev/file/e8bf41a37f92/include/petscvec.h#l98
[2] 
http://petsc.cs.iit.edu/petsc/petsc-dev/file/e8bf41a37f92/src/mat/impls/aij/seq/
seqcuda/aijcuda.cu#l16

Original comment by wnbell on 6 Oct 2010 at 5:16

GoogleCodeExporter commented 8 years ago
Okay, that takes care of that problem, which exposes another one for me. I just 
copied over the arch.h/.inl from thrust/experimental to cusp/detail/device, 
which now seems to be blowing up on me. What should I be using for these files?

  Thanks,

     Matt

Original comment by knep...@gmail.com on 6 Oct 2010 at 7:59

GoogleCodeExporter commented 8 years ago
r80c0df6fbb adds the missing arch files

Original comment by wnbell on 17 Oct 2010 at 9:06