Hi Mat,
Nice to see you online and very happy to see your reply.
I tried to recompile it by removing "reduction(+:tmp), however, the parallelization generation failed by reporting:
30, Generating present_or_copy(c(:,:))
Generating present_or_copyin(a(:,:))
Generating present_or_copyin(b(:,:))
31, Loop carried scalar dependence for ‘tmp’ at line 35
Scalar last value needed after loop for ‘tmp’ at line 40
Accelerator restriction: scalar variable live-out from loop: tmp
Accelerator scalar kernel generated
32, Loop carried scalar dependence for ‘tmp’ at line 35
Scalar last value needed after loop for ‘tmp’ at line 40
Accelerator restriction: scalar variable live-out from loop: tmp
33, Complex loop carried dependence of ‘c’ prevents parallelization
Loop carried dependence due to exposed use of ‘c(i1+1,i2+1)’ prevents parallelization
Loop carried scalar dependence for ‘tmp’ at line 35
Scalar last value needed after loop for ‘tmp’ at line 40
Accelerator restriction: scalar variable live-out from loop: tmp
In addition, when I have reduction explicitly stated with kernels, I got many errors:
------ Rebuild All started: Project: 2ndOpenACC, Configuration: Debug x64 ------
Deleting intermediate and output files for project ‘2ndOpenACC’, configuration ‘Debug’
Compiling Project …
…\2ndOpenACCProgram.cuf
C:\Users.…\2ndOpenACCProgram.cuf(50) : warning W0093 : Type conversion of expression performed
C:\Users.…\2ndOpenACCProgram.cuf(50) : warning W0093 : Type conversion of expression performed
0 inform, 2 warnings, 0 severes, 0 fatal for example1
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(100): error: expected an identifier
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(100): error: expected a “)”
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(98): error: attribute “global” does not apply here
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(98): error: attribute “launch_bounds” does not apply here
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(105): error: expected a “;”
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(128): error: this declaration has no storage class or type specifier
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(129): error: expected a declaration
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(130): error: this declaration has no storage class or type specifier
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(130): error: expected a “;”
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(131): error: this declaration has no storage class or type specifier
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(131): error: identifier “S108” is undefined
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(132): error: this declaration has no storage class or type specifier
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(132): error: a value of type “float *” cannot be used to initialize an entity of type “int”
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(133): error: expected an identifier
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(133): error: a value of type “float *” cannot be used to initialize an entity of type “int *”
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(133): error: expected a “;”
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(134): error: this declaration has no storage class or type specifier
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(135): error: expected a declaration
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(136): error: this declaration has no storage class or type specifier
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(137): error: this declaration has no storage class or type specifier
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(138): error: this declaration has no storage class or type specifier
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(138): error: variable “rc4” has already been defined
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(139): error: this declaration has no storage class or type specifier
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(140): error: this declaration has no storage class or type specifier
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(140): error: variable “rc4” has already been defined
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(141): error: this declaration has no storage class or type specifier
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(141): error: variable “rc4” has already been defined
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(142): error: this declaration has no storage class or type specifier
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(142): error: variable “rc4” has already been defined
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(143): error: this declaration has no storage class or type specifier
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(143): error: variable “rc4” has already been defined
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(144): error: this declaration has no storage class or type specifier
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(144): error: variable “rc4” has already been defined
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(145): error: this declaration has no storage class or type specifier
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(145): error: expected a “;”
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(146): error: this declaration has no storage class or type specifier
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(147): error: this declaration has no storage class or type specifier
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(147): error: expected a “;”
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(148): error: expected a declaration
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(149): error: explicit type is missing (“int” assumed)
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(149): error: cannot overload functions distinguished by return type alone
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(150): error: this declaration has no storage class or type specifier
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(150): error: variable “rc4” has already been defined
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(151): error: expected a declaration
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(152): error: expected an identifier
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(152): error: a value of type “int” cannot be used to initialize an entity of type “int *”
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(152): error: expected a “;”
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(153): error: this declaration has no storage class or type specifier
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(153): error: expected a “;”
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(154): error: this declaration has no storage class or type specifier
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(154): error: variable “rc5” has already been defined
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(155): error: expected a declaration
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(156): error: this declaration has no storage class or type specifier
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(156): error: expected a “;”
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(157): error: explicit type is missing (“int” assumed)
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(157): error: cannot overload functions distinguished by return type alone
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(158): error: expected a declaration
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(159): error: expected an identifier
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(159): error: a value of type “int” cannot be used to initialize an entity of type “int *”
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(159): error: expected a “;”
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(160): error: explicit type is missing (“int” assumed)
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(160): error: cannot overload functions distinguished by return type alone
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(161): error: expected a declaration
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(162): error: expected an identifier
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(162): error: a value of type “int” cannot be used to initialize an entity of type “int *”
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(162): error: expected a “;”
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(163): error: explicit type is missing (“int” assumed)
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(163): error: cannot overload functions distinguished by return type alone
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(164): error: expected a declaration
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(165): error: expected an identifier
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(165): error: a value of type “int” cannot be used to initialize an entity of type “int *”
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(165): error: expected a “;”
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(166): error: explicit type is missing (“int” assumed)
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(166): error: cannot overload functions distinguished by return type alone
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(167): error: expected a declaration
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(168): error: expected an identifier
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(168): error: a value of type “int” cannot be used to initialize an entity of type “int *”
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(168): error: expected a “;”
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(169): error: explicit type is missing (“int” assumed)
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(169): error: cannot overload functions distinguished by return type alone
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(170): error: expected a declaration
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(171): error: expected an identifier
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(171): error: a value of type “int” cannot be used to initialize an entity of type “int *”
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(171): error: expected a “;”
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(172): error: explicit type is missing (“int” assumed)
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(172): error: cannot overload functions distinguished by return type alone
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(173): error: expected a declaration
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(174): error: expected an identifier
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(174): error: a value of type “int” cannot be used to initialize an entity of type “int *”
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(174): error: expected a “;”
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(175): error: this declaration has no storage class or type specifier
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(175): error: variable “b1” has already been defined
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(175): error: expected a “;”
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(176): error: this declaration has no storage class or type specifier
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(176): error: expected a “;”
C:\Users.…\pgcudafor2a4C6bORi-hOB3.gpu(177): error: expected a declaration
96 errors detected in the compilation of “C:\Users.…\pgnvd2a2quIZC_nhXn.nv0”.
2ndOpenACC build failed.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
It seems I got different compiling results as yours… Do you know why this happen?
Thanks and have a nice day,
Jingsen