Package jpvm

Examples of jpvm.jpvmBuffer.pack()


      }

      for(int i = 0 ; i < info.numTasks; i++)
      {
        jpvmBuffer buf = new jpvmBuffer();
        buf.pack(info.endIndex.length);
        buf.pack(netTids[i],info.endIndex.length,1);
        info.jpvm.pvm_send(buf,info.tids[i],NetMessageTag.sendTids2); //send trial Host the child tids
      }

View Full Code Here


      for(int i = 0 ; i < info.numTasks; i++)
      {
        jpvmBuffer buf = new jpvmBuffer();
        buf.pack(info.endIndex.length);
        buf.pack(netTids[i],info.endIndex.length,1);
        info.jpvm.pvm_send(buf,info.tids[i],NetMessageTag.sendTids2); //send trial Host the child tids
      }


      //Barrier Sync
View Full Code Here

      for (int i=0;i<info.numTasks; i++) {
        jpvmMessage message = info.jpvm.pvm_recv(NetMessageTag.trialReady);
        int freeId = message.buffer.upkint();
        System.out.println("Trial Host "+freeId+" is killed");
        jpvmBuffer buf = new jpvmBuffer();
        buf.pack(0);
        info.jpvm.pvm_send(buf,info.tids[freeId],NetMessageTag.stopSig);
      }
    }
    catch(jpvmException ex) {
      ex.printStackTrace();
View Full Code Here

        int freeId = message.buffer.upkint();
        System.out.println("Trial Host "+freeId+" change connection");
        seedInt = seedInt - info.endIndex.length;

        jpvmBuffer buf = new jpvmBuffer();
        buf.pack(seedInt);
        buf.pack(ba.length);
        buf.pack(ba, ba.length, 1);
        info.jpvm.pvm_mcast(buf,netTids[i],info.endIndex.length,NetMessageTag.changeConnection);
        // Unpack the message...
      }
View Full Code Here

        System.out.println("Trial Host "+freeId+" change connection");
        seedInt = seedInt - info.endIndex.length;

        jpvmBuffer buf = new jpvmBuffer();
        buf.pack(seedInt);
        buf.pack(ba.length);
        buf.pack(ba, ba.length, 1);
        info.jpvm.pvm_mcast(buf,netTids[i],info.endIndex.length,NetMessageTag.changeConnection);
        // Unpack the message...
      }
View Full Code Here

        seedInt = seedInt - info.endIndex.length;

        jpvmBuffer buf = new jpvmBuffer();
        buf.pack(seedInt);
        buf.pack(ba.length);
        buf.pack(ba, ba.length, 1);
        info.jpvm.pvm_mcast(buf,netTids[i],info.endIndex.length,NetMessageTag.changeConnection);
        // Unpack the message...
      }

      trialId = -1;
View Full Code Here

              }
              if(expId < exp.subExp.length// game is still on;
              {
                System.out.println("Subexp "+expId+" trial "+ trialId+" freeId "+freeId);
                buf = new jpvmBuffer();
                buf.pack(trialId);
                buf.pack(expId);
                info.jpvm.pvm_send(buf,info.tids[freeId],NetMessageTag.oneTrial);
              }
              else if( aliveHost != 0 ) // if all the work are done and some hosts are not killed
              {
View Full Code Here

              if(expId < exp.subExp.length// game is still on;
              {
                System.out.println("Subexp "+expId+" trial "+ trialId+" freeId "+freeId);
                buf = new jpvmBuffer();
                buf.pack(trialId);
                buf.pack(expId);
                info.jpvm.pvm_send(buf,info.tids[freeId],NetMessageTag.oneTrial);
              }
              else if( aliveHost != 0 ) // if all the work are done and some hosts are not killed
              {
                System.out.println("host "+freeId+" finished his job");
View Full Code Here

                //              buf = new jpvmBuffer();
                //              buf.pack(0);
                //              info.jpvm.pvm_send(buf,info.tids[freeId],NetMessageTag.stopSig);
                //aliveHost--;
                buf = new jpvmBuffer();
                buf.pack(0);
                info.jpvm.pvm_send(buf,info.tids[freeId],NetMessageTag.tempStopSig);                                         
              }
              break;
            case NetMessageTag.getBackData:
              countHosts++;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.