Package org.nebulaframework.core.job.future

Examples of org.nebulaframework.core.job.future.GridJobFuture


      GridArchive archive;
      archive = GridArchive.fromFile(new File("simpletestjob.nar"));
     
      log.debug("Submitting NAR");
     
      GridJobFuture future = (GridJobFuture) node.getJobSubmissionService().submitArchive(archive).values().toArray()[0];
     
      try {
        log.info("RESULT : " + future.getResult());
      } catch (RemoteInvocationFailureException e) {
        e.getCause().printStackTrace();
      }
     
      sw.stop();
View Full Code Here


      // Submit Job
      log.debug("Submitting Job");
     
      sw.start();
     
      GridJobFuture future = node.getJobSubmissionService().submitJob(testJob,new ResultCallback() {

        public void onResult(Serializable result) {
          System.err.println(result);
        }
       
      });

      while(!future.isJobFinished()) {
        Thread.sleep(1000);
      }
     
      sw.stop();
      log.info("GridJob Finished. Duration " + sw.getLastTaskTimeMillis() + " ms");
View Full Code Here

      // Submit Job
      log.debug("Submitting Job");
     
      sw.start();
     
      GridJobFuture future = node.getJobSubmissionService().submitJob(testJob,new ResultCallback() {

        public void onResult(Serializable result) {
          System.err.println(result);
        }
       
      });
      try {
        log.info("Job Result : " + future.getResult());
      } catch (RemoteInvocationFailureException e) {
        e.getCause().printStackTrace();
      }
     
      sw.stop();
View Full Code Here

          .getHeight());
     
      // Start Job Submission
      sw.start();
     
      GridJobFuture future = node.getJobSubmissionService()
          .submitJob(mandelbrotJob, new ResultCallback() {

            public void onResult(Serializable result) {
             
              MandelbrotResult mResult = (MandelbrotResult) result;
              app.displayResult(mResult);
              app.setProgress(app.getProgress()
                  + mResult.getLines());
            }

          });
     
      app.setFuture(future);
      // Block till job finishes
      future.getResult();
      app.setDone(true);
     
      sw.stop();
     
      log.info("GridJob Finished. Duration " + sw.getLastTaskTimeMillis()
View Full Code Here

      // Start Job Submission
      sw.start();
     
      System.err.println(new Date());
     
      GridJobFuture future = node.getJobSubmissionService()
          .submitJob(buddhabrotJob, new ResultCallback() {

            public void onResult(Serializable result) {
             
              log.debug("CALLBACK");
View Full Code Here

      log.info("GridNode Started Up. [" + sw.getLastTaskTimeMillis()
          + " ms]");

      sw.start();

      GridJobFuture future = null;

      log.debug("Submitting LinPack Benchmark Job");

      // Submit Job
      future = node.getJobSubmissionService()
          .submitJob(new LinPackBenchmark(200,5));

      double result = 0;
      try {
        result = (Double) future.getResult();
        System.err.println("*********************************************");
        System.err.println("LinPack Benchmark Grid MLFOPS : " + result);
        System.err.println("*********************************************");
       
      } catch (RemoteInvocationFailureException e) {
View Full Code Here

     
      // Submit Job
     
      sw.start();
     
      GridJobFuture future = null;
     
      /* ------------------------------- FFT Benchmark -------------------------------- */
      log.debug("Submitting FFT Job");
      future = node.getJobSubmissionService().submitJob(new BenchmarkFFT(TASKCOUNT));
     
      try {
        mflop_fft = (Double) future.getResult();
        log.debug("FFT Results : " + mflop_fft);
      } catch (RemoteInvocationFailureException e) {
        e.getCause().printStackTrace();
      }
     
      /* ------------------------------- SOR Benchmark -------------------------------- */
      log.debug("Submitting SOR Job");
      future = node.getJobSubmissionService().submitJob(new BenchmarkSOR(TASKCOUNT));
     
      try {
        mflop_sor = (Double) future.getResult();
        log.debug("SOR Results : " + mflop_sor);
       
      } catch (RemoteInvocationFailureException e) {
        e.getCause().printStackTrace();
      }
     
      /* ------------------------------- Monte Carlo Benchmark -------------------------------- */
      log.debug("Submitting Monte Carlo Job");
      future = node.getJobSubmissionService().submitJob(new BenchmarkMonteCarlo(TASKCOUNT));
     
      try {
        mflop_monte = (Double) future.getResult();
        log.debug("MonteCarlo Results : " + mflop_monte);
       
      } catch (RemoteInvocationFailureException e) {
        e.getCause().printStackTrace();
      }
     
      /* ------------------------------- LU Benchmark -------------------------------- */
      log.debug("Submitting LU Job");
      future = node.getJobSubmissionService().submitJob(new BenchmarkLU(TASKCOUNT));
     
      try {
        mflop_lu = (Double) future.getResult();
        log.debug("LU Results : " + mflop_lu);
       
      } catch (RemoteInvocationFailureException e) {
        e.getCause().printStackTrace();
      }
     
      /* ------------------------------- Sparse Benchmark -------------------------------- */
      log.debug("Submitting Sparse Job");
      future = node.getJobSubmissionService().submitJob(new BenchmarkSparse(TASKCOUNT));
     
      try {
        mflop_sparse = (Double) future.getResult();
        log.debug("Sparse Results : " + mflop_sparse);
       
      } catch (RemoteInvocationFailureException e) {
        e.getCause().printStackTrace();
      }
View Full Code Here

   
    GridNode node = Grid.startLightGridNode();
   
    final int TASKS = 10;
   
    GridJobFuture future;
    BenchmarkResult result;
   
    double mflops_sum = 0;
   
    // FFT
    future = node.getJobSubmissionService().submitJob(new SciMark2FFTBenchmark(TASKS));
    result = (BenchmarkResult) future.getResult();
    System.err.println("FFT : " + result);
    mflops_sum += result.getMflops();
   
    // SOR
    future = node.getJobSubmissionService().submitJob(new SciMark2SORBenchmark(TASKS));
    result = (BenchmarkResult) future.getResult();
    System.err.println("SOR : " + result);
    mflops_sum += result.getMflops();
   
    // Monte Carlo
    future = node.getJobSubmissionService().submitJob(new SciMark2MCBenchmark(TASKS));
    result = (BenchmarkResult) future.getResult();
    System.err.println("Monte Carlo : " + result);
    mflops_sum += result.getMflops();
   
    // Sparse
    future = node.getJobSubmissionService().submitJob(new SciMark2SparseBenchmark(TASKS));
    result = (BenchmarkResult) future.getResult();
    System.err.println("Sparse : " + result);
    mflops_sum += result.getMflops();
   
    // LU
    future = node.getJobSubmissionService().submitJob(new SciMark2LUBenchmark(TASKS));
    result = (BenchmarkResult) future.getResult();
    System.err.println("LU : " + result);
    mflops_sum += result.getMflops();
   
   
    System.err.println("Composite Result : " + mflops_sum / 5);
View Full Code Here

     
     
      // Submit Job
      log.debug("Submitting Job");
     
      GridJobFuture future = node.getJobSubmissionService().submitJob(annoatedJob);
      try {
        log.info("Job Result : " + future.getResult());
      } catch (RemoteInvocationFailureException e) {
        e.getCause().printStackTrace();
      }
     
      node.getNodeRegistrationService().unregister();
View Full Code Here

TOP

Related Classes of org.nebulaframework.core.job.future.GridJobFuture

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.