[Swift-devel] <profile> info to provider

Michael Wilde wilde at mcs.anl.gov
Thu Nov 18 19:46:12 CST 2010


Allan, assuming you want to fetch this from Java (as opposed to Karajan in vdl-int.k) there are a few examples in the code snip I posted for David a few days ago:

+        Object countValue = getSpec().getAttribute("count");
+        int count;
+
+        if (countValue != null)
+            count = Integer.valueOf(String.valueOf(countValue)).intValue();
+        else 
+            count = 1;
+
+        // FIXME: wpn is only meaningful for coasters; is 1 ok otherwise?
+        // should we flag wpn as error if not coasters?
+
+        Object wpnValue = getAttribute(spec, "workerspernode", "1");
+        int wpn = Integer.valueOf(String.valueOf(wpnValue)).intValue();
+        logger.info("FETCH OF WPN: " + wpn); // FIXME: DB
+
+        count *= wpn;
+        logger.info("FETCH OF PE: " + getAttribute(spec, "pe", "NO pe"));
+        logger.info("FETCH OF CPN: " + getAttribute(spec, "corespernode", "NO cpn"));
+        writeAttrValue(String.valueOf(count), "-pe "
                 + getAttribute(spec, "pe", getSGEProperties().getDefaultPE())
-                + " ", wr, "1");
+                + " ", wr);


- Mike


----- Original Message -----
> Hi,
> 
> I'm poking around the provider-coaster tree to be able to manually
> specify the ports of the local service while the persistent coaster
> service bugs are not yet ironed out. Somewhere along the "-localport"
> patch I made before.
> 
> What's the reference again for extracting <profile> information from
> the sites.xml file to the provider?
> 
> Thanks,
> -Allan
> 
> --
> Allan M. Espinosa <http://amespinosa.wordpress.com>
> PhD student, Computer Science
> University of Chicago <http://people.cs.uchicago.edu/~aespinosa>
> _______________________________________________
> Swift-devel mailing list
> Swift-devel at ci.uchicago.edu
> http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel

-- 
Michael Wilde
Computation Institute, University of Chicago
Mathematics and Computer Science Division
Argonne National Laboratory




More information about the Swift-devel mailing list