summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>2003-04-30 14:20:24 +0000
committerallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>2003-04-30 14:20:24 +0000
commit4b185e7f372afed4c33fca2293b15f87c2f62de5 (patch)
treeec32f51500c9c55d30d19324e11d8773d33787bb /lib
parent6da68b54316dba9a67ea88f7d61d2db5d74de3b2 (diff)
Rename CCTK_L2_CACHE_SIZE to CCTK_CACHE_SIZE and
CCTK_L2_CACHELINE_BYTES to CCTK_CACHELINE_BYTES to reflect the fact that for now we set these up to be the most appropriate cache size to track (usually either L2 or L3) This is hopefully added such that people don't need to reconfigure right away, but the old macros will be removed in Beta 14. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3204 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib')
-rw-r--r--lib/make/cctk_Config.h.in4
-rwxr-xr-xlib/make/configure69
-rw-r--r--lib/make/configure.in15
-rw-r--r--lib/make/known-architectures/hiuxwe26
-rw-r--r--lib/make/known-architectures/irix16
-rw-r--r--lib/make/known-architectures/linux34
-rw-r--r--lib/make/known-architectures/openbsd14
-rw-r--r--lib/make/known-architectures/unicos14
8 files changed, 96 insertions, 76 deletions
diff --git a/lib/make/cctk_Config.h.in b/lib/make/cctk_Config.h.in
index 06cb7f2f..b983999b 100644
--- a/lib/make/cctk_Config.h.in
+++ b/lib/make/cctk_Config.h.in
@@ -112,6 +112,10 @@
/* Cache stuff */
+#undef CCTK_CACHELINE_BYTES
+#undef CCTK_CACHE_SIZE
+
+/* DEPRECATED IN b13 */
#undef CCTK_L2_CACHELINE_BYTES
#undef CCTK_L2_CACHE_SIZE
diff --git a/lib/make/configure b/lib/make/configure
index c085cebb..788ca4e6 100755
--- a/lib/make/configure
+++ b/lib/make/configure
@@ -1584,12 +1584,12 @@ else
#line 1585 "configure"
#include "confdefs.h"
#include <stdio.h>
-int main()
+main()
{
FILE *f=fopen("conftestval", "w");
- if (!f) return(1);
+ if (!f) exit(1);
fprintf(f, "%d\n", sizeof(long long));
- return(0);
+ exit(0);
}
EOF
if { (eval echo configure:1596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
@@ -1628,12 +1628,12 @@ else
#line 1629 "configure"
#include "confdefs.h"
#include <stdio.h>
-int main()
+main()
{
FILE *f=fopen("conftestval", "w");
- if (!f) return(1);
+ if (!f) exit(1);
fprintf(f, "%d\n", sizeof(long int));
- return(0);
+ exit(0);
}
EOF
if { (eval echo configure:1640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
@@ -1672,12 +1672,12 @@ else
#line 1673 "configure"
#include "confdefs.h"
#include <stdio.h>
-int main()
+main()
{
FILE *f=fopen("conftestval", "w");
- if (!f) return(1);
+ if (!f) exit(1);
fprintf(f, "%d\n", sizeof(int));
- return(0);
+ exit(0);
}
EOF
if { (eval echo configure:1684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
@@ -1716,12 +1716,12 @@ else
#line 1717 "configure"
#include "confdefs.h"
#include <stdio.h>
-int main()
+main()
{
FILE *f=fopen("conftestval", "w");
- if (!f) return(1);
+ if (!f) exit(1);
fprintf(f, "%d\n", sizeof(short int));
- return(0);
+ exit(0);
}
EOF
if { (eval echo configure:1728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
@@ -1762,12 +1762,12 @@ else
#line 1763 "configure"
#include "confdefs.h"
#include <stdio.h>
-int main()
+main()
{
FILE *f=fopen("conftestval", "w");
- if (!f) return(1);
+ if (!f) exit(1);
fprintf(f, "%d\n", sizeof(long double));
- return(0);
+ exit(0);
}
EOF
if { (eval echo configure:1774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
@@ -1806,12 +1806,12 @@ else
#line 1807 "configure"
#include "confdefs.h"
#include <stdio.h>
-int main()
+main()
{
FILE *f=fopen("conftestval", "w");
- if (!f) return(1);
+ if (!f) exit(1);
fprintf(f, "%d\n", sizeof(double));
- return(0);
+ exit(0);
}
EOF
if { (eval echo configure:1818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
@@ -1851,12 +1851,12 @@ else
#line 1852 "configure"
#include "confdefs.h"
#include <stdio.h>
-int main()
+main()
{
FILE *f=fopen("conftestval", "w");
- if (!f) return(1);
+ if (!f) exit(1);
fprintf(f, "%d\n", sizeof(float));
- return(0);
+ exit(0);
}
EOF
if { (eval echo configure:1863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
@@ -1897,12 +1897,12 @@ else
#line 1898 "configure"
#include "confdefs.h"
#include <stdio.h>
-int main()
+main()
{
FILE *f=fopen("conftestval", "w");
- if (!f) return(1);
+ if (!f) exit(1);
fprintf(f, "%d\n", sizeof(char *));
- return(0);
+ exit(0);
}
EOF
if { (eval echo configure:1909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
@@ -4899,19 +4899,30 @@ fi
# Cache stuff - this will probably change
-# L2 Cache
-: ${L2_CACHELINE_BYTES="0"}
-: ${L2_CACHE_SIZE="0"}
+: ${CACHELINE_BYTES="0"}
+: ${CACHE_SIZE="0"}
cat >> confdefs.h <<EOF
-#define CCTK_L2_CACHELINE_BYTES $L2_CACHELINE_BYTES
+#define CCTK_CACHELINE_BYTES $CACHELINE_BYTES
EOF
cat >> confdefs.h <<EOF
-#define CCTK_L2_CACHE_SIZE $L2_CACHE_SIZE
+#define CCTK_CACHE_SIZE $CACHE_SIZE
EOF
+# DEPRECATED IN BETA 13
+cat >> confdefs.h <<EOF
+#define CCTK_L2_CACHELINE_BYTES $CACHELINE_BYTES
+EOF
+
+cat >> confdefs.h <<EOF
+#define CCTK_L2_CACHE_SIZE $CACHE_SIZE
+EOF
+
+
+
+
#########################################################################
#Check for extra stuff
#########################################################################
diff --git a/lib/make/configure.in b/lib/make/configure.in
index 64795488..d5689de3 100644
--- a/lib/make/configure.in
+++ b/lib/make/configure.in
@@ -990,12 +990,17 @@ AC_SUBST(PERL_BACKUP_NECESSARY)
# Cache stuff - this will probably change
-# L2 Cache
-: ${L2_CACHELINE_BYTES="0"}
-: ${L2_CACHE_SIZE="0"}
+: ${CACHELINE_BYTES="0"}
+: ${CACHE_SIZE="0"}
+
+AC_DEFINE_UNQUOTED(CCTK_CACHELINE_BYTES, $CACHELINE_BYTES)
+AC_DEFINE_UNQUOTED(CCTK_CACHE_SIZE, $CACHE_SIZE)
+
+# DEPRECATED IN BETA 13
+AC_DEFINE_UNQUOTED(CCTK_L2_CACHELINE_BYTES, $CACHELINE_BYTES)
+AC_DEFINE_UNQUOTED(CCTK_L2_CACHE_SIZE, $CACHE_SIZE)
+
-AC_DEFINE_UNQUOTED(CCTK_L2_CACHELINE_BYTES, $L2_CACHELINE_BYTES)
-AC_DEFINE_UNQUOTED(CCTK_L2_CACHE_SIZE, $L2_CACHE_SIZE)
#########################################################################
#Check for extra stuff
diff --git a/lib/make/known-architectures/hiuxwe2 b/lib/make/known-architectures/hiuxwe2
index a2131578..a7b7871a 100644
--- a/lib/make/known-architectures/hiuxwe2
+++ b/lib/make/known-architectures/hiuxwe2
@@ -17,7 +17,7 @@
# Added cross-compiling defines
# @endhdesc
# @endhistory
-# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/make/known-architectures/hiuxwe2,v 1.10 2003-02-13 11:54:12 tradke Exp $
+# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/make/known-architectures/hiuxwe2,v 1.11 2003-04-30 14:20:24 allen Exp $
# @@*/
if test "$CCTK_CONFIG_STAGE" = 'preferred-compilers' ; then
@@ -88,8 +88,8 @@ else
: ${LIBS='f90s f90 hf90pvmath hf90math m'}
- : ${L2_CACHELINE_BYTES='128'}
- : ${L2_CACHE_SIZE='128*1024'}
+ : ${CACHELINE_BYTES='128'}
+ : ${CACHE_SIZE='128*1024'}
# MPI stuff
if test -n "$MPI" ; then
diff --git a/lib/make/known-architectures/irix b/lib/make/known-architectures/irix
index 30f824ca..06fcdf72 100644
--- a/lib/make/known-architectures/irix
+++ b/lib/make/known-architectures/irix
@@ -6,7 +6,7 @@
# @desc
# Known architectures file for SGI Irix systems
# @enddesc
-# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/make/known-architectures/irix,v 1.37 2003-02-12 15:33:47 tradke Exp $
+# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/make/known-architectures/irix,v 1.38 2003-04-30 14:20:24 allen Exp $
# @@*/
if test "$CCTK_CONFIG_STAGE" = 'preferred-compilers' ; then
@@ -146,18 +146,18 @@ else
: ${F77_WARN_FLAGS='-fullwarn'}
# Cache stuff
- if test -z "$L2_CACHELINE_BYTES" ; then
- L2_CACHELINE_BYTES=128
- echo "Setting L2_CACHELINE_BYTES to $L2_CACHELINE_BYTES"
+ if test -z "$CACHELINE_BYTES" ; then
+ CACHELINE_BYTES=128
+ echo "Setting CACHELINE_BYTES to $CACHELINE_BYTES"
fi
- if test -z "$L2_CACHE_SIZE" ; then
+ if test -z "$CACHE_SIZE" ; then
TEMP_CACHE_SIZE="`hinv | perl -ne 'if (m/Secondary.*cache/) { s/^.*: (.*)( on P.*)?$/$1/ ; s/ Mbyte.*/\*1024/ ; s/ Kbyte.*//; print}' | sort | head -n1`"
if test -n "$TEMP_CACHE_SIZE" ; then
- L2_CACHE_SIZE="$TEMP_CACHE_SIZE*1024"
- echo "Setting L2_CACHE_SIZE to $L2_CACHE_SIZE bytes"
+ CACHE_SIZE="$TEMP_CACHE_SIZE*1024"
+ echo "Setting CACHE_SIZE to $CACHE_SIZE bytes"
else
- echo 'Unable to determine L2 Cache size on this machine.'
+ echo 'Unable to determine Cache size on this machine.'
fi
fi
diff --git a/lib/make/known-architectures/linux b/lib/make/known-architectures/linux
index 54d1ffd6..66920b52 100644
--- a/lib/make/known-architectures/linux
+++ b/lib/make/known-architectures/linux
@@ -272,19 +272,19 @@ else
# Cache stuff
- if test -z "$L2_CACHELINE_BYTES" ; then
+ if test -z "$CACHELINE_BYTES" ; then
case "$host_cpu" in
i?86)
- L2_CACHELINE_BYTES=32
- echo "Setting L2_CACHELINE_BYTES to $L2_CACHELINE_BYTES"
+ CACHELINE_BYTES=32
+ echo "Setting CACHELINE_BYTES to $CACHELINE_BYTES"
;;
ia64)
- L2_CACHELINE_BYTES=128
- echo "Setting L2_CACHELINE_BYTES to $L2_CACHELINE_BYTES"
+ CACHELINE_BYTES=128
+ echo "Setting CACHELINE_BYTES to $CACHELINE_BYTES"
;;
powerpc)
- L2_CACHELINE_BYTES=32
- echo "Setting L2_CACHELINE_BYTES to $L2_CACHELINE_BYTES"
+ CACHELINE_BYTES=32
+ echo "Setting CACHELINE_BYTES to $CACHELINE_BYTES"
;;
*)
echo "Don't know cacheline size for cpu $host_cpu"
@@ -292,26 +292,26 @@ else
esac
fi
- if test -z "$L2_CACHE_SIZE" ; then
+ if test -z "$CACHE_SIZE" ; then
if test "x$cross_compiling" = "xno" ; then
if test "$host_cpu" = "ia64"; then
# for IA64 set it to 2MB for now (actually it's the L3 cache size)
- L2_CACHE_SIZE=2*1024
+ CACHE_SIZE=2*1024
else
- L2_CACHE_SIZE="`cat /proc/cpuinfo | perl -nae 'if(m:cache\D+(\d+): && ! $dunnit) {print $1; $dunnit=1}'`"
- if test -z "$L2_CACHE_SIZE"; then
- L2_CACHE_SIZE=0
+ CACHE_SIZE="`cat /proc/cpuinfo | perl -nae 'if(m:cache\D+(\d+): && ! $dunnit) {print $1; $dunnit=1}'`"
+ if test -z "$CACHE_SIZE"; then
+ CACHE_SIZE=0
fi
fi
- if test -n "$L2_CACHE_SIZE" ; then
- L2_CACHE_SIZE="$L2_CACHE_SIZE*1024"
- echo "Setting L2_CACHE_SIZE to $L2_CACHE_SIZE bytes"
+ if test -n "$CACHE_SIZE" ; then
+ CACHE_SIZE="$CACHE_SIZE*1024"
+ echo "Setting CACHE_SIZE to $CACHE_SIZE bytes"
else
- echo "Unable to determine L2 Cache size on this machine. "
+ echo "Unable to determine Cache size on this machine. "
fi
else
- echo "Cross compiling - unable to determine L2 cache size"
+ echo "Cross compiling - unable to determine cache size"
fi
fi
diff --git a/lib/make/known-architectures/openbsd b/lib/make/known-architectures/openbsd
index 5d7efd8a..612713e9 100644
--- a/lib/make/known-architectures/openbsd
+++ b/lib/make/known-architectures/openbsd
@@ -6,7 +6,7 @@
# @desc
# generic known-architectures file for all versions of OpenBSD
# @enddesc
-# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/make/known-architectures/openbsd,v 1.2 2002-05-16 16:06:31 tradke Exp $
+# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/make/known-architectures/openbsd,v 1.3 2003-04-30 14:20:24 allen Exp $
# @@*/
if test "$CCTK_CONFIG_STAGE" = "preferred-compilers" ; then
@@ -28,14 +28,14 @@ else
# Cache stuff
# ... there doesn't seem to be any way to find out the cache size
# under OpenBSD -- JT will ask about this on the OpenBSD mailing lists
- if test -z "$L2_CACHELINE_BYTES" ; then
- L2_CACHELINE_BYTES=0
- echo "Setting L2_CACHELINE_BYTES to $L2_CACHELINE_BYTES"
+ if test -z "$CACHELINE_BYTES" ; then
+ CACHELINE_BYTES=0
+ echo "Setting CACHELINE_BYTES to $CACHELINE_BYTES"
fi
- if test -z "$L2_CACHE_SIZE" ; then
- L2_CACHE_SIZE="0*1024"
- echo "Setting L2_CACHE_SIZE to $L2_CACHE_SIZE bytes"
+ if test -z "$CACHE_SIZE" ; then
+ CACHE_SIZE="0*1024"
+ echo "Setting CACHE_SIZE to $CACHE_SIZE bytes"
fi
diff --git a/lib/make/known-architectures/unicos b/lib/make/known-architectures/unicos
index 1bd5cbfb..d1e9f5d4 100644
--- a/lib/make/known-architectures/unicos
+++ b/lib/make/known-architectures/unicos
@@ -6,7 +6,7 @@
# @desc
#
# @enddesc
-# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/make/known-architectures/unicos,v 1.13 2001-06-25 11:21:35 goodale Exp $
+# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/make/known-architectures/unicos,v 1.14 2003-04-30 14:20:24 allen Exp $
# @@*/
if test "$CCTK_CONFIG_STAGE" = "preferred-compilers" ; then
@@ -40,14 +40,14 @@ else
CCTK_WriteLine cctk_Archdefs.h "#define T3E 1"
# Cache stuff
- if test -z "$L2_CACHELINE_BYTES" ; then
- L2_CACHELINE_BYTES=64
- echo "Setting L2_CACHELINE_BYTES to $L2_CACHELINE_BYTES"
+ if test -z "$CACHELINE_BYTES" ; then
+ CACHELINE_BYTES=64
+ echo "Setting CACHELINE_BYTES to $CACHELINE_BYTES"
fi
- if test -z "$L2_CACHE_SIZE" ; then
- L2_CACHE_SIZE="96*1024"
- echo "Setting L2_CACHE_SIZE to $L2_CACHE_SIZE bytes"
+ if test -z "$CACHE_SIZE" ; then
+ CACHE_SIZE="96*1024"
+ echo "Setting CACHE_SIZE to $CACHE_SIZE bytes"
fi
# MPI stuff