You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
(39) |
May
(165) |
Jun
(164) |
Jul
(127) |
Aug
(81) |
Sep
(146) |
Oct
(375) |
Nov
(241) |
Dec
(77) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(42) |
Feb
(38) |
Mar
(30) |
Apr
(6) |
May
(17) |
Jun
|
Jul
(15) |
Aug
(59) |
Sep
(31) |
Oct
(44) |
Nov
(30) |
Dec
(12) |
2008 |
Jan
(9) |
Feb
(63) |
Mar
(18) |
Apr
(43) |
May
(28) |
Jun
(32) |
Jul
(61) |
Aug
(5) |
Sep
(72) |
Oct
(48) |
Nov
(6) |
Dec
|
From: <vig...@us...> - 2006-04-26 00:26:59
|
Revision: 101 Author: vigneshmpn Date: 2006-04-25 17:26:51 -0700 (Tue, 25 Apr 2006) ViewCVS: http://svn.sourceforge.net/cogkit/?rev=101&view=rev Log Message: ----------- added private and public keystore Added Paths: ----------- trunk/school/vignesh/src/keys/ trunk/school/vignesh/src/keys/privkeystore trunk/school/vignesh/src/keys/pubcertkeystore Added: trunk/school/vignesh/src/keys/privkeystore =================================================================== (Binary files differ) Property changes on: trunk/school/vignesh/src/keys/privkeystore ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/school/vignesh/src/keys/pubcertkeystore =================================================================== (Binary files differ) Property changes on: trunk/school/vignesh/src/keys/pubcertkeystore ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vig...@us...> - 2006-04-25 23:47:36
|
Revision: 100 Author: vigneshmpn Date: 2006-04-25 16:47:32 -0700 (Tue, 25 Apr 2006) ViewCVS: http://svn.sourceforge.net/cogkit/?rev=100&view=rev Log Message: ----------- included encryption Modified Paths: -------------- trunk/school/vignesh/src/SecureClient.java Modified: trunk/school/vignesh/src/SecureClient.java =================================================================== --- trunk/school/vignesh/src/SecureClient.java 2006-04-25 03:34:25 UTC (rev 99) +++ trunk/school/vignesh/src/SecureClient.java 2006-04-25 23:47:32 UTC (rev 100) @@ -1,18 +1,28 @@ - import org.apache.ws.security.WSSecurityEngine; import org.apache.ws.security.components.crypto.Crypto; import org.apache.ws.security.components.crypto.CryptoFactory; +import org.apache.ws.security.message.WSEncryptBody; +import org.apache.ws.security.WSSecurityEngine; +import org.apache.axis.SOAPPart; import org.apache.axis.client.Call; import org.apache.axis.client.Service; +import org.apache.axis.client.AxisClient; import org.apache.axis.utils.XMLUtils; import org.apache.axis.Message; import org.apache.axis.MessageContext; -import org.apache.axis.client.AxisClient; import org.apache.axis.configuration.NullProvider; import org.apache.axis.message.SOAPEnvelope; +import org.apache.xml.security.c14n.Canonicalizer; + +import org.w3c.dom.Document; + +import javax.xml.soap.MessageFactory; +import javax.xml.soap.SOAPMessage; +import javax.xml.transform.dom.DOMSource; + import java.io.ByteArrayInputStream; import java.io.InputStream; import java.io.PrintWriter; @@ -20,7 +30,7 @@ public class SecureClient { - private static final String soapMsg = + private static final String requestMsg = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<SOAP-ENV:Envelope" + " xmlns:SOAP-ENV=\"http://www.w3.org/2003/05/soap-envelope\"\n" + @@ -37,9 +47,9 @@ private static final WSSecurityEngine securityEngine = new WSSecurityEngine(); //Create and initialize the crypto provider. - //Values to initialize are provided in the cryto.properties file in wss4j.jar. + //Values to initialize are provided in the crypto.properties file in wss4j.jar. //As default org.apache.ws.security.components.crypto.Merlin as the provider class. -// private static final Crypto crypto = CryptoFactory.getInstance(); + private static final Crypto crypto = CryptoFactory.getInstance(); private AxisClient axisClient = null; private MessageContext msgContext = null; @@ -58,28 +68,75 @@ * Method name: convertStrToMsg * Converts the SOAP envelope String to a Axis Message. * - * @param: unsignEnvelope - A String containing SOAP envelope + * @param: unsecureEnvelope - A String containing SOAP envelope * * @return: axisMessage - */ - private Message convertStrToMsg(String unsignEnvelope) + private Message convertStrToMsg(String unsecureEnvelope) { - InputStream inStream = new ByteArrayInputStream(unsignEnvelope.getBytes()); + InputStream inStream = new ByteArrayInputStream(unsecureEnvelope.getBytes()); Message axisMessage = new Message(inStream); axisMessage.setMessageContext(msgContext); return axisMessage; } + /** + * Method name: toSOAPMessage + * Converts the SOAP envelope String to a Axis Message. + * + * @param: doc - A Document object + * + * @return: SOAPMessage + */ + + public static SOAPMessage toSOAPMessage(Document doc) throws Exception + { + Canonicalizer c14n = Canonicalizer.getInstance(Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS); + byte[] canonicalMessage = c14n.canonicalizeSubtree(doc); + ByteArrayInputStream in = new ByteArrayInputStream(canonicalMessage); + MessageFactory factory = MessageFactory.newInstance(); + return factory.createMessage(null, in); + } + + /** + * Method name: encryptSOAPEnvelope + * Encrypts the SOAP envelope. + * + * @param: unsecureEnvelope - An unsigned SOAP envelope + * + * @param: axisMsg - An Axis message + * + * @return: encryptSOAPMsg - An encrypted SOAP envelope as Axis message. + */ + + private Message encryptSOAPEnvelope(SOAPEnvelope unsecureEnvelope, Message axisMsg) + throws Exception + { + WSEncryptBody encryptBody = new WSEncryptBody(); + encryptBody.setUserInfo("16c73ab6-b892-458f-abf5-2f875f74882e", "security"); + + Document doc = unsecureEnvelope.getAsDocument(); + + //Build SOAP envelope with encrypted body and add encrypted key. + Document encryptDoc = encryptBody.build(doc, crypto); + + // Convert the document into a SOAP message. + Message encryptMsg = (Message) toSOAPMessage(encryptDoc); + String soapPart = encryptMsg.getSOAPPartAsString(); + ((SOAPPart)axisMsg.getSOAPPart()).setCurrentMessage(soapPart, SOAPPart.FORM_STRING); + encryptDoc = axisMsg.getSOAPEnvelope().getAsDocument(); + Message encryptSOAPMsg = (Message)toSOAPMessage(encryptDoc); + + return encryptSOAPMsg; + } + public static void main(String args[]) { try { SecureClient secClient = new SecureClient(); - Message axisMsg = secClient.convertStrToMsg(soapMsg); - SOAPEnvelope unsignEnvelope = axisMsg.getSOAPEnvelope(); - - //Define endpoint of the service. + //Define endpoint of the service String endpoint = "http://localhost:8080/axis/HelloWorldService.jws"; //Create a service @@ -91,8 +148,14 @@ //Set the target endpoint of the provided location. call.setTargetEndpointAddress(endpoint); - SOAPEnvelope responseEnvelope = call.invoke(unsignEnvelope); + Message axisMsg = secClient.convertStrToMsg(requestMsg); + SOAPEnvelope unsecureEnvelope = axisMsg.getSOAPEnvelope(); + Message encryptMsg = secClient.encryptSOAPEnvelope(unsecureEnvelope, axisMsg); + XMLUtils.PrettyElementToWriter(encryptMsg.getSOAPEnvelope().getAsDOM(), new PrintWriter(System.out)); + + SOAPEnvelope responseEnvelope = call.invoke(unsecureEnvelope); + XMLUtils.PrettyElementToWriter(responseEnvelope.getAsDOM(), new PrintWriter(System.out)); } catch (Exception e) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vig...@us...> - 2006-04-25 03:34:29
|
Revision: 99 Author: vigneshmpn Date: 2006-04-24 20:34:25 -0700 (Mon, 24 Apr 2006) ViewCVS: http://svn.sourceforge.net/cogkit/?rev=99&view=rev Log Message: ----------- Added SecureClient.java Added Paths: ----------- trunk/school/vignesh/src/SecureClient.java Added: trunk/school/vignesh/src/SecureClient.java =================================================================== --- trunk/school/vignesh/src/SecureClient.java (rev 0) +++ trunk/school/vignesh/src/SecureClient.java 2006-04-25 03:34:25 UTC (rev 99) @@ -0,0 +1,103 @@ + +import org.apache.ws.security.WSSecurityEngine; + +import org.apache.ws.security.components.crypto.Crypto; +import org.apache.ws.security.components.crypto.CryptoFactory; + +import org.apache.axis.client.Call; +import org.apache.axis.client.Service; +import org.apache.axis.utils.XMLUtils; +import org.apache.axis.Message; +import org.apache.axis.MessageContext; +import org.apache.axis.client.AxisClient; +import org.apache.axis.configuration.NullProvider; +import org.apache.axis.message.SOAPEnvelope; + +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.io.PrintWriter; + +public class SecureClient +{ + + private static final String soapMsg = + "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + + "<SOAP-ENV:Envelope" + + " xmlns:SOAP-ENV=\"http://www.w3.org/2003/05/soap-envelope\"\n" + + " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"\n" + + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">" + + " <SOAP-ENV:Body>" + + " <SayHello xmlns=\"http://localhost:8080/axis/HelloWorldService\">" + + " <value xmlns=\"\">Vignesh</value>" + + " </SayHello>" + + " </SOAP-ENV:Body>" + + "</SOAP-ENV:Envelope>"; + + //initialize the WS security engine. + private static final WSSecurityEngine securityEngine = new WSSecurityEngine(); + + //Create and initialize the crypto provider. + //Values to initialize are provided in the cryto.properties file in wss4j.jar. + //As default org.apache.ws.security.components.crypto.Merlin as the provider class. +// private static final Crypto crypto = CryptoFactory.getInstance(); + + private AxisClient axisClient = null; + private MessageContext msgContext = null; + + //Constructor + public SecureClient() + { + //initialize the engine with do-nothing engine configuration. + axisClient = new AxisClient(new NullProvider()); + + //Use AxisClient as the context engine for messaging operations. + msgContext = new MessageContext(axisClient); + } + + /** + * Method name: convertStrToMsg + * Converts the SOAP envelope String to a Axis Message. + * + * @param: unsignEnvelope - A String containing SOAP envelope + * + * @return: axisMessage - + */ + private Message convertStrToMsg(String unsignEnvelope) + { + InputStream inStream = new ByteArrayInputStream(unsignEnvelope.getBytes()); + Message axisMessage = new Message(inStream); + axisMessage.setMessageContext(msgContext); + return axisMessage; + } + + public static void main(String args[]) + { + try + { + SecureClient secClient = new SecureClient(); + + Message axisMsg = secClient.convertStrToMsg(soapMsg); + SOAPEnvelope unsignEnvelope = axisMsg.getSOAPEnvelope(); + + //Define endpoint of the service. + String endpoint = "http://localhost:8080/axis/HelloWorldService.jws"; + + //Create a service + Service service = new Service(); + + //Create a SOAP request call + Call call = (Call) service.createCall(); + + //Set the target endpoint of the provided location. + call.setTargetEndpointAddress(endpoint); + + SOAPEnvelope responseEnvelope = call.invoke(unsignEnvelope); + + XMLUtils.PrettyElementToWriter(responseEnvelope.getAsDOM(), new PrintWriter(System.out)); + } + catch (Exception e) + { + e.printStackTrace(); + } + } +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gu...@us...> - 2006-04-24 15:30:57
|
Revision: 98 Author: gurubn Date: 2006-04-24 08:30:51 -0700 (Mon, 24 Apr 2006) ViewCVS: http://svn.sourceforge.net/cogkit/?rev=98&view=rev Log Message: ----------- MPICH version of mpi-pi-a.c. Modified Paths: -------------- trunk/examples/pi/README.txt Added Paths: ----------- trunk/examples/pi/mpi/mpich-pi-a.c Modified: trunk/examples/pi/README.txt =================================================================== --- trunk/examples/pi/README.txt 2006-04-24 07:13:13 UTC (rev 97) +++ trunk/examples/pi/README.txt 2006-04-24 15:30:51 UTC (rev 98) @@ -1,16 +1,16 @@ -This directory contains example programs showing different ways to -conduct pleasently parallel programming on the Grid. - -We use a monte carlo algorthm to demonstrate some features - -The sequential program can be found in the directory: - -./sequential - -An MPI program can be found in - -./mpi - -A Web services solution can be found in - -./webservice +This directory contains example programs showing different ways to +conduct pleasently parallel programming on the Grid. + +We use a monte carlo algorthm to demonstrate some features + +The sequential program can be found in the directory: + +./sequential + +An MPI program can be found in + +./mpi + +A Web services solution can be found in + +./webservice Added: trunk/examples/pi/mpi/mpich-pi-a.c =================================================================== --- trunk/examples/pi/mpi/mpich-pi-a.c (rev 0) +++ trunk/examples/pi/mpi/mpich-pi-a.c 2006-04-24 15:30:51 UTC (rev 98) @@ -0,0 +1,116 @@ +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include <time.h> +#include "mpi.h" +#include <windows.h> + +#define PI 3.1415926535897932384626433832795 + +#define MAX_PROCESSORS 20 + +int main( int argc, char *argv[] ) { + int iterations, j; + long seed, in_circle = 0, i; + double pi_est, x, y, length_sqr; + + long h; + int listprocs[MAX_PROCESSORS]; + int hits, myid, numprocs, procs; + MPI_Group mpiGroup, subGroup; + MPI_Comm subComm; + + LARGE_INTEGER start_ticks, end_ticks; + LARGE_INTEGER ticksPerSecond; + + // Initialize the timer. + if (!QueryPerformanceFrequency(&ticksPerSecond)) { + printf("QueryPerformance not present \n"); + return 0; + } + // Begin the clock right before sending the necessary information. + QueryPerformanceCounter(&start_ticks); + + // Get all the necessary parameters from argv + seed = atol(argv[1]); + iterations = atoi(argv[2]); + procs = atoi(argv[3]); + + MPI_Init(&argc,&argv); + MPI_Comm_size(MPI_COMM_WORLD,&numprocs); + + // myid is initialized after the call to MPI-Init(). + if (myid == 0 ) { // print only once at the root node + if (argc < 4) { + printf("type; iterations; approx; delta; time\n"); + // Finalize the MPI_COMM_WORLD before terminating the program due to + // insufficient parameters. + MPI_Finalize(); + return 0; + } + } + + // Populate the list based on the number of processors available. + for (j = 0; j < numprocs; j++) + listprocs[j] = j; + + // Create a group based on the number of processors specified by the user. + MPI_Comm_group(MPI_COMM_WORLD, &mpiGroup); + MPI_Group_incl(mpiGroup, procs, listprocs, &subGroup); + MPI_Comm_create(MPI_COMM_WORLD, subGroup, &subComm); + + if(subComm != MPI_COMM_NULL) { + MPI_Comm_size(subComm,&numprocs); + MPI_Group_rank(subGroup, &myid); + + // Broadcast the seed and the number of times user is + // attempting to hit the Dartboard. + + MPI_Bcast(&seed, 1, MPI_LONG, 0, subComm); + MPI_Bcast(&iterations, 1, MPI_INT, 0, subComm); + + // Each processor will compute its own number of trials. + // Total number of trials will be divided among processors. + // I do an integer division, since its just used as a seed. + // The precision can be ignored. + h = iterations/ numprocs; + + // Seed the random function. + seed = seed * h ; //// this is alternative a of seeding + srand(seed); + + for (i = 0; i < h; i++) { + x = 2.0*rand()/RAND_MAX-1.0; + y = 2.0*rand()/RAND_MAX-1.0; + length_sqr = x*x + y*y; + + if (length_sqr <= 1.0) { + in_circle++; + } + } + // Sum up the number of successful hits by each processor. + MPI_Reduce(&in_circle, &hits, 1, MPI_INT, MPI_SUM, 0, subComm); + if (myid == 0){ + pi_est = 4.0 * hits / iterations; + } + MPI_Comm_free(&subComm); + } + + // Facilitate graceful termination + MPI_Group_free(&subGroup); + MPI_Group_free(&mpiGroup); + MPI_Finalize(); + + // Stop the clock right after PI is computed and MPI_COMM_WORLD is finalized. + QueryPerformanceCounter(&end_ticks); + + // Print the result if you are the root node. + if (myid == 0) { + printf("parallel; %d %f %f %f\n", + iterations, + pi_est, + fabs(pi_est-PI), + (float)(end_ticks.QuadPart - start_ticks.QuadPart)/(float)ticksPerSecond.QuadPart); + } + return 0; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <las...@us...> - 2006-04-24 07:13:18
|
Revision: 97 Author: laszewsk Date: 2006-04-24 00:13:13 -0700 (Mon, 24 Apr 2006) ViewCVS: http://svn.sourceforge.net/cogkit/?rev=97&view=rev Log Message: ----------- placeholders for karajan almanac Added Paths: ----------- trunk/examples/karajan/ trunk/examples/karajan/element.k trunk/examples/karajan/element.kxml Added: trunk/examples/karajan/element.k =================================================================== --- trunk/examples/karajan/element.k (rev 0) +++ trunk/examples/karajan/element.k 2006-04-24 07:13:13 UTC (rev 97) @@ -0,0 +1 @@ +here would come an element example Added: trunk/examples/karajan/element.kxml =================================================================== --- trunk/examples/karajan/element.kxml (rev 0) +++ trunk/examples/karajan/element.kxml 2006-04-24 07:13:13 UTC (rev 97) @@ -0,0 +1 @@ +here would come an element example This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gu...@us...> - 2006-04-23 21:16:34
|
Revision: 96 Author: gurubn Date: 2006-04-23 14:16:19 -0700 (Sun, 23 Apr 2006) ViewCVS: http://svn.sourceforge.net/cogkit/?rev=96&view=rev Log Message: ----------- After the bug fixes as identified by Dr.Gregor as of Apr 21 2006. Modified Paths: -------------- trunk/examples/pi/mpi/mpi-pi-b.c Modified: trunk/examples/pi/mpi/mpi-pi-b.c =================================================================== --- trunk/examples/pi/mpi/mpi-pi-b.c 2006-04-22 06:27:13 UTC (rev 95) +++ trunk/examples/pi/mpi/mpi-pi-b.c 2006-04-23 21:16:19 UTC (rev 96) @@ -1,107 +1,117 @@ -// Parallel PI program that takes as input, the seed, # of attempts to hit the dartboard, -// and number of processors on which the MPI program has to be run. -#include <stdio.h> -#include <stdlib.h> -#include <math.h> -#include <sys/time.h> -#include "mpi.h" - -#define PI 3.1415926535897932384626433832795 - -#define MAX_PROCESSORS 20 - -int main( int argc, char *argv[] ) { - double seed, iterations; - double pi_est, x, y, length_sqr, start, end; - int in_circle = 0, i; - struct timeval tame; - - double mypi, h; - int listprocs[MAX_PROCESSORS]; - int hits, n, myid, numprocs; - MPI_Group mpiGroup, subGroup; - MPI_Comm subComm; - - // Begin the clock right before sending the necessary information. - gettimeofday(&tame, NULL); - start = tame.tv_sec + (tame.tv_usec / 1000000.0); - - // Get all the nexecssary parameters from argv - seed = atof(argv[1]); - iterations = atof(argv[2]); - - MPI_Init(&argc,&argv); - MPI_Comm_size(MPI_COMM_WORLD,&numprocs); - - // myid is initialized after the call to MPI-Init(). - if (myid == 0 ) { // print only once at the root node - if (argc < 4) { - printf("type; iterations; approx; delta; time\n"); - // Finalize the MPI_COMM_WORLD before terminating the program due to insufficient parameters. - MPI_Finalize(); - return 0; - } - } - - // Populate the list based on the number of processors available. - for (i = 0; i < numprocs; i++) - listprocs[i] = i; - - // Create a group based on the number of processors specified by the user. - MPI_Comm_group(MPI_COMM_WORLD, &mpiGroup); - MPI_Group_incl(mpiGroup, atoi(argv[3]), listprocs, &subGroup); - MPI_Comm_create(MPI_COMM_WORLD, subGroup, &subComm); - - if(subComm != MPI_COMM_NULL) { - MPI_Comm_size(subComm,&numprocs); - MPI_Group_rank(subGroup, &myid); - - // Broadcast the seed and the number of times user is - // attempting to hit the Dartboard. - - MPI_Bcast(&seed, 1, MPI_DOUBLE, 0, subComm); - MPI_Bcast(&iterations, 1, MPI_DOUBLE, 0, subComm); - - // Each processor will compute its own number of trials. - // Total number of trials will be divided among processors. - h = (double) iterations/ (double) numprocs; - - // Seed the random function. - srand48(seed); - - for (i = 0; i < (int) 2*myid*h; i++) { - x = 2.0*drand48()-1.0; - y = 2.0*drand48()-1.0; - length_sqr = x*x + y*y; - - if (length_sqr <= 1.0) { - in_circle++; - } - } - // Sum up the number of successful hits by each processor. - MPI_Reduce(&in_circle, &hits, 1, MPI_INT, MPI_SUM, 0, subComm); - if (myid == 0){ - pi_est = 4.0 * hits / iterations; - } - MPI_Comm_free(&subComm); - } - - // Facilitate graceful termination - MPI_Group_free(&subGroup); - MPI_Group_free(&mpiGroup); - MPI_Finalize(); - - // Stop the clock right after PI is computed and MPI_COMM_WORLD is finalized - gettimeofday(&tame, NULL); - end = tame.tv_sec + (tame.tv_usec / 1000000.0); - - // Print the result if you are the root node. - if (myid == 0) { - printf("parallel; %.0f %19.16f %23.22f %23.22f\n", - iterations, - pi_est, - fabs(pi_est-PI), - (end - start)); - } - return 0; -} +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include <sys/time.h> +#include "mpi.h" + +#define PI 3.1415926535897932384626433832795 + +#define MAX_PROCESSORS 20 + +int main( int argc, char *argv[] ) { + int iterations, j; + long seed, in_circle = 0, i; + double pi_est, x, y, length_sqr, start, end; + struct timeval tame; + + long h, hsum, hits; + int listprocs[MAX_PROCESSORS]; + int n, myid, numprocs, procs; + MPI_Group mpiGroup, subGroup; + MPI_Comm subComm; + + // Begin the clock right before sending the necessary information. + gettimeofday(&tame, NULL); + start = tame.tv_sec + (tame.tv_usec / 1000000.0); + + // Get all the necessary parameters from argv + seed = atol(argv[1]); + iterations = atoi(argv[2]); + procs = atoi(argv[3]); + + MPI_Init(&argc,&argv); + MPI_Comm_size(MPI_COMM_WORLD,&numprocs); + + // myid is initialized after the call to MPI-Init(). + if (myid == 0 ) { // print only once at the root node + if (argc < 4) { + printf("type; iterations; approx; delta; time\n"); + // Finalize the MPI_COMM_WORLD before terminating the program due to + // insufficient parameters. + MPI_Finalize(); + return 0; + } + } + + // Populate the list based on the number of processors available. + for (j = 0; j < numprocs; j++) + listprocs[j] = j; + + // Create a group based on the number of processors specified by the user. + MPI_Comm_group(MPI_COMM_WORLD, &mpiGroup); + MPI_Group_incl(mpiGroup, procs, listprocs, &subGroup); + MPI_Comm_create(MPI_COMM_WORLD, subGroup, &subComm); + + if(subComm != MPI_COMM_NULL) { + MPI_Comm_size(subComm,&numprocs); + MPI_Group_rank(subGroup, &myid); + + // Broadcast the seed and the number of times user is + // attempting to hit the Dartboard. + + MPI_Bcast(&seed, 1, MPI_LONG, 0, subComm); + MPI_Bcast(&iterations, 1, MPI_INT, 0, subComm); + + // Each processor will compute its own number of trials. + // Total number of trials will be divided among processors. + // I do an integer division, since its just used as a seed. + // The precision can be ignored. + h = iterations * 2 * (myid+1)/ numprocs; + + // Seed the random function. + seed = seed * h ; //// this is alternative way of seeding + srand48(seed); + + for (i = 0; i < h; i++) { + x = 2.0*drand48()-1.0; + y = 2.0*drand48()-1.0; + length_sqr = x*x + y*y; + + if (length_sqr <= 1.0) { + in_circle++; + } + } + + // Sum up the number of successful hits by each processor. + MPI_Reduce(&in_circle, &hits, 1, MPI_LONG, MPI_SUM, 0, subComm); + + // Since each processor makes varying number fo attempts, + // it is important to consider the sum of all those iterations. + // Therefore iterations, can no longer be used to compute pi_est. + MPI_Reduce(&h, &hsum, 1, MPI_LONG, MPI_SUM, 0, subComm); + + if (myid == 0){ + pi_est = (double) 4.0 * hits / hsum; + } + MPI_Comm_free(&subComm); + } + + // Facilitate graceful termination + MPI_Group_free(&subGroup); + MPI_Group_free(&mpiGroup); + MPI_Finalize(); + + // Stop the clock right after PI is computed and MPI_COMM_WORLD is finalized. + gettimeofday(&tame, NULL); + end = tame.tv_sec + (tame.tv_usec / 1000000.0); + + // Print the result if you are the root node. + if (myid == 0) { + printf("parallel; %d %f %f %f\n", + iterations, + pi_est, + fabs(pi_est-PI), + (end - start)); + } + return 0; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gu...@us...> - 2006-04-22 06:27:18
|
Revision: 95 Author: gurubn Date: 2006-04-21 23:27:13 -0700 (Fri, 21 Apr 2006) ViewCVS: http://svn.sourceforge.net/cogkit/?rev=95&view=rev Log Message: ----------- After the bug fixes as identified by Dr.Gregor as of Apr 21 2006. Modified Paths: -------------- trunk/examples/pi/mpi/mpi-pi-a.c trunk/examples/pi/sequential/sequential-pi.c Removed Paths: ------------- trunk/examples/pi/mpi/mpi-pi.c Modified: trunk/examples/pi/mpi/mpi-pi-a.c =================================================================== --- trunk/examples/pi/mpi/mpi-pi-a.c 2006-04-21 19:43:27 UTC (rev 94) +++ trunk/examples/pi/mpi/mpi-pi-a.c 2006-04-22 06:27:13 UTC (rev 95) @@ -1,5 +1,3 @@ -// Parallel PI program that takes as input, the seed, # of attempts to hit the dartboard, -// and number of processors on which the MPI program has to be run. #include <stdio.h> #include <stdlib.h> #include <math.h> @@ -11,14 +9,14 @@ #define MAX_PROCESSORS 20 int main( int argc, char *argv[] ) { - double seed, iterations; + int iterations, j; + long seed, in_circle = 0, i; double pi_est, x, y, length_sqr, start, end; - int in_circle = 0, i; struct timeval tame; - double mypi, h; + long h; int listprocs[MAX_PROCESSORS]; - int hits, n, myid, numprocs; + int hits, n, myid, numprocs, procs; MPI_Group mpiGroup, subGroup; MPI_Comm subComm; @@ -26,9 +24,10 @@ gettimeofday(&tame, NULL); start = tame.tv_sec + (tame.tv_usec / 1000000.0); - // Get all the nexecssary parameters from argv - seed = atof(argv[1]); - iterations = atof(argv[2]); + // Get all the necessary parameters from argv + seed = atol(argv[1]); + iterations = atoi(argv[2]); + procs = atoi(argv[3]); MPI_Init(&argc,&argv); MPI_Comm_size(MPI_COMM_WORLD,&numprocs); @@ -37,19 +36,20 @@ if (myid == 0 ) { // print only once at the root node if (argc < 4) { printf("type; iterations; approx; delta; time\n"); - // Finalize the MPI_COMM_WORLD before terminating the program due to insufficient parameters. + // Finalize the MPI_COMM_WORLD before terminating the program due to + // insufficient parameters. MPI_Finalize(); return 0; } } // Populate the list based on the number of processors available. - for (i = 0; i < numprocs; i++) - listprocs[i] = i; + for (j = 0; j < numprocs; j++) + listprocs[j] = j; // Create a group based on the number of processors specified by the user. MPI_Comm_group(MPI_COMM_WORLD, &mpiGroup); - MPI_Group_incl(mpiGroup, atoi(argv[3]), listprocs, &subGroup); + MPI_Group_incl(mpiGroup, procs, listprocs, &subGroup); MPI_Comm_create(MPI_COMM_WORLD, subGroup, &subComm); if(subComm != MPI_COMM_NULL) { @@ -59,18 +59,20 @@ // Broadcast the seed and the number of times user is // attempting to hit the Dartboard. - MPI_Bcast(&seed, 1, MPI_DOUBLE, 0, subComm); - MPI_Bcast(&iterations, 1, MPI_DOUBLE, 0, subComm); + MPI_Bcast(&seed, 1, MPI_LONG, 0, subComm); + MPI_Bcast(&iterations, 1, MPI_INT, 0, subComm); // Each processor will compute its own number of trials. // Total number of trials will be divided among processors. - h = (double) iterations/ (double) numprocs; + // I do an integer division, since its just used as a seed. + // The precision can be ignored. + h = iterations/ numprocs; // Seed the random function. seed = seed * h ; //// this is alternative a of seeding srand48(seed); - for (i = 0; i <= (int) h; i++) { + for (i = 0; i < h; i++) { x = 2.0*drand48()-1.0; y = 2.0*drand48()-1.0; length_sqr = x*x + y*y; @@ -92,13 +94,13 @@ MPI_Group_free(&mpiGroup); MPI_Finalize(); - // Stop the clock right after PI is computed and MPI_COMM_WORLD is finalized + // Stop the clock right after PI is computed and MPI_COMM_WORLD is finalized. gettimeofday(&tame, NULL); end = tame.tv_sec + (tame.tv_usec / 1000000.0); // Print the result if you are the root node. if (myid == 0) { - printf("parallel; %.0f %19.16f %23.22f %23.22f\n", + printf("parallel; %d %f %f %f\n", iterations, pi_est, fabs(pi_est-PI), Deleted: trunk/examples/pi/mpi/mpi-pi.c =================================================================== --- trunk/examples/pi/mpi/mpi-pi.c 2006-04-21 19:43:27 UTC (rev 94) +++ trunk/examples/pi/mpi/mpi-pi.c 2006-04-22 06:27:13 UTC (rev 95) @@ -1,114 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <math.h> -#include <time.h> -#include "mpi.h" -#define PI 3.1415926535897932384626433832795 -#define MAX_PROCESSORS 20 -int main( int argc, char *argv[] ) -{ - int i, flag = 0; - double seed, iterations; - int n, myid, in_circle = 0, hits, numprocs; - double mypi, pi_est, h, x, y, length_sqr, start, end; - int listprocs[MAX_PROCESSORS]; - struct timeval tame; - int nolegend = 0; - MPI_Group mpiGroup, subGroup; - MPI_Comm subComm; - - // Begin the clock right before sending the necessary information. - gettimeofday(&tame, NULL); - start = tame.tv_sec + (tame.tv_usec / 1000000.0); - - // Get all the nexecssary parameters from argv - seed = atof(argv[1]); - iterations = atof(argv[2]); - nolegend = atoi(argv[4]); // 1 - no legend; o - with legend - - MPI_Init(&argc,&argv); - MPI_Comm_size(MPI_COMM_WORLD,&numprocs); - - // Populate the list based on the number of processors available. - for (i = 0; i < numprocs; i++) - listprocs[i] = i; - - // Create a group based on the number of processors specified by the user. - MPI_Comm_group(MPI_COMM_WORLD, &mpiGroup); - MPI_Group_incl(mpiGroup, atoi(argv[3]), listprocs, &subGroup); - MPI_Comm_create(MPI_COMM_WORLD, subGroup, &subComm); - - - // Each processor will compute its own number of trials. - // Total number of trials will be divided among processors. - h = (double) iterations/ (double) numprocs; - - // A: - seed = seed * h ; //// this is alternative a - srand48(seed); - - //B: - srand48(seed); - for {i=0; i<= myid*h; i++){ - x = drand48(); - } - - if(subComm != MPI_COMM_NULL) { - MPI_Comm_size(subComm,&numprocs); - MPI_Group_rank(subGroup, &myid); - - // Broadcast the seed and the number of times user is - // attempting to hit the Dartboard. - - MPI_Bcast(&seed, 1, MPI_DOUBLE, 0, subComm); - MPI_Bcast(&iterations, 1, MPI_DOUBLE, 0, subComm); - - // Seed the random function, values starts from 0. - - - - for (i = 0; i <= (int) h; i++) { - x = 2.0*drand48()-1.0; - y = 2.0*drand48()-1.0; - length_sqr = x*x + y*y; - - if (length_sqr <= 1.0) { - in_circle++; - } - } - // Sum up the number of successful hits by each processor. - MPI_Reduce(&in_circle, &hits, 1, MPI_INT, MPI_SUM, 0, subComm); - if (myid == 0){ - pi_est = 4.0 * hits / iterations; - - // flag is to make one of the processor print the result to stdout. - // I assume time taken for this assignment is negligibly small. - flag=1; - } - MPI_Comm_free(&subComm); - } - - // Facilitate graceful termination - MPI_Group_free(&subGroup); - MPI_Group_free(&mpiGroup); - MPI_Finalize(); - - // Stop the clock right after PI is computed and MPI_COMM_WORLD is finalized - gettimeofday(&tame, NULL); - end = tame.tv_sec + (tame.tv_usec / 1000000.0); - - // Print the result if you are the root node. - if (flag == 1) { - - if (nolegend == 1) { - printf("type; iterations; approx; delta; time\n"); - } - printf("parallel; %.0f %19.16f %23.22f %23.22f\n", - iterations, - pi_est, - fabs(pi_est-PI), - (end - start)); - } - - return 0; -} Modified: trunk/examples/pi/sequential/sequential-pi.c =================================================================== --- trunk/examples/pi/sequential/sequential-pi.c 2006-04-21 19:43:27 UTC (rev 94) +++ trunk/examples/pi/sequential/sequential-pi.c 2006-04-22 06:27:13 UTC (rev 95) @@ -1,4 +1,5 @@ -// Sequential PI program that takes as input, the seed, # of attempts to hit the dartboard. +// Sequential PI program that takes as input, the seed, +// and the # of attempts to hit the dartboard. #include <stdio.h> #include <stdlib.h> #include <math.h> @@ -7,27 +8,28 @@ #define PI 3.1415926535897932384626433832795 int main(int argc, char *argv[]) { - double seed, iterations; + int iterations, i; + long seed, in_circle = 0; double pi_est, x, y, length_sqr, start, end; - int in_circle = 0, i; struct timeval tame; if (argc < 3) { printf("type; iterations; approx; delta; time\n"); return 0; - } + } // get the initial parameters from argv - seed = atof(argv[1]); - iterations = atof(argv[2]); - + seed = atol(argv[1]); + iterations = atoi(argv[2]); + + //printf(" SEED: %f ITERATIONS:%d \n", seed, iterations); // get the time before computation gettimeofday(&tame, NULL); start = tame.tv_sec + (tame.tv_usec / 1000000.0); - - // "Seed" the random number generator + + // "Seed" the random number generator srand48(seed); - for (i = 0; i < (int) iterations; i++) { + for (i = 0; i < iterations; i++) { x = 2.0 * drand48() - 1.0; y = 2.0 * drand48() - 1.0; length_sqr = x*x + y*y; @@ -36,16 +38,16 @@ in_circle++; } } - pi_est = 4.0*((double) in_circle) / iterations; - + pi_est = 4.0*((double) in_circle / (double) iterations); + // get the time after computation gettimeofday(&tame, NULL); end = tame.tv_sec + (tame.tv_usec / 1000000.0); - printf("sequential; %.0f; %19.16f; %23.22f; %23.22f\n", - iterations, - pi_est, - fabs(PI - pi_est), - (end - start)) ; + printf("sequential; %d; %f; %f; %f\n", + iterations, + pi_est, + fabs(PI - pi_est), + (end - start)) ; return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gu...@us...> - 2006-04-21 04:03:33
|
Revision: 93 Author: gurubn Date: 2006-04-20 21:03:23 -0700 (Thu, 20 Apr 2006) ViewCVS: http://svn.sourceforge.net/cogkit/?rev=93&view=rev Log Message: ----------- Added two versions of mpi-pi program based on two different ways of seeding the random number generator. Added Paths: ----------- trunk/examples/pi/mpi/mpi-pi-a.c trunk/examples/pi/mpi/mpi-pi-b.c Added: trunk/examples/pi/mpi/mpi-pi-a.c =================================================================== --- trunk/examples/pi/mpi/mpi-pi-a.c (rev 0) +++ trunk/examples/pi/mpi/mpi-pi-a.c 2006-04-21 04:03:23 UTC (rev 93) @@ -0,0 +1,108 @@ +// Parallel PI program that takes as input, the seed, # of attempts to hit the dartboard, +// and number of processors on which the MPI program has to be run. +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include <sys/time.h> +#include "mpi.h" + +#define PI 3.1415926535897932384626433832795 + +#define MAX_PROCESSORS 20 + +int main( int argc, char *argv[] ) { + double seed, iterations; + double pi_est, x, y, length_sqr, start, end; + int in_circle = 0, i; + struct timeval tame; + + double mypi, h; + int listprocs[MAX_PROCESSORS]; + int hits, n, myid, numprocs; + MPI_Group mpiGroup, subGroup; + MPI_Comm subComm; + + // Begin the clock right before sending the necessary information. + gettimeofday(&tame, NULL); + start = tame.tv_sec + (tame.tv_usec / 1000000.0); + + // Get all the nexecssary parameters from argv + seed = atof(argv[1]); + iterations = atof(argv[2]); + + MPI_Init(&argc,&argv); + MPI_Comm_size(MPI_COMM_WORLD,&numprocs); + + // myid is initialized after the call to MPI-Init(). + if (myid == 0 ) { // print only once at the root node + if (argc < 4) { + printf("type; iterations; approx; delta; time\n"); + // Finalize the MPI_COMM_WORLD before terminating the program due to insufficient parameters. + MPI_Finalize(); + return 0; + } + } + + // Populate the list based on the number of processors available. + for (i = 0; i < numprocs; i++) + listprocs[i] = i; + + // Create a group based on the number of processors specified by the user. + MPI_Comm_group(MPI_COMM_WORLD, &mpiGroup); + MPI_Group_incl(mpiGroup, atoi(argv[3]), listprocs, &subGroup); + MPI_Comm_create(MPI_COMM_WORLD, subGroup, &subComm); + + if(subComm != MPI_COMM_NULL) { + MPI_Comm_size(subComm,&numprocs); + MPI_Group_rank(subGroup, &myid); + + // Broadcast the seed and the number of times user is + // attempting to hit the Dartboard. + + MPI_Bcast(&seed, 1, MPI_DOUBLE, 0, subComm); + MPI_Bcast(&iterations, 1, MPI_DOUBLE, 0, subComm); + + // Each processor will compute its own number of trials. + // Total number of trials will be divided among processors. + h = (double) iterations/ (double) numprocs; + + // Seed the random function. + seed = seed * h ; //// this is alternative a of seeding + srand48(seed); + + for (i = 0; i <= (int) h; i++) { + x = 2.0*drand48()-1.0; + y = 2.0*drand48()-1.0; + length_sqr = x*x + y*y; + + if (length_sqr <= 1.0) { + in_circle++; + } + } + // Sum up the number of successful hits by each processor. + MPI_Reduce(&in_circle, &hits, 1, MPI_INT, MPI_SUM, 0, subComm); + if (myid == 0){ + pi_est = 4.0 * hits / iterations; + } + MPI_Comm_free(&subComm); + } + + // Facilitate graceful termination + MPI_Group_free(&subGroup); + MPI_Group_free(&mpiGroup); + MPI_Finalize(); + + // Stop the clock right after PI is computed and MPI_COMM_WORLD is finalized + gettimeofday(&tame, NULL); + end = tame.tv_sec + (tame.tv_usec / 1000000.0); + + // Print the result if you are the root node. + if (myid == 0) { + printf("parallel; %.0f %19.16f %23.22f %23.22f\n", + iterations, + pi_est, + fabs(pi_est-PI), + (end - start)); + } + return 0; +} Added: trunk/examples/pi/mpi/mpi-pi-b.c =================================================================== --- trunk/examples/pi/mpi/mpi-pi-b.c (rev 0) +++ trunk/examples/pi/mpi/mpi-pi-b.c 2006-04-21 04:03:23 UTC (rev 93) @@ -0,0 +1,107 @@ +// Parallel PI program that takes as input, the seed, # of attempts to hit the dartboard, +// and number of processors on which the MPI program has to be run. +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include <sys/time.h> +#include "mpi.h" + +#define PI 3.1415926535897932384626433832795 + +#define MAX_PROCESSORS 20 + +int main( int argc, char *argv[] ) { + double seed, iterations; + double pi_est, x, y, length_sqr, start, end; + int in_circle = 0, i; + struct timeval tame; + + double mypi, h; + int listprocs[MAX_PROCESSORS]; + int hits, n, myid, numprocs; + MPI_Group mpiGroup, subGroup; + MPI_Comm subComm; + + // Begin the clock right before sending the necessary information. + gettimeofday(&tame, NULL); + start = tame.tv_sec + (tame.tv_usec / 1000000.0); + + // Get all the nexecssary parameters from argv + seed = atof(argv[1]); + iterations = atof(argv[2]); + + MPI_Init(&argc,&argv); + MPI_Comm_size(MPI_COMM_WORLD,&numprocs); + + // myid is initialized after the call to MPI-Init(). + if (myid == 0 ) { // print only once at the root node + if (argc < 4) { + printf("type; iterations; approx; delta; time\n"); + // Finalize the MPI_COMM_WORLD before terminating the program due to insufficient parameters. + MPI_Finalize(); + return 0; + } + } + + // Populate the list based on the number of processors available. + for (i = 0; i < numprocs; i++) + listprocs[i] = i; + + // Create a group based on the number of processors specified by the user. + MPI_Comm_group(MPI_COMM_WORLD, &mpiGroup); + MPI_Group_incl(mpiGroup, atoi(argv[3]), listprocs, &subGroup); + MPI_Comm_create(MPI_COMM_WORLD, subGroup, &subComm); + + if(subComm != MPI_COMM_NULL) { + MPI_Comm_size(subComm,&numprocs); + MPI_Group_rank(subGroup, &myid); + + // Broadcast the seed and the number of times user is + // attempting to hit the Dartboard. + + MPI_Bcast(&seed, 1, MPI_DOUBLE, 0, subComm); + MPI_Bcast(&iterations, 1, MPI_DOUBLE, 0, subComm); + + // Each processor will compute its own number of trials. + // Total number of trials will be divided among processors. + h = (double) iterations/ (double) numprocs; + + // Seed the random function. + srand48(seed); + + for (i = 0; i < (int) 2*myid*h; i++) { + x = 2.0*drand48()-1.0; + y = 2.0*drand48()-1.0; + length_sqr = x*x + y*y; + + if (length_sqr <= 1.0) { + in_circle++; + } + } + // Sum up the number of successful hits by each processor. + MPI_Reduce(&in_circle, &hits, 1, MPI_INT, MPI_SUM, 0, subComm); + if (myid == 0){ + pi_est = 4.0 * hits / iterations; + } + MPI_Comm_free(&subComm); + } + + // Facilitate graceful termination + MPI_Group_free(&subGroup); + MPI_Group_free(&mpiGroup); + MPI_Finalize(); + + // Stop the clock right after PI is computed and MPI_COMM_WORLD is finalized + gettimeofday(&tame, NULL); + end = tame.tv_sec + (tame.tv_usec / 1000000.0); + + // Print the result if you are the root node. + if (myid == 0) { + printf("parallel; %.0f %19.16f %23.22f %23.22f\n", + iterations, + pi_est, + fabs(pi_est-PI), + (end - start)); + } + return 0; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gu...@us...> - 2006-04-21 03:39:08
|
Revision: 92 Author: gurubn Date: 2006-04-20 20:39:02 -0700 (Thu, 20 Apr 2006) ViewCVS: http://svn.sourceforge.net/cogkit/?rev=92&view=rev Log Message: ----------- Added two versions of mpi-pi program based on two different ways of seeding the random numbers. Modified Paths: -------------- trunk/examples/pi/sequential/sequential-pi.c Modified: trunk/examples/pi/sequential/sequential-pi.c =================================================================== --- trunk/examples/pi/sequential/sequential-pi.c 2006-04-19 16:07:04 UTC (rev 91) +++ trunk/examples/pi/sequential/sequential-pi.c 2006-04-21 03:39:02 UTC (rev 92) @@ -1,4 +1,4 @@ -// Sequential PI program that takeas as input, the seed, # of attempts to hit the dartboard and the # of processors. +// Sequential PI program that takes as input, the seed, # of attempts to hit the dartboard. #include <stdio.h> #include <stdlib.h> #include <math.h> @@ -7,10 +7,9 @@ #define PI 3.1415926535897932384626433832795 int main(int argc, char *argv[]) { - int i, seed, iterations; - double pi_est; - double x, y, length_sqr, start, end; - int in_circle = 0; + double seed, iterations; + double pi_est, x, y, length_sqr, start, end; + int in_circle = 0, i; struct timeval tame; if (argc < 3) { @@ -19,27 +18,31 @@ } // get the initial parameters from argv - seed = atoi(argv[1]); - iterations = atoi(argv[2]); + seed = atof(argv[1]); + iterations = atof(argv[2]); // get the time before computation gettimeofday(&tame, NULL); start = tame.tv_sec + (tame.tv_usec / 1000000.0); + // "Seed" the random number generator srand48(seed); - for (i = 0; i < iterations; i++) { + for (i = 0; i < (int) iterations; i++) { x = 2.0 * drand48() - 1.0; y = 2.0 * drand48() - 1.0; length_sqr = x*x + y*y; + if (length_sqr <= 1.0) { in_circle++; } } pi_est = 4.0*((double) in_circle) / iterations; + // get the time after computation gettimeofday(&tame, NULL); end = tame.tv_sec + (tame.tv_usec / 1000000.0); - printf("sequential; %d; %19.16f; %23.22f; %23.22f\n", + + printf("sequential; %.0f; %19.16f; %23.22f; %23.22f\n", iterations, pi_est, fabs(PI - pi_est), This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <las...@us...> - 2006-04-19 16:07:09
|
Revision: 91 Author: laszewsk Date: 2006-04-19 09:07:04 -0700 (Wed, 19 Apr 2006) ViewCVS: http://svn.sourceforge.net/cogkit/?rev=91&view=rev Log Message: ----------- added some default dirs Added Paths: ----------- trunk/school/vignesh/bin/ trunk/school/vignesh/lib/ trunk/school/vignesh/man/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <las...@us...> - 2006-04-19 16:04:20
|
Revision: 90 Author: laszewsk Date: 2006-04-19 09:04:10 -0700 (Wed, 19 Apr 2006) ViewCVS: http://svn.sourceforge.net/cogkit/?rev=90&view=rev Log Message: ----------- added template for vignesh Added Paths: ----------- trunk/school/ trunk/school/vignesh/ trunk/school/vignesh/paper/ trunk/school/vignesh/paper/README.txt trunk/school/vignesh/paper/paper-template.doc trunk/school/vignesh/src/ Added: trunk/school/vignesh/paper/README.txt =================================================================== --- trunk/school/vignesh/paper/README.txt (rev 0) +++ trunk/school/vignesh/paper/README.txt 2006-04-19 16:04:10 UTC (rev 90) @@ -0,0 +1 @@ +copy the templaet to paper.doc and modify Added: trunk/school/vignesh/paper/paper-template.doc =================================================================== (Binary files differ) Property changes on: trunk/school/vignesh/paper/paper-template.doc ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <las...@us...> - 2006-04-18 19:34:33
|
Revision: 89 Author: laszewsk Date: 2006-04-18 12:34:26 -0700 (Tue, 18 Apr 2006) ViewCVS: http://svn.sourceforge.net/cogkit/?rev=89&view=rev Log Message: ----------- added more details Modified Paths: -------------- trunk/src/cog/modules/basic/org/cogkit/state/State.java trunk/src/cog/modules/basic/org/cogkit/state/StateMachine.java Modified: trunk/src/cog/modules/basic/org/cogkit/state/State.java =================================================================== --- trunk/src/cog/modules/basic/org/cogkit/state/State.java 2006-04-18 19:21:06 UTC (rev 88) +++ trunk/src/cog/modules/basic/org/cogkit/state/State.java 2006-04-18 19:34:26 UTC (rev 89) @@ -7,8 +7,15 @@ interface State { /** + * initialises a state with the given name and an asociated type in integer. * @param name + * @param type */ + public State (String name, int type); + + /** + * @param name + */ public void setName(String name); /** Modified: trunk/src/cog/modules/basic/org/cogkit/state/StateMachine.java =================================================================== --- trunk/src/cog/modules/basic/org/cogkit/state/StateMachine.java 2006-04-18 19:21:06 UTC (rev 88) +++ trunk/src/cog/modules/basic/org/cogkit/state/StateMachine.java 2006-04-18 19:34:26 UTC (rev 89) @@ -2,8 +2,34 @@ public interface StateMachine { + /** initialises a Statemachine with the given name. + public StateMachine (String name) + /** + * returns the current state + * + * @return + */ + public State getState(); + + /** + * returns the last states of the statemachine wher the number of states is + * maximal limit. + * + * @param limit + * @return + */ + public State[] getStates(int limit); + + /** + * sets the maximal number of saved states to limit. + * @param limit + */ + public void setSavedStates(int limit); + + /** * adds a state s to the state machine + * * @param s */ public void addState (State s); @@ -34,9 +60,20 @@ * @param to * State */ - public void removeTransition (State from, State to); + public void removeTransition (State from, State to); /** + * returns tru if the transition between from and to is allowed. + * + * @param from + * State + * @param to + * State + * @return true if the transition is allowed. + */ + public boolean validTransition (State from, State to); + + /** * exports the transition graph to a Graph object. The Graph consists of * nodes and edges in which the names of the nodes are determined by the * names of the states. @@ -48,7 +85,8 @@ * verifies the statemachine to see if no states exists, that are not * conected to other states. * + * @return returns true if the machine is valid. */ - public void verify(); + public boolean verify(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <las...@us...> - 2006-04-18 19:21:15
|
Revision: 88 Author: laszewsk Date: 2006-04-18 12:21:06 -0700 (Tue, 18 Apr 2006) ViewCVS: http://svn.sourceforge.net/cogkit/?rev=88&view=rev Log Message: ----------- added some more use examples for the statemachine class Added Paths: ----------- trunk/src/cog/modules/basic/org/cogkit/state/BatchQueueStateMachine.java Added: trunk/src/cog/modules/basic/org/cogkit/state/BatchQueueStateMachine.java =================================================================== --- trunk/src/cog/modules/basic/org/cogkit/state/BatchQueueStateMachine.java (rev 0) +++ trunk/src/cog/modules/basic/org/cogkit/state/BatchQueueStateMachine.java 2006-04-18 19:21:06 UTC (rev 88) @@ -0,0 +1,23 @@ +package org.cogkit.state; + +public class BatchQueueStateMachine implements StateMachine { + + BatchQueueStateMachine (){ + + State start = new State("START", 0); + State submit = new State("SUBMIT", 1); + State cancel = new State("CANCEL", 2); + State done = new State("DONE", 3); + State failed = new State("FAILED", 4); + State pending = new State("PENDING", 5); + + StateMachine m = new StateMachine("BatchQueue"); + m.addTransition(start, pending); + m.addTransition(pending, submit); + m.addTransition(submit, done); + m.addTransition(submit, failed); + m.addTransition(pending, failed); + // More states need to be added. + } + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <las...@us...> - 2006-04-18 18:11:35
|
Revision: 87 Author: laszewsk Date: 2006-04-18 11:11:28 -0700 (Tue, 18 Apr 2006) ViewCVS: http://svn.sourceforge.net/cogkit/?rev=87&view=rev Log Message: ----------- testing eclipse formating Modified Paths: -------------- trunk/src/cog/modules/basic/org/cogkit/state/StateMachine.java Modified: trunk/src/cog/modules/basic/org/cogkit/state/StateMachine.java =================================================================== --- trunk/src/cog/modules/basic/org/cogkit/state/StateMachine.java 2006-04-18 17:33:10 UTC (rev 86) +++ trunk/src/cog/modules/basic/org/cogkit/state/StateMachine.java 2006-04-18 18:11:28 UTC (rev 87) @@ -2,9 +2,53 @@ public interface StateMachine { + /** + * adds a state s to the state machine + * @param s + */ public void addState (State s); + + /** + * removes the state form the state transition machine. It also removes + * transitions to and from this state. + * + * @param s + */ public void removeState (State s); + + /** + * adds a transition in the state diagram from the states from and to + * + * @param from + * State + * @param to + * State + */ public void addTransition (State from, State to); - public void removeTransition (State from, State to); + + /** + * removes a transition in the state diagram from the states from and to + * + * @param from + * State + * @param to + * State + */ + public void removeTransition (State from, State to); + /** + * exports the transition graph to a Graph object. The Graph consists of + * nodes and edges in which the names of the nodes are determined by the + * names of the states. + * + */ + public void Graph export(); + + /** + * verifies the statemachine to see if no states exists, that are not + * conected to other states. + * + */ + public void verify(); + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <las...@us...> - 2006-04-18 17:33:16
|
Revision: 86 Author: laszewsk Date: 2006-04-18 10:33:10 -0700 (Tue, 18 Apr 2006) ViewCVS: http://svn.sourceforge.net/cogkit/?rev=86&view=rev Log Message: ----------- testing refactorisation Added Paths: ----------- trunk/src/cog/modules/basic/org/cogkit/state/ trunk/src/cog/modules/basic/org/cogkit/state/State.java trunk/src/cog/modules/basic/org/cogkit/state/StateMachine.java Copied: trunk/src/cog/modules/basic/org/cogkit/state/State.java (from rev 84, trunk/src/cog/modules/basic/State.java) =================================================================== --- trunk/src/cog/modules/basic/org/cogkit/state/State.java (rev 0) +++ trunk/src/cog/modules/basic/org/cogkit/state/State.java 2006-04-18 17:33:10 UTC (rev 86) @@ -0,0 +1,29 @@ +/** + * @author Gregor von Laszewsk, gr...@mc... + * + */ +package org.cogkit.state; + +interface State { + + /** + * @param name + */ + public void setName(String name); + + /** + * @return + */ + public String getName(); + + /** + * @param type + */ + public void setType (int type); + + /** + * @return + */ + public int getType(); + +} \ No newline at end of file Added: trunk/src/cog/modules/basic/org/cogkit/state/StateMachine.java =================================================================== --- trunk/src/cog/modules/basic/org/cogkit/state/StateMachine.java (rev 0) +++ trunk/src/cog/modules/basic/org/cogkit/state/StateMachine.java 2006-04-18 17:33:10 UTC (rev 86) @@ -0,0 +1,10 @@ +package org.cogkit.state; + +public interface StateMachine { + + public void addState (State s); + public void removeState (State s); + public void addTransition (State from, State to); + public void removeTransition (State from, State to); + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <las...@us...> - 2006-04-18 17:33:10
|
Revision: 85 Author: laszewsk Date: 2006-04-18 10:33:05 -0700 (Tue, 18 Apr 2006) ViewCVS: http://svn.sourceforge.net/cogkit/?rev=85&view=rev Log Message: ----------- testing refactorisation Added Paths: ----------- trunk/src/cog/modules/basic/org/ trunk/src/cog/modules/basic/org/cogkit/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <las...@us...> - 2006-04-18 17:14:05
|
Revision: 84 Author: laszewsk Date: 2006-04-18 10:13:59 -0700 (Tue, 18 Apr 2006) ViewCVS: http://svn.sourceforge.net/cogkit/?rev=84&view=rev Log Message: ----------- testing the commit of a new file via svn Modified Paths: -------------- trunk/src/cog/modules/basic/State.java Added Paths: ----------- trunk/src/cog/modules/basic/SateMachine.java Added: trunk/src/cog/modules/basic/SateMachine.java =================================================================== --- trunk/src/cog/modules/basic/SateMachine.java (rev 0) +++ trunk/src/cog/modules/basic/SateMachine.java 2006-04-18 17:13:59 UTC (rev 84) @@ -0,0 +1,8 @@ + +public interface SateMachine { + + addState + removeState + transition(from, to); + +} Modified: trunk/src/cog/modules/basic/State.java =================================================================== --- trunk/src/cog/modules/basic/State.java 2006-04-18 16:29:32 UTC (rev 83) +++ trunk/src/cog/modules/basic/State.java 2006-04-18 17:13:59 UTC (rev 84) @@ -1,2 +1,27 @@ +/** + * @author Gregor von Laszewsk, gr...@mc... + * + */ +interface State { -Hello world ! \ No newline at end of file + /** + * @param name + */ + public void setName(String name); + + /** + * @return + */ + public String getName(); + + /** + * @param type + */ + public void setType (int type); + + /** + * @return + */ + public int getType(); + +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dko...@us...> - 2006-04-18 16:29:36
|
Revision: 83 Author: dkodeboy Date: 2006-04-18 09:29:32 -0700 (Tue, 18 Apr 2006) ViewCVS: http://svn.sourceforge.net/cogkit/?rev=83&view=rev Log Message: ----------- Test for eclipse check in Modified Paths: -------------- trunk/src/cog/modules/basic/State.java Modified: trunk/src/cog/modules/basic/State.java =================================================================== --- trunk/src/cog/modules/basic/State.java 2006-04-18 16:06:16 UTC (rev 82) +++ trunk/src/cog/modules/basic/State.java 2006-04-18 16:29:32 UTC (rev 83) @@ -0,0 +1,2 @@ + +Hello world ! \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <las...@us...> - 2006-04-18 16:06:19
|
Revision: 82 Author: laszewsk Date: 2006-04-18 09:06:16 -0700 (Tue, 18 Apr 2006) ViewCVS: http://svn.sourceforge.net/cogkit/?rev=82&view=rev Log Message: ----------- added a test dir Added Paths: ----------- trunk/src/cog/modules/basic/ trunk/src/cog/modules/basic/State.java Added: trunk/src/cog/modules/basic/State.java =================================================================== This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <las...@us...> - 2006-04-18 14:58:43
|
Revision: 81 Author: laszewsk Date: 2006-04-18 07:58:40 -0700 (Tue, 18 Apr 2006) ViewCVS: http://svn.sourceforge.net/cogkit/?rev=81&view=rev Log Message: ----------- added a template for a thesis Modified Paths: -------------- trunk/papers/thesis-guru/prasad-thesis.tex Modified: trunk/papers/thesis-guru/prasad-thesis.tex =================================================================== --- trunk/papers/thesis-guru/prasad-thesis.tex 2006-04-18 14:57:15 UTC (rev 80) +++ trunk/papers/thesis-guru/prasad-thesis.tex 2006-04-18 14:58:40 UTC (rev 81) @@ -1,6 +1,10 @@ % This is just a placeholder and you should be identifying a preliminary % set of sections and list questions you expect this section will answer. +% I recommend that this document be editit with MIcrosoft Word or +% another program that has spell and grammar checker +% + \documentclass{article} \usepackage{fullpage} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <las...@us...> - 2006-04-18 14:57:22
|
Revision: 80 Author: laszewsk Date: 2006-04-18 07:57:15 -0700 (Tue, 18 Apr 2006) ViewCVS: http://svn.sourceforge.net/cogkit/?rev=80&view=rev Log Message: ----------- added a template for a thesis Added Paths: ----------- trunk/papers/thesis-guru/ trunk/papers/thesis-guru/Makefile trunk/papers/thesis-guru/images/ trunk/papers/thesis-guru/prasad-thesis.tex Added: trunk/papers/thesis-guru/Makefile =================================================================== --- trunk/papers/thesis-guru/Makefile (rev 0) +++ trunk/papers/thesis-guru/Makefile 2006-04-18 14:57:15 UTC (rev 80) @@ -0,0 +1,5 @@ +all: + pdflatex prasad-thesis.tex + +clean: + rm *.dvi *.log *.toc *.aux \ No newline at end of file Added: trunk/papers/thesis-guru/prasad-thesis.tex =================================================================== --- trunk/papers/thesis-guru/prasad-thesis.tex (rev 0) +++ trunk/papers/thesis-guru/prasad-thesis.tex 2006-04-18 14:57:15 UTC (rev 80) @@ -0,0 +1,42 @@ +% This is just a placeholder and you should be identifying a preliminary +% set of sections and list questions you expect this section will answer. + +\documentclass{article} + +\usepackage{fullpage} + +\author{Guru Prasad} +\title{TBD} + +\begin{document} + +\maketitle + +\tableofcontents + +\section*{Preface} + +\section*{Acknowledgements} + +\section{Introdcution} + +\section{Related Work} + +\section{Approach} + +* What is the thesis about + +* ... + +\section{implementation} + +\section{Evaluation} + + +\section{Conclusion} + + + +%References + +\end{document} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <las...@us...> - 2006-04-18 12:44:15
|
Revision: 79 Author: laszewsk Date: 2006-04-18 05:44:03 -0700 (Tue, 18 Apr 2006) ViewCVS: http://svn.sourceforge.net/cogkit/?rev=79&view=rev Log Message: ----------- testing the mail notification Modified Paths: -------------- trunk/examples/pi/README.txt Modified: trunk/examples/pi/README.txt =================================================================== --- trunk/examples/pi/README.txt 2006-04-18 12:41:23 UTC (rev 78) +++ trunk/examples/pi/README.txt 2006-04-18 12:44:03 UTC (rev 79) @@ -14,5 +14,3 @@ A Web services solution can be found in ./webservice - ----- \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <las...@us...> - 2006-04-18 12:41:31
|
Revision: 78 Author: laszewsk Date: 2006-04-18 05:41:23 -0700 (Tue, 18 Apr 2006) ViewCVS: http://svn.sourceforge.net/cogkit/?rev=78&view=rev Log Message: ----------- testing the mail notification Modified Paths: -------------- trunk/examples/pi/README.txt Modified: trunk/examples/pi/README.txt =================================================================== --- trunk/examples/pi/README.txt 2006-04-18 12:33:36 UTC (rev 77) +++ trunk/examples/pi/README.txt 2006-04-18 12:41:23 UTC (rev 78) @@ -14,3 +14,5 @@ A Web services solution can be found in ./webservice + +---- \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <las...@us...> - 2006-04-18 12:33:41
|
Revision: 77 Author: laszewsk Date: 2006-04-18 05:33:36 -0700 (Tue, 18 Apr 2006) ViewCVS: http://svn.sourceforge.net/cogkit/?rev=77&view=rev Log Message: ----------- testing the mail notification Added Paths: ----------- trunk/examples/pi/README.txt Added: trunk/examples/pi/README.txt =================================================================== --- trunk/examples/pi/README.txt (rev 0) +++ trunk/examples/pi/README.txt 2006-04-18 12:33:36 UTC (rev 77) @@ -0,0 +1,16 @@ +This directory contains example programs showing different ways to +conduct pleasently parallel programming on the Grid. + +We use a monte carlo algorthm to demonstrate some features + +The sequential program can be found in the directory: + +./sequential + +An MPI program can be found in + +./mpi + +A Web services solution can be found in + +./webservice Property changes on: trunk/examples/pi/README.txt ___________________________________________________________________ Name: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |