assorted-commits Mailing List for Assorted projects (Page 52)
Brought to you by:
yangzhang
You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(9) |
Dec
(12) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(86) |
Feb
(265) |
Mar
(96) |
Apr
(47) |
May
(136) |
Jun
(28) |
Jul
(57) |
Aug
(42) |
Sep
(20) |
Oct
(67) |
Nov
(37) |
Dec
(34) |
2009 |
Jan
(39) |
Feb
(85) |
Mar
(96) |
Apr
(24) |
May
(82) |
Jun
(13) |
Jul
(10) |
Aug
(8) |
Sep
(2) |
Oct
(20) |
Nov
(31) |
Dec
(17) |
2010 |
Jan
(16) |
Feb
(11) |
Mar
(17) |
Apr
(53) |
May
(31) |
Jun
(13) |
Jul
(3) |
Aug
(6) |
Sep
(11) |
Oct
(4) |
Nov
(17) |
Dec
(17) |
2011 |
Jan
(3) |
Feb
(19) |
Mar
(5) |
Apr
(17) |
May
(3) |
Jun
(4) |
Jul
(14) |
Aug
(3) |
Sep
(2) |
Oct
(1) |
Nov
(3) |
Dec
(2) |
2012 |
Jan
(3) |
Feb
(7) |
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
(4) |
Aug
(5) |
Sep
(2) |
Oct
(3) |
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
(9) |
Apr
(5) |
May
|
Jun
(2) |
Jul
(1) |
Aug
(10) |
Sep
(1) |
Oct
(2) |
Nov
|
Dec
|
2014 |
Jan
(1) |
Feb
(3) |
Mar
(3) |
Apr
(1) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2016 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(5) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <yan...@us...> - 2008-03-15 21:33:36
|
Revision: 627 http://assorted.svn.sourceforge.net/assorted/?rev=627&view=rev Author: yangzhang Date: 2008-03-15 14:33:36 -0700 (Sat, 15 Mar 2008) Log Message: ----------- added blokus, mosaic Modified Paths: -------------- configs/trunk/src/ssh/config Modified: configs/trunk/src/ssh/config =================================================================== --- configs/trunk/src/ssh/config 2008-03-13 21:21:27 UTC (rev 626) +++ configs/trunk/src/ssh/config 2008-03-15 21:33:36 UTC (rev 627) @@ -5,6 +5,14 @@ # StrictHostKeyChecking no +Host blokus + HostName blokus.csail.mit.edu + User y_z + +Host mosaic + HostName mosaic.csail.mit.edu + User y_z + Host josmp HostName josmp.csail.mit.edu User yang This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-03-13 21:21:22
|
Revision: 626 http://assorted.svn.sourceforge.net/assorted/?rev=626&view=rev Author: yangzhang Date: 2008-03-13 14:21:27 -0700 (Thu, 13 Mar 2008) Log Message: ----------- added a basic, minimal console ui Modified Paths: -------------- zdb/trunk/run.bash zdb/trunk/src/zdb/AltUi.scala Modified: zdb/trunk/run.bash =================================================================== --- zdb/trunk/run.bash 2008-03-13 21:21:15 UTC (rev 625) +++ zdb/trunk/run.bash 2008-03-13 21:21:27 UTC (rev 626) @@ -16,14 +16,16 @@ then echo "specify 'web' or 'file'"; exit 1 fi -case "$1" in +cmd="$1" +shift +case "$cmd" in build ) fsc -deprecation -d build \ src/zdb/Core.scala \ src/zdb/AltUi.scala \ $COMMONS/commons/*.scala \ $COMMONS/commons/extras/*.scala ;; web ) run scala zdb.WebUi ;; - file ) run scala zdb.FileIo ;; + file ) run rlwrap scala zdb.FileIo "$@" ;; repl ) run rlwrap scala ;; - * ) run scala "$@" ;; + * ) run scala "$1" "$@" ;; esac Modified: zdb/trunk/src/zdb/AltUi.scala =================================================================== --- zdb/trunk/src/zdb/AltUi.scala 2008-03-13 21:21:15 UTC (rev 625) +++ zdb/trunk/src/zdb/AltUi.scala 2008-03-13 21:21:27 UTC (rev 626) @@ -4,24 +4,112 @@ import ZdbUtil._ import ObjUser._ +import commons.Collections._ import commons.Control._ import commons.Io._ import commons.Misc._ import commons.extras._ -import java.io._ +// import scala.collection.jcl._ +import scala.io._ -import scala.collection.jcl._ +/** Command-line interface. */ +object FileIo { -object FileIo { - def main(args: Array[String]) { - loadFilePickle("data/data") - using (TextWriter("output")) { w => - for (obj <- universe.objs) { - w println printSummObj(obj) + /** Find objects such that at least one of its names contains the query. */ + def find(query: String) = { + val results = for ( + obj <- universe.objs + if obj.vals("names").asInstanceOf[StrSetV].s exists (_ contains query) + ) yield { + print(obj) + } + results mkString "\n" + } + /** + * Read a block of input, terminated by a line consisting solely of a + * period. + */ + def readBlock: List[String] = { + val line = Console.readLine + if (line == null || line == ".") Nil + else line :: readBlock + } + /** Read a block and parse it as a struct. */ + def readStruct = { + val lines = readBlock + val pairs = for (line <- lines) yield { + val Seq(key, valstr) = line split (": ", 2) + val vals = valstr split ";" map (_ trim) + (key, vals) + } + val map = Map(pairs: _*) + if (map.size != pairs.length) throw new Exception("duplicate key") + map + } + /** Update by struct, either adding or updating an object. */ + def updateStruct(shouldExist: Boolean) = { + val map = readStruct + val obj = + if (shouldExist) { + deref(getObj(map("names")(0))) + } else { + try { + getObj(map("names")(0)) + throw new Exception("object of that name already exists") + } catch { + case e: Exception => mkObj(map("parents") map getObj) + } } + for ((key, vals) <- map; if key != "parents") { + obj.infoProp(key).typ match { + case _: ObjSetT => obj.setProp(key, mkObjSetV(vals map getObj)) + case _: StrSetT => obj.setProp(key, mkStrSetV(vals)) + } } + validateAll } + /** Show an object in struct format. */ + def show(o: Obj) = { + val lines = for ((key, vals) <- o.vals) yield { + val valstr = vals match { + case StrSetV(s) => s mkString "; " + case ObjSetV(s) => s map deref map nameAndId mkString "; " + } + key + ": " + valstr + } + lines mkString "\n" + } + + def main(argv: Array[String]) { + while (true) { + Console print ">>> " + val line = Console.readLine + if (line == null) return + val ws = words(line.trim) + val args = ws drop 1 + ws(0) match { + case "load-full" => loadFilePickle("data/data") + case "load" => load + case "validate" => validateAll + case "save-full" => { validateAll; saveFilePickle(ws(1)) } + case "save" => { validateAll; save } + case "find" => println(find(args mkString " ")) + case "get-full" => args match { + case Seq(name) => println(print(deref(getObj(name)))) + case Seq(name, refine) => println(print(deref(getObj(name, refine)))) + } + case "get" => args match { + case Seq(name) => println(show(deref(getObj(name)))) + case Seq(name, refine) => println(show(deref(getObj(name, refine)))) + } + case "add" => updateStruct(false) + case "update" => updateStruct(true) + case "" => () + case x => println("unknown command: " + x) + } + } + } } object WebUi { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-03-13 21:21:10
|
Revision: 625 http://assorted.svn.sourceforge.net/assorted/?rev=625&view=rev Author: yangzhang Date: 2008-03-13 14:21:15 -0700 (Thu, 13 Mar 2008) Log Message: ----------- reintroduced pickling Modified Paths: -------------- zdb/trunk/src/zdb/Core.scala Modified: zdb/trunk/src/zdb/Core.scala =================================================================== --- zdb/trunk/src/zdb/Core.scala 2008-03-13 16:13:33 UTC (rev 624) +++ zdb/trunk/src/zdb/Core.scala 2008-03-13 21:21:15 UTC (rev 625) @@ -59,7 +59,8 @@ } def printSummObj(o: Obj) = { val names = o.getProp("names").asInstanceOf[StrSetV].s.toList - if (names.length > 0) names(0) else "" + val name = if (names.length > 0) names(0) else "" + name } def printSumm(o: Obj): String = printSummObj(o) def printSumm(v: Val): String = v match { @@ -279,7 +280,7 @@ } def load = loadFile( fnameGen takeWhile fileExists last ) // def saveLoad = { save; load } -// def saveMem = pickle(pickleUniverse, universe) + def saveMem = pickle(pickleUniverse, universe) import java.io._ def saveFile(fname: String) = { val stream = new ObjectOutputStream(new FileOutputStream(fname)) @@ -302,6 +303,8 @@ def loadFilePickle(fname: String) = loadMem(using (BinaryReader(fname)) (_.read)) + def saveFilePickle(fname: String) = + using (BinaryWriter(fname)) (_ write saveMem) def loadMem(buf: Array[Byte]) = { universe = unpickle(pickleUniverse, buf) } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-03-13 16:29:28
|
Revision: 624 http://assorted.svn.sourceforge.net/assorted/?rev=624&view=rev Author: yangzhang Date: 2008-03-13 09:13:33 -0700 (Thu, 13 Mar 2008) Log Message: ----------- fixed no-par/barrier bug Modified Paths: -------------- numa-bench/trunk/src/chew.cc Modified: numa-bench/trunk/src/chew.cc =================================================================== --- numa-bench/trunk/src/chew.cc 2008-03-13 15:53:06 UTC (rev 623) +++ numa-bench/trunk/src/chew.cc 2008-03-13 16:13:33 UTC (rev 624) @@ -228,7 +228,7 @@ cout << worker << " alloc " << p << endl; check(pthread_mutex_unlock(&iomutex) == 0); } - if (!warmup) { + if (!warmup && config.par) { int barrier_result = pthread_barrier_wait(&startup_barrier); check(barrier_result == PTHREAD_BARRIER_SERIAL_THREAD || barrier_result == 0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-03-13 15:53:11
|
Revision: 623 http://assorted.svn.sourceforge.net/assorted/?rev=623&view=rev Author: yangzhang Date: 2008-03-13 08:53:06 -0700 (Thu, 13 Mar 2008) Log Message: ----------- added option for preserving pthread barrier Modified Paths: -------------- cpp-commons/trunk/src/commons/pthread/barrier.h Modified: cpp-commons/trunk/src/commons/pthread/barrier.h =================================================================== --- cpp-commons/trunk/src/commons/pthread/barrier.h 2008-03-12 20:44:56 UTC (rev 622) +++ cpp-commons/trunk/src/commons/pthread/barrier.h 2008-03-13 15:53:06 UTC (rev 623) @@ -4,7 +4,14 @@ #include <commons/check.h> #include <pthread.h> -#define pthread_barrier_t my_barrier_t +#define pthread_barrier_t my_barrier_t + +#ifdef PRESERVE_PTHREAD_BARRIER // don't define pthread_barrier_*() +#define pthread_barrier_init my_barrier_init +#define pthread_barrier_wait my_barrier_wait +#define pthread_barrier_destroy my_barrier_destroy +#endif + struct my_barrier_t { pthread_mutex_t lock; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-03-12 20:44:49
|
Revision: 622 http://assorted.svn.sourceforge.net/assorted/?rev=622&view=rev Author: yangzhang Date: 2008-03-12 13:44:56 -0700 (Wed, 12 Mar 2008) Log Message: ----------- ported to tile64 Modified Paths: -------------- numa-bench/trunk/src/chew.cc Modified: numa-bench/trunk/src/chew.cc =================================================================== --- numa-bench/trunk/src/chew.cc 2008-03-12 20:41:57 UTC (rev 621) +++ numa-bench/trunk/src/chew.cc 2008-03-12 20:44:56 UTC (rev 622) @@ -1,6 +1,7 @@ #include <fstream> #include <iostream> +#include <pthread.h> #include <sched.h> #ifdef HAVE_NUMA @@ -8,6 +9,7 @@ #endif #include <boost/bind.hpp> +#include <boost/scoped_array.hpp> #include <commons/check.h> #include <commons/rand.h> @@ -15,12 +17,19 @@ #include <commons/time.h> #include <commons/boost/threads.h> +#ifdef TILE64 +#include <commons/pthread/barrier.h> +#endif + using namespace boost; using namespace commons; using namespace std; // TODO Make into command line flags? -const bool debug = false, pretouch = true, do_warmup = false, use_numa = false; +const bool debug = false, pretouch = true, do_warmup = false; +#ifdef HAVE_NUMA +const bool use_numa = false; +#endif pthread_barrier_t cross_barrier, startup_barrier; pthread_mutex_t iomutex; void*** partitions; @@ -321,7 +330,7 @@ if (config.par) { // Chew the memory area from each core in parallel (and also chew own). - pthread_t ts[config.nworkers]; + scoped_array<pthread_t> ts(new pthread_t[config.nworkers]); check(0 == pthread_barrier_init(&cross_barrier, NULL, config.nworkers)); check(0 == pthread_barrier_init(&startup_barrier, NULL, config.nworkers)); for (unsigned int i = 0; i < config.nworkers; i++) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-03-12 20:41:51
|
Revision: 621 http://assorted.svn.sourceforge.net/assorted/?rev=621&view=rev Author: yangzhang Date: 2008-03-12 13:41:57 -0700 (Wed, 12 Mar 2008) Log Message: ----------- added minimal pthread barrier implementation (to work around absence in tile64 uclibc) Added Paths: ----------- cpp-commons/trunk/src/commons/pthread/ cpp-commons/trunk/src/commons/pthread/barrier.h Added: cpp-commons/trunk/src/commons/pthread/barrier.h =================================================================== --- cpp-commons/trunk/src/commons/pthread/barrier.h (rev 0) +++ cpp-commons/trunk/src/commons/pthread/barrier.h 2008-03-12 20:41:57 UTC (rev 621) @@ -0,0 +1,47 @@ +#ifndef COMMONS_PTHREAD_BARRIER_H +#define COMMONS_PTHREAD_BARRIER_H + +#include <commons/check.h> +#include <pthread.h> + +#define pthread_barrier_t my_barrier_t +struct my_barrier_t +{ + pthread_mutex_t lock; + pthread_cond_t cond; + int required; + int present; +}; + +int +pthread_barrier_init(pthread_barrier_t* b, pthread_barrierattr_t* a, unsigned count) +{ + check0(pthread_mutex_init(&b->lock, NULL)); + check0(pthread_cond_init (&b->cond, NULL)); + b->required = count; + b->present = 0; + return 0; +} + +int +pthread_barrier_wait(pthread_barrier_t* b) +{ + check0(pthread_mutex_lock(&b->lock)); + if (++b->present == b->required) { + check0(pthread_cond_broadcast(&b->cond)); + } else { + check0(pthread_cond_wait(&b->cond, &b->lock)); + } + check0(pthread_mutex_unlock(&b->lock)); + return 0; +} + +int +pthread_barrier_destroy(pthread_barrier_t* b) +{ + check0(pthread_mutex_destroy(&b->lock)); + check0(pthread_cond_destroy(&b->cond)); + return 0; +} + +#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-03-12 20:41:22
|
Revision: 620 http://assorted.svn.sourceforge.net/assorted/?rev=620&view=rev Author: yangzhang Date: 2008-03-12 13:41:21 -0700 (Wed, 12 Mar 2008) Log Message: ----------- added check0 Modified Paths: -------------- cpp-commons/trunk/src/commons/check.h Modified: cpp-commons/trunk/src/commons/check.h =================================================================== --- cpp-commons/trunk/src/commons/check.h 2008-03-10 23:54:07 UTC (rev 619) +++ cpp-commons/trunk/src/commons/check.h 2008-03-12 20:41:21 UTC (rev 620) @@ -10,7 +10,7 @@ using namespace std; - class check_exception : exception + class check_exception : public exception { public: check_exception(const string & name) : name(name) {} @@ -41,20 +41,28 @@ * This is a macro for two reasons: (1) the file and line, and (2) the lazy * evaluation of msg. */ -#define checkmsg(cond, msg) \ - bool b__ = cond; \ +#define checkmsg(cond, msg) \ + bool b__ = cond; \ if (!b__) _check(b__, (msg), __FILE__, __LINE__) // TODO: half-written -#define checkmsgf(cond, msg, ...) \ - do { \ - bool b__ = cond; \ - if (!b__) { \ - char s__[4096]; \ - snprintf(s, ); \ - _check(b__, s__, __FILE__, __LINE__); \ - } \ +#define checkmsgf(cond, msg, ...) \ + do { \ + bool b__ = cond; \ + if (!b__) { \ + char s__[4096]; \ + snprintf(s, ); \ + _check(b__, s__, __FILE__, __LINE__); \ + } \ } while (0) +#define check0(expr) \ + do { \ + typeof(expr) r__ = expr; \ + if (r__ != 0) { \ + return r__; \ + } \ + } while (0) + #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-03-10 23:54:19
|
Revision: 619 http://assorted.svn.sourceforge.net/assorted/?rev=619&view=rev Author: yangzhang Date: 2008-03-10 16:54:07 -0700 (Mon, 10 Mar 2008) Log Message: ----------- added conditional numa compilation Modified Paths: -------------- numa-bench/trunk/src/chew.cc Modified: numa-bench/trunk/src/chew.cc =================================================================== --- numa-bench/trunk/src/chew.cc 2008-03-10 19:52:06 UTC (rev 618) +++ numa-bench/trunk/src/chew.cc 2008-03-10 23:54:07 UTC (rev 619) @@ -3,7 +3,9 @@ #include <sched.h> +#ifdef HAVE_NUMA #include <numa.h> +#endif #include <boost/bind.hpp> @@ -100,13 +102,21 @@ void * alloc(size_t sz) { +#ifdef HAVE_NUMA return use_numa ? numa_alloc_local(sz) : malloc(sz); +#else + return malloc(sz); +#endif } void dealloc(void *p, size_t sz) { +#ifdef HAVE_NUMA return use_numa ? numa_free(p, sz) : free(p); +#else + return free(p); +#endif } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-03-10 19:52:12
|
Revision: 618 http://assorted.svn.sourceforge.net/assorted/?rev=618&view=rev Author: yangzhang Date: 2008-03-10 12:52:06 -0700 (Mon, 10 Mar 2008) Log Message: ----------- added some lazy c++ tests Added Paths: ----------- sandbox/trunk/src/lzz/ sandbox/trunk/src/lzz/A.lzz sandbox/trunk/src/lzz/Makefile sandbox/trunk/src/lzz/test.lzz Added: sandbox/trunk/src/lzz/A.lzz =================================================================== --- sandbox/trunk/src/lzz/A.lzz (rev 0) +++ sandbox/trunk/src/lzz/A.lzz 2008-03-10 19:52:06 UTC (rev 618) @@ -0,0 +1,14 @@ +#hdr +#include <iostream> +using namespace std; +#end + +class A +{ + public: + inline void f(int i) { cout << "hello"; } + void g(int j = 0) { cout << "world"; } +}; +bool operator ==(A const & a1, A const & a2) { return true; } + +// vim:ft=cpp:et:sw=2:ts=2 Added: sandbox/trunk/src/lzz/Makefile =================================================================== --- sandbox/trunk/src/lzz/Makefile (rev 0) +++ sandbox/trunk/src/lzz/Makefile 2008-03-10 19:52:06 UTC (rev 618) @@ -0,0 +1,6 @@ +all: lzztest +lzztest: $(wildcard *.lzz) + lzz *.lzz + g++ -Wall *.cpp -o lzztest +clean: + rm -f *.cpp *.h lzztest Added: sandbox/trunk/src/lzz/test.lzz =================================================================== --- sandbox/trunk/src/lzz/test.lzz (rev 0) +++ sandbox/trunk/src/lzz/test.lzz 2008-03-10 19:52:06 UTC (rev 618) @@ -0,0 +1,16 @@ +#hdr +#include <iostream> +#include "A.h" +using namespace std; +#end + +int +main() +{ + A a; + a.g(); + cout << "hello, world!" << endl; + return 0; +} + +// vim:ft=cpp:et:sw=2:ts=2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-03-07 07:32:06
|
Revision: 617 http://assorted.svn.sourceforge.net/assorted/?rev=617&view=rev Author: yangzhang Date: 2008-03-06 23:32:09 -0800 (Thu, 06 Mar 2008) Log Message: ----------- added a readme Added Paths: ----------- zdb/trunk/README Added: zdb/trunk/README =================================================================== --- zdb/trunk/README (rev 0) +++ zdb/trunk/README 2008-03-07 07:32:09 UTC (rev 617) @@ -0,0 +1,43 @@ +Overview +-------- + +ZDB is an object database system that emphasizes semantics (naturally +representing things). + +Requirements +------------ + +- [Scala Commons] 0.1 + +[Scala Commons]: http://assorted.sf.net/scala-commons/ + +Setup +----- + +To build, run: + + ./run.bash build + +Usage +----- + + ./run.bash file + +runs `zdb.FileIo`, which just loads the DB and dumps the name of every object +to stdout. + + ./run.bash web + +runs `zdb.WebUi`, which loads the DB and starts an HTTP server listening on +port 8888. This serves a bookmarklet page at `http://localhost:8888/` for +adding new objects that are bookmarks. + +Misc +---- + +I think the next step is to build a UI so that I can use this thing. UIs have +to be ultra-easy to build, though, since there are going to be so many +different views over ZDB. The first one to build should be a generic data +maneger/explorer, which I barely started writing in `explorer.lzx`. + +I'll also provide a sample DB (my own) at some point. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-03-07 02:49:01
|
Revision: 616 http://assorted.svn.sourceforge.net/assorted/?rev=616&view=rev Author: yangzhang Date: 2008-03-06 18:49:04 -0800 (Thu, 06 Mar 2008) Log Message: ----------- moved shared pretouching to shared location Modified Paths: -------------- numa-bench/trunk/src/chew.cc Modified: numa-bench/trunk/src/chew.cc =================================================================== --- numa-bench/trunk/src/chew.cc 2008-03-07 02:38:20 UTC (rev 615) +++ numa-bench/trunk/src/chew.cc 2008-03-07 02:49:04 UTC (rev 616) @@ -165,6 +165,22 @@ global_sum += sum; } +void +do_pretouch(void *p, const config & config) +{ + if (pretouch) { + int *is = (int*) p; + for (size_t i = 0; i < config.size / sizeof(int); i++) { + is[i] = i; + } + int sum = 0; + for (size_t i = 0; i < config.size / sizeof(int); i++) { + sum += is[i]; + } + global_sum += sum; + } +} + /** * \param pp The start of the buffer to chew. * \param worker From this we can determine which CPU to pin our thread to. @@ -187,17 +203,7 @@ } void* p = config.local ? alloc(config.size) : pp; - if (pretouch) { - int *is = (int*) p; - for (size_t i = 0; i < config.size / sizeof(int); i++) { - is[i] = i; - } - int sum = 0; - for (size_t i = 0; i < config.size / sizeof(int); i++) { - sum += is[i]; - } - global_sum += sum; - } + if (config.local) do_pretouch(p, config); if (debug) { check(pthread_mutex_lock(&iomutex) == 0); cout << worker << " alloc " << p << endl; @@ -288,7 +294,8 @@ check(config.shuffle || config.opcount <= config.size / sizeof(int)); - void *p = malloc(config.size); + void *p = alloc(config.size); + do_pretouch(p, config); check(p != NULL); check(pthread_mutex_init(&iomutex, NULL) == 0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-03-07 02:38:20
|
Revision: 615 http://assorted.svn.sourceforge.net/assorted/?rev=615&view=rev Author: yangzhang Date: 2008-03-06 18:38:20 -0800 (Thu, 06 Mar 2008) Log Message: ----------- inlined rand methods Modified Paths: -------------- cpp-commons/trunk/src/commons/rand.h Modified: cpp-commons/trunk/src/commons/rand.h =================================================================== --- cpp-commons/trunk/src/commons/rand.h 2008-03-06 00:41:49 UTC (rev 614) +++ cpp-commons/trunk/src/commons/rand.h 2008-03-07 02:38:20 UTC (rev 615) @@ -10,11 +10,11 @@ private: unsigned long randx; public: - posix_rand(long s = 0) { randx = s; } - void seed(long s) { randx = s; } - long abs(long x) { return x & 0x7fffffff; } - long draw() { return randx = randx * 1103515245 + 12345; } - long operator()() { return abs(draw()); } + inline posix_rand(long s = 0) { randx = s; } + inline void seed(long s) { randx = s; } + inline long abs(long x) { return x & 0x7fffffff; } + inline long draw() { return randx = randx * 1103515245 + 12345; } + inline long operator()() { return abs(draw()); } }; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-03-06 00:41:43
|
Revision: 614 http://assorted.svn.sourceforge.net/assorted/?rev=614&view=rev Author: yangzhang Date: 2008-03-05 16:41:49 -0800 (Wed, 05 Mar 2008) Log Message: ----------- added some stuff to explorer frontend Modified Paths: -------------- zdb/trunk/src/lzx/explorer.lzx Modified: zdb/trunk/src/lzx/explorer.lzx =================================================================== --- zdb/trunk/src/lzx/explorer.lzx 2008-03-05 22:59:46 UTC (rev 613) +++ zdb/trunk/src/lzx/explorer.lzx 2008-03-06 00:41:49 UTC (rev 614) @@ -1,3 +1,79 @@ <canvas> - <autocompletecombobox contentpath=""> + <class name="objlist" layout="axis:y" height="100%" width="200"> + <edittext width="100%"/> + <list height="${parent.height - this.y}" width="100%"> + <textlistitem datapath="items:/item" text="$path{'text()'}" value="$path{'@value'}"/> + </list> + </class> + + <class name="field" layout="axis:x" width="100%"> + <text name="label" text="some field:" width="50%"/> + <edittext width="50%"/> + </class> + + <class name="details" layout="axis:y" height="100%" width="200"> + <field/> + <field/> + <field/> + <field/> + </class> + + <view height="100%" width="100%"> + <view layout="axis:x;spacing:10" height="90%" width="100%" x="5%" y="5%"> + <objlist/> + <details/> + <objlist/> + </view> + </view> + + <dataset name="items"> + <item value="item1">item one</item> + <item value="item2">item two</item> + <item value="item3">item three</item> + <item value="item4">item four</item> + <item value="item5">item five</item> + <item value="item6">item six</item> + <item value="item1">item one</item> + <item value="item2">item two</item> + <item value="item3">item three</item> + <item value="item4">item four</item> + <item value="item5">item five</item> + <item value="item6">item six</item> + <item value="item1">item one</item> + <item value="item2">item two</item> + <item value="item3">item three</item> + <item value="item4">item four</item> + <item value="item5">item five</item> + <item value="item6">item six</item> + <item value="item1">item one</item> + <item value="item2">item two</item> + <item value="item3">item three</item> + <item value="item4">item four</item> + <item value="item5">item five</item> + <item value="item6">item six</item> + <item value="item1">item one</item> + <item value="item2">item two</item> + <item value="item3">item three</item> + <item value="item4">item four</item> + <item value="item5">item five</item> + <item value="item6">item six</item> + <item value="item1">item one</item> + <item value="item2">item two</item> + <item value="item3">item three</item> + <item value="item4">item four</item> + <item value="item5">item five</item> + <item value="item6">item six</item> + <item value="item1">item one</item> + <item value="item2">item two</item> + <item value="item3">item three</item> + <item value="item4">item four</item> + <item value="item5">item five</item> + <item value="item6">item six</item> + <item value="item1">item one</item> + <item value="item2">item two</item> + <item value="item3">item three</item> + <item value="item4">item four</item> + <item value="item5">item five</item> + <item value="item6">item six</item> + </dataset> </canvas> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-03-05 22:59:42
|
Revision: 613 http://assorted.svn.sourceforge.net/assorted/?rev=613&view=rev Author: yangzhang Date: 2008-03-05 14:59:46 -0800 (Wed, 05 Mar 2008) Log Message: ----------- checkpoint Modified Paths: -------------- zdb/trunk/Makefile zdb/trunk/run.bash zdb/trunk/src/zdb/AltUi.scala zdb/trunk/src/zdb/Core.scala Added Paths: ----------- zdb/trunk/doc/ zdb/trunk/doc/manual.txt zdb/trunk/src/lzx/ zdb/trunk/src/lzx/explorer.lzx Modified: zdb/trunk/Makefile =================================================================== --- zdb/trunk/Makefile 2008-03-05 21:16:43 UTC (rev 612) +++ zdb/trunk/Makefile 2008-03-05 22:59:46 UTC (rev 613) @@ -1,30 +1,35 @@ +COMMONS := $(HOME)/scom/src + all: core +# fsc -d build -classpath ~/workspace-3.2/zharva:build -sourcepath src:scala-tui:$(COMMONS) src/zdb/Ui.scala + +build: mkdir -p build -# fsc -d build -classpath ~/workspace-3.2/zharva:build -sourcepath src:scala-tui:scala-commons src/zdb/Ui.scala -zdb: +zdb: build fsc -d build -classpath ~/workspace-3.2/zharva:build \ src/zdb/*.scala -tui: +tui: build fsc -d build -classpath ~/workspace-3.2/zharva:build \ scala-tui/tui/*.scala \ src/zdb/*.scala -full: +full: build fsc -d build -classpath ~/workspace-3.2/zharva:build \ - scala-commons/commons/*.scala \ + $(COMMONS)/commons/*.scala \ scala-tui/tui/*.scala \ src/zdb/*.scala -core: - fsc -deprecation -d build src/zdb/Core.scala \ - -classpath javabib-bin.jar - src/zdb/AltUi.scala scala-commons/commons/*.scala +core: build + ./run.bash build -# fsc -d build -target:jvm-1.5 -classpath ~/workspace-3.2/zharva:build -sourcepath src:scala-tui:scala-commons src/zdb/*.scala scala-tui/tui/*.scala scala-commons/commons/*.scala -# scalac -d build -classpath ~/workspace-3.2/zharva:build:~/tmp/pkg/pure/todo//charva/java/lib/commons-logging.jar:~/tmp/pkg/pure/todo//charva/java/lib/commons-logging-api.jar -sourcepath src:scala-tui:scala-commons src/zdb/Ui.scala scala-tui/tui/Tui.scala +stop: + fsc -shutdown +# fsc -d build -target:jvm-1.5 -classpath ~/workspace-3.2/zharva:build -sourcepath src:scala-tui:$(COMMONS) src/zdb/*.scala scala-tui/tui/*.scala $(COMMONS)/commons/*.scala +# scalac -d build -classpath ~/workspace-3.2/zharva:build:~/tmp/pkg/pure/todo//charva/java/lib/commons-logging.jar:~/tmp/pkg/pure/todo//charva/java/lib/commons-logging-api.jar -sourcepath src:scala-tui:$(COMMONS) src/zdb/Ui.scala scala-tui/tui/Tui.scala + # .PATH.scala = src/tui #.scala: Added: zdb/trunk/doc/manual.txt =================================================================== --- zdb/trunk/doc/manual.txt (rev 0) +++ zdb/trunk/doc/manual.txt 2008-03-05 22:59:46 UTC (rev 613) @@ -0,0 +1,8 @@ +Requirements +------------ + +java 6 for the sun http server +scala 2.6.0 +scala-commons +ostermillerutils_1_06_01.jar +jscrape Modified: zdb/trunk/run.bash =================================================================== --- zdb/trunk/run.bash 2008-03-05 21:16:43 UTC (rev 612) +++ zdb/trunk/run.bash 2008-03-05 22:59:46 UTC (rev 613) @@ -1,7 +1,29 @@ #!/usr/bin/env bash # vim:et:sw=2:ts=2 +if [ ! -f javabib-bin.jar ] +then wget 'http://www-plan.cs.colorado.edu/henkel/stuff/javabib/20040801/javabib-bin.jar' +fi + +export COMMONS=~/scom/src +export CLASSPATH=javabib-bin.jar:ostermillerutils_1_06_01.jar:jscrape/libs/commons-codec-1.3.jar:jscrape/libs/commons-httpclient-3.0.1.jar:jscrape/libs/commons-logging-1.1.jar:jscrape/libs/log4j-1.2.11.jar:jscrape/libs/saxon8-dom.jar:jscrape/libs/saxon8.jar:jscrape/libs/saxon8-xpath.jar:jscrape/libs/saxon8-xqj.jar:jscrape/libs/tagsoup-1.1.jar:jscrape/libs/xalan.jar:jscrape/jscrape.jar + +run() { + CLASSPATH=build:$CLASSPATH "$@" +} + +if (( $# == 0 )) +then echo "specify 'web' or 'file'"; exit 1 +fi + case "$1" in - web ) scala -classpath build:javabib-bin.jar zdb.WebUi - file ) scala -classpath build:javabib-bin.jar zdb.FileIo + build ) fsc -deprecation -d build \ + src/zdb/Core.scala \ + src/zdb/AltUi.scala \ + $COMMONS/commons/*.scala \ + $COMMONS/commons/extras/*.scala ;; + web ) run scala zdb.WebUi ;; + file ) run scala zdb.FileIo ;; + repl ) run rlwrap scala ;; + * ) run scala "$@" ;; esac Added: zdb/trunk/src/lzx/explorer.lzx =================================================================== --- zdb/trunk/src/lzx/explorer.lzx (rev 0) +++ zdb/trunk/src/lzx/explorer.lzx 2008-03-05 22:59:46 UTC (rev 613) @@ -0,0 +1,3 @@ +<canvas> + <autocompletecombobox contentpath=""> +</canvas> Modified: zdb/trunk/src/zdb/AltUi.scala =================================================================== --- zdb/trunk/src/zdb/AltUi.scala 2008-03-05 21:16:43 UTC (rev 612) +++ zdb/trunk/src/zdb/AltUi.scala 2008-03-05 22:59:46 UTC (rev 613) @@ -2,37 +2,187 @@ import Zdb._ import ZdbUtil._ +import ObjUser._ import commons.Control._ import commons.Io._ +import commons.Misc._ +import commons.extras._ +import java.io._ + +import scala.collection.jcl._ + object FileIo { def main(args: Array[String]) { loadFilePickle("data/data") using (TextWriter("output")) { w => for (obj <- universe.objs) { - w println (printSummObj(obj)); + w println printSummObj(obj) } } } } -import com.sun.net.httpserver._ +object WebUi { + // TODO make into enum + class FieldType + object ReadOnly extends FieldType + object Editable extends FieldType + type Field = (String, FieldType, String, Seq[String]) + def handleCiteseer(url: String, title: String) = { + val bibtex = JScraper scrapeForString (url, "//xhtml:pre") + println(bibtex) + val (entries, exs) = JavaBib parse bibtex + exs foreach (_ printStackTrace) + val entry = entries(0) + assert(entries.length == 1) + println(entry) -object WebUi { - def dialog(s: String) = { - "This is the response" + val title = entry("title")(0) + val (obj, exists) = try { + (deref(getObj(title)), true) + } catch { + case _ => (deref(mk(title)("BibTeX item")), false) + } + + for ((rawName, value) <- entry elements) { + val name = if (rawName == "title") "name" else rawName + if (!success(obj getProp name)) { + prop("BibTeX item", name, "string set") + } + set(title, name)(value(0)) // obj setProp mkStrSetV(obj getProp name) + } + + val fields = for ((owner, name, info, value) <- getProps(obj)) + yield (name, + ReadOnly, + <p>{name} ({printSummObj(owner)})</p>.text, + List(optionize(value.get.asInstanceOf[StrSetV].s.elements.next) getOrElse "")) // TODO only a single value + + List(("exists", ReadOnly, "already exists", List(exists toString))) ++ fields toList } + def handleWebsite(url: String, title: String) = List[Field]() + def dialog(method: String, + headers: SunHttpServer.HeaderMap, + uri: java.net.URI, + params: SunHttpServer.ParamMap, + in: String) = { + val (url, title) = (params("url"), params("title")) + val bookmarklet = "javascript: var pw = window.open( 'http://localhost:8888/?url=' + encodeURIComponent(location.href) + '&title=' + encodeURIComponent(document.title) + '&body=' + encodeURIComponent(document.body), 'zdb popup post', 'width=400,height=400,scrollbars=1,resizable=1' ); void(window.setTimeout('pw.focus()', 300));" + //val bookmarklet = "javascript: var pw = window.open( 'http://localhost:8888/?url=' + escape(location.href) + '&title=' + escape(document.title) + '&body=' + escape(document.body), 'zdb popup post', 'width=400,height=400,scrollbars=1,resizable=1' ); void(window.setTimeout('pw.focus()', 300));" + println(url + " " + title) + if (url != "") { + val fields: Seq[Field] = + if ((url startsWith "http://citeseer.ist.psu.edu") && + (title contains " (ResearchIndex)")) + handleCiteseer(url, title) + else + handleWebsite(url, title) + val res = + <html> + <head> + <!--CSS file (default YUI Sam Skin) --> + <link type="text/css" rel="stylesheet" href="http://yui.yahooapis.com/2.3.1/build/autocomplete/assets/skins/sam/autocomplete.css"/> + <!-- Dependencies --> + <script type="text/javascript" src="http://yui.yahooapis.com/2.3.1/build/yahoo-dom-event/yahoo-dom-event.js"></script> + <!-- OPTIONAL: Connection (required only if using XHR DataSource) --> + <script type="text/javascript" src="http://yui.yahooapis.com/2.3.1/build/connection/connection-min.js"></script> + <!-- OPTIONAL: Animation (required only if enabling animation) --> + <script type="text/javascript" src="http://yui.yahooapis.com/2.3.1/build/animation/animation-min.js"></script> + <!-- OPTIONAL: External JSON parser from http://www.json.org/ (enables JSON validation) --> + <script type="text/javascript" src="http://www.json.org/json.js"></script> + <!-- Source file --> + <script type="text/javascript" src="http://yui.yahooapis.com/2.3.1/build/autocomplete/autocomplete-min.js"></script> + <style>{scala.xml.Unparsed(""" + /* custom styles for multiple stacked instances */ + .autocomp { + width:15em; /* set width here */ + padding-bottom:2em; + z-index:9000; /* z-index needed on top instance for ie & sf absolute inside relative issue */ + } + /*.autoinput { + _position:absolute; /* abs pos needed for ie quirks */ + }*/ + """)}</style> + </head> + <body> + <form action="/" method="post"> + { + val handles = new HandleGenerator("xxx") + def quote(x: String) = x replaceAll ("\\\\","\\\\\\\\") replaceAll ("\"", "\\\\\"") + def jsarray(xs: List[String]) = xs map quote mkString ("[\"", "\",\"", "\"]") + for ((name, typ, label, values) <- fields) yield { + // typ match { + // case ReadOnly => + // <p>{label}:</p> // <input type="text" name="{name}" value={value}/></p> + // case Editable => + // <p>{label}:</p> // <input type="text" name="{name}" value={value}/></p> + // } + val arrayHandle, datasourceHandle, inputHandle, containerHandle, autocompHandle = + handles next; + <p>{label}: <input type="text" name={name} value={values mkString ","}/></p> +// <div style="z-index: 9000;"> +// {label}: +// <input name={name} id={inputHandle} type="text" value={values mkString ";"}/> +// <div id={containerHandle}/> +// </div> +// <script type="text/javascript"> +// {scala.xml.Unparsed(<p> +// var {arrayHandle} = {jsarray(List("a","aa","aa\"a\\a"))}; +// var {datasourceHandle} = new YAHOO.widget.DS_JSArray({arrayHandle}); +// var {autocompHandle} = new YAHOO.widget.AutoComplete("{inputHandle}","{containerHandle}", {datasourceHandle}); +// {autocompHandle}.queryDelay = 0; +// {autocompHandle}.prehighlightClassName = "yui-ac-prehighlight"; +// //{autocompHandle}.typeAhead = true; +// {autocompHandle}.useShadow = true; +// {autocompHandle}.minQueryLength = 0; +// //{autocompHandle}.textboxFocusEvent.subscribe(function() {{ +// // var sInputValue = YAHOO.util.Dom.get("{inputHandle}").value; +// // if(sInputValue.length === 0) {{ +// // var oSelf = this; +// // setTimeout(function(){{oSelf.sendQuery(sInputValue);}},0); +// // }} +// //}}); +// //{autocompHandle}.forceSelection = true; +// </p>.text)} +// </script> + } + } + <input type="submit" name="submit"/> + </form> + bookmarklet: <a href={bookmarklet}>Process in ZDB</a> + </body> + </html> toString; + res + } else { + <html> + <head> + <script> + window.close(); + </script> + </head> + </html> toString + } + /* + val fname = save + import commons.Debug._ + info(<p>saved to {fname}: {title}</p>.text) + */ + } def main(args: Array[String]) { - val server = HttpServer create (new InetSocketAddress(8888)) - server createContext ("/", new HttpHandler { - override def handle(t: HttpExchange) { - val response = dialog(t getRequestBody) - t sendResponseHeaders (200, response length) - using(t getResponseBody) (_ write response.getBytes) - } - }) - server setExecutor null - server start + load + SunHttpServer start dialog + println("started") } } + +object ConsoleTest { + def main(args: Array[String]) { + //val url = "http://citeseer.ist.psu.edu/desikan03lightweight.html" + //val query = "//xhtml:pre" + //println(WebUi handleCiteseer (url, query)) + val bib = using (TextReader("bib")) (_ read) + JavaBib parse bib + } +} Modified: zdb/trunk/src/zdb/Core.scala =================================================================== --- zdb/trunk/src/zdb/Core.scala 2008-03-05 21:16:43 UTC (rev 612) +++ zdb/trunk/src/zdb/Core.scala 2008-03-05 22:59:46 UTC (rev 613) @@ -166,9 +166,23 @@ case _ => throw new MultiResultException(objs.size, name, objs) } } + def ancestors(x: Obj): Set[Obj] = { + Set(x) ++ strictAncestors(x) + } + def strictAncestors(x: Obj): Set[Obj] = { + val as = for (p <- x.parents map deref; + a <- ancestors(p)) yield p + Set(as toList: _*) + } + // given an object, returns a list of all the properties associated with the object, including those from its parents + def getProps(x: Obj) = { + for (a <- ancestors(x); + (propname, prop) <- a.props.elements.toList) + yield (a, propname, prop, optionize(x getProp propname)) + } def pickleStrSetT: SPU[Type] = wrap( - (x: String) => StrSetT, + (x: String) => StrSetT(), (t: Type) => t match { case StrSetT() => "" }, string ) @@ -193,7 +207,7 @@ triple(pickleType, pickleVal, bool) ) def pickleNilV: SPU[Val] = wrap( - (s: String) => NilV, + (s: String) => NilV(), (v: Val) => v match { case NilV() => "" }, string ) @@ -258,7 +272,11 @@ ) val defaultBase = "data/data." def fnameGen = Iterator from 0 map (defaultBase +) - def save = saveFile( fnameGen find not(fileExists) get ) + def save = { + val fname = fnameGen find not(fileExists) get; + saveFile( fname ) + fname + } def load = loadFile( fnameGen takeWhile fileExists last ) // def saveLoad = { save; load } // def saveMem = pickle(pickleUniverse, universe) @@ -624,10 +642,10 @@ val obj = deref(getObj(objName)) val dflt = default match { case Some(s) => mkStrSetV(s) - case None => NilV + case None => NilV() } propType match { - case "string set" => obj.addProp(propName, StrSetT, dflt, opt) + case "string set" => obj.addProp(propName, StrSetT(), dflt, opt) case _ => throw new BadTypeException() } } @@ -731,6 +749,12 @@ } rmObjLossless(b) } + + def props(x: Obj) = { + val xs = for ((owner, name, info, value) <- getProps(x)) + yield <p>{name} ({owner}): {optionize(print(value.get))}</p> + xs mkString "\n" + } } import ObjUser._ @@ -1036,7 +1060,7 @@ while (true) { Console print "> " val line = Console.readLine - val cmd :: rest = split(line).toList + val cmd :: rest = words(line).toList return } } @@ -1048,7 +1072,7 @@ } def bigbang = { val concept = mkObj(Set()) - concept.addProp("names", StrSetT, NilV, false) + concept.addProp("names", StrSetT(), NilV(), false) concept.setProp("names", mkStrSetV("concept")) } def findAndRefineDups = { @@ -1059,6 +1083,8 @@ obj.infoProp(name) match { case Prop(ObjSetT(rels),_,_) => { for (val t <- rels map (_._1)) { + // verify that the object refs satisfy the type constraints, + // which limit which types of objects we can reference if (!(vs map deref forall (_.parents.contains(t)))) { Console.err printf ("%-40s%s", Array[Object](nameAndId(obj), "")) Console.err println; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-03-05 21:16:41
|
Revision: 612 http://assorted.svn.sourceforge.net/assorted/?rev=612&view=rev Author: yangzhang Date: 2008-03-05 13:16:43 -0800 (Wed, 05 Mar 2008) Log Message: ----------- added footer Added Paths: ----------- personal-site/trunk/src/footer.html Added: personal-site/trunk/src/footer.html =================================================================== --- personal-site/trunk/src/footer.html (rev 0) +++ personal-site/trunk/src/footer.html 2008-03-05 21:16:43 UTC (rev 612) @@ -0,0 +1,30 @@ +<div class="footer"> + <!--<p>Styles: <a href="plain.html">Plain</a> | <a href="dark.html">Dark</a></p>--> + <p>Valid XHTML 1.0 (<a href="http://validator.w3.org/check/referer">re-validate</a>)</p> + <p>Valid CSS (<a href="http://jigsaw.w3.org/css-validator/check/referer">re-validate</a>)</p> +</div> +<div id="spamlink" style="position: absolute; top: -250px; left: -250px;"><a href="http://people.csail.mit.edu/yang/appraisal.php">pattern</a></div> +<!-- +<style>a.pudris{color:#FFF;font:bold 10px arial,sans-serif;text-decoration:none;}</style><table cellspacing="0"cellpadding="0"border="0"style="background:#999;width:230px;"><tr><td valign="top"style="padding: 1px 2px 5px 4px;border-right:solid 1px #CCC;"><span style="font:bold 30px arial,sans-serif;color:#666;top:0px;position:relative;">@</span></td><td valign="top" align="left" style="padding:3px 0 0 4px;"><a href="http://www.projecthoneypot.org/" class="pudris">MEMBER OF PROJECT HONEY POT</a><br/><a href="http://www.unspam.com"class="pudris">Spam Harvester Protection Network<br/>provided by Unspam</a></td></tr></table> +--> + +<!-- Google Analytics --> +<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> +</script> +<script type="text/javascript"> + _uacct = "UA-1322324-1"; + urchinTracker(); +</script> + +<!-- Performance Metrics --> +<script src="http://pmetrics.performancing.com/102.js" type="text/javascript"></script> +<noscript><p><img alt="Performancing Metrics" src="http://pmetrics.performancing.com/102ns.gif" /></p></noscript> + +<!-- Quantcast --> +<!-- Start Quantcast tag --> +<script type="text/javascript" src="http://edge.quantserve.com/quant.js"></script> +<script type="text/javascript"> +_qacct="p-45nKPbm9DJOeE";quantserve();</script> +<noscript> +<img src="http://pixel.quantserve.com/pixel/p-45nKPbm9DJOeE.gif" style="display: none" height="1" width="1" alt="Quantcast"/></noscript> +<!-- End Quantcast tag --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-03-05 21:15:16
|
Revision: 611 http://assorted.svn.sourceforge.net/assorted/?rev=611&view=rev Author: yangzhang Date: 2008-03-05 13:15:08 -0800 (Wed, 05 Mar 2008) Log Message: ----------- added and updated recommendations; some fixes Modified Paths: -------------- personal-site/trunk/Makefile personal-site/trunk/src/index.txt personal-site/trunk/src/recommendations.txt Modified: personal-site/trunk/Makefile =================================================================== --- personal-site/trunk/Makefile 2008-03-05 20:45:06 UTC (rev 610) +++ personal-site/trunk/Makefile 2008-03-05 21:15:08 UTC (rev 611) @@ -23,10 +23,12 @@ $(INDEX): $(DARK) ln -sf plain.html $(INDEX) -$(PLAIN): src/index.txt src/header.html out +$(PLAIN): src/index.txt src/header.html out src/footer.html src/recommendations.txt pandoc -s -S --tab-stop=2 -H src/header.html src/index.txt \ -c plain.css | \ $(MUNGEMAIL) > $(PLAIN) + pandoc -s -S --tab-stop=2 -H src/header.html src/recommendations.txt \ + -c plain.css -o out/recommendations.html $(DARK): src/index.txt src/header.html src/dark-prologue.html src/dark-epilogue.html out pandoc -s -S --tab-stop=2 -H src/header.html src/index.txt \ Modified: personal-site/trunk/src/index.txt =================================================================== --- personal-site/trunk/src/index.txt 2008-03-05 20:45:06 UTC (rev 610) +++ personal-site/trunk/src/index.txt 2008-03-05 21:15:08 UTC (rev 611) @@ -92,7 +92,7 @@ <!-- TODO upload --> -[WebTables]: webtables-presentation-google07.pdf +[WebTables]: slides/webtables-presentation-google07.pdf [Scalable Resilient Overlay Networks]: http://nms.csail.mit.edu/ron/ @@ -102,7 +102,7 @@ <!-- TODO: mirror this pdf --> -[Guarded Atomic Actions for Haskell]: http://www.mit.edu/~amdragon/projects/gaah-6.827.pdf +[Guarded Atomic Actions for Haskell]: papers/gaah.pdf [TelegraphCQ]: http://telegraph.cs.berkeley.edu/ [Technology and Infrastructure for Emerging Regions]: http://tier.cs.berkeley.edu/ @@ -177,6 +177,11 @@ - 6.033 Computer Systems Engineering (TA, spring 2007) - 6.867 Machine Learning (fall 2007) +Stuff +----- + +- [Software recommendations](recommendations.html) + Links ----- @@ -186,28 +191,6 @@ - [PBF Comics](http://www.pbfcomics.com/) - [Tumbolia](http://jorendorff.blogspot.com/) -<div class="footer"> - <p>Styles: <a href="plain.html">Plain</a> | <a href="dark.html">Dark</a></p> - <p>Valid XHTML 1.0 (<a href="http://validator.w3.org/check/referer">re-validate</a>)</p> - <p>Valid CSS (<a href="http://jigsaw.w3.org/css-validator/check/referer">re-validate</a>)</p> -</div> -<div id="spamlink" style="position: absolute; top: -250px; left: -250px;"><a href="http://people.csail.mit.edu/yang/appraisal.php">pattern</a></div> -<!-- -<style>a.pudris{color:#FFF;font:bold 10px arial,sans-serif;text-decoration:none;}</style><table cellspacing="0"cellpadding="0"border="0"style="background:#999;width:230px;"><tr><td valign="top"style="padding: 1px 2px 5px 4px;border-right:solid 1px #CCC;"><span style="font:bold 30px arial,sans-serif;color:#666;top:0px;position:relative;">@</span></td><td valign="top" align="left" style="padding:3px 0 0 4px;"><a href="http://www.projecthoneypot.org/" class="pudris">MEMBER OF PROJECT HONEY POT</a><br/><a href="http://www.unspam.com"class="pudris">Spam Harvester Protection Network<br/>provided by Unspam</a></td></tr></table> ---> - -<!-- Google Analytics --> -<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> -</script> -<script type="text/javascript"> - _uacct = "UA-1322324-1"; - urchinTracker(); -</script> - -<!-- Performance Metrics --> -<script src="http://pmetrics.performancing.com/102.js" type="text/javascript"></script> -<noscript><p><img alt="Performancing Metrics" src="http://pmetrics.performancing.com/102ns.gif" /></p></noscript> - <!-- Extreme Tracking --> <div id="eXTReMe"><a href="http://extremetracking.com/open?login=yzzororg"> <img src="http://t1.extreme-dm.com/i.gif" style="border: 0;" @@ -232,15 +215,6 @@ img.height=1; </script> -<!-- Quantcast --> -<!-- Start Quantcast tag --> -<script type="text/javascript" src="http://edge.quantserve.com/quant.js"></script> -<script type="text/javascript"> -_qacct="p-45nKPbm9DJOeE";quantserve();</script> -<noscript> -<img src="http://pixel.quantserve.com/pixel/p-45nKPbm9DJOeE.gif" style="display: none" height="1" width="1" alt="Quantcast"/></noscript> -<!-- End Quantcast tag --> - <!-- vim:ft=mkd:et:sw=2:ts=2:nocin --> Modified: personal-site/trunk/src/recommendations.txt =================================================================== --- personal-site/trunk/src/recommendations.txt 2008-03-05 20:45:06 UTC (rev 610) +++ personal-site/trunk/src/recommendations.txt 2008-03-05 21:15:08 UTC (rev 611) @@ -1,21 +1,22 @@ -Useful tools ------------- +Software recommendations +------------------------ -Some random underdogs. +Some underdogs that more people should know about. -- [toast]: Automated software installation with safe compartmentalization. Works - without hassle 90% of the time. Supports a variety of package types, e.g.: - autotools, plain prefix-dir, plain make, [distutils], [Cabal], etc. +- [toast]: Automated software retrieval, compilation, installation, and removal + with safe compartmentalization and non-root usage. Works without hassle 90% + of the time. Supports a variety of package types, including autotools, plain + prefix-dir, plain make, [distutils], [Cabal], and more. -[toast]: http://toastball.net/ +[toast]: http://toastball.net/toast/ [Cabal]: http://www.haskell.org/cabal/ [distutils]: http://docs.python.org/lib/module-distutils.html - [pandoc]: [Markdown] done right. A sane markup (structured text) language supporting a variety of input and output formats, including HTML, man, and - TeX. [AsciiDoc] is a close runner-up. [ReST] starts to become unreadable. - If only there were some work on making these markup language extensible and - flexible enough to be used in everything from [wikis] to docstrings. + TeX. [AsciiDoc] is a close runner-up; [ReST] is more complex. Hopefully the + future will yield markup languages with greater extensibility and enough + flexibility to be used in everything from [wikis] to comment documentation. [AsciiDoc]: http://www.methods.co.nz/asciidoc/ [Markdown]: http://daringfireball.net/projects/markdown/ @@ -23,7 +24,7 @@ [pandoc]: http://johnmacfarlane.net/pandoc/ [wikis]: http://code.google.com/p/pandocwiki/ -- [rubber]: a usable frontend for LaTeX and all its friends: BibTeX, image +- [rubber]: A usable frontend for LaTeX and all its friends: BibTeX, image converters, etc. Similar to but more modular than [latexmk]. [rubber]: http://www.pps.jussieu.fr/~beffara/soft/rubber/ @@ -31,35 +32,39 @@ <!-- TODO ensure the following is formatted correctly. --> -- [Gobby]: A collaborative text editor. I always end up underestimating the - utility and power of collaborative editing. Examples of things I've used it - for: +- [Gobby]: A collaborative text editor. Examples of things I've used it for: - peer programming - - explaining things to multiple parties, using this as a whiteboard - - online meetings: everybody ends up communicating exclusively in the - document, and no more meeting minutes are necessary - If only the quirks could be removed from Emacs' displays on different - frames. Vim also has a "collaborative editing" as an item sponsors can vote - on. UIs of tomorrow should support multiple simultaneous user inputs. + - whiteboard + - online meetings (everybody ends up communicating exclusively in the + document; you get meeting minutes for free!) + Emacs has `make-frame-on-display`, but it's quirky (e.g. going to the + minibuffer locks up everything else). Vim also has a "collaborative editing" + as an item sponsors can vote on. [screen] can be a poor man's collaborative + editor (it's decent as a whiteboard, at least). + [Gobby]: http://gobby.0x539.de/trac/ +[screen]: http://www.gnu.org/software/screen/ -- [Opera]: And if I trusted it with my mail, M2 would also be very far ahead as - well (alas, it's too buggy). [KHTML] is probably the closest-performing +- [Opera]: The fastest, smallest browser I've used is also the most usable and + comes with the most features out of the box. Its M2 mail client is awesome + too, but alas, it's too buggy. [KHTML] is probably the closest-performing engine, but I've found it to be too crash-prone. [Opera]: http://www.opera.com/ [KHTML]: http://en.wikipedia.org/wiki/KHTML -- [gprof2dot]: A handy tool for visualizing the results of gprof, the Google - CPU profiler, python cProfile, and more. +- [gprof2dot]: A handy tool for visualizing the callgraph results of gprof, the + Google CPU profiler, python cProfile, and more. [gprof2dot]: http://code.google.com/p/jrfonseca/wiki/Gprof2Dot -- [wtf]: A filter for `g++`'s obscure page-long template errors. Error messages - are now pretty and colored. See also [gstlfilt]. +- [wtf]: A filter for `g++`'s obscure page-long template errors. Resulting + error messages are readable and beautified. See also [gstlfilt]. [wtf]: http://nmstl.sourceforge.net/doc/nmstl-guide.html [gstlfilt]: http://www.bdsoft.com/tools/stlfilt.html -- [asdf]: +<!-- +vim:ft=mkd:et:sw=2:ts=2:nocin +--> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-03-05 20:45:02
|
Revision: 610 http://assorted.svn.sourceforge.net/assorted/?rev=610&view=rev Author: yangzhang Date: 2008-03-05 12:45:06 -0800 (Wed, 05 Mar 2008) Log Message: ----------- added slides for google project Added Paths: ----------- personal-site/trunk/static/slides/ personal-site/trunk/static/slides/webtables-presentation-google07.pdf Added: personal-site/trunk/static/slides/webtables-presentation-google07.pdf =================================================================== (Binary files differ) Property changes on: personal-site/trunk/static/slides/webtables-presentation-google07.pdf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-03-05 20:08:24
|
Revision: 609 http://assorted.svn.sourceforge.net/assorted/?rev=609&view=rev Author: yangzhang Date: 2008-03-05 12:08:25 -0800 (Wed, 05 Mar 2008) Log Message: ----------- minor fixes Modified Paths: -------------- configs/trunk/bootstrap.bash Modified: configs/trunk/bootstrap.bash =================================================================== --- configs/trunk/bootstrap.bash 2008-03-05 19:30:17 UTC (rev 608) +++ configs/trunk/bootstrap.bash 2008-03-05 20:08:25 UTC (rev 609) @@ -115,7 +115,7 @@ # setup toast if ! has toast ; then - wget -O- http://toastball.net/toast/toast | dosu su - -c 'perl -x - arm toast' + wget -O- http://toastball.net/toast/toast | dosu perl -x - arm toast export PATH="$HOME/.toast/armed/bin:$PATH" fi @@ -189,12 +189,12 @@ # default configurations -if ! grep -q 'share/configs/emacs/yang\.el' ~/.emacs ; then +if ! grep -q 'share/configs/emacs/yang\.el' ~/.emacs >& /dev/null ; then echo appending a line to your .emacs echo "(load-file \"$armed/share/configs/emacs/yang.el\")" >> ~/.emacs fi -if ! grep -q 'share/configs/vim' ~/.vimrc ; then +if ! grep -q 'share/configs/vim' ~/.vimrc >& /dev/null ; then echo appending a line to your .vimrc echo "set rtp+=$armed/share/configs/vim" >> ~/.vimrc fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-03-05 19:30:12
|
Revision: 608 http://assorted.svn.sourceforge.net/assorted/?rev=608&view=rev Author: yangzhang Date: 2008-03-05 11:30:17 -0800 (Wed, 05 Mar 2008) Log Message: ----------- latest experiments Modified Paths: -------------- numa-bench/trunk/src/chew.bash numa-bench/trunk/src/chew.cc Modified: numa-bench/trunk/src/chew.bash =================================================================== --- numa-bench/trunk/src/chew.bash 2008-03-05 07:09:45 UTC (rev 607) +++ numa-bench/trunk/src/chew.bash 2008-03-05 19:30:17 UTC (rev 608) @@ -2,12 +2,12 @@ set -o errexit -o nounset -reps=3 +reps=1 make -s chew-dbg run() { - for i in {1..$reps} + for ((i = 0; i < reps; i++)) do out/chew-dbg "$@" done } @@ -61,8 +61,8 @@ #run 2 1000$MB 10$M 1 1 1 1 0 0 0 1 4 16 #run 3 1000$MB 10$M 1 1 1 1 0 0 0 1 4 16 #run 4 1000$MB 10$M 1 1 1 1 0 0 0 1 4 16 -#run 8 1000$MB 10$M 1 1 1 1 0 0 0 1 4 16 -#run 12 1000$MB 10$M 1 1 1 1 0 0 0 1 4 16 +run 8 1000$MB 10$M 1 1 1 1 0 0 0 1 4 16 +run 12 1000$MB 10$M 1 1 1 1 0 0 0 1 4 16 run 16 1000$MB 10$M 1 1 1 1 0 0 0 1 4 16 fi Modified: numa-bench/trunk/src/chew.cc =================================================================== --- numa-bench/trunk/src/chew.cc 2008-03-05 07:09:45 UTC (rev 607) +++ numa-bench/trunk/src/chew.cc 2008-03-05 19:30:17 UTC (rev 608) @@ -18,7 +18,7 @@ using namespace std; // TODO Make into command line flags? -const bool debug = false, pretouch = false, do_warmup = false, use_numa = false; +const bool debug = false, pretouch = true, do_warmup = false, use_numa = false; pthread_barrier_t cross_barrier, startup_barrier; pthread_mutex_t iomutex; void*** partitions; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-03-05 07:09:39
|
Revision: 607 http://assorted.svn.sourceforge.net/assorted/?rev=607&view=rev Author: yangzhang Date: 2008-03-04 23:09:45 -0800 (Tue, 04 Mar 2008) Log Message: ----------- added setup instructions Modified Paths: -------------- simple-build/trunk/README Modified: simple-build/trunk/README =================================================================== --- simple-build/trunk/README 2008-03-05 06:12:14 UTC (rev 606) +++ simple-build/trunk/README 2008-03-05 07:09:45 UTC (rev 607) @@ -35,6 +35,24 @@ - [JYaml] 1.3 +Setup +----- + +Install the files using `setup.bash`. + +First, set `$SIMPLEBUILD` to the directory (e.g., +`/opt/simple-build/share/simple-build/`) that will contain the SimpleBuild data +files. + +Make sure that `$SCALA_COMMONS_SRC` is set correctly (pointing to the `src/` +subdir) or that `~/scom` is (or symlinks to) the `scala-commons/` directory. + +Then run `make run`. This will run SimpleBuild on its own `build` file, +yielding a `GNUmakefile` on which you can again run `make`. + +Run `setup.bash` again to install the generated launcher script `simple-build`. +Make sure that `simple-build` works by trying out some of the tests. + Examples -------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-03-05 06:12:10
|
Revision: 606 http://assorted.svn.sourceforge.net/assorted/?rev=606&view=rev Author: yangzhang Date: 2008-03-04 22:12:14 -0800 (Tue, 04 Mar 2008) Log Message: ----------- tweak Modified Paths: -------------- assorted-site/trunk/index.txt Modified: assorted-site/trunk/index.txt =================================================================== --- assorted-site/trunk/index.txt 2008-03-05 06:11:57 UTC (rev 605) +++ assorted-site/trunk/index.txt 2008-03-05 06:12:14 UTC (rev 606) @@ -39,8 +39,8 @@ Makefiles; you do not want to use this (active) - [Object Code Generator](object-codegen): currently targets Java serialization, emphasizing compactness, speed, and simplicity (done) - - TopCoder tools: crawl [TopCoder] rankings to analyze players. Currently only - produces language statistics. (done) + - TopCoder tools: crawl [TopCoder] rankings to analyze players; currently + only produces language statistics (done) - Simple Pre-Processor (spp): tiny implementation of the C preprocessor's _object-like macros_ (done) - Tools for various websites or services This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-03-05 06:11:52
|
Revision: 605 http://assorted.svn.sourceforge.net/assorted/?rev=605&view=rev Author: yangzhang Date: 2008-03-04 22:11:57 -0800 (Tue, 04 Mar 2008) Log Message: ----------- added metadata to trash Modified Paths: -------------- shell-tools/trunk/src/trash.bash Modified: shell-tools/trunk/src/trash.bash =================================================================== --- shell-tools/trunk/src/trash.bash 2008-03-05 06:11:35 UTC (rev 604) +++ shell-tools/trunk/src/trash.bash 2008-03-05 06:11:57 UTC (rev 605) @@ -3,9 +3,10 @@ # Brain-dead trash mechanism -. common.bash +. common.bash || exit 1 : "${TRASHDIR:="$HOME/trash"}" dir="$TRASHDIR/$(date)" mkdir -p "$dir" mv "$@" "$dir" +echo "$PWD: $0 $@" >> "$dir/trash-metadata" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-03-05 06:11:34
|
Revision: 604 http://assorted.svn.sourceforge.net/assorted/?rev=604&view=rev Author: yangzhang Date: 2008-03-04 22:11:35 -0800 (Tue, 04 Mar 2008) Log Message: ----------- updated for new results Modified Paths: -------------- numa-bench/trunk/doc/analysis.txt Modified: numa-bench/trunk/doc/analysis.txt =================================================================== --- numa-bench/trunk/doc/analysis.txt 2008-03-05 06:11:23 UTC (rev 603) +++ numa-bench/trunk/doc/analysis.txt 2008-03-05 06:11:35 UTC (rev 604) @@ -1,6 +1,10 @@ % NUMA Benchmarks Analysis % Yang Zhang +__Updates__ + +- 3/4/08: updated scalability experiments + All tests were performed on `josmp.csail.mit.edu`. The [graphs](graphs) show the results of running several different experiments. The results are averaged across three trials for each experiment. The experiments varied the following @@ -8,14 +12,15 @@ - number of threads (CPUs, 1-16, usually 16 if not testing scalability) - size of the memory buffer to operate on (10MB, 100MB, or 1GB) -- number of times to repeat the operation (usually one) +- number of operations, i.e. reads/writes (frequently 10 million) +- number of times to repeat the chewing (usually 1) - whether to chew through the memory sequentially or using random access - whether to run operations in parallel on all the CPUs - whether to explicitly pin the threads to a CPU (usually we do) - whether to operate on a global buffer or on our own buffer (that we allocate ourselves) or on buffers that all other nodes allocated (for cross-communication) -- whether to perform writes to the buffer, otherwise just read +- whether operations are writes or reads - in experiments varying the number of cores $k$ working concurrently: whether we're using cores 1 through $k$ or cores across the nodes in round-robin fashion @@ -25,48 +30,71 @@ - How much does working from another node affect throughput? - It doesn't make much difference for sequential scans - this shows hardware prefetching (and caching) at work. It still makes [a bit of - difference](graphs/ncores-16-size-100000000-nreps-1-shuffle-0-par-0-pin-1-local-0-write-1-cross-0.pdf). + difference](graphs/nworkers-16-size-100000000-nreps-1-shuffle-0-par-0-pin-1-local-0-write-1-cross-0-rrnodes-1-nnodes-4-ncpus-16.pdf). - However, for random accesses, the difference is much more - [pronounced](graphs/ncores-16-size-100000000-nreps-1-shuffle-1-par-0-pin-1-local-0-write-1-cross-0.pdf). + [pronounced](graphs/nworkers-16-size-100000000-nreps-1-shuffle-1-par-0-pin-1-local-0-write-1-cross-0-rrnodes-1-nnodes-4-ncpus-16.pdf). - How much difference is there between sequential scan and random access? - Substantial difference. Also magnifies NUMA effects. Compare - [a](graphs/ncores-16-size-100000000-nreps-1-shuffle-0-par-0-pin-1-local-0-write-1-cross-0.pdf) + [a](graphs/nworkers-16-size-100000000-nreps-1-shuffle-0-par-0-pin-1-local-0-write-1-cross-0-rrnodes-1-nnodes-4-ncpus-16.pdf) and - [b](graphs/ncores-16-size-100000000-nreps-1-shuffle-1-par-0-pin-1-local-0-write-1-cross-0.pdf) + [b](graphs/nworkers-16-size-100000000-nreps-1-shuffle-1-par-0-pin-1-local-0-write-1-cross-0-rrnodes-1-nnodes-4-ncpus-16.pdf) - Read vs. write - - Substantial difference. Random writes are ~2x slower than random reads. + - Substantial difference. Random writes are over 2x slower than random reads. - Compare - [a](graphs/ncores-16-size-100000000-nreps-1-shuffle-1-par-0-pin-1-local-0-write-0-cross-0.pdf) + [a](graphs/nworkers-16-size-100000000-nreps-1-shuffle-1-par-0-pin-1-local-0-write-0-cross-0-rrnodes-1-nnodes-4-ncpus-16.pdf) and - [b](graphs/ncores-16-size-100000000-nreps-1-shuffle-1-par-0-pin-1-local-0-write-1-cross-0.pdf) + [b](graphs/nworkers-16-size-100000000-nreps-1-shuffle-1-par-0-pin-1-local-0-write-1-cross-0-rrnodes-1-nnodes-4-ncpus-16.pdf) - Does `malloc` tend to allocate locally? - Yes, because working with memory allocated from the current thread shows improved times. - Scalability of: cross-node memory writes vs. shared memory writes vs. local node memory writes - - Graphs for each of these: - [a](graphs/scaling-size-10000000-nreps-1-shuffle-0-par-1-pin-1-local-0-write-1-cross-1.pdf) + - Throughputs for sequential scans: + [a](graphs/scaling-size-1000000000-opcount-10000000-nreps-1-shuffle-0-par-1-pin-1-local-0-write-1-cross-1-rrnodes-1-nnodes-4-ncpus-16.pdf) vs. - [b](graphs/scaling-size-10000000-nreps-1-shuffle-0-par-1-pin-1-local-0-write-1-cross-0.pdf) + [b](graphs/scaling-size-1000000000-opcount-10000000-nreps-1-shuffle-0-par-1-pin-1-local-0-write-1-cross-0-rrnodes-1-nnodes-4-ncpus-16.pdf) vs. - [c](graphs/scaling-size-10000000-nreps-1-shuffle-0-par-1-pin-1-local-1-write-1-cross-0.pdf) - - Local memory node access is best but still has problems scaling. The time - remains constant after some point. This is probably because increasing the - number of cores causes the load distribution to approach a more uniform - distribution. + [c](graphs/scaling-size-1000000000-opcount-10000000-nreps-1-shuffle-0-par-1-pin-1-local-1-write-1-cross-0-rrnodes-1-nnodes-4-ncpus-16.pdf) + - Speedup graphs: + [a](graphs/speedup-size-1000000000-opcount-10000000-nreps-1-shuffle-0-par-1-pin-1-local-0-write-1-cross-1-rrnodes-1-nnodes-4-ncpus-16.pdf) + vs. + [b](graphs/speedup-size-1000000000-opcount-10000000-nreps-1-shuffle-0-par-1-pin-1-local-0-write-1-cross-0-rrnodes-1-nnodes-4-ncpus-16.pdf) + vs. + [c](graphs/speedup-size-1000000000-opcount-10000000-nreps-1-shuffle-0-par-1-pin-1-local-1-write-1-cross-0-rrnodes-1-nnodes-4-ncpus-16.pdf) + - Throughputs for random access: + [a](graphs/scaling-size-1000000000-opcount-10000000-nreps-1-shuffle-1-par-1-pin-1-local-0-write-1-cross-1-rrnodes-1-nnodes-4-ncpus-16.pdf) + vs. + [b](graphs/scaling-size-1000000000-opcount-10000000-nreps-1-shuffle-1-par-1-pin-1-local-0-write-1-cross-0-rrnodes-1-nnodes-4-ncpus-16.pdf) + vs. + [c](graphs/scaling-size-1000000000-opcount-10000000-nreps-1-shuffle-1-par-1-pin-1-local-1-write-1-cross-0-rrnodes-1-nnodes-4-ncpus-16.pdf) + - Speedup graphs: + [a](graphs/speedup-size-1000000000-opcount-10000000-nreps-1-shuffle-1-par-1-pin-1-local-0-write-1-cross-1-rrnodes-1-nnodes-4-ncpus-16.pdf) + vs. + [b](graphs/speedup-size-1000000000-opcount-10000000-nreps-1-shuffle-1-par-1-pin-1-local-0-write-1-cross-0-rrnodes-1-nnodes-4-ncpus-16.pdf) + vs. + [c](graphs/speedup-size-1000000000-opcount-10000000-nreps-1-shuffle-1-par-1-pin-1-local-1-write-1-cross-0-rrnodes-1-nnodes-4-ncpus-16.pdf) - Scalability of: cross-node memory reads vs. shared memory reads vs. local node memory reads - - Graphs for each of these: - [a](graphs/scaling-size-10000000-nreps-1-shuffle-0-par-1-pin-1-local-0-write-0-cross-1.pdf) + - Throughputs for sequential scans: + [a](graphs/scaling-size-1000000000-opcount-10000000-nreps-1-shuffle-0-par-1-pin-1-local-0-write-0-cross-1-rrnodes-1-nnodes-4-ncpus-16.pdf) vs. - [b](graphs/scaling-size-10000000-nreps-1-shuffle-0-par-1-pin-1-local-0-write-0-cross-0.pdf) + [b](graphs/scaling-size-1000000000-opcount-10000000-nreps-1-shuffle-0-par-1-pin-1-local-0-write-0-cross-0-rrnodes-1-nnodes-4-ncpus-16.pdf) vs. - [c](graphs/scaling-size-10000000-nreps-1-shuffle-0-par-1-pin-1-local-1-write-0-cross-0.pdf) - - Cross-communicating performs worse, and local memory node access performs - the same as shared memory access. This is expected, since we aren't - performing writes, so the data is freely replicated to all caches (same - reason that there is little difference between the non-parallel reads from - local vs. remote). + [c](graphs/scaling-size-1000000000-opcount-10000000-nreps-1-shuffle-0-par-1-pin-1-local-1-write-0-cross-0-rrnodes-1-nnodes-4-ncpus-16.pdf) + - Speedup graphs: + [a](graphs/speedup-size-1000000000-opcount-10000000-nreps-1-shuffle-0-par-1-pin-1-local-0-write-0-cross-1-rrnodes-1-nnodes-4-ncpus-16.pdf) + vs. + [b](graphs/speedup-size-1000000000-opcount-10000000-nreps-1-shuffle-0-par-1-pin-1-local-0-write-0-cross-0-rrnodes-1-nnodes-4-ncpus-16.pdf) + vs. + [c](graphs/speedup-size-1000000000-opcount-10000000-nreps-1-shuffle-0-par-1-pin-1-local-1-write-0-cross-0-rrnodes-1-nnodes-4-ncpus-16.pdf) + - Throughputs for random access: + [a](graphs/scaling-size-1000000000-opcount-10000000-nreps-1-shuffle-1-par-1-pin-1-local-0-write-0-cross-1-rrnodes-1-nnodes-4-ncpus-16.pdf) + vs. + [b](graphs/scaling-size-1000000000-opcount-10000000-nreps-1-shuffle-1-par-1-pin-1-local-0-write-0-cross-0-rrnodes-1-nnodes-4-ncpus-16.pdf) + vs. + [c](graphs/scaling-size-1000000000-opcount-10000000-nreps-1-shuffle-1-par-1-pin-1-local-1-write-0-cross-0-rrnodes-1-nnodes-4-ncpus-16.pdf) + - Speedup graphs: + [a](graphs/speedup-size-1000000000-opcount-10000000-nreps-1-shuffle-1-par-1-pin-1-local-0-write-0-cross-1-rrnodes-1-nnodes-4-ncpus-16.pdf) + vs. + [b](graphs/speedup-size-1000000000-opcount-10000000-nreps-1-shuffle-1-par-1-pin-1-local-0-write-0-cross-0-rrnodes-1-nnodes-4-ncpus-16.pdf) + vs. + [c](graphs/speedup-size-1000000000-opcount-10000000-nreps-1-shuffle-1-par-1-pin-1-local-1-write-0-cross-0-rrnodes-1-nnodes-4-ncpus-16.pdf) -There's still quite a bit of room to fill out this test suite. For instance, -the experiments varying the number of cores all exercise the fewest number of -chips; the results may be quite different for tests that distribute the loaded -cores across all chips. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-03-05 06:11:21
|
Revision: 603 http://assorted.svn.sourceforge.net/assorted/?rev=603&view=rev Author: yangzhang Date: 2008-03-04 22:11:23 -0800 (Tue, 04 Mar 2008) Log Message: ----------- updated; fixed to present throughput Modified Paths: -------------- numa-bench/trunk/tools/PlotHist.scala numa-bench/trunk/tools/plot-hist.bash Modified: numa-bench/trunk/tools/PlotHist.scala =================================================================== --- numa-bench/trunk/tools/PlotHist.scala 2008-03-05 06:10:46 UTC (rev 602) +++ numa-bench/trunk/tools/PlotHist.scala 2008-03-05 06:11:23 UTC (rev 603) @@ -1,8 +1,18 @@ import commons.Collections._ import commons.Control._ import commons.Io._ + import scala.util._ +import scala.collection.mutable.MultiMap + object PlotHist { + type ConfigDescrip = String + type WorkerId = Int + type Time = Int + type MeanTime = Int + type Throughput = Double + type NumWorkers = Int + def main(args: Array[String]) { // The input consists of header lines describing the experiment // configuration followed by body lines reporting the time measurements. @@ -10,31 +20,41 @@ // config. val lines = using (TextReader(Console.in)) (_.readLines.toArray) val runs = separateHeads(groupByHeaders(lines)(_ startsWith "config: ")) - val exps = multimap( + val exps: MultiMap[ConfigDescrip, Seq[(WorkerId, Time)]] = multimap( for ((config, lines) <- runs) yield { val pairs = for (line <- lines) yield { - val Seq(a,b) = line split ": " - (a.toInt, b.toInt) + try { + val Seq(a,b) = line split ": " + (a.toInt, b.toInt) + } catch { + case e: Exception => { Console.err println line; throw e } + } } (config.split(": ")(1), pairs) } ) + // For each config, aggregate the bodies together by finding the average of // all the measurements corresponding to the same core. - val graphs = for ((config, vs) <- exps) yield { - val vmap = multimap(vs flatMap (x=>x)) - val agg = for ((x,ys) <- vmap) yield (x,mean(ys.toArray)) - val arr = agg.toStream.toArray - Sorting quickSort arr - (config, arr) - } + val graphs: Iterable[(ConfigDescrip, Array[(WorkerId, MeanTime)])] = + for ((config, vs) <- exps) yield { + val vmap = multimap(vs flatMap (x=>x)) + val agg = for ((x,ys) <- vmap) yield (x, mean(ys.toArray)) + val arr = agg.toStream.toArray + Sorting quickSort arr + (config, arr) + } + // Also generate the scaling view of the data by grouping together by the // first numeric parameter (in this case, the number of cores). - val scaling = multimap( + val scaling: MultiMap[ConfigDescrip, (NumWorkers, Throughput)] = multimap( for ((config, points) <- graphs) yield { - val Seq(_, ncores, rest) = config split (" ", 3) - (rest, (ncores.toInt, Iterable.max(points map (_._2)))) + val attrmap = Map(pairs(config split " "): _*) + val Seq(_, nworkers, rest) = config split (" ", 3) + val maxTime = Iterable.max(points map (_._2)) + val tput = nworkers.toDouble * attrmap("opcount").toDouble / (maxTime / 1000.0) + (rest, (nworkers.toInt, tput)) } ) val scalingGraphs = for ((k,vs) <- scaling; if vs.size > 1) yield { @@ -42,6 +62,7 @@ Sorting quickSort arr (k, arr) } + // Prepare the plotting. val cmd = <p> set style data histogram @@ -64,21 +85,24 @@ } set style data linespoints { - // Generate the time and speedup plots varying ncores. + // Generate the time and speedup plots varying nworkers. for ((config, points) <- scalingGraphs) yield { <p> set title '{config}' + set xlabel 'worker count' + set ylabel 'throughput (ops/s)' set output 'graphs/{"scaling-" + spacedToHyphen(config)}.pdf' plot '-' {points map {case (a,b) => (a + " " + b)} mkString "\n"} e + set ylabel 'speedup' set output 'graphs/{"speedup-" + spacedToHyphen(config)}.pdf' plot '-' { val (_, base) = points(0) - points map {case (a,b) => (a + " " + (base.toDouble/b)) + points map {case (a,b) => (a + " " + (b/base.toDouble)) } mkString "\n"} e </p>.text Modified: numa-bench/trunk/tools/plot-hist.bash =================================================================== --- numa-bench/trunk/tools/plot-hist.bash 2008-03-05 06:10:46 UTC (rev 602) +++ numa-bench/trunk/tools/plot-hist.bash 2008-03-05 06:11:23 UTC (rev 603) @@ -1,4 +1,4 @@ #!/usr/bin/env bash set -o errexit -o nounset make -s -egrep '^[[:digit:]]+: [[:digit:]]+|config' "$@" | scala -cp out PlotHist +egrep '^[[:digit:]]+: [[:digit:]]+|config' "$@" | out/plot-hist This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |