summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2000-02-16 18:27:50 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2000-02-16 18:27:50 +0000
commit6ad2528cf00a111a7b1a52a117a7aeaad2d1b367 (patch)
tree9322c0822d4f6bf2b9a6b68a0f6738904a598c7d /lib
parent9888d09430884354d4625760d1d5310690f32756 (diff)
Added in secondary cache info. Under linux and irix it examines
the machine on which the configuration is happening, so it may not be correct for other machines with the same architecture. E.g. the aei origin has a 4Mb cache, but skuld only has a 1 Mb cache. You should be able to override the detection on the configuration line with something like L2_CACHELINE_BYTES=xxx L2_CACHE_SIZE=xxx Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1386 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib')
-rw-r--r--lib/make/known-architectures/irix13
-rw-r--r--lib/make/known-architectures/linux20
-rw-r--r--lib/make/known-architectures/unicos21
3 files changed, 52 insertions, 2 deletions
diff --git a/lib/make/known-architectures/irix b/lib/make/known-architectures/irix
index 0b680978..37b58196 100644
--- a/lib/make/known-architectures/irix
+++ b/lib/make/known-architectures/irix
@@ -6,7 +6,7 @@
# @desc
#
# @enddesc
-# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/make/known-architectures/irix,v 1.13 1999-10-11 13:49:08 goodale Exp $
+# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/make/known-architectures/irix,v 1.14 2000-02-16 18:27:50 goodale Exp $
# @@*/
if test "$CCTK_CONFIG_STAGE" = "preferred-compilers" ; then
@@ -123,6 +123,17 @@ esac
;;
esac
+# Cache stuff
+ if test -z "$L2_CACHELINE_BYTES" ; then
+ L2_CACHELINE_BYTES=128
+ echo "Setting L2_CACHELINE_BYTES to $L2_CACHELINE_BYTES"
+ fi
+
+ if test -z "$L2_CACHE_SIZE" ; then
+ L2_CACHE_SIZE="`hinv | perl -ane 'print $F[$#F-1] if (m/Secondary.*cache/)'`*1024*1024"
+ echo "Setting L2_CACHE_SIZE to $L2_CACHE_SIZE bytes"
+ fi
+
# MPI stuff
if test -n "$MPI" ; then
diff --git a/lib/make/known-architectures/linux b/lib/make/known-architectures/linux
index 42ab3393..cd15cde5 100644
--- a/lib/make/known-architectures/linux
+++ b/lib/make/known-architectures/linux
@@ -102,4 +102,24 @@ else
;;
esac
+# Cache stuff
+ if test -z "$L2_CACHELINE_BYTES" ; then
+ L2_CACHELINE_BYTES=32
+ echo "Setting L2_CACHELINE_BYTES to $L2_CACHELINE_BYTES"
+ fi
+
+ if test -z "$L2_CACHE_SIZE" ; then
+ L2_CACHE_SIZE="`cat /proc/cpuinfo | perl -nae 'print $F[3] if(m:cache:)'`*1024"
+ echo "Setting L2_CACHE_SIZE to $L2_CACHE_SIZE bytes"
+ fi
+
+# MPI stuff
+
+ if test -n "$MPI" ; then
+ if test "$MPI" = "NATIVE" ; then
+ echo "ERROR: NATIVE MPI selected, but linux has no native MPI"
+ exit 2
+ fi
+ fi
+
fi
diff --git a/lib/make/known-architectures/unicos b/lib/make/known-architectures/unicos
index 24fcea66..c331142f 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.6 2000-01-26 09:07:58 allen Exp $
+# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/make/known-architectures/unicos,v 1.7 2000-02-16 18:27:50 goodale Exp $
# @@*/
if test "$CCTK_CONFIG_STAGE" = "preferred-compilers" ; then
@@ -35,5 +35,24 @@ else
EOF
+# Cache stuff
+ if test -z "$L2_CACHELINE_BYTES" ; then
+ L2_CACHELINE_BYTES=64
+ echo "Setting L2_CACHELINE_BYTES to $L2_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"
+ fi
+
+# MPI stuff
+
+ if test -n "$MPI" ; then
+ if test "$MPI" = "NATIVE" ; then
+# Don't need to do anything for the T3E
+ fi
+ fi
fi
+