Triton-commits
Threads by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
July 2009
- 5 participants
- 36 discussions
[Gs-commits] Grayskull Repository branch, master, updated. git-migration-51-ge234731
by noreply@mcs.anl.gov 31 Jul '09
by noreply@mcs.anl.gov 31 Jul '09
31 Jul '09
A ref change was pushed to the repository containing
the project "Grayskull Repository".
The branch, master has been updated
via e234731a3c9e6ed2297aaf44d3b9331f3cfb2647 (commit)
via e27655c32d09f5225b869204065527066e6b8805 (commit)
via 4d46057703c5895fa225caca46d58b4531175c3a (commit)
via 0cf37928aafbd27ddf15cf85a40ff2ce347865c0 (commit)
from 1c87e343de209fe99fd950f961640437a8eaec68 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e234731a3c9e6ed2297aaf44d3b9331f3cfb2647
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Fri Jul 31 17:31:20 2009 -0500
Corrections and cleanups.
commit e27655c32d09f5225b869204065527066e6b8805
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Fri Jul 31 16:35:57 2009 -0500
Improved output for replica replacement. Normal distance metric.
Trying to improve readability of replica movement output.
Added Nearest, a PlacementScheme based on the subtraction distance
metric (Chord, Pastry, etc.).
commit 4d46057703c5895fa225caca46d58b4531175c3a
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Fri Jul 31 15:14:28 2009 -0500
Places primaries and secondaries before and after a fault.
commit 0cf37928aafbd27ddf15cf85a40ff2ce347865c0
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Fri Jul 31 15:10:00 2009 -0500
Now places secondary replicas explicitly.
-----------------------------------------------------------------------
Summary of changes:
sim/gobs/GOBS.java | 71 ++++++++++++++----------------
sim/gobs/Kademlia.java | 88 +++++++++++++++++++++++++++++++------
sim/gobs/MapSorter.java | 22 +++++++++
sim/gobs/Nearest.java | 97 +++++++++++++++++++++++++++++++++++++++++
sim/gobs/Node.java | 50 +++++++++++++++++++++-
sim/gobs/Obj.java | 18 +++++++-
sim/gobs/PlacementScheme.java | 80 ++++++++++++++++++++++++++++++++-
sim/gobs/Primary.java | 20 ++++++++
sim/gobs/RandomLayout.java | 48 --------------------
sim/gobs/Secondary.java | 24 ++++++++++
10 files changed, 411 insertions(+), 107 deletions(-)
create mode 100644 sim/gobs/Nearest.java
create mode 100644 sim/gobs/Primary.java
delete mode 100644 sim/gobs/RandomLayout.java
create mode 100644 sim/gobs/Secondary.java
Diff of changes:
diff --git a/sim/gobs/GOBS.java b/sim/gobs/GOBS.java
index d54b8cb..e99108c 100644
--- a/sim/gobs/GOBS.java
+++ b/sim/gobs/GOBS.java
@@ -11,7 +11,7 @@ import java.util.*;
* nodes: Number of nodes <br>
* fileCount: Number of files <br>
* fileSize: Size of each file <br>
- * objSize: Size of each object
+ * chunk: Size of a contiguous chunk
* */
class GOBS
@@ -45,32 +45,24 @@ class GOBS
System.out.println(node);
}
- /* Debugging sortMap():
-
- public static void main(String[] args)
+ static void printFiles(Map<Integer,List<Obj>> files)
{
- int B = 4;
-
- Map<Node,Integer> table = new Hashtable<Node,Integer>();
-
- table.put(new Node(B, new BigInteger("3")), 2);
- table.put(new Node(B, new BigInteger("5")), 1);
- table.put(new Node(B, new BigInteger("8")), 4);
- table.put(new Node(B, new BigInteger("3")), 3);
-
- Map<Node,Integer> sorted = (Map<Node,Integer>) sortMap(table);
- for (Node node : sorted.keySet())
+ for (Integer i : files.keySet())
{
- System.out.println(node.toString() + " " + sorted.get(node));
+ System.out.println("file: " + i);
+ List<Obj> set = files.get(i);
+ for (Obj object : set)
+ System.out.print(object + " ");
+ System.out.println("");
}
}
- */
-
+
public static void main(String[] args)
{
String layoutName;
- int N, fileCount, fileSize, objSize;
-
+ int N, fileCount, fileSize, chunk;
+ int uniqueFile = 1;
+
Bits.init();
if (args.length < 5)
@@ -87,23 +79,16 @@ class GOBS
N = Integer.parseInt(args[arg++]);
fileCount = Integer.parseInt(args[arg++]);
fileSize = Integer.parseInt(args[arg++]);
- objSize = Integer.parseInt(args[arg++]);
+ chunk = Integer.parseInt(args[arg++]);
- PlacementScheme placer = new Kademlia();
- LayoutScheme layout = null;
+ //PlacementScheme placer = new Kademlia(B);
+ PlacementScheme placer = new Nearest(B);
NodeScheme hub = new RandomNodes(B);
-
- layout = new RandomLayout(B);
-
- if (layout == null)
- {
- System.out.println("unknown layout!");
- System.exit(1);
- }
List<Node> nodes = new ArrayList<Node>(N);
- Set<Integer> files = new HashSet<Integer>(fileCount);
List<Obj> objects = new ArrayList<Obj>();
+ Map<Integer,List<Obj>>
+ files = new HashMap<Integer,List<Obj>>(fileCount);
// Initialize node addresses...
hub.generate(N, nodes);
@@ -111,18 +96,25 @@ class GOBS
// Initialize object addresses...
for (int i = 0; i < fileCount; i++)
{
- int fid = Bits.nextInt(fileCount*10);
- if (files.add(fid))
- objects.addAll(layout.generate(fileSize,objSize));
+ int fid = uniqueFile++;
+ if (! files.containsKey(fid))
+ {
+ List<Obj> set = placer.allocateFile(fileSize, chunk, 4,
+ 3, nodes);
+ files.put(fid, set);
+ objects.addAll(set);
+ }
}
+
+ printFiles(files);
// Place objects and add up load...
placer.place(objects, nodes);
Map<Node,Integer> origCount = countObjects(nodes);
// printNodes(nodes);
- // printNodeObjects(nodes);
-
+ printNodeObjects(nodes);
+
// Cause a fault and reallocate objects...
int index = Bits.nextInt(nodes.size());
Node failed = nodes.remove(index);
@@ -130,9 +122,12 @@ class GOBS
" (" + failed.objects.size() + ")");
List<Obj> replacements = failed.objects;
- placer.place(replacements, nodes);
+ for (Obj object : replacements)
+ placer.rebuild(object, nodes);
Map<Node,Integer> faultCount = countObjects(nodes);
+ printNodeObjects(nodes);
+
// Find the load difference from before the fault...
Map<Node,Integer> diffs = new Hashtable<Node,Integer>();
for (Node node : faultCount.keySet())
diff --git a/sim/gobs/Kademlia.java b/sim/gobs/Kademlia.java
index 886da8d..30c0f2b 100644
--- a/sim/gobs/Kademlia.java
+++ b/sim/gobs/Kademlia.java
@@ -1,39 +1,97 @@
import java.math.BigInteger;
-import java.util.List;
+import java.util.*;
/**
* Places objects on the nearest node using the XOR distance metric.
* */
class Kademlia
- implements PlacementScheme
+ extends PlacementScheme
{
+ Kademlia(int B)
+ {
+ super(B);
+ }
+
public void place(List<Obj> objects, List<Node> nodes)
{
+ System.out.println("placing: " + objects.size());
for (Obj object : objects)
placeObject(object, nodes);
}
-
+
+ /**
+ Allocate replicas for object and place all on nodes.
+ */
void placeObject(Obj object, List<Node> nodes)
{
- Node closest = null;
- BigInteger diff = null;
- for (Node node : nodes)
+ List<Node> closest = closestNodes(object, nodes);
+ Primary primary = object.toPrimary();
+ closest.remove(0).add(primary);
+ for (Node node : closest)
+ {
+ node.add(object.toSecondary(primary));
+ }
+ }
+
+ /**
+ Place this object to rebuild.
+ */
+ void rebuild(Obj object, List<Node> nodes)
+ {
+ List<Node> closest = closestNodes(object, nodes);
+ Secondary secondary;
+ Node source = null, destination = null;
+ if (object instanceof Primary)
{
- BigInteger d = node.id.xor(object.id);
- if (diff == null ||
- diff.compareTo(d) > 0)
+ Primary primary = object.toPrimary();
+ source = closest.remove(0);
+ secondary = (Secondary) source.remove(primary.id);
+ source.add(primary);
+ }
+ else
+ {
+ source = closest.remove(0);
+ Primary primary = (Primary) source.get(object.id);
+ secondary = primary.toSecondary(primary);
+ }
+
+ for (Node node : closest)
+ {
+ if (! node.contains(secondary.id))
{
- closest = node;
- diff = d;
+ destination = node;
+ destination.add(secondary);
+ break;
}
}
- closest.objects.add(object);
+ System.out.println("rebuild: " + object.toString() + ": " +
+ source.bitString() + " -> " +
+ destination.bitString());
}
-
- long xor(long i, long j)
+
+ List<Node> closestNodes(Obj object, List<Node> nodes)
{
- return i ^ j;
+ List<Node> closest = new ArrayList<Node>(object.replicas*2);
+
+ for (int i = 0; i < object.replicas; i++)
+ {
+ BigInteger closestDiff = null;
+ Node closestNode = null;
+ for (Node node : nodes)
+ {
+ BigInteger d = node.id.xor(object.id);
+ if ((closestDiff == null ||
+ closestDiff.compareTo(d) > 0) &&
+ ! closest.contains(node))
+ {
+ closestNode = node;
+ closestDiff = d;
+ }
+ }
+ closest.add(closestNode);
+ }
+ return closest;
}
}
diff --git a/sim/gobs/MapSorter.java b/sim/gobs/MapSorter.java
index 7f7931a..b92e4cf 100644
--- a/sim/gobs/MapSorter.java
+++ b/sim/gobs/MapSorter.java
@@ -27,3 +27,25 @@ class MapSorter<T>
return result;
}
}
+
+ /* Debugging sortMap():
+
+ public static void main(String[] args)
+ {
+ int B = 4;
+
+ Map<Node,Integer> table = new Hashtable<Node,Integer>();
+
+ table.put(new Node(B, new BigInteger("3")), 2);
+ table.put(new Node(B, new BigInteger("5")), 1);
+ table.put(new Node(B, new BigInteger("8")), 4);
+ table.put(new Node(B, new BigInteger("3")), 3);
+
+ Map<Node,Integer> sorted = (Map<Node,Integer>) sortMap(table);
+ for (Node node : sorted.keySet())
+ {
+ System.out.println(node.toString() + " " + sorted.get(node));
+ }
+ }
+ */
+
diff --git a/sim/gobs/Nearest.java b/sim/gobs/Nearest.java
new file mode 100644
index 0000000..a4f78a1
--- /dev/null
+++ b/sim/gobs/Nearest.java
@@ -0,0 +1,97 @@
+
+import java.math.BigInteger;
+import java.util.*;
+
+/**
+ * Places objects on the nearest node using the XOR distance metric.
+ * */
+
+class Nearest
+ extends PlacementScheme
+{
+ Nearest(int B)
+ {
+ super(B);
+ }
+
+ public void place(List<Obj> objects, List<Node> nodes)
+ {
+ System.out.println("placing: " + objects.size());
+ for (Obj object : objects)
+ placeObject(object, nodes);
+ }
+
+ /**
+ Allocate replicas for object and place all on nodes.
+ */
+ void placeObject(Obj object, List<Node> nodes)
+ {
+ List<Node> closest = closestNodes(object, nodes);
+ Primary primary = object.toPrimary();
+ closest.remove(0).add(primary);
+ for (Node node : closest)
+ {
+ node.add(object.toSecondary(primary));
+ }
+ }
+
+ /**
+ Place this object to rebuild.
+ */
+ void rebuild(Obj object, List<Node> nodes)
+ {
+ List<Node> closest = closestNodes(object, nodes);
+ Secondary secondary;
+ Node source = null, destination = null;
+ if (object instanceof Primary)
+ {
+ Primary primary = object.toPrimary();
+ source = closest.remove(0);
+ secondary = (Secondary) source.remove(primary.id);
+ source.add(primary);
+ }
+ else
+ {
+ source = closest.remove(0);
+ Primary primary = (Primary) source.get(object.id);
+ secondary = primary.toSecondary(primary);
+ }
+
+ for (Node node : closest)
+ {
+ if (! node.contains(secondary.id))
+ {
+ destination = node;
+ destination.add(secondary);
+ break;
+ }
+ }
+ System.out.println("rebuild: " + object.toString() + ": " +
+ source.bitString() + " -> " +
+ destination.bitString());
+ }
+
+ List<Node> closestNodes(Obj object, List<Node> nodes)
+ {
+ List<Node> closest = new ArrayList<Node>(object.replicas*2);
+
+ for (int i = 0; i < object.replicas; i++)
+ {
+ BigInteger closestDiff = null;
+ Node closestNode = null;
+ for (Node node : nodes)
+ {
+ BigInteger d = node.id.subtract(object.id).abs();
+ if ((closestDiff == null ||
+ closestDiff.compareTo(d) > 0) &&
+ ! closest.contains(node))
+ {
+ closestNode = node;
+ closestDiff = d;
+ }
+ }
+ closest.add(closestNode);
+ }
+ return closest;
+ }
+}
diff --git a/sim/gobs/Node.java b/sim/gobs/Node.java
index 71d1859..680d9db 100644
--- a/sim/gobs/Node.java
+++ b/sim/gobs/Node.java
@@ -22,6 +22,52 @@ class Node
objects.add(object);
}
+ /**
+ @return An Obj with this id.
+ */
+ Obj get(BigInteger id)
+ {
+ for (Iterator<Obj> it = objects.iterator(); it.hasNext(); )
+ {
+ Obj object = it.next();
+ if (object.id.equals(id))
+ {
+ return object;
+ }
+ }
+ return null;
+ }
+
+ /**
+ Remove and return an Obj with this id.
+ */
+ Obj remove(BigInteger id)
+ {
+ for (Iterator<Obj> it = objects.iterator(); it.hasNext(); )
+ {
+ Obj object = it.next();
+ if (object.id.equals(id))
+ {
+ it.remove();
+ return object;
+ }
+ }
+ return null;
+ }
+
+ /**
+ @return true iff this node has an object with the given id.
+ */
+ boolean contains(BigInteger id)
+ {
+ for (Obj object : objects)
+ {
+ if (object.id.equals(id))
+ return true;
+ }
+ return false;
+ }
+
String loadReport()
{
return bitString() + " " + objects.size();
@@ -33,7 +79,9 @@ class Node
result.append(bitString());
result.append(":\t");
for (Obj object : objects)
- result.append(" " + bitString(B, object.id));
+ {
+ result.append(object.toString()).append(" ");
+ }
result.append("\n");
return result.toString();
}
diff --git a/sim/gobs/Obj.java b/sim/gobs/Obj.java
index c3ce9a2..2fb7025 100644
--- a/sim/gobs/Obj.java
+++ b/sim/gobs/Obj.java
@@ -9,14 +9,28 @@ import java.math.BigInteger;
class Obj
extends Addressable
{
- int size;
+ /** Simulated size in bytes. */
+ int size;
+ /** Number of replicas, including primary. */
+ int replicas;
- Obj(int B, BigInteger id, int size)
+ Obj(int B, BigInteger id, int size, int replicas)
{
super(B, id);
this.size = size;
+ this.replicas = replicas;
}
+ Primary toPrimary()
+ {
+ return new Primary(B, id, size, replicas);
+ }
+
+ Secondary toSecondary(Primary primary)
+ {
+ return new Secondary(B, id, size, replicas, primary);
+ }
+
public String toString()
{
return bitString() + "(" + size + ")";
diff --git a/sim/gobs/PlacementScheme.java b/sim/gobs/PlacementScheme.java
index 2b58b60..989aee9 100644
--- a/sim/gobs/PlacementScheme.java
+++ b/sim/gobs/PlacementScheme.java
@@ -1,11 +1,85 @@
-import java.util.List;
+import java.math.BigInteger;
+import java.util.*;
/**
* Interface to place a list of objects on a set of nodes.
* */
-interface PlacementScheme
+abstract class PlacementScheme
{
- void place(List<Obj> objects, List<Node> nodes);
+ int B;
+ BigInteger M;
+
+ PlacementScheme(int B)
+ {
+ this.B = B;
+
+ BigInteger two = new BigInteger("2");
+ M = two.pow(B);
+ }
+
+ /**
+ Generate an object set for a file.
+ */
+ public List<Obj> allocateFile(int size, int chunk, int width,
+ int replicas, List<Node> nodes)
+ {
+ List<Obj> result = new ArrayList<Obj>(width*2);
+
+ BigInteger p = randomID();
+
+ BigInteger two = new BigInteger("2");
+ BigInteger bigWidth = new BigInteger("" + width);
+ BigInteger bigWidth2 = new BigInteger("2");
+ while (bigWidth2.compareTo(bigWidth) < 0)
+ {
+ bigWidth2 = bigWidth2.multiply(two);
+ }
+
+ BigInteger s = M.divide(bigWidth2);
+
+ int chunks = size/chunk;
+ int extras = chunks % width;
+
+ int i;
+ for (i = 0; i < extras; i++)
+ {
+ BigInteger id = p;
+ int bytes = (1 + chunks/width)*chunk;
+ Obj obj = new Obj(B, id, bytes, replicas);
+ result.add(obj);
+ p = p.add(s);
+ }
+ for ( ; i < width; i++)
+ {
+ BigInteger id = p;
+ int bytes = (chunks/width)*chunk;
+ Obj obj = new Obj(B, id, bytes, replicas);
+ result.add(obj);
+ p = p.add(s);
+ }
+
+ /*
+ for (Obj o : result)
+ System.out.println(o);
+ */
+
+ return result;
+ }
+
+ /**
+ Place a set of objects.
+ */
+ abstract void place(List<Obj> objects, List<Node> nodes);
+
+ /**
+ Find a new node to hold this object replica and place it.
+ */
+ abstract void rebuild(Obj object, List<Node> nodes);
+
+ BigInteger randomID()
+ {
+ return new BigInteger(B, Bits.rng);
+ }
}
diff --git a/sim/gobs/Primary.java b/sim/gobs/Primary.java
new file mode 100644
index 0000000..ecc90a7
--- /dev/null
+++ b/sim/gobs/Primary.java
@@ -0,0 +1,20 @@
+
+import java.math.BigInteger;
+
+/**
+ * Simulates a single primary object.
+ * */
+
+class Primary
+ extends Obj
+{
+ Primary(int B, BigInteger id, int size, int replicas)
+ {
+ super(B, id, size, replicas);
+ }
+
+ public String toString()
+ {
+ return bitString() + "[P](" + size + ")";
+ }
+}
diff --git a/sim/gobs/RandomLayout.java b/sim/gobs/RandomLayout.java
deleted file mode 100644
index 675325e..0000000
--- a/sim/gobs/RandomLayout.java
+++ /dev/null
@@ -1,48 +0,0 @@
-
-import java.math.BigInteger;
-import java.util.*;
-
-/**
- * Generates random object ids.
- * */
-
-class RandomLayout
- extends LayoutScheme
-{
- RandomLayout(int B)
- {
- super(B);
- }
-
- BigInteger randomID()
- {
- return new BigInteger(B, Bits.rng);
- }
-
- public List<Obj> generate(int fileSize, int objSize)
- {
- List<Obj> result;
-
- int n = fileSize/objSize + 1;
- result = new ArrayList<Obj>(fileSize/objSize+1);
-
- for (int i = 0; i < n-1; i++)
- result.add(new Obj(B, randomID(), objSize));
- result.add(new Obj(B, randomID(), fileSize % objSize));
-
- return result;
- }
-
- /**
- Debugging only.
- */
- public static void main(String[] args)
- {
- Bits.init();
- int B = 128;
- RandomLayout rl = new RandomLayout(B);
- BigInteger i = rl.randomID();
- System.out.println(i);
- System.out.println(Addressable.bitString(B, i));
- }
-}
diff --git a/sim/gobs/Secondary.java b/sim/gobs/Secondary.java
new file mode 100644
index 0000000..8f691fc
--- /dev/null
+++ b/sim/gobs/Secondary.java
@@ -0,0 +1,24 @@
+
+import java.math.BigInteger;
+
+/**
+ * Simulates a single secondary object.
+ * */
+
+class Secondary
+ extends Obj
+{
+ Primary primary;
+
+ Secondary(int B, BigInteger id, int size, int replicas,
+ Primary primary)
+ {
+ super(B, id, size, replicas);
+ this.primary = primary;
+ }
+
+ public String toString()
+ {
+ return bitString() + "[S](" + size + ")";
+ }
+}
hooks/post-receive
--
Grayskull Repository
1
0
[Gs-commits] Grayskull Repository branch, master, updated. git-migration-47-g1c87e34
by noreply@mcs.anl.gov 30 Jul '09
by noreply@mcs.anl.gov 30 Jul '09
30 Jul '09
A ref change was pushed to the repository containing
the project "Grayskull Repository".
The branch, master has been updated
via 1c87e343de209fe99fd950f961640437a8eaec68 (commit)
via 6dabfa2bf628b27ce5f7cc90bd6414b2037bde48 (commit)
via 026d0b654f5eaca176ee54593c49cb2ab00c3c39 (commit)
via 77ae19108aed314ab6120bc3259baf62ecd2b1e2 (commit)
from 64e1ad598885443d5789ec39423e7917833f3192 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 1c87e343de209fe99fd950f961640437a8eaec68
Author: Justin M Wozniak <wozniak(a)mcs.anl.gov>
Date: Thu Jul 30 15:55:00 2009 -0500
Added output from Trac #2.
commit 6dabfa2bf628b27ce5f7cc90bd6414b2037bde48
Author: Justin M Wozniak <wozniak(a)mcs.anl.gov>
Date: Wed Jul 29 16:08:51 2009 -0500
Improved sorting mechanism for output.
commit 026d0b654f5eaca176ee54593c49cb2ab00c3c39
Author: Justin M Wozniak <wozniak(a)mcs.anl.gov>
Date: Wed Jul 29 15:37:17 2009 -0500
Draft of new output features.
commit 77ae19108aed314ab6120bc3259baf62ecd2b1e2
Author: Justin M Wozniak <wozniak(a)mcs.anl.gov>
Date: Wed Jul 29 15:32:50 2009 -0500
GUM fault emulation basically works.
-----------------------------------------------------------------------
Summary of changes:
code/Makefile.in | 2 +-
code/configure.ac | 2 +-
code/src/gobs/dense/dense.gs | 2 +-
code/src/gum/gum.gs | 246 ++++++++++++++++++++++---------
code/src/include/gum.gsh | 87 ++++++++----
code/src/mpi_tools/mpi_tools.c | 2 +-
code/test/gum/About.txt | 7 +
code/test/gum/module.mk.in | 8 +-
code/test/gum/test01.gs | 81 +++++++----
code/test/gum/test02.gs | 170 +++++++++++++++++++---
code/test/gum/{test01.gs => test04.gs} | 91 +++++++-----
sim/gobs/GOBS.java | 69 ++++++++-
sim/gobs/MapSorter.java | 29 ++++
13 files changed, 590 insertions(+), 206 deletions(-)
create mode 100644 code/test/gum/About.txt
copy code/test/gum/{test01.gs => test04.gs} (76%)
create mode 100644 sim/gobs/MapSorter.java
Diff of changes:
diff --git a/code/Makefile.in b/code/Makefile.in
index d5002c8..a66a2af 100644
--- a/code/Makefile.in
+++ b/code/Makefile.in
@@ -498,7 +498,7 @@ GSLLIBS = -L src/gsl/lib -l gs -l gstest
%.gs.dummyobj: %.gs
$(Q) " MPICC $(@)"
- $(E)$(MPICC) -D__blocking="" \
+ $(E)$(MPICC) -D DUMMYOBJ -D__blocking="" \
-Dpwait="while(0)" -Dpbranch="" -Dpbreak="break"\
$(GSLINCLUDES) -x c -c -o $(@) $(LIBCFLAGS) \
-Wall -Wno-implicit -Wno-unused -Werror \
diff --git a/code/configure.ac b/code/configure.ac
index 555c5ec..c8e3e75 100644
--- a/code/configure.ac
+++ b/code/configure.ac
@@ -968,5 +968,5 @@ AC_MSG_RESULT()
pushd src/gsl > /dev/null
echo
echo "configure in src/gsl"
-configure -C --with-mpi=${USE_MPI} || exit 1
+configure -C --with-mpi=${USE_MPI} --enable-gsl-debug || exit 1
popd > /dev/null
diff --git a/code/src/gobs/dense/dense.gs b/code/src/gobs/dense/dense.gs
index 6c65669..57ce20e 100644
--- a/code/src/gobs/dense/dense.gs
+++ b/code/src/gobs/dense/dense.gs
@@ -266,7 +266,7 @@ handle_quit(gum_node caller, gum_msg* call)
{
gum_msg response;
- gum_running = false;
+ gum_shutdown();
gobs_running = false;
response.unique = flip2(call->unique);
response.data = malloc(1);
diff --git a/code/src/gum/gum.gs b/code/src/gum/gum.gs
index 6ddd004..69f02a5 100644
--- a/code/src/gum/gum.gs
+++ b/code/src/gum/gum.gs
@@ -1,16 +1,14 @@
#include "gum.gsh"
-int error;
+static struct itable* gum_map;
-bool gum_running;
-
-struct itable* gum_map;
+static gum_status gum_current_status;
int
gum_init()
{
- gum_running = true;
+ gum_current_status = GUM_STATUS_RUNNING;
gum_map = itable_create(32);
@@ -72,6 +70,19 @@ gum_msg_build(gum_proc_idx name, char* data, int length)
return result;
}
+gum_msg*
+gum_msg_response(int unique, char* data, int length)
+{
+ gum_msg* result;
+
+ result = gum_msg_create();
+ result->data = data;
+ result->length = length;
+ result->unique = flip2(unique);
+
+ return result;
+}
+
void
gum_pack(gum_msg* msg)
{
@@ -96,13 +107,16 @@ gum_register(char* name, gum_proc procedure)
itable_add(gum_map, idx, procedure);
}
-__blocking int
+__blocking int // gum_result
gum_call(gum_node target, gum_msg* msg, gum_msg** response)
{
int mpi_rank;
gum_msg* result;
+ int from;
+ int /* gum_result */ error;
+
gossip_debug(MASK_GUM, "gum_call(%i):\n", target.rank);
gum_pack(msg);
@@ -112,109 +126,117 @@ gum_call(gum_node target, gum_msg* msg, gum_msg** response)
error = gs_mpi_send(MPI_BOTTOM, 1, msg->type, target.rank,
GUM_CALL, target.comm);
- result = gum_msg_create();
- result->data = malloc(GUM_MSG_MAX);
+ result = gum_msg_create();
+ result->data = malloc(GUM_MSG_MAX);
- gum_recv(target, flip2(msg->unique), &(result->procedure),
- &(result->unique), &(result->length), result->data);
+ error = gum_recv(target, flip2(msg->unique), &(result->procedure),
+ &from, &(result->unique),
+ &(result->length), result->data);
*response = result;
- return 0;
+ return error;
}
-/*
-int
-gum_call(gum_node target, gum_msg* msg, gum_msg** response)
+/**
+ Copy of gum_call() to simply instruct a node to emulate failure.
+*/
+__blocking int gum_emulate_fault(gum_node target)
{
int mpi_rank;
- int p;
+ gum_msg* msg;
gum_msg* result;
- int length;
+ int from;
+ int /* gum_result */ error;
+
+ gossip_debug(MASK_GUM, "gum_emulate_fault(%i):\n", target.rank);
+
+ msg = gum_msg_build(GUM_EMULATE_FAULT, NULL, 0);
gum_pack(msg);
MPI_Comm_rank(target.comm, &mpi_rank);
- error = MPI_Send(MPI_BOTTOM, 1, msg->type, target.rank,
- GUM_CALL, target.comm);
+ error = gs_mpi_send(MPI_BOTTOM, 1, msg->type, target.rank,
+ GUM_CALL, target.comm);
- result = gum_msg_create();
- result->data = malloc(GUM_MSG_MAX);
+ result = gum_msg_create();
+ result->data = malloc(GUM_MSG_MAX);
- gum_recv(target, flip2(msg->unique), &(result->procedure),
- &(result->unique), &(result->length), result->data);
- length = strlen(result->data);
- *response = result;
+ error = gum_recv(target, flip2(msg->unique), &(result->procedure),
+ &from, &(result->unique),
+ &(result->length), result->data);
+
+ printf("gum_emulate_fault: got: %s\n", result->data);
- return 0;
+ return error;
+
}
-*/
/**
- @param target IN Node from which to recv.
- @param tag IN Tag to look for.
- @param idx OUT Procedure index.
- @param unique OUT Uniquifier
- @param length OUT Length of data.
- @param data OUT Received data.
- */
-__blocking int
-gum_recv(gum_node target, int tag, gum_proc_idx* idx,
- int* unique, int* length, char* data)
+ Copy of gum_call() to simply instruct a node to shutdown.
+*/
+__blocking int gum_kill(gum_node target)
{
- MPI_Status status;
- int size[4];
- MPI_Datatype type[4];
- MPI_Datatype new_type;
- MPI_Aint address[4];
+ int mpi_rank;
- gossip_debug(MASK_GUM, "gum_recv(%i,%i): \n", target.rank, tag);
-
- type[0] = MPI_INT;
- size[0] = 1;
- type[1] = MPI_INT;
- size[1] = 1;
- type[2] = MPI_INT;
- size[2] = 1;
- type[3] = MPI_CHAR;
- size[3] = GUM_MSG_MAX;
+ gum_msg* msg;
+ gum_msg* result;
+
+ int from;
+ int /* gum_result */ error;
+
+ gossip_debug(MASK_GUM, "gum_kill(%i):\n", target.rank);
+
+ msg = gum_msg_build(GUM_SHUTDOWN, NULL, 0);
+ gum_pack(msg);
- MPI_Get_address(idx, &(address[0]));
- MPI_Get_address(unique, &(address[1]));
- MPI_Get_address(length, &(address[2]));
- MPI_Get_address(data, &(address[3]));
- MPI_Type_create_struct(4, size, address, type, &new_type);
- MPI_Type_commit(&new_type);
+ MPI_Comm_rank(target.comm, &mpi_rank);
- error = gs_mpi_recv(MPI_BOTTOM, 1, new_type, target.rank,
- tag, target.comm, &status);
+ error = gs_mpi_send(MPI_BOTTOM, 1, msg->type, target.rank,
+ GUM_CALL, target.comm);
- MPI_Type_free(&new_type);
+ result = gum_msg_create();
+ result->data = malloc(GUM_MSG_MAX);
+
+ error = gum_recv(target, flip2(msg->unique), &(result->procedure),
+ &from, &(result->unique),
+ &(result->length), result->data);
+
+ printf("gum_kill(): got: %s\n", result->data);
+
+ return error;
- return status.MPI_SOURCE;
}
/**
@param target IN Node from which to recv.
@param tag IN Tag to look for.
@param idx OUT Procedure index.
- @param unique OUT Uniquifier
+ @param from OUT Recvd from.
+ @param unique OUT Uniquifier.
@param length OUT Length of data.
- @param data OUT Received data.
+ @param data OUT Received data.
+ @return Error status: GUM_SUCCESS or GUM_EMULATE_FAULT.
*/
-/*
-int
+__blocking int // gum_result
gum_recv(gum_node target, int tag, gum_proc_idx* idx,
- int* unique, int* length, char* data)
+ int* from, int* unique, int* length, char* data)
{
- int rank;
MPI_Status status;
int size[4];
MPI_Datatype type[4];
MPI_Datatype new_type;
MPI_Aint address[4];
+ gum_node caller;
+ gum_msg* response;
+ char* text;
+
+ int err;
+
+ gossip_debug(MASK_GUM, "gum_recv(%i,%i): \n", target.rank, tag);
+
type[0] = MPI_INT;
size[0] = 1;
type[1] = MPI_INT;
@@ -231,25 +253,105 @@ gum_recv(gum_node target, int tag, gum_proc_idx* idx,
MPI_Type_create_struct(4, size, address, type, &new_type);
MPI_Type_commit(&new_type);
- error = MPI_Recv(MPI_BOTTOM, 1, new_type, target.rank,
- tag, target.comm, &status);
+ gs_mpi_recv(MPI_BOTTOM, 1, new_type, target.rank,
+ tag, target.comm, &status);
MPI_Type_free(&new_type);
- return status.MPI_SOURCE;
+ caller.rank = status.MPI_SOURCE;
+ caller.comm = target.comm;
+
+ *from = caller.rank;
+
+ err = 1;
+ if (*idx == GUM_RESPONSE_FAULTY)
+ {
+ printf("gum_recv(): I am faulty!\n");
+ err = 0; // GUM_EMULATE_FAULT;
+ }
+ else if (*idx == GUM_RESPONSE)
+ {
+ err = 1;
+ }
+ else if (*idx == GUM_EMULATE_FAULT)
+ {
+ gossip_debug(MASK_GUM, "gum_recv(GUM_EMULATE_FAULT)\n");
+ gum_current_status = GUM_STATUS_EMULATE_FAULT;
+ text = strdup("going faulty");
+ response = gum_msg_response(*unique, text, strlen(text));
+ gum_return(caller, response);
+ free(text);
+ }
+ else if (*idx == GUM_SHUTDOWN)
+ {
+ gossip_debug(MASK_GUM, "gum_recv(GUM_SHUTDOWN)\n");
+ gum_shutdown();
+ response = gum_msg_response(*unique, NULL, 0);
+ gum_return(caller, response);
+ }
+ else if (gum_current_status == GUM_STATUS_EMULATE_FAULT)
+ {
+ text = strdup("i am faulty");
+ response = gum_msg_response(*unique, text, strlen(text));
+ gum_return_emulating_fault(caller, response);
+ free(text);
+ }
+ else if (*idx == GUM_PING)
+ {
+ text = strdup("pong");
+ response = gum_msg_response(*unique, text, strlen(text));
+ gum_return(caller, response);
+ free(text);
+ }
+
+ return err; // GUM_SUCCESS;
}
-*/
__blocking int
gum_return(gum_node caller, gum_msg* response)
{
+ int err;
+
gossip_debug(MASK_GUM, "gum_return(%i):\n", response->unique);
response->procedure = GUM_RESPONSE;
gum_pack(response);
- error = gs_mpi_send(MPI_BOTTOM, 1, response->type, caller.rank,
+ err = gs_mpi_send(MPI_BOTTOM, 1, response->type, caller.rank,
response->unique, caller.comm);
// MPI_Type_free?
return 1;
}
+
+/**
+ Copy of gum_return() with GUM_RESPONSE_FAULTY code.
+*/
+__blocking int
+gum_return_emulating_fault(gum_node caller, gum_msg* response)
+{
+ int err;
+
+ gossip_debug(MASK_GUM, "gum_return_emulate_fault(%i):\n",
+ response->unique);
+
+ response->procedure = GUM_RESPONSE_FAULTY;
+ gum_pack(response);
+
+ err = gs_mpi_send(MPI_BOTTOM, 1, response->type, caller.rank,
+ response->unique, caller.comm);
+ // MPI_Type_free?
+ return 1;
+}
+
+bool
+gum_running()
+{
+ return (gum_current_status != GUM_STATUS_SHUTDOWN);
+}
+
+void
+gum_shutdown()
+{
+ gossip_debug(MASK_GUM, "gum_shutdown()\n");
+ gum_current_status = GUM_STATUS_SHUTDOWN;
+}
diff --git a/code/src/include/gum.gsh b/code/src/include/gum.gsh
index bec5ee1..183f60a 100644
--- a/code/src/include/gum.gsh
+++ b/code/src/include/gum.gsh
@@ -23,24 +23,39 @@
#include "dmalloc.h"
#endif
-typedef int gum_proc_idx;
+typedef enum
+{
+ GUM_STATUS_PROTO,
+ GUM_STATUS_RUNNING,
+ GUM_STATUS_SHUTDOWN,
+ GUM_STATUS_EMULATE_FAULT
+} gum_status;
-extern bool gum_running;
-extern int gum_unique_id;
+typedef enum
+{
+ GUM_SUCCESS,
+ GUM_EMULATE_FAULT
+} gum_result;
-#define GUM_MSG_MAX (1*1024)
+/**
+ gum_proc_idx codes that have special meaning to GUM.
+*/
+typedef enum
+{
+ GUM_RESPONSE = -1,
+ GUM_RESPONSE_FAULTY = -2,
+ GUM_PING = -3,
+ GUM_SHUTDOWN = -4
+} gum_fn;
-typedef struct
+typedef enum
{
- gum_proc_idx procedure;
- int unique;
- int source;
- int length;
- char* data;
- MPI_Datatype type;
-} gum_msg;
+ GUM_CALL = 0,
+} gum_tag;
-typedef void (*gum_proc)(gum_msg*);
+#define GUM_MSG_MAX (1*1024)
+
+typedef int gum_proc_idx;
typedef struct
{
@@ -48,15 +63,17 @@ typedef struct
MPI_Comm comm;
} gum_node;
-typedef enum
+typedef struct
{
- GUM_RESPONSE = -1,
-} gum_fn;
+ gum_proc_idx procedure;
+ int unique;
+ int source;
+ int length;
+ char* data;
+ MPI_Datatype type;
+} gum_msg;
-typedef enum
-{
- GUM_CALL = 0,
-} gum_tag;
+typedef void (*gum_proc)(gum_msg*);
int gum_init(void);
@@ -67,24 +84,36 @@ void gum_msg_init(gum_proc_idx name, char* data, int length,
gum_msg* gum_msg_build(gum_proc_idx name, char* data, int length);
+gum_msg* gum_msg_response(int unique, char* data, int length);
+
void gum_register(char* name, gum_proc procedure);
gum_proc_idx gum_procedure_create(char* name);
void gum_pack(gum_msg* msg);
-// int gum_call(gum_node target, gum_msg* msg, gum_msg** response);
-
-__blocking int gum_call(gum_node target,
- gum_msg* msg, gum_msg** response);
+__blocking int /* gum_result */ gum_call(gum_node target,
+ gum_msg* msg, gum_msg** response);
__blocking int gum_response();
-/* int gum_recv(gum_node target, int tag, gum_proc_idx* idx,
- int* unique, int* length, char* data); */
-
-__blocking int gum_recv(gum_node target, int tag, gum_proc_idx* idx,
- int* unique, int* length, char* data);
+__blocking int /* gum_result */ gum_recv(gum_node target, int tag,
+ gum_proc_idx* idx,
+ int* from, int* unique,
+ int* length, char* data);
__blocking int gum_return(gum_node caller, gum_msg* response);
+__blocking int gum_return_emulating_fault(gum_node caller,
+ gum_msg* response);
+
+
+__blocking int gum_emulate_fault(gum_node target);
+
+__blocking int gum_kill(gum_node target);
+
+bool gum_running();
+
+void gum_shutdown();
+
+
#endif
diff --git a/code/src/mpi_tools/mpi_tools.c b/code/src/mpi_tools/mpi_tools.c
index 63949fb..3f60542 100644
--- a/code/src/mpi_tools/mpi_tools.c
+++ b/code/src/mpi_tools/mpi_tools.c
@@ -123,7 +123,7 @@ int
flip2(int i)
{
static int s = 1 << 30;
- return i+s;
+ return i^s;
}
unsigned int
diff --git a/code/test/gum/About.txt b/code/test/gum/About.txt
new file mode 100644
index 0000000..3c78366
--- /dev/null
+++ b/code/test/gum/About.txt
@@ -0,0 +1,7 @@
+
+GUM TESTS
+
+test01: Simple calls
+test02: Fault emulation
+test03: Function registration
+test04: Ping
diff --git a/code/test/gum/module.mk.in b/code/test/gum/module.mk.in
index ed837b4..fd7e942 100644
--- a/code/test/gum/module.mk.in
+++ b/code/test/gum/module.mk.in
@@ -12,10 +12,10 @@ TEST_GSSRC += $(TEST_GUM_GSSRC)
TEST_GUM_ADTS = src/adts/itable.o src/adts/hashtable.o src/adts/ilist.o src/adts/klist.o
# GUM tests
-test/gum/test01.o: test/gum/test01.gs
- $(Q) " GSCC $(@)"
- $(E)$(GSCC) $(GSLFLAGS) --dontclean $(GSINCLUDES) --compiler $(MPICC) --outfile $(@) $(<)
+# test/gum/test01.o: test/gum/test01.gs
+# $(Q) " GSCC $(@)"
+# $(E)$(GSCC) $(GSLFLAGS) --dontclean $(GSINCLUDES) --compiler $(MPICC) --outfile $(@) $(<)
-test/gum/test01.x: test/gum/test01.o src/gum/gum.o $(TEST_GUM_ADTS) src/mpi_tools/mpi_tools.o
+test/gum/test%.x: test/gum/test%.o src/gum/gum.o $(TEST_GUM_ADTS) src/common/gossip/gossip.o src/mpi_tools/mpi_tools.o
$(Q) " MPICC $(@)"
$(E)$(MPICC) -rdynamic $(^) -L src/gsl/lib -l gs -l gstest -l crypto -l m -o $(@)
diff --git a/code/test/gum/test01.gs b/code/test/gum/test01.gs
index 8040383..8591dcd 100644
--- a/code/test/gum/test01.gs
+++ b/code/test/gum/test01.gs
@@ -19,12 +19,39 @@ enum
GUM_TEST01
};
+#ifndef DUMMYOBJ
+static gs_ret_t bootstrap_post(void (f)(void*,int),
+ void*, gs_hints_t,
+ gs_context_t, gs_op_id_t*);
+
static void
done_callback(void *user_ptr, int ret)
{
done = 1;
}
+#endif
+
+__blocking int
+gum_test01(gum_node caller, gum_msg* call)
+{
+ gum_msg response;
+
+ if (strcmp(call->data, "quit") == 0)
+ gum_shutdown();
+
+ response.unique = flip2(call->unique);
+ response.data = malloc(4);
+ response.length = 4;
+ strcpy(response.data, "ok");
+
+ gum_return(caller, &response);
+
+ return 1;
+}
+
+#ifndef DUMMYOBJ
+
static __blocking int
client(void)
{
@@ -59,46 +86,28 @@ client(void)
return 0;
}
-__blocking int
-gum_test01(gum_node caller, gum_msg* call)
-{
- gum_msg response;
-
- if (strcmp(call->data, "quit") == 0)
- gum_running = false;
-
- response.unique = flip2(call->unique);
- response.data = malloc(4);
- response.length = 4;
- strcpy(response.data, "ok");
-
- gum_return(caller, &response);
-
- return 1;
-}
-
static __blocking int
service(MPI_Comm comm)
{
gum_node caller;
-
+
int unique;
gum_proc_idx idx;
int length;
- char data[GUM_MSG_MAX];
+ // char data[GUM_MSG_MAX];
gum_msg call;
gum_node target;
- gum_proc procedure;
+ // gum_proc procedure;
- while (gum_running)
+ while (gum_running())
{
target.rank = MPI_ANY_SOURCE;
target.comm = comm;
call.data = malloc(GUM_MSG_MAX);
- caller.rank = gum_recv(target, GUM_CALL, &idx, &unique,
+ gum_recv(target, GUM_CALL, &idx, &(caller.rank), &unique,
&length, call.data);
caller.comm = comm;
@@ -112,14 +121,14 @@ service(MPI_Comm comm)
}
}
printf("service done\n");
- return 0;
+ return 0;
}
static __blocking int
bootstrap(void)
{
- MPI_Status status;
- gum_node target;
+ // MPI_Status status;
+ // gum_node target;
if (mpi_rank == 0)
{
@@ -133,13 +142,17 @@ bootstrap(void)
return 0;
}
+#endif
+
int
main(int argc, char *argv[])
{
+#ifndef DUMMYOBJ
gs_op_id_t op_id;
+#endif
gs_context_t ctx;
- bool debugWait = false;
+ // bool debugWait = false;
MPI_Init(&argc, &argv);
@@ -152,10 +165,20 @@ main(int argc, char *argv[])
gs_mpi_init();
gs_context_create(&ctx, 1, "mpi");
- gum_init();
+ gum_init();
+
+#ifndef DUMMYOBJ
bootstrap_post(done_callback, NULL, NULL, ctx, &op_id);
+#endif
- while(done == 0)
+ /*
+ while (false)
+ {
+ bootstrap();
+ }
+ */
+
+ while (done == 0)
{
gs_poll(ctx, 10);
}
diff --git a/code/test/gum/test02.gs b/code/test/gum/test02.gs
index 8de08ca..c4517a2 100644
--- a/code/test/gum/test02.gs
+++ b/code/test/gum/test02.gs
@@ -9,71 +9,193 @@
#include <resources/mpi/gs-mpi.gsh>
#include <gum.gsh>
-char buffer[100];
-
int done = 0;
int mpi_size;
int mpi_rank;
-static void done_callback(void *user_ptr, int ret)
+enum
+{
+ GUM_TEST
+};
+
+#ifndef DUMMYOBJ
+static gs_ret_t bootstrap_post(void (f)(void*,int),
+ void*, gs_hints_t,
+ gs_context_t, gs_op_id_t*);
+
+static void
+done_callback(void *user_ptr, int ret)
{
done = 1;
}
-static __blocking int bootstrap(void)
+#endif
+
+__blocking int
+gum_test(gum_node caller, gum_msg* call)
{
- MPI_Status status;
- gum_node target;
+ gum_msg response;
+
+ if (strcmp(call->data, "quit") == 0)
+ gum_shutdown();
- if (mpi_rank == 0)
+ response.unique = flip2(call->unique);
+ response.data = malloc(4);
+ response.length = 4;
+ strcpy(response.data, "ok");
+
+ gum_return(caller, &response);
+
+ return 1;
+}
+
+#ifndef DUMMYOBJ
+
+static __blocking int
+client(void)
+{
+ gum_msg* msg;
+ gum_msg* result;
+ gum_node target;
+
+ char args[32];
+
+ int error;
+
+ target.rank = 0;
+ target.comm = MPI_COMM_WORLD;
+
+ msg = malloc(sizeof(gum_msg));
+
+ strcpy(args, "args1");
+ gum_msg_init(GUM_TEST, args, strlen(args)+1, msg);
+ error = gum_call(target, msg, &result);
+ printf("called: got: %s\n", result->data);
+ printf("error: %i\n", error);
+ free(result);
+
+ gum_emulate_fault(target);
+
+ strcpy(args, "args1");
+ gum_msg_init(GUM_TEST, args, strlen(args)+1, msg);
+ error = gum_call(target, msg, &result);
+ printf("called: got: %s\n", result->data);
+ printf("error: %i\n", error);
+ if (error == 0)
{
- while (gum_running)
+ printf("got emulated fault!\n");
+ }
+
+ gum_kill(target);
+
+ free(msg);
+ printf("client done\n");
+ return 0;
+}
+
+static __blocking int
+service(MPI_Comm comm)
+{
+ gum_node caller;
+
+ int unique;
+ gum_proc_idx idx;
+ int length;
+ // char data[GUM_MSG_MAX];
+
+ gum_msg call;
+ gum_node target;
+ // gum_proc procedure;
+
+ while (gum_running())
+ {
+ target.rank = MPI_ANY_SOURCE;
+ target.comm = comm;
+
+ call.data = malloc(GUM_MSG_MAX);
+ gum_recv(target, GUM_CALL, &idx, &(caller.rank), &unique,
+ &length, call.data);
+ caller.comm = comm;
+
+ call.unique = unique;
+ call.source = caller.rank;
+ call.length = length;
+
+ printf("idx: %i\n", idx);
+ if (idx == GUM_TEST)
{
- printf("responding... \n");
- gum_response();
- sleep(1);
+ gum_test(caller, &call);
}
}
+ printf("service done\n");
+ return 0;
+}
+
+static __blocking int
+bootstrap(void)
+{
+ // MPI_Status status;
+ // gum_node target;
+
+ if (mpi_rank == 0)
+ {
+ service(MPI_COMM_WORLD);
+ }
else
{
- target.rank = 0;
- target.comm = MPI_COMM_WORLD;
- printf("calling...\n");
- gum_call(target, "blah", NULL, NULL);
- printf("called blah\n");
- gum_call(target, "quit", NULL, NULL);
+ client();
}
return 0;
}
+#endif
+
int
main(int argc, char *argv[])
{
+#ifndef DUMMYOBJ
gs_op_id_t op_id;
+#endif
gs_context_t ctx;
+ // bool debugWait = false;
+
MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
- gs_mpi_init();
- gum_init();
-
- memset(buffer, '\0', 100);
+ // if (mpi_rank == 0)
+ // while (!debugWait);
+ gs_mpi_init();
gs_context_create(&ctx, 1, "mpi");
+
+ gossip_set_debug_mask(1, MASK_GUM);
+
+ gum_init();
+
+#ifndef DUMMYOBJ
bootstrap_post(done_callback, NULL, NULL, ctx, &op_id);
+#endif
- while(done == 0)
+ /*
+ while (false)
+ {
+ bootstrap();
+ }
+ */
+
+ while (done == 0)
{
gs_poll(ctx, 10);
}
- MPI_Finalize();
- gs_mpi_finalize();
+ printf("finalize\n");
gs_context_destroy(ctx);
+ gs_mpi_finalize();
+ MPI_Finalize();
return 0;
}
diff --git a/code/test/gum/test01.gs b/code/test/gum/test04.gs
similarity index 76%
copy from code/test/gum/test01.gs
copy to code/test/gum/test04.gs
index 8040383..54b797c 100644
--- a/code/test/gum/test01.gs
+++ b/code/test/gum/test04.gs
@@ -19,12 +19,39 @@ enum
GUM_TEST01
};
+#ifndef DUMMYOBJ
+static gs_ret_t bootstrap_post(void (f)(void*,int),
+ void*, gs_hints_t,
+ gs_context_t, gs_op_id_t*);
+
static void
done_callback(void *user_ptr, int ret)
{
done = 1;
}
+#endif
+
+__blocking int
+gum_test01(gum_node caller, gum_msg* call)
+{
+ gum_msg response;
+
+ if (strcmp(call->data, "quit") == 0)
+ gum_shutdown();
+
+ response.unique = flip2(call->unique);
+ response.data = malloc(4);
+ response.length = 4;
+ strcpy(response.data, "ok");
+
+ gum_return(caller, &response);
+
+ return 1;
+}
+
+#ifndef DUMMYOBJ
+
static __blocking int
client(void)
{
@@ -40,65 +67,41 @@ client(void)
msg = malloc(sizeof(gum_msg));
strcpy(args, "args1");
- gum_msg_init(GUM_TEST01, args, strlen(args)+1, msg);
+ gum_msg_init(GUM_PING, args, strlen(args)+1, msg);
gum_call(target, msg, &result);
printf("called: got: %s\n", result->data);
free(result);
-
- strcpy(args, "quit");
- gum_msg_init(GUM_TEST01, args, strlen(args)+1, msg);
- gum_call(target, msg, &result);
- printf("called: got: %s\n", result->data);
- free(msg);
- free(result);
+ gum_kill(target);
printf("client done\n");
return 0;
}
-__blocking int
-gum_test01(gum_node caller, gum_msg* call)
-{
- gum_msg response;
-
- if (strcmp(call->data, "quit") == 0)
- gum_running = false;
-
- response.unique = flip2(call->unique);
- response.data = malloc(4);
- response.length = 4;
- strcpy(response.data, "ok");
-
- gum_return(caller, &response);
-
- return 1;
-}
-
static __blocking int
service(MPI_Comm comm)
{
gum_node caller;
-
+
int unique;
gum_proc_idx idx;
int length;
- char data[GUM_MSG_MAX];
+ // char data[GUM_MSG_MAX];
gum_msg call;
gum_node target;
- gum_proc procedure;
+ // gum_proc procedure;
- while (gum_running)
+ while (gum_running())
{
target.rank = MPI_ANY_SOURCE;
target.comm = comm;
call.data = malloc(GUM_MSG_MAX);
- caller.rank = gum_recv(target, GUM_CALL, &idx, &unique,
+ gum_recv(target, GUM_CALL, &idx, &(caller.rank), &unique,
&length, call.data);
caller.comm = comm;
@@ -112,14 +115,14 @@ service(MPI_Comm comm)
}
}
printf("service done\n");
- return 0;
+ return 0;
}
static __blocking int
bootstrap(void)
{
- MPI_Status status;
- gum_node target;
+ // MPI_Status status;
+ // gum_node target;
if (mpi_rank == 0)
{
@@ -133,13 +136,17 @@ bootstrap(void)
return 0;
}
+#endif
+
int
main(int argc, char *argv[])
{
+#ifndef DUMMYOBJ
gs_op_id_t op_id;
+#endif
gs_context_t ctx;
- bool debugWait = false;
+ // bool debugWait = false;
MPI_Init(&argc, &argv);
@@ -152,10 +159,20 @@ main(int argc, char *argv[])
gs_mpi_init();
gs_context_create(&ctx, 1, "mpi");
- gum_init();
+ gum_init();
+
+#ifndef DUMMYOBJ
bootstrap_post(done_callback, NULL, NULL, ctx, &op_id);
+#endif
- while(done == 0)
+ /*
+ while (false)
+ {
+ bootstrap();
+ }
+ */
+
+ while (done == 0)
{
gs_poll(ctx, 10);
}
diff --git a/sim/gobs/GOBS.java b/sim/gobs/GOBS.java
index 1dd7124..d54b8cb 100644
--- a/sim/gobs/GOBS.java
+++ b/sim/gobs/GOBS.java
@@ -1,4 +1,6 @@
+import java.math.BigInteger;
+import java.text.DecimalFormat;
import java.util.*;
/**
@@ -16,6 +18,8 @@ class GOBS
{
static int B;
static int M;
+
+ static DecimalFormat df = new DecimalFormat("0.0");
static Map<Node,Integer> countObjects(List<Node> nodes)
{
@@ -40,7 +44,28 @@ class GOBS
for (Node node : nodes)
System.out.println(node);
}
-
+
+ /* Debugging sortMap():
+
+ public static void main(String[] args)
+ {
+ int B = 4;
+
+ Map<Node,Integer> table = new Hashtable<Node,Integer>();
+
+ table.put(new Node(B, new BigInteger("3")), 2);
+ table.put(new Node(B, new BigInteger("5")), 1);
+ table.put(new Node(B, new BigInteger("8")), 4);
+ table.put(new Node(B, new BigInteger("3")), 3);
+
+ Map<Node,Integer> sorted = (Map<Node,Integer>) sortMap(table);
+ for (Node node : sorted.keySet())
+ {
+ System.out.println(node.toString() + " " + sorted.get(node));
+ }
+ }
+ */
+
public static void main(String[] args)
{
String layoutName;
@@ -109,19 +134,49 @@ class GOBS
Map<Node,Integer> faultCount = countObjects(nodes);
// Find the load difference from before the fault...
- List<Integer> diffs = new ArrayList<Integer>();
+ Map<Node,Integer> diffs = new Hashtable<Node,Integer>();
for (Node node : faultCount.keySet())
{
int before = origCount.get(node);
int after = faultCount.get(node);
- diffs.add(after-before);
+ diffs.put(node, new Integer(after-before));
}
+ // Sort load differences...
+ MapSorter<Node> sorter = new MapSorter<Node>();
+ Map<Node,Integer> sorted = sorter.sort(diffs);
+
// Display load differences...
System.out.println("");
- System.out.println("LOAD INCREASES:");
- Collections.sort(diffs);
- for (Integer i : diffs)
- System.out.println(i);
+ System.out.println("LOAD_INCREASES:");
+ for (Node node : sorted.keySet())
+ {
+ Integer d = sorted.get(node);
+ System.out.println(node.bitString() + ": " + d);
+ }
+
+ // Display data movement stats...
+ int total = 0;
+ for (Node node : sorted.keySet())
+ {
+ total += sorted.get(node);
+ }
+ System.out.println("TOTAL_TRANSFERS: " + total);
+
+ // Display data reallocation declustering...
+ System.out.println("PULL_DECLUSTERING: ");
+ int affected = 0;
+ for (Node node : sorted.keySet())
+ {
+ int d = sorted.get(node);
+ if (d > 0)
+ {
+ System.out.println(node.bitString() + ": " +
+ df.format((100.0*d)/total) + "%");
+ affected++;
+ }
+ }
+ System.out.println("SERVERS_AFFECTED: " + affected);
+
}
}
diff --git a/sim/gobs/MapSorter.java b/sim/gobs/MapSorter.java
new file mode 100644
index 0000000..7f7931a
--- /dev/null
+++ b/sim/gobs/MapSorter.java
@@ -0,0 +1,29 @@
+
+import java.util.*;
+
+class MapSorter<T>
+{
+ LinkedHashMap<T,Integer> sort(Map<T,Integer> input)
+ {
+ LinkedHashMap<T,Integer> result = new LinkedHashMap<T,Integer>();
+
+ while (! input.isEmpty())
+ {
+ int minValue = Integer.MAX_VALUE;
+ T minThing = null;
+ for (T thing : input.keySet())
+ {
+ Integer i = input.get(thing);
+ if (i < minValue)
+ {
+ minValue = i;
+ minThing = thing;
+ }
+ }
+ input.remove(minThing);
+ result.put(minThing, new Integer(minValue));
+ }
+
+ return result;
+ }
+}
hooks/post-receive
--
Grayskull Repository
1
0
[Gs-commits] Grayskull Repository branch, master, updated. git-migration-43-g64e1ad5
by noreply@mcs.anl.gov 28 Jul '09
by noreply@mcs.anl.gov 28 Jul '09
28 Jul '09
A ref change was pushed to the repository containing
the project "Grayskull Repository".
The branch, master has been updated
via 64e1ad598885443d5789ec39423e7917833f3192 (commit)
via 481c4c7817800d4121ec300e70f2ecc286ef3b07 (commit)
via 68ef1bd38c3ec4c06eb4e72972eae62b9358dfc5 (commit)
via 1fb79463ce8f4b1fe1ab5b95204c710ef48f93e2 (commit)
via eba4cc00b430ac448db7bae92bc4095b3b8530e3 (commit)
via 0e16ea414048df4bf946b7962b05793891631aec (commit)
via ad2ad8ab57935136d120bb93a7ce391224f9fd58 (commit)
via 844a6b67219c07969c4e056dc8736dcca28dc23e (commit)
via 3f6aa4abc973f747586344b27e0747afa504fb71 (commit)
via 0f5dee7abb6aa49db60fc9affd9378f28c4e00d1 (commit)
via 04a97f354b67bfd89ae63fee69438ec6de9961a2 (commit)
via 59f05df0a3566e7036bb5d97f8c183f66f6f758a (commit)
via b51b809637f97e4f5f653660fbfe2592bbad1194 (commit)
from 8f0ad1a9238818da3d1a0c2ab960e6342acea211 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 64e1ad598885443d5789ec39423e7917833f3192
Author: Justin M Wozniak <wozniak(a)mcs.anl.gov>
Date: Tue Jul 28 16:31:38 2009 -0500
Reverting to previous version.
Something strange happened with the email commit.
commit 481c4c7817800d4121ec300e70f2ecc286ef3b07
Merge: 68ef1bd38c3ec4c06eb4e72972eae62b9358dfc5 8f0ad1a9238818da3d1a0c2ab960e6342acea211
Author: Justin M Wozniak <wozniak(a)mcs.anl.gov>
Date: Tue Jul 28 14:12:18 2009 -0500
Merge branch 'master' of /homes/dkimpe/git/grayskull
commit 68ef1bd38c3ec4c06eb4e72972eae62b9358dfc5
Author: Justin M Wozniak <wozniak(a)mcs.anl.gov>
Date: Tue Jul 28 14:03:34 2009 -0500
Added GACK draft.
commit 1fb79463ce8f4b1fe1ab5b95204c710ef48f93e2
Author: Justin M Wozniak <wozniak(a)login2.mcs.anl.gov>
Date: Mon Jul 27 19:26:02 2009 -0500
Multiple changes.
commit eba4cc00b430ac448db7bae92bc4095b3b8530e3
Merge: 0e16ea414048df4bf946b7962b05793891631aec 75b46b7fb9cd9c4b2ea47aea86de12a48ef176a8
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Wed Jul 22 12:55:21 2009 -0500
Merge branch 'master' of ssh://login3.mcs.anl.gov/~wozniak/proj/gs
commit 0e16ea414048df4bf946b7962b05793891631aec
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Wed Jul 22 12:53:34 2009 -0500
New GACK module.
commit ad2ad8ab57935136d120bb93a7ce391224f9fd58
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Wed Jul 22 12:20:35 2009 -0500
Test for xtree ADT.
commit 844a6b67219c07969c4e056dc8736dcca28dc23e
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Wed Jul 22 11:29:03 2009 -0500
Added javadoc comments.
commit 3f6aa4abc973f747586344b27e0747afa504fb71
Merge: 0f5dee7abb6aa49db60fc9affd9378f28c4e00d1 d9c95daae6cf4a28afaed3224d7c5a2b7277dfc3
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Tue Jul 21 17:01:52 2009 -0500
Merge branch 'master' of [email protected]:~dkimpe/git/grayskull
commit 0f5dee7abb6aa49db60fc9affd9378f28c4e00d1
Merge: 04a97f354b67bfd89ae63fee69438ec6de9961a2 598da6d94a53b93960ca88b162e4c4372d752c5f
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Tue Jul 21 14:34:33 2009 -0500
Merge branch 'master' of [email protected]:~dkimpe/git/grayskull
commit 04a97f354b67bfd89ae63fee69438ec6de9961a2
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Tue Jul 21 14:32:29 2009 -0500
New addresses of arbitrary length.
commit 59f05df0a3566e7036bb5d97f8c183f66f6f758a
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Tue Jul 21 14:19:25 2009 -0500
Do not need Key.java .
commit b51b809637f97e4f5f653660fbfe2592bbad1194
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Tue Jul 21 14:17:53 2009 -0500
New NodeScheme interface and support for large address lengths.
-----------------------------------------------------------------------
Summary of changes:
code/Makefile.in | 14 ++-
code/configure.ac | 2 +
...ozniak_aproj_ags.git_acode_asrc_agack_agack.gs# | 3 +
code/src/gack/gack.gs | 56 ++++++
code/src/{gum => gack}/module.mk.in | 8 +-
code/src/gobs/ait.gs | 72 +++++++
code/src/gobs/dense/dense.gs | 199 +++++++++-----------
code/src/gobs/gobs.gs | 154 ++++++++++++++-
code/src/gobs/interpreter.gs | 8 -
code/src/gobs/launch.gs | 4 +-
code/src/gobs/module.mk.in | 6 +-
code/src/include/ait.gsh | 12 ++
code/src/include/ait_types.gsh | 33 ++++
code/src/include/gack.gsh | 29 +++
code/src/include/gack_types.gsh | 13 ++
code/src/include/gobs.gsh | 70 +++++---
code/src/include/gobs_dense.h | 18 ++
code/src/include/gobs_types.gsh | 12 +-
code/src/include/gum.gsh | 6 +-
code/src/include/interpreter.gsh | 32 ---
code/src/include/skullfs.gsh | 15 ++-
code/src/include/skullfs_client.gsh | 14 ++-
code/src/include/skullfs_handlers.gsh | 2 +
code/src/include/skullfs_rpcs.gsh | 4 +-
code/src/skullfs/client.gs | 146 +++++++++------
code/src/skullfs/handlers.gs | 87 +++++++--
code/src/skullfs/rpcs.gs | 42 ++---
code/src/skullfs/skullfs.gs | 60 ++++--
code/test/adts/test07.c | 43 +++++
code/test/common/gdb_wait_loop.c | 11 +
code/test/gack/module.mk.in | 24 +++
code/test/{skullfs/test02.gs => gack/test01.gs} | 16 +-
code/test/gobs/About.txt | 4 +
code/test/gobs/test03.gs | 115 +----------
code/test/skullfs/About.txt | 5 +-
code/test/skullfs/test02.gs | 4 +-
code/test/skullfs/test05.gs | 21 ++-
code/test/skullfs/{test05.gs => test06.gs} | 26 +--
code/test/skullfs/{test05.gs => test07.gs} | 33 ++--
sim/gobs/About.txt | 17 ++-
sim/gobs/Addressable.java | 34 +++-
sim/gobs/Bits.java | 3 +-
sim/gobs/GOBS.java | 33 ++--
sim/gobs/Kademlia.java | 4 +
sim/gobs/LayoutScheme.java | 4 +
sim/gobs/Node.java | 4 +
sim/gobs/NodeScheme.java | 10 +-
sim/gobs/Obj.java | 5 +-
sim/gobs/PlacementScheme.java | 4 +
sim/gobs/RandomLayout.java | 4 +
sim/gobs/RandomNodes.java | 6 +-
sim/gobs/UniformNodes.java | 16 +-
52 files changed, 1030 insertions(+), 537 deletions(-)
create mode 100644 code/src/gack/#_ascpx_blogin3.mcs.anl.gov_b_ahomes_awozniak_aproj_ags.git_acode_asrc_agack_agack.gs#
create mode 100644 code/src/gack/gack.gs
copy code/src/{gum => gack}/module.mk.in (50%)
create mode 100644 code/src/gobs/ait.gs
delete mode 100644 code/src/gobs/interpreter.gs
create mode 100644 code/src/include/ait.gsh
create mode 100644 code/src/include/ait_types.gsh
create mode 100644 code/src/include/gack.gsh
create mode 100644 code/src/include/gack_types.gsh
delete mode 100644 code/src/include/interpreter.gsh
create mode 100644 code/test/adts/test07.c
create mode 100644 code/test/common/gdb_wait_loop.c
create mode 100644 code/test/gack/module.mk.in
copy code/test/{skullfs/test02.gs => gack/test01.gs} (57%)
create mode 100644 code/test/gobs/About.txt
copy code/test/skullfs/{test05.gs => test06.gs} (57%)
copy code/test/skullfs/{test05.gs => test07.gs} (57%)
Diff of changes:
diff --git a/code/Makefile.in b/code/Makefile.in
index 45de700..d5002c8 100644
--- a/code/Makefile.in
+++ b/code/Makefile.in
@@ -295,9 +295,11 @@ SKULLFS_GSSRC :=
TEST_GSSRC :=
GOBS_OBJS :=
+GACK_OBJS :=
ALL_GS = $(GUM_GSSRC) \
$(GOBS_GSSRC) src/gobs/launch.gs \
+ $(GACK_GSSRC) \
$(SKULLFS_GSSRC) \
$(TEST_GSSRC)
ALL_GS_I = $(patsubst %.gs, %.gs.i, $(ALL_GS))
@@ -333,6 +335,7 @@ debug_variables:
$(E)echo ADT_OBJS: $(ADT_OBJS)
$(E)echo GUM_OBJS: $(GUM_OBJS)
$(E)echo GOBS_OBJS: $(GOBS_OBJS)
+ $(E)echo GACK_OBJS: $(GACK_OBJS)
# $(E)echo TEST_CMPI_SRC: $(TEST_CMPI_SRC)
$(E)echo TEST_DISKSIM_SRC: $(TEST_DISKSIM_SRC)
# $(E)echo TEST_MPIRPC_SRC: $(TEST_MPIRPC_SRC)
@@ -351,6 +354,7 @@ CMPI := lib/libcmpi.a
MPIRPC := lib/libmpirpc.a
CMPI_IO := lib/libcmpi-io.so
GOBS = lib/libgobs.a
+GACK = lib/libgack.a
SKULLFS = lib/libskullfs.a
################################################################
@@ -413,6 +417,8 @@ mpirpc: $(MPIRPC)
gobs: $(GOBS)
+gack: $(GACK)
+
skullfs: $(SKULLFS)
# Just like dir, but strip the slash off the end, to be pretty.
@@ -451,7 +457,12 @@ $(GOBS): $(GOBS_OBJS) $(GUM_OBJS)
$(E)$(INSTALL) -d lib
$(E)ar rcs $(@) $(^)
-$(SKULLFS): $(GOBS_OBJS) $(SKULLFS_OBJS) $(GUM_OBJS)
+$(GACK): $(GACK_OBJS) $(GOBS_OBJS) $(SKULLFS_OBJS) $(GUM_OBJS)
+ $(Q) " AR $@"
+ $(E)$(INSTALL) -d lib
+ $(E)ar rcs $(@) $(^)
+
+$(SKULLFS): $(GACK_OBJS) $(GOBS_OBJS) $(SKULLFS_OBJS) $(GUM_OBJS)
$(Q) " AR $@"
$(E)$(INSTALL) -d lib
$(E)ar rcs $(@) $(^)
@@ -620,6 +631,7 @@ clean::
$(CMPI_PROGS) $(CMPI_CP_OBJS) splint.out \
$(GUM_OBJS) \
$(GOBS_OBJS) $(GOBS) src/gobs/launch.o \
+ $(GACK_OBJS) $(GACK) \
$(SKULLFS_OBJS) \
$(ALL_GS_S) $(ALL_GS_I) $(ALL_GS_DUMMY)
# $(E)find . -name "*.avg" -exec rm -fv \{\} \;
diff --git a/code/configure.ac b/code/configure.ac
index 4146c9c..555c5ec 100644
--- a/code/configure.ac
+++ b/code/configure.ac
@@ -881,6 +881,7 @@ src/adts/module.mk
src/cmpi/module.mk
src/cmpi-cp/module.mk
src/cmpi-db/module.mk
+src/gack/module.mk
src/gobs/module.mk
src/gobs/dense/module.mk
src/gum/module.mk
@@ -902,6 +903,7 @@ if test "x$ENABLE_TESTS" = "xyes" ; then
test/cmpi/module.mk
test/cmpi-io/module.mk
test/driver/module.mk
+ test/gack/module.mk
test/gobs/module.mk
test/gum/module.mk
test/gossip/module.mk
diff --git a/code/src/gack/#_ascpx_blogin3.mcs.anl.gov_b_ahomes_awozniak_aproj_ags.git_acode_asrc_agack_agack.gs# b/code/src/gack/#_ascpx_blogin3.mcs.anl.gov_b_ahomes_awozniak_aproj_ags.git_acode_asrc_agack_agack.gs#
new file mode 100644
index 0000000..232742a
--- /dev/null
+++ b/code/src/gack/#_ascpx_blogin3.mcs.anl.gov_b_ahomes_awozniak_aproj_ags.git_acode_asrc_agack_agack.gs#
@@ -0,0 +1,3 @@
+
+#include <gack.gsh>
+
diff --git a/code/src/gack/gack.gs b/code/src/gack/gack.gs
new file mode 100644
index 0000000..cf31cba
--- /dev/null
+++ b/code/src/gack/gack.gs
@@ -0,0 +1,56 @@
+
+#include <gack.gsh>
+
+void
+gack_init(gobs_impl impl, MPI_Comm comm)
+{}
+
+gack_sack*
+gack_allocate()
+{
+ gack_sack* result;
+
+ int i,j,k,n;
+ gobs_id range;
+ gobs_id offset;
+
+ result = malloc(sizeof(gack_sack));
+
+ n = gobs_size();
+
+ result->size = n;
+ result->id = malloc(n*sizeof(gobs_id));
+
+ offset = rand_lt(GOBS_LIMIT);
+
+ range = GOBS_LIMIT/n;
+ j = -offset/range;
+ k = -j;
+ for (i = 0; i < n; i++)
+ {
+ result->id[k] = offset + range*j;
+ j++;
+ k = (k+1) % n;
+ }
+
+ return result;
+}
+
+gobs_id
+gack_file()
+{
+ return rand_lt(100);
+}
+
+void
+gack_printf_sack(gack_sack* sack)
+{
+ int i;
+
+ printf("sack: (%i) {", sack->size);
+ for (i = 0; i < sack->size-1; i++)
+ {
+ printf("%i ", sack->id[i]);
+ }
+ printf("%i}\n", sack->id[i]);
+}
diff --git a/code/src/gum/module.mk.in b/code/src/gack/module.mk.in
similarity index 50%
copy from code/src/gum/module.mk.in
copy to code/src/gack/module.mk.in
index 065d4a8..007623f 100644
--- a/code/src/gum/module.mk.in
+++ b/code/src/gack/module.mk.in
@@ -1,10 +1,10 @@
-# GUM
+# GACK
-DIR := src/gum
+DIR := src/gack
-GUM_GSSRC += $(shell cd @SRC_ABSOLUTE_TOP@; find $(DIR) -name "*.gs" )
-GUM_OBJS = $(patsubst %.gs, %.o, $(GUM_GSSRC))
+GACK_GSSRC += $(shell cd @SRC_ABSOLUTE_TOP@; find $(DIR) -name "*.gs" )
+GACK_OBJS := $(patsubst %.gs, %.o, $(GACK_GSSRC))
#src/gum/gum.o: src/gum/gum.gs src/include/gum.gsh $(GSCC)
# $(Q) " GSCC $(@)"
diff --git a/code/src/gobs/ait.gs b/code/src/gobs/ait.gs
new file mode 100644
index 0000000..00cf71a
--- /dev/null
+++ b/code/src/gobs/ait.gs
@@ -0,0 +1,72 @@
+
+#include <ait.gsh>
+
+void
+ait_create()
+{
+ gobs.ait_create();
+}
+
+ait_iterator*
+ait_get_iterator()
+{
+ ait_iterator* result;
+
+ result = gobs.ait_iterator();
+
+ return result;
+}
+
+ait_entry*
+ait_lookup(gobs_id id)
+{
+ return gobs.ait_lookup(id);
+}
+
+__blocking int
+handle_ait_fetch(gum_node caller, gum_msg* call)
+{
+ gum_msg response;
+
+ ait_iterator* iterator;
+ ait_entry* entry;
+
+ char* result;
+ char* p;
+
+ result = malloc(gobs.ait_size()*100);
+
+ iterator = ait_get_iterator();
+
+ p = result;
+ p += sprintf(p, "%i ", gobs.ait_size());
+ while ((entry = gobs.ait_iterator_next(iterator)) != NULL)
+ {
+ p += sprintf(p, "%i ", entry->node.rank);
+ }
+
+ response.unique = flip2(call->unique);
+ response.data = result;
+ response.length = strlen(result);
+
+ gum_return(caller, &response);
+
+ return 1;
+}
+
+__blocking int
+gobs_ait_pull(gum_node target)
+{
+ gum_msg* msg;
+ gum_msg* response;
+
+ char args[8];
+
+ strcpy(args, "");
+ msg = gum_msg_build(AIT_FETCH, args, 8);
+ gum_call(target, msg, &response);
+
+ printf("gobs_ait_pull(): %s\n", response->data);
+
+ return 1;
+}
diff --git a/code/src/gobs/dense/dense.gs b/code/src/gobs/dense/dense.gs
index 9530513..6c65669 100644
--- a/code/src/gobs/dense/dense.gs
+++ b/code/src/gobs/dense/dense.gs
@@ -1,12 +1,91 @@
#include <gobs_dense.h>
+ait_entry* gobs_dense_ait;
+int gobs_dense_ait_size;
+
void
gobs_dense_setup(MPI_Comm comm)
{
self.comm = comm;
MPI_Comm_rank(self.comm, &self.rank);
MPI_Comm_size(self.comm, &mpi_size);
+
+ gobs_dense_ait_create();
+
+ gobs.ait_iterator = gobs_dense_get_iterator;
+ gobs.ait_size = gobs_dense_ait_get_size;
+ gobs.ait_lookup = gobs_dense_ait_lookup;
+ gobs.ait_iterator_next = gobs_dense_iterator_next;
+}
+
+void
+gobs_dense_ait_create()
+{
+ gobs_dense_ait = malloc(mpi_size*sizeof(ait_entry));
+ gobs_dense_ait_size = mpi_size;
+}
+
+int
+gobs_dense_ait_get_size()
+{
+ return gobs_dense_ait_size;
+}
+
+ait_entry*
+gobs_dense_ait_lookup(gobs_id id)
+{
+ gum_node node;
+
+ node = gobs_lookup(id);
+
+ return &(gobs_dense_ait[node.rank]);
+}
+
+ait_iterator*
+gobs_dense_get_iterator()
+{
+ ait_iterator* result;
+ gobs_dense_iterator* dense_iterator;
+ ait_entry* table;
+ int i;
+
+ result = malloc(sizeof(ait_iterator));
+
+ result->type = AIT_TYPE_DENSE;
+
+ result->content = malloc(sizeof(gobs_dense_iterator));
+ dense_iterator = result->content;
+
+ dense_iterator->index = -1;
+ dense_iterator->table = malloc(mpi_size*sizeof(ait_entry));
+
+ table = dense_iterator->table;
+ for (i = 0; i < mpi_size; i++)
+ {
+ table[i].node.rank = i;
+ table[i].node.comm = self.comm;
+ table[i].status = AIT_STATUS_UP;
+ table[i].attrib = klist_create();
+ }
+
+ return result;
+}
+
+ait_entry*
+gobs_dense_iterator_next(ait_iterator* iterator)
+{
+ gobs_dense_iterator* dense_iterator;
+
+ dense_iterator = iterator->content;
+ dense_iterator->index++;
+
+ if (dense_iterator->index >= mpi_size)
+ {
+ return NULL;
+ }
+
+ return &(dense_iterator->table[dense_iterator->index]);
}
/**
@@ -67,6 +146,12 @@ gobs_lookup(gobs_id id)
return node;
}
+int
+gobs_size()
+{
+ return mpi_size;
+}
+
__blocking int
gobs_store(gum_node target, gobs_id id,
char* data, int length)
@@ -114,61 +199,6 @@ handle_store(gum_node caller, gum_msg* msg)
return 1;
}
-__blocking int
-gobs_write(gum_node target, gobs_id id,
- char* data, int count, int offset)
-{
- gum_msg* msg;
- gum_msg* response;
-
- char args[64];
-
- sprintf(args, "%i %i %i", id, count, offset);
- msg = gum_msg_build(GOBS_WRITE, args, strlen(args)+1);
-
- gum_call(target, msg, &response);
-
- gs_mpi_send(data, count, MPI_CHAR, target.rank,
- response->unique, target.comm);
-
- return 1;
-}
-
-__blocking int
-handle_write(gum_node caller, gum_msg* msg)
-{
- MPI_Status status;
- gum_msg response;
- gobs_id id;
- int count;
- int offset;
- char* object;
- char* data;
-
- sscanf(msg->data, "%i %i %i", &id, &count, &offset);
-
- gossip_debug(MASK_STORAGE, "handle_write(%i,%i,%i)\n",
- id, count, offset);
-
- response.unique = flip2(msg->unique);
- response.data = malloc(1);
- response.data[0] = '\0';
- response.length = 1;
-
- gum_return(caller, &response);
-
- data = malloc(GUM_MSG_MAX);
- gs_mpi_recv(data, GUM_MSG_MAX, MPI_CHAR, caller.rank,
- response.unique, caller.comm, &status);
-
- printdata("handle_write(): data: ", data, count);
-
- object = itable_search(gobs_cache, id);
- memcpy(object+offset, data, count);
-
- return 1;
-}
-
/**
@param data OUT Must be allocated GUM_MSG_MAX bytes.
*/
@@ -219,65 +249,6 @@ handle_retrieve(gum_node caller, gum_msg* msg)
}
__blocking int
-gobs_read(gum_node target, gobs_id id,
- char* data, int count, int offset)
-{
- MPI_Status status;
- gum_msg* msg;
- gum_msg* response;
-
- char args[64];
-
- sprintf(args, "%i %i %i", id, count, offset);
- msg = gum_msg_build(GOBS_READ, args, strlen(args)+1);
-
- gossip_debug(MASK_STORAGE, "gobs_read(%i,%i,%i)\n",
- id, count, offset);
-
- gum_call(target, msg, &response);
-
- gs_mpi_recv(data, count, MPI_CHAR, target.rank,
- response->unique, target.comm, &status);
-
- return 1;
-}
-
-__blocking int
-handle_read(gum_node caller, gum_msg* msg)
-{
- gum_msg response;
- gobs_id id;
- int count;
- int offset;
- char* object;
- char* data;
-
- sscanf(msg->data, "%i %i %i", &id, &count, &offset);
-
- gossip_debug(MASK_STORAGE, "handle_read(%i,%i,%i)\n",
- id, count, offset);
-
- response.unique = flip2(msg->unique);
- response.data = malloc(1);
- response.data[0] = '\0';
- response.length = 1;
-
- gum_return(caller, &response);
-
- data = itable_search(gobs_cache, id);
-
- gs_mpi_send(data+offset, count, MPI_CHAR, caller.rank,
- response.unique, caller.comm);
-
- // printdata("handle_read(): data: ", data, count);
-
- object = itable_search(gobs_cache, id);
- memcpy(object+offset, data, count);
-
- return 1;
-}
-
-__blocking int
gobs_quit(gum_node target)
{
gum_msg* msg;
diff --git a/code/src/gobs/gobs.gs b/code/src/gobs/gobs.gs
index 60403fc..c07aed3 100644
--- a/code/src/gobs/gobs.gs
+++ b/code/src/gobs/gobs.gs
@@ -11,6 +11,9 @@ int mpi_size;
struct itable* gobs_cache;
+gobs_fns gobs;
+gobs_id GOBS_LIMIT;
+
void
gobs_init(gobs_impl impl, MPI_Comm comm)
{
@@ -22,7 +25,9 @@ gobs_init(gobs_impl impl, MPI_Comm comm)
MPI_Comm_rank(gobs_comm, &mpi_rank);
MPI_Comm_size(gobs_comm, &mpi_size);
- gobs_cache = itable_create(10);
+ gobs_cache = itable_create(10);
+
+ GOBS_LIMIT = INT_MAX;
}
/**
@@ -107,7 +112,7 @@ gobs_response(MPI_Comm comm)
}
else if (idx == GOBS_ALLOCATE)
{
- handle_allocate(caller, &call);
+ // handle_allocate(caller, &call);
}
else if (idx == GOBS_STORE)
{
@@ -125,13 +130,16 @@ gobs_response(MPI_Comm comm)
{
handle_retrieve(caller, &call);
}
+ // AIT OPERATIONS:
+ else if (idx == AIT_FETCH)
+ {
+ handle_ait_fetch(caller, &call);
+ }
// FS OPERATIONS:
- /*
else if (idx == GOBS_OPEN)
{
handle_open(caller, &call);
}
- */
else if (idx == GOBS_MKFS)
{
handle_mkfs(caller, &call);
@@ -166,13 +174,9 @@ gobs_response(MPI_Comm comm)
{
handle_link_file(caller, &call);
}
- else if (idx == GOBS_LINK_BLOB)
- {
- handle_link_blob(caller, &call);
- }
else if (idx == GOBS_BLOB_IDS)
{
- handle_blob_ids(caller, &call);
+ // handle_blob_ids(caller, &call);
}
else if (idx == GOBS_QUIT)
{
@@ -186,3 +190,135 @@ gobs_response(MPI_Comm comm)
return 0;
}
+
+
+__blocking int
+gobs_write(gum_node target, gobs_id id,
+ char* data, int count, int offset)
+{
+ gum_msg* msg;
+ gum_msg* response;
+
+ char args[64];
+
+ sprintf(args, "%i %i %i", id, count, offset);
+ msg = gum_msg_build(GOBS_WRITE, args, strlen(args)+1);
+
+ gum_call(target, msg, &response);
+
+ gs_mpi_send(data, count, MPI_CHAR, target.rank,
+ response->unique, target.comm);
+
+ return 1;
+}
+
+__blocking int
+handle_write(gum_node caller, gum_msg* msg)
+{
+ MPI_Status status;
+ gum_msg response;
+ gobs_id id;
+ int count;
+ int offset;
+
+ skullfs_object* object;
+ skullfs_blob* blob;
+ char* tmp;
+ char* data;
+
+ sscanf(msg->data, "%i %i %i", &id, &count, &offset);
+
+ gossip_debug(MASK_STORAGE, "handle_write(%i,%i,%i)\n",
+ id, count, offset);
+
+ response.unique = flip2(msg->unique);
+ response.data = malloc(1);
+ response.data[0] = '\0';
+ response.length = 1;
+
+ gum_return(caller, &response);
+
+ data = malloc(GUM_MSG_MAX);
+ gs_mpi_recv(data, GUM_MSG_MAX, MPI_CHAR, caller.rank,
+ response.unique, caller.comm, &status);
+
+ // printdata("handle_write(): data: ", data, count);
+
+ object = itable_search(gobs_cache, id);
+ blob = object->contents;
+
+ if (blob->size < offset+count)
+ {
+ tmp = realloc(blob->data, offset+count);
+ blob->data = tmp;
+ blob->size = offset+count;
+ }
+
+ memcpy(blob->data+offset, data, count);
+
+ return 1;
+}
+
+__blocking int
+gobs_read(gum_node target, gobs_id id,
+ char* data, int count, int offset)
+{
+ MPI_Status status;
+ gum_msg* msg;
+ gum_msg* response;
+
+ char args[64];
+
+ sprintf(args, "%i %i %i", id, count, offset);
+ msg = gum_msg_build(GOBS_READ, args, strlen(args)+1);
+
+ gossip_debug(MASK_STORAGE, "gobs_read(%i,%i,%i)\n",
+ id, count, offset);
+
+ gum_call(target, msg, &response);
+
+ gs_mpi_recv(data, count, MPI_CHAR, target.rank,
+ response->unique, target.comm, &status);
+
+ return 1;
+}
+
+__blocking int
+handle_read(gum_node caller, gum_msg* msg)
+{
+ gum_msg response;
+ gobs_id id;
+
+ int count;
+ int offset;
+
+ skullfs_object* object;
+ skullfs_blob* blob;
+
+ char* data;
+
+ sscanf(msg->data, "%i %i %i", &id, &count, &offset);
+
+ gossip_debug(MASK_STORAGE, "handle_read(%i,%i,%i)\n",
+ id, count, offset);
+
+ response.unique = flip2(msg->unique);
+ response.data = malloc(1);
+ response.data[0] = '\0';
+ response.length = 1;
+
+ gum_return(caller, &response);
+
+ object = itable_search(gobs_cache, id);
+ blob = object->contents;
+ data = blob->data;
+
+ gs_mpi_send(data+offset, count, MPI_CHAR, caller.rank,
+ response.unique, caller.comm);
+
+ gossip_do(MASK_FS, printdata("handle_read(): data: ",
+ data, count));
+
+ return 1;
+}
+
diff --git a/code/src/gobs/interpreter.gs b/code/src/gobs/interpreter.gs
deleted file mode 100644
index 996c5d2..0000000
--- a/code/src/gobs/interpreter.gs
+++ /dev/null
@@ -1,8 +0,0 @@
-
-#include <interpreter.gsh>
-
-int
-handle_open(gum_node caller, gum_msg* call)
-{
- return 0;
-}
diff --git a/code/src/gobs/launch.gs b/code/src/gobs/launch.gs
index 4cf37fb..fb04666 100644
--- a/code/src/gobs/launch.gs
+++ b/code/src/gobs/launch.gs
@@ -13,6 +13,8 @@ int gobs_layout_clients;
char dmalloc_mpi_logpath[128];
+bool gobs_using_gdb;
+
gs_ret_t bootstrap_post(void (f)(void*,int),
void*, gs_hints_t,
gs_context_t, gs_op_id_t*);
@@ -65,7 +67,7 @@ gdb_startup(void)
fflush(stdout);
- // if (mpi_rank == 0)
+ if (mpi_rank == 0)
while (!gdb_wait);
}
diff --git a/code/src/gobs/module.mk.in b/code/src/gobs/module.mk.in
index 8ac30b7..42cd261 100644
--- a/code/src/gobs/module.mk.in
+++ b/code/src/gobs/module.mk.in
@@ -8,11 +8,11 @@ GOBS_ADTS += src/adts/hashtable.c
GOBS_ADTS += src/adts/ilist.c
GOBS_ADTS += src/adts/klist.c
-GOBS_GSSRC := src/gobs/client.gs src/gobs/storage.gs src/skullfs/skullfs.o src/gobs/dense/dense.gs src/gobs/gobs.gs
-# src/gobs/table.gs
+GOBS_GSSRC := src/gobs/client.gs src/gobs/storage.gs src/gobs/ait.gs src/skullfs/skullfs.o src/gobs/dense/dense.gs src/gobs/gobs.gs
# $(shell cd @SRC_ABSOLUTE_TOP@; find $(DIR) -name "*.gs" )
-GOBS_OBJS := $(patsubst %.gs, %.o, $(GOBS_GSSRC)) $(patsubst %.c, %.o, $(GOBS_ADTS)) src/mpi_tools/mpi_tools.o src/common/gossip/gossip.o
+# SKULLFS and GACK only necessary until we get function pointers working
+GOBS_OBJS := $(patsubst %.gs, %.o, $(GOBS_GSSRC)) $(patsubst %.c, %.o, $(GOBS_ADTS)) src/mpi_tools/mpi_tools.o src/common/gossip/gossip.o src/skullfs/skullfs.o src/skullfs/handlers.o src/skullfs/rpcs.o src/gack/gack.o
# $(GUM_OBJS)
diff --git a/code/src/include/ait.gsh b/code/src/include/ait.gsh
new file mode 100644
index 0000000..80b3080
--- /dev/null
+++ b/code/src/include/ait.gsh
@@ -0,0 +1,12 @@
+
+#ifndef AIT_GSH
+#define AIT_GSH
+
+#include <ait_types.gsh>
+#include <gobs.gsh>
+
+void gobs_neighbor_down(gum_node node);
+
+void gobs_neighbor_up(gum_node node);
+
+#endif
diff --git a/code/src/include/ait_types.gsh b/code/src/include/ait_types.gsh
new file mode 100644
index 0000000..0109b47
--- /dev/null
+++ b/code/src/include/ait_types.gsh
@@ -0,0 +1,33 @@
+
+#ifndef AIT_TYPES_GSH
+#define AIT_TYPES_GSH
+
+#include <gum.gsh>
+
+typedef enum
+{
+ AIT_STATUS_PROTO,
+ AIT_STATUS_UP,
+ AIT_STATUS_DOWN
+} ait_status;
+
+typedef enum
+{
+ AIT_TYPE_DENSE,
+ AIT_TYPE_KDA
+} ait_type;
+
+typedef struct
+{
+ gum_node node;
+ ait_status status;
+ struct klist* attrib;
+} ait_entry;
+
+typedef struct
+{
+ ait_type type;
+ void* content;
+} ait_iterator;
+
+#endif
diff --git a/code/src/include/gack.gsh b/code/src/include/gack.gsh
new file mode 100644
index 0000000..486f7de
--- /dev/null
+++ b/code/src/include/gack.gsh
@@ -0,0 +1,29 @@
+
+/**
+ GACK: Grayskull Allocation Controller
+*/
+
+#ifndef GACK_GSH
+#define GACK_GSH
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include <mpi.h>
+
+#include <include/gs.h>
+#include <resources/mpi/gs-mpi.gsh>
+
+#include <gack_types.gsh>
+#include <gobs.gsh>
+
+void gack_init(gobs_impl impl, MPI_Comm comm);
+
+gobs_id gack_file();
+
+gack_sack* gack_allocate();
+
+void gack_printf_sack(gack_sack* sack);
+
+#endif
diff --git a/code/src/include/gack_types.gsh b/code/src/include/gack_types.gsh
new file mode 100644
index 0000000..5964c6e
--- /dev/null
+++ b/code/src/include/gack_types.gsh
@@ -0,0 +1,13 @@
+
+#ifndef GACK_TYPES_GSH
+#define GACK_TYPES_GSH
+
+#include <gobs_types.gsh>
+
+typedef struct
+{
+ int size;
+ gobs_id* id;
+} gack_sack;
+
+#endif
diff --git a/code/src/include/gobs.gsh b/code/src/include/gobs.gsh
index a5fc0d9..59b6bcf 100644
--- a/code/src/include/gobs.gsh
+++ b/code/src/include/gobs.gsh
@@ -6,6 +6,7 @@
#ifndef GOBS_GSH
#define GOBS_GSH
+#include <limits.h>
#include <stdbool.h>
#include <stdio.h>
#include <unistd.h>
@@ -16,21 +17,59 @@
#include <resources/mpi/gs-mpi.gsh>
#include <gobs_types.gsh>
+#include <ait.gsh>
#include <skullfs.gsh>
#include <skullfs_handlers.gsh>
// #warning GOBS.GSH
-bool gobs_using_gdb;
+// extern bool gobs_using_gdb;
+extern gobs_id GOBS_LIMIT;
+extern int mpi_rank;
+extern bool gobs_running;
+extern gum_node self;
+extern int mpi_size;
+// extern gobs_impl gobs_current_impl;
+
+//// Client section:
+
+__blocking int gobs_query(gum_node target, gobs_id id,
+ gum_node* node);
+
+__blocking int gobs_store(gum_node target, gobs_id id,
+ char* data, int length);
+
+__blocking int gobs_write(gum_node node, gobs_id id,
+ char* data, int count, int offset);
+
+__blocking int gobs_retrieve(gum_node target, gobs_id id,
+ char* data);
+
+__blocking int gobs_read(gum_node node, gobs_id id,
+ char* data, int count, int offset);
+
+__blocking int gobs_client_code();
+
+gum_node gobs_lookup(gobs_id id);
+
+__blocking int gobs_ait_pull(gum_node node);
+
+//// Server section:
-/*
typedef struct
{
void (*setup)(MPI_Comm comm);
gum_node (*lookup)(gobs_id id);
- gum_node (*query)(gum_node target, gobs_id id);
+ gum_node (*query)(gum_node target, gobs_id id);
+
+ void (*ait_create)();
+ ait_iterator* (*ait_iterator)(void);
+ ait_entry* (*ait_iterator_next)(ait_iterator*);
+ int (*ait_size)();
+ ait_entry* (*ait_lookup)(gobs_id id);
} gobs_fns;
-*/
+
+extern gobs_fns gobs;
void gobs_init(gobs_impl impl, MPI_Comm comm);
@@ -46,25 +85,6 @@ __blocking int gobs_ping(gum_node target);
__blocking int gobs_response(MPI_Comm comm);
-gum_node gobs_lookup(gobs_id id);
-
-// #warning GOBS_QUERY
-
-__blocking int gobs_query(gum_node target, gobs_id id,
- gum_node* node);
-
-__blocking int gobs_store(gum_node target, gobs_id id,
- char* data, int length);
-
-__blocking int gobs_write(gum_node node, gobs_id blob_id,
- char* data, int count, int offset);
-
-__blocking int gobs_retrieve(gum_node target, gobs_id id,
- char* data);
-
-__blocking int gobs_read(gum_node node, gobs_id blob_id,
- char* data, int count, int offset);
-
__blocking int gobs_quit(gum_node target);
__blocking int handle_query(gum_node caller, gum_msg* call);
@@ -79,9 +99,9 @@ __blocking int handle_read(gum_node caller, gum_msg* call);
__blocking int handle_lookup(gum_node caller, gum_msg* call);
-__blocking int handle_quit(gum_node caller, gum_msg* call);
+__blocking int handle_ait_fetch(gum_node caller, gum_msg* call);
-__blocking int gobs_client_code();
+__blocking int handle_quit(gum_node caller, gum_msg* call);
__blocking int gobs_all_quit();
diff --git a/code/src/include/gobs_dense.h b/code/src/include/gobs_dense.h
index 7a84818..4d0e253 100644
--- a/code/src/include/gobs_dense.h
+++ b/code/src/include/gobs_dense.h
@@ -4,11 +4,29 @@
#include <gobs.gsh>
+typedef struct
+{
+ int index;
+ ait_entry* table;
+} gobs_dense_iterator;
+
// extern gobs_fns gobs_dense_impl;
+extern ait_entry* gobs_dense_ait;
+extern int gobs_dense_ait_size;
void gobs_dense_setup(MPI_Comm comm);
+void gobs_dense_ait_create();
+
+int gobs_dense_ait_get_size();
+
+ait_iterator* gobs_dense_get_iterator();
+
+ait_entry* gobs_dense_iterator_next(ait_iterator* iterator);
+
+ait_entry* gobs_dense_ait_lookup(gobs_id id);
+
/*
gum_node gobs_dense_lookup(gobs_id id);
diff --git a/code/src/include/gobs_types.gsh b/code/src/include/gobs_types.gsh
index ac59c73..1e3a4b1 100644
--- a/code/src/include/gobs_types.gsh
+++ b/code/src/include/gobs_types.gsh
@@ -41,13 +41,11 @@ typedef enum
GOBS_LINK_FILE, // 15
GOBS_LINK_BLOB,
GOBS_BLOB_IDS,
- GOBS_QUIT
-} gobs_fns;
-extern int mpi_rank;
-extern bool gobs_running;
-extern gum_node self;
-extern int mpi_size;
-extern gobs_fns gobs;
+ AIT_FETCH,
+ AIT_HASH,
+
+ GOBS_QUIT
+} gobs_code;
#endif
diff --git a/code/src/include/gum.gsh b/code/src/include/gum.gsh
index 18e878f..bec5ee1 100644
--- a/code/src/include/gum.gsh
+++ b/code/src/include/gum.gsh
@@ -72,15 +72,15 @@ void gum_register(char* name, gum_proc procedure);
gum_proc_idx gum_procedure_create(char* name);
void gum_pack(gum_msg* msg);
-int gum_call(gum_node target, gum_msg* msg, gum_msg** response);
+// int gum_call(gum_node target, gum_msg* msg, gum_msg** response);
__blocking int gum_call(gum_node target,
gum_msg* msg, gum_msg** response);
__blocking int gum_response();
-int gum_recv(gum_node target, int tag, gum_proc_idx* idx,
- int* unique, int* length, char* data);
+/* int gum_recv(gum_node target, int tag, gum_proc_idx* idx,
+ int* unique, int* length, char* data); */
__blocking int gum_recv(gum_node target, int tag, gum_proc_idx* idx,
int* unique, int* length, char* data);
diff --git a/code/src/include/interpreter.gsh b/code/src/include/interpreter.gsh
deleted file mode 100644
index a45d124..0000000
--- a/code/src/include/interpreter.gsh
+++ /dev/null
@@ -1,32 +0,0 @@
-
-/**
- INTERPRETER: Translate FS operations into GOBS operations.
-*/
-
-#ifndef INTERPRETER_GSH
-#define INTERPRETER_GSH
-
-#include <linux/limits.h>
-
-#include <gobs.gsh>
-
-#define SKULLFS_BLOB_SIZE 4
-
-typedef enum
-{
- SKULLFS_DIRECTORY,
- SKULLFS_FILE,
- SKULLFS_BLOB
-} skullfs_object_type;
-
-typedef struct
-{
- skullfs_object_type type;
- void* contents;
-} skullfs_object;
-
-int skullfs_split_path(char* path, char** ptrs, int* lengths);
-
-int handle_open(gum_node caller, gum_msg* call);
-
-#endif
diff --git a/code/src/include/skullfs.gsh b/code/src/include/skullfs.gsh
index e040019..e2d5ec4 100644
--- a/code/src/include/skullfs.gsh
+++ b/code/src/include/skullfs.gsh
@@ -8,7 +8,7 @@
#include <linux/limits.h>
-#include <gobs.gsh>
+#include <gack.gsh>
#include <skullfs_rpcs.gsh>
#define SKULLFS_BLOB_SIZE 4
@@ -26,6 +26,17 @@ typedef struct
void* contents;
} skullfs_object;
+typedef struct
+{
+ gack_sack* sack;
+} skullfs_file;
+
+typedef struct
+{
+ long size;
+ char* data;
+} skullfs_blob;
+
int skullfs_split_path(char* path, char** ptrs, int* lengths);
int skullfs_serialize_directory(int count, char** names, int* ids,
@@ -44,7 +55,7 @@ int skullfs_link_blob(gobs_id file_id, gobs_id blob_id,
int skullfs_create_blob(gobs_id blob_id);
-int skullfs_create_file(gobs_id file_id);
+int skullfs_create_file(gobs_id file_id, gack_sack* sack);
int skullfs_link_file(gobs_id directory_id, gobs_id file_id,
char* name);
diff --git a/code/src/include/skullfs_client.gsh b/code/src/include/skullfs_client.gsh
index aeec54f..77af776 100644
--- a/code/src/include/skullfs_client.gsh
+++ b/code/src/include/skullfs_client.gsh
@@ -5,9 +5,16 @@
#include <linux/limits.h>
#include <gobs.gsh>
+#include <gack_types.gsh>
// __blocking gobs_id skull_lookup(gum_node target, char* path);
+typedef struct
+{
+ gobs_id id;
+ gack_sack sack;
+} skullfs_fd;
+
__blocking int skullfs_mkfs(gum_node target, gobs_id* root_id);
__blocking int skullfs_mkdir(gum_node target,
@@ -20,10 +27,13 @@ __blocking int skullfs_ls(gum_node target, gobs_id directory_id,
__blocking int skullfs_create(gum_node target, gobs_id directory_id,
char* name, gobs_id* file_id);
-__blocking int skullfs_pwrite(gum_node target, gobs_id file,
+__blocking int skullfs_open(gum_node target, gobs_id file,
+ skullfs_fd* fd);
+
+__blocking int skullfs_pwrite(gum_node target, skullfs_fd* file,
void* data, int count, int offset);
-__blocking int skullfs_pread(gum_node target, gobs_id file,
+__blocking int skullfs_pread(gum_node target, skullfs_fd* file,
void* data, int count, int offset);
__blocking int skullfs_fallocate(gum_node target, gobs_id file_id,
diff --git a/code/src/include/skullfs_handlers.gsh b/code/src/include/skullfs_handlers.gsh
index 7ec3db8..f4458ff 100644
--- a/code/src/include/skullfs_handlers.gsh
+++ b/code/src/include/skullfs_handlers.gsh
@@ -32,4 +32,6 @@ __blocking int handle_blob_ids(gum_node caller, gum_msg* call);
__blocking int handle_allocate(gum_node caller, gum_msg* call);
+__blocking int handle_open(gum_node caller, gum_msg* call);
+
#endif
diff --git a/code/src/include/skullfs_rpcs.gsh b/code/src/include/skullfs_rpcs.gsh
index 2ae6337..f2eb81a 100644
--- a/code/src/include/skullfs_rpcs.gsh
+++ b/code/src/include/skullfs_rpcs.gsh
@@ -10,9 +10,9 @@
__blocking int rpc_create_blob(gobs_location* blob);
-__blocking int rpc_create_file(gobs_location* file);
+__blocking int rpc_create_file(gobs_location* file, gack_sack* sack);
-__blocking int rpc_link_blob(gobs_location file, gobs_location blob);
+// __blocking int rpc_link_blob(gobs_location file, gobs_location blob);
__blocking int rpc_link_file(gobs_location directory,
gobs_location file, char* filename);
diff --git a/code/src/skullfs/client.gs b/code/src/skullfs/client.gs
index b98f55b..d5550c7 100644
--- a/code/src/skullfs/client.gs
+++ b/code/src/skullfs/client.gs
@@ -15,33 +15,10 @@ skull_init(MPI_Comm comm, struct ilist* contacts)
}
*/
-/*
-skull_file*
-skull_open(char* name)
-{
- skull_file* result;
- int rank;
- gum_node target;
- gum_msg* msg;
- gum_msg* response;
-
- result = malloc(sizeof(skull_file));
- strcpy(result->name, name);
-
- target.rank = ilist_random(skull_contacts);
- target.comm = skull_comm;
- msg = gum_msg_build(GOBS_OPEN, name, strlen(name)+1);
- gum_call(target, msg, &response);
- sscanf(response->data, "%i", result->id);
-
- return result;
-}
-*/
-
/**
@param root_id OUT The gobs_id of the root directory object.
*/
-__blocking gobs_id
+__blocking int
skullfs_mkfs(gum_node target, gobs_id* root_id)
{
gobs_id result;
@@ -159,13 +136,49 @@ skullfs_create(gum_node target, gobs_id directory_id, char* name,
}
__blocking int
-skullfs_pwrite(gum_node target, gobs_id file_id,
+skullfs_open(gum_node target, gobs_id file, skullfs_fd* fd)
+{
+ gum_node recipient;
+ gum_msg* msg;
+ gum_msg* response;
+
+ char args[32];
+ char* p;
+ int i,n;
+
+ sprintf(args, "%i", file);
+
+ gobs_query(target, file, &recipient);
+ msg = gum_msg_build(GOBS_OPEN, args, strlen(args)+1);
+ gum_call(recipient, msg, &response);
+
+ p = response->data;
+ sscanf(p, "%i %n", &(fd->sack.size), &n);
+ p += n;
+
+ fd->sack.id = malloc(fd->sack.size * sizeof(gobs_id));
+ for (i = 0; i < fd->sack.size; i++)
+ {
+ sscanf(p, "%i %n", &(fd->sack.id[i]), &n);
+ p += n;
+ }
+
+ return 1;
+
+}
+
+__blocking int
+skullfs_pwrite(gum_node target, skullfs_fd* fd,
void* data, int count, int offset)
{
+ gack_sack sack;
+ int current;
+ int wraps;
+
// Number of first blob:
int first;
// Number of blobs:
- int blobs;
+ int total;
// Blob number:
int i;
// Helper indices into data:
@@ -173,32 +186,39 @@ skullfs_pwrite(gum_node target, gobs_id file_id,
// Moving pointer into data:
void* p;
- gobs_id* blob_ids;
-
- first = offset/SKULLFS_BLOB_SIZE;
- blobs = count/SKULLFS_BLOB_SIZE + 1;
+ sack = fd->sack;
- blob_ids = malloc(blobs*sizeof(gobs_id));
+ first = (offset/SKULLFS_BLOB_SIZE) % sack.size;
+ wraps = offset/(SKULLFS_BLOB_SIZE*sack.size);
+ total = count/SKULLFS_BLOB_SIZE + 1;
- skullfs_fallocate(target, file_id, first, blobs, blob_ids);
-
p = data;
-
+
// Write first partial blob...
+ current = first;
r = offset % SKULLFS_BLOB_SIZE;
l = SKULLFS_BLOB_SIZE-r;
- skullfs_pwrite_blob(target, blob_ids[0], p, l, r);
+ skullfs_pwrite_blob(target, sack.id[current], p, l, r);
p += l;
- // Write whole blobs:
- for (i = 1; i < blobs-1; i++)
+ // Write whole blobs:
+ for (i = 1; i < total-1; i++)
{
- skullfs_pwrite_blob(target, blob_ids[i], p, SKULLFS_BLOB_SIZE, 0);
+ current = current+1 % sack.size;
+ if (current == 0)
+ wraps++;
+ skullfs_pwrite_blob(target, sack.id[current], p,
+ SKULLFS_BLOB_SIZE, wraps*SKULLFS_BLOB_SIZE);
+ p += SKULLFS_BLOB_SIZE;
}
// Write last partial blob...
+ current = current+1 % sack.size;
+ if (current == 0)
+ wraps++;
l = count % SKULLFS_BLOB_SIZE;
- skullfs_pwrite_blob(target, blob_ids[i], p, l, 0);
+ skullfs_pwrite_blob(target, sack.id[current], p, l,
+ wraps*SKULLFS_BLOB_SIZE);
return 1;
}
@@ -208,6 +228,7 @@ skullfs_pwrite(gum_node target, gobs_id file_id,
Create blobs if necessary.
@param blobs_ids OUT The resulting blob ids.
*/
+/*
__blocking int
skullfs_fallocate(gum_node target, gobs_id file_id,
int first, int blobs, gobs_id* blob_ids)
@@ -239,11 +260,13 @@ skullfs_fallocate(gum_node target, gobs_id file_id,
return 1;
}
+*/
/**
Find all the blobs for this file.
@param blobs_ids OUT The resulting blob ids.
*/
+/*
__blocking int
skullfs_blob_ids(gum_node target, gobs_id file_id,
int first, int blobs, gobs_id* blob_ids)
@@ -278,6 +301,7 @@ skullfs_blob_ids(gum_node target, gobs_id file_id,
return 1;
}
+*/
__blocking int
skullfs_pwrite_blob(gum_node target, gobs_id blob_id,
@@ -296,13 +320,17 @@ skullfs_pwrite_blob(gum_node target, gobs_id blob_id,
}
__blocking int
-skullfs_pread(gum_node target, gobs_id file_id,
+skullfs_pread(gum_node target, skullfs_fd* fd,
void* data, int count, int offset)
{
+ gack_sack sack;
+ int current;
+ int wraps;
+
// Number of first blob:
int first;
// Number of blobs:
- int blobs;
+ int total;
// Blob number:
int i;
// Helper indices into data:
@@ -310,33 +338,39 @@ skullfs_pread(gum_node target, gobs_id file_id,
// Moving pointer into data:
void* p;
- gobs_id* blob_ids;
-
- first = offset/SKULLFS_BLOB_SIZE;
- blobs = count/SKULLFS_BLOB_SIZE + 1;
+ sack = fd->sack;
+
+ first = (offset/SKULLFS_BLOB_SIZE) % sack.size;
+ wraps = offset/(SKULLFS_BLOB_SIZE*sack.size);
+ total = count/SKULLFS_BLOB_SIZE + 1;
- blob_ids = malloc(blobs*sizeof(gobs_id));
-
- skullfs_blob_ids(target, file_id, first, blobs, blob_ids);
-
p = data;
-
- // Write first partial object...
+
+ // Read first partial blob...
+ current = first;
r = offset % SKULLFS_BLOB_SIZE;
l = SKULLFS_BLOB_SIZE-r;
- skullfs_pread_blob(target, blob_ids[0], p, l, r);
+ skullfs_pread_blob(target, sack.id[current], p, l, r);
p += l;
- // Write whole blobs:
- for (i = first+1; i < blobs-1; i++)
+ // Read whole blobs:
+ for (i = first+1; i < total-1; i++)
{
- skullfs_pread_blob(target, blob_ids[i], p, SKULLFS_BLOB_SIZE, 0);
+ current = current+1 % sack.size;
+ if (current == 0)
+ wraps++;
+ skullfs_pread_blob(target, sack.id[current], p,
+ SKULLFS_BLOB_SIZE, wraps*SKULLFS_BLOB_SIZE);
p += SKULLFS_BLOB_SIZE;
}
// Write last partial blob:
+ current = current+1 % sack.size;
+ if (current == 0)
+ wraps++;
l = count % SKULLFS_BLOB_SIZE;
- skullfs_pread_blob(target, blob_ids[i], p, l, 0);
+ skullfs_pread_blob(target, sack.id[current], p, l,
+ wraps*SKULLFS_BLOB_SIZE);
return 1;
}
diff --git a/code/src/skullfs/handlers.gs b/code/src/skullfs/handlers.gs
index fe9480e..f4cb202 100644
--- a/code/src/skullfs/handlers.gs
+++ b/code/src/skullfs/handlers.gs
@@ -156,14 +156,29 @@ handle_link_file(gum_node caller, gum_msg* call)
__blocking int
handle_create_file(gum_node caller, gum_msg* call)
{
- gum_msg response;
- gobs_id file_id;
+ gum_msg response;
+ gobs_id file_id;
+ gack_sack* sack;
- printf("handle_create_file()\n");
+ int i,n;
+ char* p;
+ p = call->data;
- sscanf(call->data, "%i", &file_id);
+ printf("handle_create_file(%s)\n", call->data);
+ p = call->data;
- skullfs_create_file(file_id);
+ sack = malloc(sizeof(gack_sack));
+ sscanf(p, "%i %i %n", &file_id, &(sack->size), &n);
+ p += n;
+
+ sack->id = malloc(sack->size * sizeof(gobs_id));
+ for (i = 0; i < n; i++)
+ {
+ sscanf(p, "%i %n", &(sack->id[i]), &n);
+ p += n;
+ }
+
+ skullfs_create_file(file_id, sack);
response.unique = flip2(call->unique);
response.data = NULL;
@@ -174,20 +189,22 @@ handle_create_file(gum_node caller, gum_msg* call)
return 1;
}
+/*
__blocking int
-handle_link_blob(gum_node caller, gum_msg* call)
+handle_link_blobs(gum_node caller, gum_msg* call)
{
gum_msg response;
gobs_id file_id;
+ gack_sack sack;
int blob_number;
gobs_id blob_id;
-
- printf("handle_link_blob():\n");
+ int n;
+ char* p;
- sscanf(call->data, "%i %i %i", &file_id, &blob_id, &blob_number);
+ printf("handle_link_blobs():\n");
- skullfs_link_blob(file_id, blob_id, blob_number);
+ skullfs_link_blobs(file_id, &sack);
response.unique = flip2(call->unique);
response.data = NULL;
@@ -197,6 +214,7 @@ handle_link_blob(gum_node caller, gum_msg* call)
return 1;
}
+*/
__blocking int
handle_create_blob(gum_node caller, gum_msg* call)
@@ -204,15 +222,11 @@ handle_create_blob(gum_node caller, gum_msg* call)
gum_msg response;
gobs_id blob_id;
- skullfs_object* blob;
-
gossip_debug(MASK_FS, "handle_create_blob(): \n");
- blob = skullfs_alloc_blob();
-
sscanf(call->data, "%i", &blob_id);
-
- itable_add(gobs_cache, blob_id, blob);
+
+ skullfs_create_blob(blob_id);
response.unique = flip2(call->unique);
response.data = malloc(1);
@@ -224,6 +238,7 @@ handle_create_blob(gum_node caller, gum_msg* call)
return 1;
}
+/*
__blocking int
handle_allocate(gum_node caller, gum_msg* call)
{
@@ -257,7 +272,9 @@ handle_allocate(gum_node caller, gum_msg* call)
return 1;
}
+*/
+/*
__blocking int
handle_blob_ids(gum_node caller, gum_msg* call)
{
@@ -291,3 +308,41 @@ handle_blob_ids(gum_node caller, gum_msg* call)
return 1;
}
+*/
+
+__blocking int
+handle_open(gum_node caller, gum_msg* call)
+{
+ gum_msg response;
+ gobs_id file_id;
+
+ skullfs_object* object;
+ skullfs_file* file;
+ gack_sack* sack;
+
+ int i;
+ char* p;
+
+ gossip_debug(MASK_FS, "handle_open(): \n");
+
+ sscanf(call->data, "%i", &file_id);
+
+ object = itable_search(gobs_cache, file_id);
+ file = object->contents;
+ sack = file->sack;
+
+ response.unique = flip2(call->unique);
+ response.data = malloc(sack->size * 16);
+
+ p = response.data;
+ p += sprintf(p, "%i ", sack->size);
+ for (i = 0; i < sack->size; i++)
+ {
+ p += sprintf(p, "%i ", sack->id[i]);
+ }
+ response.length = strlen(response.data)+1;
+
+ gum_return(caller, &response);
+
+ return 1;
+}
diff --git a/code/src/skullfs/rpcs.gs b/code/src/skullfs/rpcs.gs
index c4c4a15..b1222d6 100644
--- a/code/src/skullfs/rpcs.gs
+++ b/code/src/skullfs/rpcs.gs
@@ -9,7 +9,6 @@ rpc_create_blob(gobs_location* blob)
char args[32];
- blob->id = rand_lt(1000);
gossip_debug(MASK_FS, "rpc_create_blob(%i): \n", blob->id);
blob->node = gobs_lookup(blob->id);
@@ -30,24 +29,32 @@ rpc_create_blob(gobs_location* blob)
}
__blocking int
-rpc_create_file(gobs_location* file)
+rpc_create_file(gobs_location* file, gack_sack* sack)
{
gum_msg file_msg;
gum_msg* response;
- char args[32];
+ char* args;
+ char* p;
+ int i;
- file->id = rand_lt(100);
+ args = malloc(16*sack->size+32);
+ p = args;
+
+ file->id = gack_file();
file->node = gobs_lookup(file->id);
if (file->node.comm == self.comm &&
file->node.rank == self.rank)
{
- skullfs_create_file(file->id);
+ skullfs_create_file(file->id, sack);
}
else
{
- sprintf(args, "%i", file->id);
+ p += sprintf(p, "%i %i ", file->id, sack->size);
+ for (i = 0; i < sack->size; i++)
+ p += sprintf(p, "%i ", sack->id[i]);
+
gum_msg_init(GOBS_CREATE_FILE, args, strlen(args)+1, &file_msg);
gum_call(file->node, &file_msg, &response);
}
@@ -56,29 +63,6 @@ rpc_create_file(gobs_location* file)
}
__blocking int
-rpc_link_blob(gobs_location file, gobs_location blob)
-{
- gum_msg link_msg;
- gum_msg* response;
-
- char args[32];
-
- if (file.node.comm == self.comm &&
- file.node.rank == self.rank)
- {
- skullfs_link_blob(file.id, blob.id, 0);
- }
- else
- {
- sprintf(args, "%i %i %i", file.id, blob.id, 0);
- gum_msg_init(GOBS_LINK_BLOB, args, strlen(args)+1, &link_msg);
- gum_call(file.node, &link_msg, &response);
- }
-
- return 1;
-}
-
-__blocking int
rpc_link_file(gobs_location directory, gobs_location file,
char* filename)
{
diff --git a/code/src/skullfs/skullfs.gs b/code/src/skullfs/skullfs.gs
index 13a7e7f..5c6b011 100644
--- a/code/src/skullfs/skullfs.gs
+++ b/code/src/skullfs/skullfs.gs
@@ -69,10 +69,14 @@ skullfs_object*
skullfs_alloc_file()
{
skullfs_object* result;
+ skullfs_file* file;
result = malloc(sizeof(skullfs_object));
result->type = SKULLFS_FILE;
- result->contents = itable_create(10);
+ result->contents = malloc(sizeof(skullfs_file));
+
+ file = result->contents;
+ file->sack = NULL;
return result;
}
@@ -81,10 +85,14 @@ skullfs_object*
skullfs_alloc_blob()
{
skullfs_object* result;
+ skullfs_blob* blob;
result = malloc(sizeof(skullfs_object));
result->type = SKULLFS_BLOB;
- result->contents = malloc(SKULLFS_BLOB_SIZE);
+ result->contents = malloc(sizeof(skullfs_blob));
+ blob = result->contents;
+ blob->size = 0;
+ blob->data = NULL;
return result;
}
@@ -152,14 +160,14 @@ skullfs_list(gobs_id directory_id, char*** names, int** ids)
return contents->size;
}
+/*
int
-skullfs_link_blob(gobs_id file_id, gobs_id blob_id, int blob_number)
+skullfs_link_blobs(gobs_id file_id, gack_sack* sack)
{
skullfs_object* file;
gobs_id* blob_space;
- blob_space = malloc(sizeof(gobs_id));
- *blob_space = blob_id;
+ blob_space = malloc(sack->size * sizeof(gobs_id));
gossip_debug(MASK_FS, "skullfs_link_blob(%i,%i,%i)...\n",
file_id, blob_id, blob_number);
@@ -169,6 +177,7 @@ skullfs_link_blob(gobs_id file_id, gobs_id blob_id, int blob_number)
return 1;
}
+*/
int
skullfs_create_blob(gobs_id blob_id)
@@ -184,13 +193,19 @@ skullfs_create_blob(gobs_id blob_id)
}
int
-skullfs_create_file(gobs_id file_id)
+skullfs_create_file(gobs_id file_id, gack_sack* sack)
{
- skullfs_object* file;
+ skullfs_object* object;
+ skullfs_file* file;
- file = skullfs_alloc_file();
- itable_add(gobs_cache, file_id, file);
+ object = skullfs_alloc_file();
+ file = object->contents;
+ file->sack = sack;
+ gossip_debug(MASK_FS, "skullfs_create_file(%i)\n", file_id);
+
+ itable_add(gobs_cache, file_id, object);
+
return 1;
}
@@ -210,7 +225,6 @@ skullfs_link_file(gobs_id directory_id, gobs_id file_id, char* name)
return 1;
}
-
/**
Create file.
Remote nodes are contacted to create the file, the first blob,
@@ -223,24 +237,27 @@ skullfs_make_file(gobs_id directory_id, char* filename,
gobs_id* file_id)
{
gobs_location file;
+ gack_sack* sack;
gobs_location blob;
gobs_location directory;
+ int i;
+
directory.id = directory_id;
+ sack = gack_allocate();
+
gossip_debug(MASK_FS, "skullfs_make_file(): \n");
- rpc_create_blob(&blob);
-
- gossip_debug(MASK_FS, "created blob: %i\n", blob.id);
+ for (i = 0; i < sack->size; i++)
+ {
+ blob.id = sack->id[i];
+ rpc_create_blob(&blob);
+ }
- rpc_create_file(&file);
+ rpc_create_file(&file, sack);
gossip_debug(MASK_FS, "created file\n");
-
- rpc_link_blob(file, blob);
-
- gossip_debug(MASK_FS, "linked blob\n");
directory.node = gobs_lookup(directory.id);
rpc_link_file(directory, file, filename);
@@ -252,10 +269,10 @@ skullfs_make_file(gobs_id directory_id, char* filename,
return 1;
}
-/**
+/*
Return the list relevant blob ids.
If more were requested, create them.
-*/
+
__blocking int
skullfs_ensure_blobs(gobs_id file_id, int first, int count,
gobs_id* blob_ids)
@@ -298,9 +315,10 @@ skullfs_ensure_blobs(gobs_id file_id, int first, int count,
return 1;
}
+*/
/**
- Return the list relevant blob ids.
+ Return the list of relevant blob ids.
If more were requested, return 0s for those blob ids.
@param blob_ids OUT
*/
diff --git a/code/test/adts/test07.c b/code/test/adts/test07.c
new file mode 100644
index 0000000..daabb02
--- /dev/null
+++ b/code/test/adts/test07.c
@@ -0,0 +1,43 @@
+
+#include <xtree.h>
+
+int
+main()
+{
+ struct xtree* tree = xtree_create();
+
+ xtree_printf(tree);
+
+ xtree_add(tree, 2, NULL);
+ xtree_printf(tree);
+
+ xtree_add(tree, 4, NULL);
+ printf("after 4\n");
+ xtree_printf(tree);
+
+ xtree_add(tree, 8, NULL);
+ printf("after 8\n");
+ xtree_printf(tree);
+
+ xtree_add(tree, 8000, NULL);
+ printf("after 8000\n");
+ xtree_printf(tree);
+
+ xtree_add(tree, 6, NULL);
+ printf("after 6\n");
+ xtree_printf(tree);
+
+ xtree_add(tree, 8001, NULL);
+ printf("after 8001\n");
+ xtree_printf(tree);
+
+ struct inlist* nodes = xtree_query(tree, 8008, 2);
+ inlist_printf(nodes);
+
+ void* d = xtree_search(tree, 8000);
+ printf("search: %p\n", d);
+
+ printf("ok\n");
+
+ return 0;
+}
diff --git a/code/test/common/gdb_wait_loop.c b/code/test/common/gdb_wait_loop.c
new file mode 100644
index 0000000..6c06f66
--- /dev/null
+++ b/code/test/common/gdb_wait_loop.c
@@ -0,0 +1,11 @@
+
+void
+gdb_wait_loop()
+{
+ int v = 0;
+
+ pid_t pid = getpid();
+ printf("pid: %i\n", pid);
+
+ while (!v);
+}
diff --git a/code/test/gack/module.mk.in b/code/test/gack/module.mk.in
new file mode 100644
index 0000000..61ab7bb
--- /dev/null
+++ b/code/test/gack/module.mk.in
@@ -0,0 +1,24 @@
+
+DIR := test/gack
+
+TEST_GACK_GSSRC += $(shell cd @SRC_ABSOLUTE_TOP@; find $(DIR) -name "*.gs" )
+TEST_GACK_SRC += $(shell cd @SRC_ABSOLUTE_TOP@; find $(DIR) -name "*.c" )
+TEST_GSSRC += $(TEST_GACK_GSSRC)
+
+TEST_GACK_OBJS := $(patsubst %.gs, %.o, $(TEST_GACK_GSSRC))
+TEST_GACK_PROGS := $(patsubst %.gs, %.x, $(TEST_GACK_GSSRC))
+
+TEST_OBJS += $(TEST_GACK_OBJS)
+TEST_PROGS += $(TEST_GACK_PROGS)
+
+# GACK tests
+
+# Separate rule for local function tests:
+# test/gack/test01.x: test/gack/test01.o $(GACK)
+# $(Q) " MPICC $(@)"
+# $(E)$(MPICC) -rdynamic -L src/gsl/lib $(<) $(GACK) -l gs -l gstest $(LIBS) -o $(@)
+
+test/gack/test%.x: test/gack/test%.o $(GACK) src/gobs/launch.o
+ $(Q) " MPICC $(@)"
+ $(E)$(MPICC) -rdynamic -L src/gsl/lib $(<) src/gobs/launch.o src/gobs/client.o $(GACK) -l gs -l gstest -l crypto -l m $(LIBS) -o $(@)
+
diff --git a/code/test/skullfs/test02.gs b/code/test/gack/test01.gs
similarity index 57%
copy from code/test/skullfs/test02.gs
copy to code/test/gack/test01.gs
index 31037d8..d77ae70 100644
--- a/code/test/skullfs/test02.gs
+++ b/code/test/gack/test01.gs
@@ -1,6 +1,6 @@
/**
- TEST02: Simple lookup.
+ TEST01: Simple local allocation.
*/
#include <stdbool.h>
@@ -17,18 +17,12 @@
__blocking int
gobs_client_code()
{
- gobs_id id;
+ gack_sack sack;
+
+ gack_allocate(&sack);
- gum_node target;
-
- target.rank = 0;
- target.comm = MPI_COMM_WORLD;
-
- id = skullfs_mkfs(target);
- assert(id == 0);
+ gack_printf_sack(&sack);
- printf("id: %i\n", id);
-
return 1;
}
diff --git a/code/test/gobs/About.txt b/code/test/gobs/About.txt
new file mode 100644
index 0000000..9ff651d
--- /dev/null
+++ b/code/test/gobs/About.txt
@@ -0,0 +1,4 @@
+
+test01: Simple lookup and store.
+test02: Simple lookup and store and retrieve.
+test03: AIT tests
diff --git a/code/test/gobs/test03.gs b/code/test/gobs/test03.gs
index 5629ffa..481eff2 100644
--- a/code/test/gobs/test03.gs
+++ b/code/test/gobs/test03.gs
@@ -1,6 +1,6 @@
/**
- TEST03: NOT USED
+ TEST03: AIT Tests.
*/
#include <stdbool.h>
@@ -11,114 +11,21 @@
#include <include/gs.h>
#include <resources/mpi/gs-mpi.gsh>
-#include <gobs.h>
+#include <gobs.gsh>
-char buffer[100];
+#include <test/common/gdb_wait_loop.c>
-int done = 0;
-
-static void
-done_callback(void *user_ptr, int ret)
-{
- done = 1;
-}
-
-__blocking int
-bootstrap(void)
-{
- MPI_Status status;
- gum_node target;
- gum_node recipient;
- gum_msg* msg;
- gum_msg* result;
-
- gobs_id key = 3;
- char data[128];
- int length;
-
- if (mpi_rank == 0)
- {
- gobs_init(GOBS_DENSE, MPI_COMM_WORLD);
- while (gobs_running)
- {
- gobs_response(MPI_COMM_WORLD);
- }
- }
- else
- {
- gobs_init(GOBS_DENSE, MPI_COMM_WORLD);
- target.rank = 0;
- target.comm = MPI_COMM_WORLD;
-
- pwait
- {
- pbranch
- {
- recipient = gobs_query(target, key);
- length = gobs_retrieve(recipient, key, data);
- printf("recvd: %i chars\n", length);
- printf("data: %s\n", data);
- gobs_quit(target);
- target.rank = 1;
- gobs_quit(target);
- }
- pbranch
- {
- while (gobs_running)
- {
- gobs_response(MPI_COMM_WORLD);
- }
- }
- }
- }
-
- return 0;
-}
-
-void
-gdb_startup(void)
+__blocking int
+gobs_client_code()
{
- int gdb_wait = 0;
+ gum_node target;
- pid_t pid = getpid();
- printf("pid: %i\n", pid);
- fflush(stdout);
-
-// if (mpi_rank == 1)
- while (!gdb_wait);
-}
-
-int
-main(int argc, char *argv[])
-{
- gs_op_id_t op_id;
- gs_context_t ctx;
-
- MPI_Init(&argc, &argv);
-
- MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
- MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
+ // gdb_wait_loop();
- // gdb_startup();
+ target.rank = 0;
+ target.comm = MPI_COMM_WORLD;
- gs_mpi_init();
+ gobs_ait_pull(target);
- memset(buffer, '\0', 100);
-
- gs_context_create(&ctx, 1, "mpi");
- gum_init();
-
- bootstrap_post(done_callback, NULL, NULL, ctx, &op_id);
-
- while (done == 0)
- {
- gs_poll(ctx, 10);
- }
-
- printf("finalize\n");
- MPI_Finalize();
-
- gs_mpi_finalize();
- gs_context_destroy(ctx);
- return 0;
+ return 1;
}
diff --git a/code/test/skullfs/About.txt b/code/test/skullfs/About.txt
index 083c648..ef44f7c 100644
--- a/code/test/skullfs/About.txt
+++ b/code/test/skullfs/About.txt
@@ -3,5 +3,6 @@ test01: Test local functions.
test02: Just setup FS.
test03: Make some directories.
test04: Make a file.
-test05: Make a file and write into it.
-test06: Make a file, write to it, read it back.
+test05: Make a file and open it.
+test06: Make a file and write into it.
+test07: Make a file, write to it, read it back.
diff --git a/code/test/skullfs/test02.gs b/code/test/skullfs/test02.gs
index 31037d8..8b4eb40 100644
--- a/code/test/skullfs/test02.gs
+++ b/code/test/skullfs/test02.gs
@@ -1,6 +1,6 @@
/**
- TEST02: Simple lookup.
+ TEST02: Simple startup.
*/
#include <stdbool.h>
@@ -24,7 +24,7 @@ gobs_client_code()
target.rank = 0;
target.comm = MPI_COMM_WORLD;
- id = skullfs_mkfs(target);
+ skullfs_mkfs(target, &id);
assert(id == 0);
printf("id: %i\n", id);
diff --git a/code/test/skullfs/test05.gs b/code/test/skullfs/test05.gs
index 32334f1..24d1b62 100644
--- a/code/test/skullfs/test05.gs
+++ b/code/test/skullfs/test05.gs
@@ -7,7 +7,7 @@
#include <skullfs_client.gsh>
void
-gdb_wait()
+gdb_wait_loop()
{
int v = 0;
@@ -25,6 +25,8 @@ gobs_client_code()
gum_node target;
+ skullfs_fd fd;
+
int count;
char** names;
int* ids;
@@ -32,7 +34,7 @@ gobs_client_code()
char data[32];
- // gdb_wait();
+ // gdb_wait_loop();
strcpy(data, "hello!");
@@ -49,11 +51,20 @@ gobs_client_code()
skullfs_ls(target, root_id, &count, &names, &ids);
for (i = 0; i < count; i++)
{
- printf("entry: %i %s %i\n", i, names[i], ids[i]);
+ printf(" entry: %i %s %i\n", i, names[i], ids[i]);
}
- printf("test05: write\n");
- skullfs_pwrite(target, file_id, data, strlen(data), 0);
+ printf("test05: open\n");
+
+ skullfs_open(target, file_id, &fd);
+
+ printf("sack->size: %i\n", fd.sack.size);
+ for (i = 0; i < fd.sack.size; i++)
+ {
+ printf(" id: %i\n", fd.sack.id[i]);
+ }
+
+ // skullfs_pwrite(target, file_id, data, strlen(data), 0);
return 1;
}
diff --git a/code/test/skullfs/test05.gs b/code/test/skullfs/test06.gs
similarity index 57%
copy from code/test/skullfs/test05.gs
copy to code/test/skullfs/test06.gs
index 32334f1..59d9eab 100644
--- a/code/test/skullfs/test05.gs
+++ b/code/test/skullfs/test06.gs
@@ -5,9 +5,8 @@
#include <gobs.gsh>
#include <skullfs_client.gsh>
-
void
-gdb_wait()
+gdb_wait_loop()
{
int v = 0;
@@ -25,14 +24,11 @@ gobs_client_code()
gum_node target;
- int count;
- char** names;
- int* ids;
- int i;
-
+ skullfs_fd fd;
+
char data[32];
- // gdb_wait();
+ // gdb_wait_loop();
strcpy(data, "hello!");
@@ -42,18 +38,14 @@ gobs_client_code()
skullfs_mkfs(target, &root_id);
assert(root_id == 0);
- printf("test05: create:\n");
+ printf("test06: create:\n");
skullfs_create(target, root_id, "file", &file_id);
- printf("test05: list after create:\n");
- skullfs_ls(target, root_id, &count, &names, &ids);
- for (i = 0; i < count; i++)
- {
- printf("entry: %i %s %i\n", i, names[i], ids[i]);
- }
+ printf("test06: open\n");
+
+ skullfs_open(target, file_id, &fd);
- printf("test05: write\n");
- skullfs_pwrite(target, file_id, data, strlen(data), 0);
+ skullfs_pwrite(target, &fd, data, strlen(data), 0);
return 1;
}
diff --git a/code/test/skullfs/test05.gs b/code/test/skullfs/test07.gs
similarity index 57%
copy from code/test/skullfs/test05.gs
copy to code/test/skullfs/test07.gs
index 32334f1..35225fb 100644
--- a/code/test/skullfs/test05.gs
+++ b/code/test/skullfs/test07.gs
@@ -5,9 +5,8 @@
#include <gobs.gsh>
#include <skullfs_client.gsh>
-
void
-gdb_wait()
+gdb_wait_loop()
{
int v = 0;
@@ -25,14 +24,12 @@ gobs_client_code()
gum_node target;
- int count;
- char** names;
- int* ids;
- int i;
-
+ skullfs_fd fd;
+
char data[32];
-
- // gdb_wait();
+ char copy[32];
+
+ // gdb_wait_loop();
strcpy(data, "hello!");
@@ -42,18 +39,18 @@ gobs_client_code()
skullfs_mkfs(target, &root_id);
assert(root_id == 0);
- printf("test05: create:\n");
+ printf("test06: create:\n");
skullfs_create(target, root_id, "file", &file_id);
- printf("test05: list after create:\n");
- skullfs_ls(target, root_id, &count, &names, &ids);
- for (i = 0; i < count; i++)
- {
- printf("entry: %i %s %i\n", i, names[i], ids[i]);
- }
+ printf("test06: open\n");
+
+ skullfs_open(target, file_id, &fd);
+
+ skullfs_pwrite(target, &fd, data, strlen(data), 0);
+
+ skullfs_pread(target, &fd, copy, strlen(data), 0);
- printf("test05: write\n");
- skullfs_pwrite(target, file_id, data, strlen(data), 0);
+ printf("read copy: %s\n", copy);
return 1;
}
diff --git a/sim/gobs/About.txt b/sim/gobs/About.txt
index b29c065..0ca351f 100644
--- a/sim/gobs/About.txt
+++ b/sim/gobs/About.txt
@@ -1,18 +1,27 @@
GOBS: Simulator
-Compile with:
+Compile and run with:
+
javac GOBS.java
+java GOBS
+
+or
+
+ant
+java -jar GOBS.jar
-Run with:
+Run with arguments:
-java GOBS <B> <nodes> <objects>
+ <B> <nodes> <files> <file size> <object size>
where:
B is the bit length of the addresses
nodes is the number of object stores
-objects is the number of objects
+files is the number of files
+file size is the size of each file
+objects size is the chunk size within a file
The simulator simply assigns the objects to the nodes
in accordance with the (Kademlia) XOR metric.
diff --git a/sim/gobs/Addressable.java b/sim/gobs/Addressable.java
index 0f03854..e96ffa6 100644
--- a/sim/gobs/Addressable.java
+++ b/sim/gobs/Addressable.java
@@ -1,6 +1,10 @@
import java.math.BigInteger;
+/**
+ * Superclass for things with an address: objects and nodes.
+ * */
+
class Addressable
{
int B;
@@ -14,7 +18,10 @@ class Addressable
this.B = B;
this.id = id;
}
-
+
+ /**
+ Does this Addressable start with the given bit prefix?
+ */
boolean prefix(int[] p)
{
int[] A = bitArray();
@@ -25,7 +32,10 @@ class Addressable
}
return true;
}
-
+
+ /**
+ Obtain an array of bits for this Addressable.
+ */
int[] bitArray()
{
if (array != null)
@@ -36,6 +46,9 @@ class Addressable
return result;
}
+ /**
+ Obtain the array of bits for the given address.
+ */
static int[] bitArray(int B, BigInteger i)
{
int[] result = new int[B];
@@ -52,20 +65,26 @@ class Addressable
return result;
}
-
+
+ /**
+ Convert the Addressable to a String of 0s and 1s.
+ */
String bitString()
{
return bitString(B, id);
}
/**
- Bits in integer < 2^B.
+ Convert the given address to a String of 0s and 1s.
*/
static String bitString(int B, BigInteger i)
{
return arrayString(bitArray(B, i));
}
+ /**
+ Convert the given bits to a String.
+ */
static String arrayString(int[] bits)
{
StringBuilder buffer = new StringBuilder();
@@ -79,11 +98,12 @@ class Addressable
return buffer.toString();
}
- /**
- Debugging only.
- */
+ /*
+ Debugging only.
+
public static void main(String[] args)
{
// System.out.println(bitString(10, ));
}
+ */
}
diff --git a/sim/gobs/Bits.java b/sim/gobs/Bits.java
index 1062790..d6dd4db 100644
--- a/sim/gobs/Bits.java
+++ b/sim/gobs/Bits.java
@@ -4,7 +4,8 @@ import java.util.*;
/**
* Provides random bits, statically.
* Kills VM exit code 2 on misuse.
- */
+ * */
+
public class Bits
{
public static Random rng = null;
diff --git a/sim/gobs/GOBS.java b/sim/gobs/GOBS.java
index 315a225..1dd7124 100644
--- a/sim/gobs/GOBS.java
+++ b/sim/gobs/GOBS.java
@@ -1,17 +1,17 @@
-/**
- GOBS placement simulator
-
- Usage: GOBS <B> <nodes> <objects>
-
- B: Bit length of addresses
- nodes: Number of nodes
- objects: Number of objects
-*/
-
-
import java.util.*;
+/**
+ * <h3> GOBS placement simulator. </h3>
+ *
+ * Command-line arguments: <br>
+ * B: Bit length of addresses <br>
+ * nodes: Number of nodes <br>
+ * fileCount: Number of files <br>
+ * fileSize: Size of each file <br>
+ * objSize: Size of each object
+ * */
+
class GOBS
{
static int B;
@@ -92,9 +92,7 @@ class GOBS
}
// Place objects and add up load...
- System.out.println("placing...");
placer.place(objects, nodes);
- System.out.println("done");
Map<Node,Integer> origCount = countObjects(nodes);
// printNodes(nodes);
@@ -102,7 +100,6 @@ class GOBS
// Cause a fault and reallocate objects...
int index = Bits.nextInt(nodes.size());
- System.out.println("index: " + index);
Node failed = nodes.remove(index);
System.out.println("failed: " + failed.bitString() +
" (" + failed.objects.size() + ")");
@@ -112,19 +109,19 @@ class GOBS
Map<Node,Integer> faultCount = countObjects(nodes);
// Find the load difference from before the fault...
- List<Integer> adds = new ArrayList<Integer>();
+ List<Integer> diffs = new ArrayList<Integer>();
for (Node node : faultCount.keySet())
{
int before = origCount.get(node);
int after = faultCount.get(node);
- adds.add(after-before);
+ diffs.add(after-before);
}
// Display load differences...
System.out.println("");
System.out.println("LOAD INCREASES:");
- Collections.sort(adds);
- for (Integer i : adds)
+ Collections.sort(diffs);
+ for (Integer i : diffs)
System.out.println(i);
}
}
diff --git a/sim/gobs/Kademlia.java b/sim/gobs/Kademlia.java
index 2cbc434..886da8d 100644
--- a/sim/gobs/Kademlia.java
+++ b/sim/gobs/Kademlia.java
@@ -2,6 +2,10 @@
import java.math.BigInteger;
import java.util.List;
+/**
+ * Places objects on the nearest node using the XOR distance metric.
+ * */
+
class Kademlia
implements PlacementScheme
{
diff --git a/sim/gobs/LayoutScheme.java b/sim/gobs/LayoutScheme.java
index 3fe2c1a..1222f50 100644
--- a/sim/gobs/LayoutScheme.java
+++ b/sim/gobs/LayoutScheme.java
@@ -2,6 +2,10 @@
import java.math.BigInteger;
import java.util.List;
+/**
+ * LayoutSchemes generate object ids within a file.
+ * */
+
abstract class LayoutScheme
{
int B;
diff --git a/sim/gobs/Node.java b/sim/gobs/Node.java
index 696152c..71d1859 100644
--- a/sim/gobs/Node.java
+++ b/sim/gobs/Node.java
@@ -2,6 +2,10 @@
import java.math.BigInteger;
import java.util.*;
+/**
+ * Simulates an object store.
+ * */
+
class Node
extends Addressable
{
diff --git a/sim/gobs/NodeScheme.java b/sim/gobs/NodeScheme.java
index e44063f..09b3d1a 100644
--- a/sim/gobs/NodeScheme.java
+++ b/sim/gobs/NodeScheme.java
@@ -1,6 +1,10 @@
import java.util.*;
+/**
+ * Generates node addresses.
+ * */
+
abstract class NodeScheme
{
int B;
@@ -11,6 +15,10 @@ abstract class NodeScheme
this.B = B;
M = Math.round(Math.pow(2,B));
}
-
+
+ /**
+ Generate <tt>count</tt> new nodes and place them in
+ <tt>nodes</tt>.
+ */
abstract void generate(int count, List<Node> nodes);
}
diff --git a/sim/gobs/Obj.java b/sim/gobs/Obj.java
index 263147f..c3ce9a2 100644
--- a/sim/gobs/Obj.java
+++ b/sim/gobs/Obj.java
@@ -2,8 +2,9 @@
import java.math.BigInteger;
/**
- Identifier "Object" is used by Java.
-*/
+ * Simulates a single object.
+ * Identifier "Object" is used by Java.
+ * */
class Obj
extends Addressable
diff --git a/sim/gobs/PlacementScheme.java b/sim/gobs/PlacementScheme.java
index ffdf195..2b58b60 100644
--- a/sim/gobs/PlacementScheme.java
+++ b/sim/gobs/PlacementScheme.java
@@ -1,6 +1,10 @@
import java.util.List;
+/**
+ * Interface to place a list of objects on a set of nodes.
+ * */
+
interface PlacementScheme
{
void place(List<Obj> objects, List<Node> nodes);
diff --git a/sim/gobs/RandomLayout.java b/sim/gobs/RandomLayout.java
index afc9e55..675325e 100644
--- a/sim/gobs/RandomLayout.java
+++ b/sim/gobs/RandomLayout.java
@@ -2,6 +2,10 @@
import java.math.BigInteger;
import java.util.*;
+/**
+ * Generates random object ids.
+ * */
+
class RandomLayout
extends LayoutScheme
{
diff --git a/sim/gobs/RandomNodes.java b/sim/gobs/RandomNodes.java
index 9866eea..c625831 100644
--- a/sim/gobs/RandomNodes.java
+++ b/sim/gobs/RandomNodes.java
@@ -2,6 +2,10 @@
import java.math.BigInteger;
import java.util.*;
+/**
+ * Places new nodes randomly without looking at existing nodes.
+ * */
+
class RandomNodes
extends NodeScheme
{
@@ -9,7 +13,7 @@ class RandomNodes
{
super(B);
}
-
+
public void generate(int count, List<Node> nodes)
{
for (int i = 0; i < count; i++)
diff --git a/sim/gobs/UniformNodes.java b/sim/gobs/UniformNodes.java
index 7d2d8a1..9f2988c 100644
--- a/sim/gobs/UniformNodes.java
+++ b/sim/gobs/UniformNodes.java
@@ -3,7 +3,7 @@ import java.math.BigInteger;
import java.util.*;
/**
- * UNIFORMNODES: New nodes insert themselves in the middle of
+ * New nodes insert themselves in the middle of
* the largest gap in the node address space.
* */
@@ -74,6 +74,9 @@ class UniformNodes
return children(A, 0);
}
+ /**
+ Helper for allPossible().
+ */
Set<int[]> children(int[] A, int b)
{
Set<int[]> result = new HashSet<int[]>();
@@ -111,12 +114,6 @@ class UniformNodes
return result;
}
-
- /**
- @param count The number of new nodes to generate.
- @param nodes The existing nodes.
- New nodes are added to this List.
- */
public void generate(int count, List<Node> nodes)
{
for (int i = 0; i < count; i++)
@@ -126,9 +123,9 @@ class UniformNodes
}
}
- /**
+ /*
Debugging only.
- */
+
public static void main(String[] args)
{
int B = 6;
@@ -146,4 +143,5 @@ class UniformNodes
// System.out.println(allPossible(3));
}
+ */
}
hooks/post-receive
--
Grayskull Repository
1
0
[Gs-commits] Grayskull Repository branch, master, updated. git-migration-30-g8f0ad1a
by noreply@mcs.anl.gov 24 Jul '09
by noreply@mcs.anl.gov 24 Jul '09
24 Jul '09
A ref change was pushed to the repository containing
the project "Grayskull Repository".
The branch, master has been updated
via 8f0ad1a9238818da3d1a0c2ab960e6342acea211 (commit)
via ad6dd3db1ec87aed48758336ff8b85a98d71471e (commit)
from 75b46b7fb9cd9c4b2ea47aea86de12a48ef176a8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 8f0ad1a9238818da3d1a0c2ab960e6342acea211
Merge: ad6dd3db1ec87aed48758336ff8b85a98d71471e 75b46b7fb9cd9c4b2ea47aea86de12a48ef176a8
Author: slang <slang(a)gamgee-debian.(none)>
Date: Fri Jul 24 13:34:46 2009 -0500
Merge branch 'master' of ssh://shakey.mcs.anl.gov/~dkimpe/git/grayskull
commit ad6dd3db1ec87aed48758336ff8b85a98d71471e
Author: slang <slang(a)gamgee-debian.(none)>
Date: Fri Jul 24 13:33:39 2009 -0500
fix non-blocking function return.
-----------------------------------------------------------------------
Summary of changes:
code/src/gsl/parser/gs-parser.lhs | 4 ++++
code/src/gsl/tests/correctness/nbfun.gs | 14 ++++++++++----
2 files changed, 14 insertions(+), 4 deletions(-)
Diff of changes:
diff --git a/code/src/gsl/parser/gs-parser.lhs b/code/src/gsl/parser/gs-parser.lhs
index e8025e1..4be7f2a 100644
--- a/code/src/gsl/parser/gs-parser.lhs
+++ b/code/src/gsl/parser/gs-parser.lhs
@@ -1415,6 +1415,10 @@ CStat: The blocking statement
> -- Walk the tree, and generate the callback function definitions
> callbackDefs <- generateCallbackDefs ctx
+> setErrorWriter mkErrorPostHandler
+> setPBDone mkPBranchPostDoneStmts
+> setTransExit transformPostFuncReturnStmts
+
> -- Generate the post statements for the post function from the first blocking context
> postStmts <- generateFirstPostStmts ctx
diff --git a/code/src/gsl/tests/correctness/nbfun.gs b/code/src/gsl/tests/correctness/nbfun.gs
index 7381c7d..6d72d04 100644
--- a/code/src/gsl/tests/correctness/nbfun.gs
+++ b/code/src/gsl/tests/correctness/nbfun.gs
@@ -2,19 +2,25 @@
#include "include/gs.h"
#include "tests/correctness/btest.gsh"
-static __blocking void run_nbfun1(void)
+static __blocking int run_inner_nbfun1(void)
{
int ret;
int a = 0;
printf("a is: %d\n", a);
+ return 1;
+}
+
+static __blocking int run_outer_nbfun1(void)
+{
+ return run_inner_nbfun1();
}
static int done = 0;
-static void cb(void *ptr)
+static void cb(void *ptr, int i)
{
printf("%p\n", ptr);
- printf("done\n");
+ printf("done: %d\n", i);
done = 1;
}
@@ -48,7 +54,7 @@ int main(int argc, char *argv[])
btest_init();
printf("%p\n", myptr);
- run_nbfun1_post(cb, myptr, NULL, NULL, &id);
+ run_outer_nbfun1_post(cb, myptr, NULL, NULL, &id);
while(done == 0)
{
hooks/post-receive
--
Grayskull Repository
1
0
[Gs-commits] [SCM] Grayskull Repository branch, master, updated. git-migration-28-g75b46b7
by noreply@mcs.anl.gov 22 Jul '09
by noreply@mcs.anl.gov 22 Jul '09
22 Jul '09
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Grayskull Repository".
The branch, master has been updated
via 75b46b7fb9cd9c4b2ea47aea86de12a48ef176a8 (commit)
via b2db089b071c448fb0646922ba9536331c76fd7f (commit)
via 1dfa59c7798b7c2c8883df55f903caf2b65db2c7 (commit)
via 7c3e49a0c8883e342dc02039ba0ccf450fa96f55 (commit)
from d9c95daae6cf4a28afaed3224d7c5a2b7277dfc3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 75b46b7fb9cd9c4b2ea47aea86de12a48ef176a8
Author: Samuel Lang <slang(a)bblogin.mcs.anl.gov>
Date: Wed Jul 22 11:58:03 2009 -0500
arrays instead of realloc.
we can't have pointers moving around on us, so realloc doesn't work. use arrays of allocation blocks instead.
commit b2db089b071c448fb0646922ba9536331c76fd7f
Author: Samuel Lang <slang(a)bblogin.mcs.anl.gov>
Date: Wed Jul 22 12:00:02 2009 -0500
remove tabs
commit 1dfa59c7798b7c2c8883df55f903caf2b65db2c7
Author: Samuel Lang <slang(a)bblogin.mcs.anl.gov>
Date: Wed Jul 22 11:55:26 2009 -0500
Revert "mpi timing changes."
This reverts commit 7c3e49a0c8883e342dc02039ba0ccf450fa96f55.
commit 7c3e49a0c8883e342dc02039ba0ccf450fa96f55
Author: Samuel Lang <slang(a)bblogin.mcs.anl.gov>
Date: Wed Jul 22 11:46:41 2009 -0500
mpi timing changes.
-----------------------------------------------------------------------
Summary of changes:
code/src/gsl/common/gs-opcache.c | 50 ++++++++++---
code/src/gsl/common/gs.c | 152 +++++++++++++++++++-------------------
2 files changed, 114 insertions(+), 88 deletions(-)
hooks/post-receive
--
Grayskull Repository
1
0
[Gs-commits] [SCM] Grayskull Repository branch, master, updated. git-migration-24-gd9c95da
by noreply@mcs.anl.gov 21 Jul '09
by noreply@mcs.anl.gov 21 Jul '09
21 Jul '09
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Grayskull Repository".
The branch, master has been updated
via d9c95daae6cf4a28afaed3224d7c5a2b7277dfc3 (commit)
via c481121a1ac11b88b344848369616323ba1285bc (commit)
via a72c927dbecab2ff14bd1aa9943603f136ae89a6 (commit)
from 598da6d94a53b93960ca88b162e4c4372d752c5f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d9c95daae6cf4a28afaed3224d7c5a2b7277dfc3
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Tue Jul 21 16:59:52 2009 -0500
New addresses of arbitrary length.
commit c481121a1ac11b88b344848369616323ba1285bc
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Tue Jul 21 16:59:51 2009 -0500
Do not need Key.java .
commit a72c927dbecab2ff14bd1aa9943603f136ae89a6
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Tue Jul 21 16:59:50 2009 -0500
New NodeScheme interface and support for large address lengths.
-----------------------------------------------------------------------
Summary of changes:
sim/gobs/Addressable.java | 89 ++++++++++++++++++++++++++
sim/gobs/Bits.java | 28 +++++++--
sim/gobs/GOBS.java | 92 ++++++++++++++++-----------
sim/gobs/HaltonLayout.java | 60 ------------------
sim/gobs/Kademlia.java | 10 ++-
sim/gobs/LayoutScheme.java | 15 ++++-
sim/gobs/Node.java | 21 ++++---
sim/gobs/NodeScheme.java | 16 +++++
sim/gobs/Obj.java | 11 ++-
sim/gobs/RandomLayout.java | 30 ++++++---
sim/gobs/RandomNodes.java | 22 +++++++
sim/gobs/UniformNodes.java | 149 ++++++++++++++++++++++++++++++++++++++++++++
sim/gobs/build.xml | 49 ++++++++++++++
sim/gobs/manifest.mf | 2 +
14 files changed, 464 insertions(+), 130 deletions(-)
create mode 100644 sim/gobs/Addressable.java
delete mode 100644 sim/gobs/HaltonLayout.java
create mode 100644 sim/gobs/NodeScheme.java
create mode 100644 sim/gobs/RandomNodes.java
create mode 100644 sim/gobs/UniformNodes.java
create mode 100644 sim/gobs/manifest.mf
hooks/post-receive
--
Grayskull Repository
1
0
[Gs-commits] [SCM] Grayskull Repository branch, master, updated. git-migration-21-g598da6d
by noreply@mcs.anl.gov 21 Jul '09
by noreply@mcs.anl.gov 21 Jul '09
21 Jul '09
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Grayskull Repository".
The branch, master has been updated
via 598da6d94a53b93960ca88b162e4c4372d752c5f (commit)
from 36febf136d046cc9ef1fed7e25993dafc88bd114 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 598da6d94a53b93960ca88b162e4c4372d752c5f
Author: slang <slang(a)gamgee-debian.(none)>
Date: Tue Jul 21 12:01:46 2009 -0500
fix gs_assert issues and bug with pbreak8 test failing.
gs_assert wasn't working properly -- it wasn't printing the line
number of the file or the actual expression. Replaced with just
a fprintf to stderr and exits. Not sure that's what we want to do
for invalid resources, but is the best thing for now.
pbreak8 was failing because it was trying to cancel children
when there were no children to cancel, resulting in an error in
gs_cancel_children. Just removing the return -EINVAL fixes this.
-----------------------------------------------------------------------
Summary of changes:
code/src/gsl/common/gs.c | 5 ++++-
code/src/gsl/parser/Walker.lhs | 8 ++++----
code/src/gsl/parser/gs-parser.lhs | 22 ++++++++++++++--------
3 files changed, 22 insertions(+), 13 deletions(-)
hooks/post-receive
--
Grayskull Repository
1
0
[Gs-commits] [SCM] Grayskull Repository annotated tag, git-migration, created. git-migration
by noreply@mcs.anl.gov 17 Jul '09
by noreply@mcs.anl.gov 17 Jul '09
17 Jul '09
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Grayskull Repository".
The annotated tag, git-migration has been created
at 034af870928ffc3082e645169f7f2c9dba87b74e (tag)
tagging 31995d1e2743a390a5595d8c401201119c4069c1 (commit)
tagged by Dries Kimpe
on Fri Jul 17 15:32:01 2009 -0500
- Log -----------------------------------------------------------------
Point at which the git repository was created
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
iEYEABECAAYFAkpg39UACgkQv/8puanD4GrIJwCeJ1Xj+UoXouXAC+Yh+VSYMheM
F48AnRy+eO9Xn7I4Xxk6jqMFGP57jFRB
=S1MK
-----END PGP SIGNATURE-----
carns (77):
adding trunk directory
Rob R's work on isolating the state machine code from PVFS
added stdint include
Updated configure script to look for mpicc rather than mpi.h. First check
minor fix for people that don't have . in their path
table arguments should be --enable rather than --with
- code adjustments to avoid -std=gnu99 requirement
applied gnu99 removal updates to test programs
pulled an old version of junk.h out of svn history; it looks like the
print some helpful hints if someone tries to make default target
update print line for mpicc compile to reflect it is using mpicc now
added make tests to helpful output under the default rule
some tweaks for out of tree builds, search src tree rather than local path
get per-file dependencies working, remove default dependency on all headers,
take test_helpers.c out of list of files that correspond to executables
take some test programs out of the "tests" target that are either missing
exclude test_helpers in cmpi dir from list of files to be made into
"." include path is still needed for out of tree builds at least
stuff gossip into build, backtraces disabled temporarily
update include path, stub in gossip test program
fill in a little bit of test program, hack on formatting a little
add ability to show mpi rank in gossip messages, set as the default in gs
add in helper functions to translate env variable into gossip mask and add
adding a toy gsl resource to play with, based off of timer
fix minor compile error
trying some different modes to service ops and trigger callbacks in storage
fix bugs, shorten sleep times in test case
make output less confusing in test program
experimenting with calling gs_poll() in some different scenarios
ability to unregister resources safely
dumping some relevant parts of OSC OSD implementation into the tree to use for
vim/emacs format stuff
remove test dir from osd target, was added by accident
tell vim that .gs files should be highlighted like c files rather than "Grid
stub for a test program that issues simple object commands
pulled in helper code to interpret osd sense fields, fiddled with example
removing accidental addition
$[ ... ] notation isn't strictly legal in sh, but it happens to work on
wrap compiler argument in quotes in case CC is set to something that
some tweaks for out-of-tree (vpath) builds, doesn't quite work yet
fix dependency paths for out of tree builds
whoops, reverting last change; that wasn't right
borrow depend script from top level in gs repo, with tweak to avoid errors
look for sqlite at configure time (to use with OSC OSD). sqlite.m4 based on
mark setup-langc script as executable
Update setup-langc to remove directory after build to avoid "Could not find
fix definition of canonname. The old version was duplicating the
integrate OSC OSD target into build system, needs a little more work
fix typo in modlibs macro that showed up after canonname fix
hush some warnings
shuffle around some files, build osd utils into same lib with target for our
- fixes to sqlite.m4
rename test program, build storage resource tests only if sqlite is found
added sizeof(long int) check to configure to help determine how to print 64
tried out a few more OSD functions
tie storate resource init and shutdown functions into osd
List partitions and create one if not present. Need to work out cleaner API
started a small glue layer to hide scsi-ness in osd.h api; may eventually be
added __blocking object creation function to resource
show error codes (something's not right here)
bug fix
ability to toggle polling mode for storage test; thread-per-op isn't working
tinkering, trying to isolate bug in thread-per-op model
fix memory error; must set output op_id before launching op in case it
re-enable create fn in resource
added osd object remove function, fixed some prints of 64 bit values
adding another pbreak test case
playing with doxygen
remove deprecated references to gscc from configure.in
setattr list operation; works only in polling mode right now for some reason
bug fix to cancel path
whoops; posix locking is disabled by default, but the storage resource needs
another pbreak test case
getattr_list implementation in storage resource
handle wacky OSD alignment stuff in getattr
whoops, meant to commit this before. Define limits for various values in
dm-delay module to use as a starting point for a disksim based device mapper
robl (2):
first draft of MPI for services text. sorry it took me so long to contribute
this text on MPI for services fits in better here, but it's still not perfect
slang (45):
first commit of gsl parser and test code.
better tests, added some instructions on building haskell/language-c and scripts for debian/ubuntu.
minor changes to Makefile
missed a dep
add some resources, other changes/fixes.
a bunch of changes.
working timer test.
fix parser from changes with state variables in pwait
added check for resource that doesn't implement poll.
added a proper build system. allow .h files to be generated from .gsh. added an oplist interface. Modified the resources and tests to work with oplist interface, build system and include headers in a proper fashion.
remove old Makefiles
add missing.
make runtests should work now.
updates.
commit missing file.
fix issues with non-bash shells.
adding a few correctness tests for parser. Adding a scheduling resource with two tests, a coalescing example, and a limited resource example.
allow builds without sqlite, fix dep generation to work with bash.
fix dependency issue.
fix warnings that show up with --enable-strict. builds without warnings now.
get valgrind tests working.
add random call to btest interface. add --enable-gsl-debug to configure to allow viewing of intermediate translated files.
update parser binary.
don't build parser binary unless specified.
fix status bug for recv.
this should have been the fix for the bug where status wasn't being set in recv.
added a btest_random call to return a random value. Changed parser to handle certain pbranch cases better. Added an rpc-invoke example.
adding test that compares scheduling to pthreads and condition variables.
fix if conditional bug within pbranch
fix bug with polling without any posted operations.
add pthread compare test. compares performance of broadcast in gsl and threads.
fixes for weird if conditional case Justin hit.
test case for Justin's if with non-blocking else.
change language-c to language-gsl
install language-gsl locally.
removed parser binary. Too hard to manage binaries across x86 and x86_64. Hopefully people will be able to just install ghc.
add test dependencies.
fixes to gum code and test03
use Makefile to run parser and compile intermediate code. Also add a compile check on unparsed code to verify that the code is valid C before running the parser. Fix a bunch of warnings that now show up as errors.
Fix blocking funcions that return void (nothing). Added test case.
Changed parser to require output file, and report an error if a blocking function with a return type doesn't end in a return statement. add afterwhile test.
add interfaces to btest resource to test immediate completion and threaded completioned where the callback gets called before the post call returns.
allow NULL context to be passed to gs_poll
fix for pbreak7.
preliminary support for __blocking function pointers used in structs, etc.
sson (3):
added some flags for disksim
initial integration with disksim-4.0.
added emulate_read() when retrieve is called.
wozniak (355):
CMPI stuff.
Starting up CAN/MPI paper.
Paper describing the CMPI system.
Paper describing a QoS-ish data management system.
Inserted abstract.
Convenience scripts for reconfiguring Makefile.
configure.ac replaces configure.in .
CMPI code base compiles.
Should be generated by configure.
ADTs required by CMPI functionality.
Need this.
No important changes.
Goofy scripts to help manage src movement to SiCortex.
Basically works.
Implementing driver_info() and related debugging tools.
Minor input option fix to avoid compiler warning.
Works. Ready to make plot.
Works.
Obsolete or moved to tools.
Re-order $(LIBS) on cygwin.
Minors.
Almost have plot.
cmpi_get() and cmpi_put() work over Kademlia.
Compiles and works.
KDM_* -> KDA_*.
List of longs.
CMPI MPI-IO implementation.
Test method for CMPI-IO.
Table indexed by longs.
List of longs.
Weird bug fix in MPI_File* handling.
Minors.
Swap.
Important bug fix.
Octave helpers for plotting timing data.
Until SiCortex gets Octave.
Re-usable parameter sweep helpers w/ functions from .zfunctions.
Should get u+x.
Needs u+x.
Now has u+x.
Plotting script updates.
Fixing write_matrix().
Editing...
Works.
Minors.
Doesn't work- transferring...
Starts multiple nodes.
Simple program to unpublish an MPI name.
Mostly connects.
Better include structure.
Works for 4 nodes + hub + driver.
Still works. Cleanups.
Postprocesses output file. Works.
For files on the wiki.
Generated from Bryan's stuff.
Some old Grayskull images.
Grayskull white paper.
Bad version. Must re-run experiment to obtain original EPS.
Getting started with white paper.
Set svn:ignore via
First draft.
Minors.
Unnecessary.
cmpi_get() works pretty well.
Dropped generated file.
DiskSim integration zone.
Starting function header design discussion.
Quick error check.
Removed Grayskull name.
Made support for DISKSIM conditional at configure time.
Fixed tests target in Makefile.in .
Performs a real lookup- should work for a disksim operation.
Now deletes test programs correctly.
Seems to work.
New test files in test/cmpi-io/test.* mostly work.
New checkpoint calculator for wiki.
Misc changes.
New list functions.
Compiles with new cmpi_detach() & KDA_Detach() functionality.
Mostly works.
Log cleaners for MPE output.
Splitting into KDA-1, KDA-2A, KDA-2B.
Moving MPI-1 implementation to kda-1.
Shortening directory name.
Configure basically works.
New location for MPI helper tools.
New location for MPI helper tools.
Moved to src/mpi_tools .
KDA-1 compiles.
Getting things to compile with cmpi_user_code().
Mostly works.
Trying to fix SVN setup.
Fixing SVN setup.
Helper script for KDA-1 case.
Compiles; writing tests...
cmpi_put() test.
New types file.
New simple MPIRPC test.
Fixes. New simple MPIRPC test.
Somehow not in SVN until now?
Oops. This was supposed to be generated by autoheader.
New tests.
cmpi_quit() and cmpi_debug_tables() work.
Works for test/cmpi/test01-03.c
3 intro paragraphs.
Got format working.
KDA-2A compiles.
Showed some changes to Seung.
Quick readme for tests.
Cleaned up debugging output.
Minor Makefile fixes.
Minors.
Node variable fix.
Unnecessary.
Need smarter etags functionality.
Trying to fix problem on Seung's machine.
Added wozniak's disksim location.
Debugging disksim problem.
Removed some checks.
Compiler checking.
Should barf; doesn't.
Bug with DiskSim integration fixed.
Works for test/cmpi/test03.c .
test04 works.
Hopefully stopped deleting intermediate *.o and *.x files.
Should not be in here.
Adding MPI services test cases.
Adding related work.
Adds.
Got compilation with and without disksim.
Basic Disksim usage tests.
New Disksim test 01 runs but is not very diagnostic.
Two quick slides about Grayskull.
Page 1 pretty much done.
Page 2 done. Sending to rross.
New disksim tests.
Quick fix to no Disksim case.
LRU works, I think.
Fixes to disksim interface.
Unknown change.
Fleshing out section 3 (P2P on HPC).
Testing disksim calls.
Test infrastructure and xmgrace defaults for Disksim write chunk profiling.
Basic Disksim test01 working.
Fixes to make writes fill area.
Renaming to chunk_test.zsh .
Added support for multiple test numbers (T).
Random order test works.
Adding to DHT section.
New cmpi_cached_load() and cmpi_cached_store() probably work.
Patch to get DiskSim running on a 64-bit machine.
src/cmpi/test04 works with augmented disk operation dispatch functionality.
Added note_ss().
Added HAVE_SRUN check for SiCortex test execution.
New output transfer script.
srun functionality.
Added --gnu to mpicc test for compatibility on SiCortex.
Added --enable-tests option to disable tests in the general case.
Shorter sleep time on startup.
New module for shell tools to interact with an existing CMPI service.
Module for tests for DHT/MPI paper.
Notes.
Fixed a range of build problems.
New tests for DHT/MPI paper.
Removed --gnu flag from line in configure.ac .
MPI rank 0 is now included in the KDA-1 DHT.
test/paper1/test01 works.
Minors.
Debugging conflict fixed.
Added date_nice().
Parameterizing... in progress.
Data processing for test01.
test/paper1/test01 works for per node RPCs.
Plot formatting for test01.
Quick fixes.
Generates correct plot per nodes per put.
Uncommented actual execution.
Rough plot of test/paper1/test01 for small numbers of nodes.
Renamed squash() to avgs(). Much more meaningful.
Fixed cmpi_sanity().
Cleanups, comments, and minor fixes.
Client sleep time now = mpi_rank.
Merge from branches/mpirpc_faults. Now we can emulate a node fault.
Removed useless debugging statement.
Note to start thinking about function names for CMPI-IO methods.
test02 mostly working...
test02 mostly works...
Same as test01 for now.
Available built-in RPC handlers.
Minor changes to wrong FS.
Minors.
Draft of DHT from the application point of view.
test02 basic plotting works. Possible cmpi_get() bug, check output.
test03 compiles; untested.
Result counting functions.
Grace commands for test02.
Added isqrt().
test03 basically works for small cases.
test03 basically works.
Basically works. Performance looks terrible.
Renaming this file so I can delete test*.txt .
test04 basically works.
test04 basically works.
First drafts of plots.
Building figure table. Getting bizarre LaTeX results.
Fixes for test02 & test04.
Plot table does not appear correctly in xdvi but is OK in ps and pdf output.
Convenience EPS for application model figure.
General MPI services diagram.
General MPI services diagram.
Added general MPI services figure.
Switched in bib file including only relevant citations.
Fixing KDA-2B test cases.
Got test/cmpi/test01 working.
test01 got pretty good results up to 800 nodes.
Minor improvements... count_success() moved to counts.zsh .
Funcionality moved to counts.zsh .
Basically works for test04. Augmenting startup procedure...
NOTIFICATION hack works.
test01 works.
test02 works.
Accepted all changes.
test02 works.
test01 works.
Reusing some code out of tests.
Minors, testing now...
Changing debugging info...
Added cmpi_comm_clients communicator to KDA-1.
test03 works with new cmpi_comm_clients.
XOR calculator useful when debugging Kademlia.
test01 works again.
Nothing.
test04 almost works.
Try new test01.
Hopefully fixed test01.
Test everything again with less output and check notifications.
test02 works.
tests 01 & 02 work at full scale.
test03 works with cleaner output.
test03 almost complete.
Fixes.
Minors to get test01 working on the BG/P.
New shoot() methodology should work on the BG/P.
test04 works... moving to SiCortex...
Works on BG/P.
Plot fonts and device settings working.
Sent to Bryan 3/23/2008.
Sent to Bryan 3/23/2009.
Original copy of CAN code from MBT.
Added pseudo-code pointers for Bryan in src/can/cmpi_can.c
Expanding font sizes...
Bigger fonts for test01.
test01 has wider view.
All plots looking good.
Now imgs called kda - will have can imgs soon.
Rounding out with images.
Try this test01 on SiCortex.
Revised intro.
Minor fixes for test01.
Do not remove .dat files except for distclean.
Added memory usage debugging.
Added splint integration to Makefile.in . Checked many splint issues.
Keyvalue memory deallocation function.
Adding memory debugging.
New check_mallocs() functionality.
Fixing memory leaks.
Works. Migrating to a branch for further memory tests.
Works.
Probably correct re: malloc- need better debugging...
Working on memory leaks...
Merged branches/plug_leaks -r312:334 into trunk.
These tests now work: fixed issues with:
Minor fixes for test/cmpi .
test_helpers for test notifications.
Typo.
Merged branches/cmpi-io-1 336:348 into trunk.
Added scan() function.
Overhauling intro.
Rounded out new intro.
Revised abstract to meet 100 word limit and moved some text into the
Section descriptions updated.
Hacked out major CAN sections and plots.
Restored TAGS construction based on configure-time implementation selection.
Final versions of test01 & test02.
Previous revision of test03.zsh was garbage.
Merged: svn merge -r 369:370 $GS/branches/code/MPI-DHT-Finals .
Getting close to a version to distribute to co-authors.
Sending to co-authors.
Added SiCortex stats and some experiment notes.
Bryan's correct email address.
Merged branches/cmpi-io -r355:387 .
Patches to enable MPICH2 to use CMPI-IO.
Cleaned up.
Should have been called mpirpc-1 to begin with.
Quick fix for MPIRPC test change.
Starting on Kademlia version that uses sockets and MPI_Comm_join().
KDA-2B fixes merged from branches/code/kda-2B-fixes 395:397 .
Adds to related work.
2nd draft submitted.
4th submission.
Merged fixes from dense-1.
KDA-1 and KDA-2B now compile after overhaul to MPIRPC-2.
Moved to src/adio/ad_cmpi .
Merge from branches/code/cmpi-io-1 to keep things together.
Merged changes from branch cmpi-io-1 .
Improving MPIRPC-2 test for sockets.
Merges from branch dense-1.
Finishing up DB on BG/P.
Apparently need to be more careful about SIGPIPE on BG/P.
Minor changes to cleanup cmpi-db on surveyor.
Checking in some experiments for debugging.
Wrong extension.
Added debugger support to GUM tests.
Debugging test cases...
gum tests that work...
Building call/response in GUM.
Basic call/response paradigm works (test/gum/test03).
Readability cleanups.
Checking in skeleton of GOBS.
Header for GOBS functionality.
Need absolute path for Setup.hs configure --prefix.
Checking in current stuff for memory question.
Final submission documents.
Minor change to allow compilation of poster abstract.
Header for dense distributed hashtable implementation.
Draft of dense distributed hashtable implementation.
Cleanups.
Adding test for DHT functionality.
Cleanups.
Changed GSL pretty output option.
Developing DHT component...
Fixes to disksim test routines for renewed disksim integration effort.
New figures for wiki.
Basic query model for dense implementation (gobs/test01).
Added uniquifiers to RPC messages.
Reorganized to avoid function pointer response to queries.
Test for simple DHT insertion.
Better uniquifiers.
Simple DHT store works.
Simple retrieve test.
Added gobs_retrieve() functionality.
Going with GSL header convention.
Piecing some things together...
Bump.
Basic launch skeleton compiles.
Posting simple GUM & GOBS tests.
Hopefully helpful prototype diagram.
Reorg to show unified metadata&data cluster.
Resized to save space.
Adding skeleton of FS functionality.
Just getting this out of my svn status list.
Basic write functionality and test case (test05).
Simple read functionality.
Location for Kademlia implementation.
New structure for fast lookups in XOR space.
-----------------------------------------------------------------------
hooks/post-receive
--
Grayskull Repository
1
0
[Gs-commits] [SCM] Grayskull Repository branch, master, updated. 36febf136d046cc9ef1fed7e25993dafc88bd114
by noreply@mcs.anl.gov 17 Jul '09
by noreply@mcs.anl.gov 17 Jul '09
17 Jul '09
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Grayskull Repository".
The branch, master has been updated
via 36febf136d046cc9ef1fed7e25993dafc88bd114 (commit)
via 49690fbfa633b29a3dc43e3827ff2b288c6aab1e (commit)
via 3944011ba40eee841f41c3c608e9555be36b1b7f (commit)
via 6a5215fae33dda3e7a67f02d64f6c52668d79423 (commit)
via d9a7f9ac62afe0dda33df2a835b95b3124141936 (commit)
via 819d37b2e5dae329f21c38064454230bc07ceaba (commit)
via 9fede552c0a722af77ee05480309d72b8c756c78 (commit)
from c4189208fc32d5c223de5301c9927d39fce100d2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 36febf136d046cc9ef1fed7e25993dafc88bd114
Merge: 49690fbfa633b29a3dc43e3827ff2b288c6aab1e c4189208fc32d5c223de5301c9927d39fce100d2
Author: Dries Kimpe <dkimpe(a)mcs.anl.gov>
Date: Fri Jul 17 15:10:14 2009 -0500
Merge [email protected]:git/grayskull
commit 49690fbfa633b29a3dc43e3827ff2b288c6aab1e
Author: slang <slang@cf56b8ba-6243-0410-985a-9235ae14e7ef>
Date: Fri Jul 17 19:53:03 2009 +0000
add end of line to transformed source.
git-svn-id: https://svn.mcs.anl.gov/repos/grayskull/trunk@623 cf56b8ba-6243-0410-985a-9235ae14e7ef
commit 3944011ba40eee841f41c3c608e9555be36b1b7f
Author: slang <slang@cf56b8ba-6243-0410-985a-9235ae14e7ef>
Date: Fri Jul 17 16:42:00 2009 +0000
add support for blocking functions that don't make blocking calls. Instead of just reporting an error and aborting, we now issue a warning at compile time, and allow the blocking function to directly call the callback.
git-svn-id: https://svn.mcs.anl.gov/repos/grayskull/trunk@622 cf56b8ba-6243-0410-985a-9235ae14e7ef
commit 6a5215fae33dda3e7a67f02d64f6c52668d79423
Author: slang <slang@cf56b8ba-6243-0410-985a-9235ae14e7ef>
Date: Fri Jul 17 16:07:55 2009 +0000
more complete function pointer support.
git-svn-id: https://svn.mcs.anl.gov/repos/grayskull/trunk@621 cf56b8ba-6243-0410-985a-9235ae14e7ef
commit d9a7f9ac62afe0dda33df2a835b95b3124141936
Author: wozniak <wozniak@cf56b8ba-6243-0410-985a-9235ae14e7ef>
Date: Tue Jul 14 17:02:35 2009 +0000
xtree basically works.
git-svn-id: https://svn.mcs.anl.gov/repos/grayskull/trunk@620 cf56b8ba-6243-0410-985a-9235ae14e7ef
commit 819d37b2e5dae329f21c38064454230bc07ceaba
Author: slang <slang@cf56b8ba-6243-0410-985a-9235ae14e7ef>
Date: Tue Jul 14 14:09:03 2009 +0000
adding header stuff.
git-svn-id: https://svn.mcs.anl.gov/repos/grayskull/trunk@619 cf56b8ba-6243-0410-985a-9235ae14e7ef
commit 9fede552c0a722af77ee05480309d72b8c756c78
Author: slang <slang@cf56b8ba-6243-0410-985a-9235ae14e7ef>
Date: Mon Jul 13 21:31:10 2009 +0000
fix header generation problem with new header parser/generator. This required a new version of Language.C (0.3.3), and will require running setup-langc again.
git-svn-id: https://svn.mcs.anl.gov/repos/grayskull/trunk@618 cf56b8ba-6243-0410-985a-9235ae14e7ef
-----------------------------------------------------------------------
Summary of changes:
code/Makefile.in | 1 +
code/src/adts/ilist.c | 12 +-
code/src/adts/module.mk.in | 1 +
code/src/adts/xtree.c | 255 +++++++++++++++++++------
code/src/gsl/Makefile.in | 24 ++--
code/src/gsl/common/gs.c | 4 +-
code/src/gsl/configure.in | 17 ++-
code/src/gsl/language-c-0.3.1.tar.gz | Bin 138161 -> 0 bytes
code/src/gsl/language-c-0.3.3.tar.gz | Bin 0 -> 103493 bytes
code/src/gsl/language-c.patch | 251 ++++++++++++-------------
code/src/gsl/parser/CGen.lhs | 31 +++-
code/src/gsl/parser/CParse.lhs | 111 ++++++++++--
code/src/gsl/parser/ContextGen.lhs | 10 +-
code/src/gsl/parser/Header.lhs | 100 ++++++++++
code/src/gsl/parser/Serialize.hs | 2 +-
code/src/gsl/parser/Walker.lhs | 85 +++++++--
code/src/gsl/parser/gs-gen-header.sh | 58 ------
code/src/gsl/parser/gs-parser.lhs | 238 +++++++++++++++++++-----
code/src/gsl/parser/module.mk.in | 3 +-
code/src/gsl/resources/mpi/gs-mpi.c | 27 +++-
code/src/gsl/resources/scheduling/gs-sched.c | 7 +
code/src/gsl/resources/storage/gs-storage.c | 39 ++++
code/src/gsl/resources/storage/gs-storage.gsh | 8 -
code/src/gsl/resources/storage/module.mk.in | 2 +-
code/src/gsl/resources/timer/gs-timer.c | 7 +
code/src/gsl/setup-langc | 6 +-
code/src/gsl/tests/correctness/btest-impl.c | 46 +++++
code/src/gsl/tests/correctness/funptrs.gs | 81 ++++++++
code/src/gsl/tests/correctness/module.mk.in | 4 +-
code/src/gsl/tests/correctness/nbfun.gs | 77 ++++++++
code/src/include/xtree.h | 69 +++++--
code/test/adts/About.txt | 2 +-
code/test/adts/module.mk.in | 13 +-
code/test/paper1/defaults01.grace | 2 +-
34 files changed, 1207 insertions(+), 386 deletions(-)
delete mode 100644 code/src/gsl/language-c-0.3.1.tar.gz
create mode 100644 code/src/gsl/language-c-0.3.3.tar.gz
create mode 100644 code/src/gsl/parser/Header.lhs
delete mode 100755 code/src/gsl/parser/gs-gen-header.sh
create mode 100644 code/src/gsl/tests/correctness/funptrs.gs
create mode 100644 code/src/gsl/tests/correctness/nbfun.gs
hooks/post-receive
--
Grayskull Repository
1
0
Author: slang
Date: 2009-07-17 14:53:03 -0500 (Fri, 17 Jul 2009)
New Revision: 623
Modified:
trunk/code/src/gsl/parser/gs-parser.lhs
Log:
add end of line to transformed source.
Modified: trunk/code/src/gsl/parser/gs-parser.lhs
===================================================================
--- trunk/code/src/gsl/parser/gs-parser.lhs 2009-07-17 16:42:00 UTC (rev 622)
+++ trunk/code/src/gsl/parser/gs-parser.lhs 2009-07-17 19:53:03 UTC (rev 623)
@@ -1484,6 +1484,7 @@
> ctu <- generateAST headerfile
> (pairs, w) <- runStateT (getBlockingHeaderDecls ctu) w
> outputHeader r outfile pairs
+> appendFile headerfile "\n\n"
> return ()
> parseFile :: Bool -> [String] -> FilePath -> Maybe FilePath -> FilePath -> IO ()
@@ -1495,6 +1496,7 @@
> (transCTU, w) <- runStateT (transform ctuWithPostDecls) w
> if p then ((writeFile outfile) . show . pretty) transCTU
> else ((writeFile outfile) . show . serialize) transCTU
+> appendFile outfile "\n\n"
> return ()
> data ParserOpts = Pretty | Help | Include String | Report String | Outfile String | Header
1
0