[Developers] New local reduction operators
Erik Schnetter
schnetter at cct.lsu.edu
Thu Mar 9 13:57:31 CST 2006
On Mar 9, 2006, at 12:54:41, Yaakoub El Khamra wrote:
>
> I'm afraid I have a bit more bad news, on nemeaux this is the error
> I get:
> Compiling /private/automount/Volumes/xserveraid/home/yye00/
> nemeauxCactus/arrangements/AlphaThorns/LocalReduce/src/reduce.c
> In file included from /private/automount/Volumes/xserveraid/home/
> yye00/nemeauxCactus/configs/testAll/build/LocalReduce/reduce.c:9:
> /private/automount/Volumes/xserveraid/home/yye00/nemeauxCactus/
> arrangements/AlphaThorns/LocalReduce/src/reduce.h:82: error:
> invalid use of `restrict'
> /private/automount/Volumes/xserveraid/home/yye00/nemeauxCactus/
> arrangements/AlphaThorns/LocalReduce/src/reduce.h:85: error:
> invalid use of `restrict'
> /private/automount/Volumes/xserveraid/home/yye00/nemeauxCactus/
> configs/testAll/build/LocalReduce/reduce.c:20: error: invalid use
> of `restrict'
> /private/automount/Volumes/xserveraid/home/yye00/nemeauxCactus/
> configs/testAll/build/LocalReduce/reduce.c:23: error: invalid use
> of `restrict'
>
> I am compiling a fixed version though, I will wait until I finish
> all the testing before I commit.
The code is correct. What compiler version is this?
The "correct" way to solve this problem is to auto-detect whether the
compiler supports restrict in all the ways it can be used, or only in
some ways. Try the following patch, then rerun autoconf, and
reconfigure your configuration:
Index: aclocal.m4
===================================================================
RCS file: /cactusdevcvs/Cactus/lib/make/aclocal.m4,v
retrieving revision 1.13
diff -u -r1.13 aclocal.m4
--- aclocal.m4 28 Sep 2005 17:09:31 -0000 1.13
+++ aclocal.m4 9 Mar 2006 19:58:32 -0000
@@ -281,7 +281,10 @@
[AC_CACHE_CHECK([for C restrict], cctk_cv_c_restrict,
[cctk_cv_c_restrict=no
for ac_kw in restrict __restrict__ __restrict; do
- AC_TRY_COMPILE(, [double * $ac_kw foo;], [cctk_cv_c_restrict=
$ac_kw; break])
+ AC_TRY_COMPILE(, [
+double * $ac_kw foo;
+void bar (void * $ac_kw arr[]);
+], [cctk_cv_c_restrict=$ac_kw; break])
done
])
case "$cctk_cv_c_restrict" in
@@ -297,7 +300,10 @@
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
for ac_kw in restrict __restrict__ __restrict; do
- AC_TRY_COMPILE(, [double * $ac_kw foo;], [cctk_cv_cxx_restrict=
$ac_kw; break])
+ AC_TRY_COMPILE(, [
+double * $ac_kw foo;
+void bar (void * $ac_kw arr[]);
+], [cctk_cv_cxx_restrict=$ac_kw; break])
done
AC_LANG_RESTORE
])
-erik
--
Erik Schnetter <schnetter at cct.lsu.edu>
My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from www.keyserver.net.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://www.cactuscode.org/pipermail/developers/attachments/20060309/d495d688/attachment.bin
More information about the Developers
mailing list