How to distribute many works to different servers in turn

Why can't I use =default for default ctors with a member initializer list

How did old MS-DOS games utilize various graphic cards?

Is it possible to have the age of the universe be unknown?

How can this tool find out registered domains from an IP?

What is the purpose of the goat for Azazel, as opposed to conventional offerings?

Need feedback - Can the composition/colors of this design be fixed if something is lacking or is not a better fit?

Why doesn't Adrian Toomes give up Spider-Man's identity?

English word for "product of tinkering"

Can Rydberg constant be in joules?

Wooden cooking layout

Extreme flexible working hours: how to control people and activities?

Is it legal for a bar bouncer to confiscate a fake ID

Fixing obscure 8080 emulator bug?

Is a lack of character descriptions a problem?

Generate basis elements of the Steenrod algebra

Non-disclosure agreement in a small business

Mathematically, why does mass matrix / load vector lumping work?

What makes Ada the language of choice for the ISS's safety-critical systems?

Alternate way of computing the probability of being dealt a 13 card hand with 3 kings given that you have been dealt 2 kings

Were Alexander the Great and Hephaestion lovers?

How to trick the reader into thinking they're following a redshirt instead of the protagonist?

Inward extrusion is not working

Why can my keyboard only digest 6 keypresses at a time?

What to do when surprise and a high initiative roll conflict with the narrative?



How to distribute many works to different servers in turn







.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















Suppose that I have 5 servers,named n1,n2,n3,n4,n5.And I need to run a same exe named test.exe with a different input for 10 or 20 times, which are in the directory /run_001 to /run_010 or to /run_020.



If only one server, they are run sequentially. Since they are independent and for now I have 5 servers, so I want to distribute them to all the serves, which means that there will be 5 run at the same time.



I want to use shell to control the process, for example,



#!/bin/bash 
# run_001 to run_010 containing the input and exe have been created first
# define an idnex
# according index%5 to distribute run_001 ... run_005 to n1 ... n5 (suppose we are at n5)
# may use rsync -a run_001 n1:~/
# .... rsync -a run_004 n4:~/
# then n1 to n5 will be at work at the same time
# run the exe and should determine they are completed
# for each server if completed then run next part
# i.e. run_006 at n1, run_007 at n2,..., run_010 at n5
# if all completed, copy all run_0xx at n1,.. n4 to the n5
# async -au n1:~/run_0* ./
# ... async -au n4:~/run_0* ./


Above is the framework what I think.



But I have difficulty in implementing it. Can any one give me some suggestions.



Thanks!









share





























    0















    Suppose that I have 5 servers,named n1,n2,n3,n4,n5.And I need to run a same exe named test.exe with a different input for 10 or 20 times, which are in the directory /run_001 to /run_010 or to /run_020.



    If only one server, they are run sequentially. Since they are independent and for now I have 5 servers, so I want to distribute them to all the serves, which means that there will be 5 run at the same time.



    I want to use shell to control the process, for example,



    #!/bin/bash 
    # run_001 to run_010 containing the input and exe have been created first
    # define an idnex
    # according index%5 to distribute run_001 ... run_005 to n1 ... n5 (suppose we are at n5)
    # may use rsync -a run_001 n1:~/
    # .... rsync -a run_004 n4:~/
    # then n1 to n5 will be at work at the same time
    # run the exe and should determine they are completed
    # for each server if completed then run next part
    # i.e. run_006 at n1, run_007 at n2,..., run_010 at n5
    # if all completed, copy all run_0xx at n1,.. n4 to the n5
    # async -au n1:~/run_0* ./
    # ... async -au n4:~/run_0* ./


    Above is the framework what I think.



    But I have difficulty in implementing it. Can any one give me some suggestions.



    Thanks!









    share

























      0












      0








      0








      Suppose that I have 5 servers,named n1,n2,n3,n4,n5.And I need to run a same exe named test.exe with a different input for 10 or 20 times, which are in the directory /run_001 to /run_010 or to /run_020.



      If only one server, they are run sequentially. Since they are independent and for now I have 5 servers, so I want to distribute them to all the serves, which means that there will be 5 run at the same time.



      I want to use shell to control the process, for example,



      #!/bin/bash 
      # run_001 to run_010 containing the input and exe have been created first
      # define an idnex
      # according index%5 to distribute run_001 ... run_005 to n1 ... n5 (suppose we are at n5)
      # may use rsync -a run_001 n1:~/
      # .... rsync -a run_004 n4:~/
      # then n1 to n5 will be at work at the same time
      # run the exe and should determine they are completed
      # for each server if completed then run next part
      # i.e. run_006 at n1, run_007 at n2,..., run_010 at n5
      # if all completed, copy all run_0xx at n1,.. n4 to the n5
      # async -au n1:~/run_0* ./
      # ... async -au n4:~/run_0* ./


      Above is the framework what I think.



      But I have difficulty in implementing it. Can any one give me some suggestions.



      Thanks!









      share














      Suppose that I have 5 servers,named n1,n2,n3,n4,n5.And I need to run a same exe named test.exe with a different input for 10 or 20 times, which are in the directory /run_001 to /run_010 or to /run_020.



      If only one server, they are run sequentially. Since they are independent and for now I have 5 servers, so I want to distribute them to all the serves, which means that there will be 5 run at the same time.



      I want to use shell to control the process, for example,



      #!/bin/bash 
      # run_001 to run_010 containing the input and exe have been created first
      # define an idnex
      # according index%5 to distribute run_001 ... run_005 to n1 ... n5 (suppose we are at n5)
      # may use rsync -a run_001 n1:~/
      # .... rsync -a run_004 n4:~/
      # then n1 to n5 will be at work at the same time
      # run the exe and should determine they are completed
      # for each server if completed then run next part
      # i.e. run_006 at n1, run_007 at n2,..., run_010 at n5
      # if all completed, copy all run_0xx at n1,.. n4 to the n5
      # async -au n1:~/run_0* ./
      # ... async -au n4:~/run_0* ./


      Above is the framework what I think.



      But I have difficulty in implementing it. Can any one give me some suggestions.



      Thanks!







      bash shell-script shell ssh





      share












      share










      share



      share










      asked 3 mins ago









      Allen ZhangAllen Zhang

      64




      64






















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f523176%2fhow-to-distribute-many-works-to-different-servers-in-turn%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f523176%2fhow-to-distribute-many-works-to-different-servers-in-turn%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Hudson River Historic District Contents Geography History The district today Aesthetics Cultural...

          The number designs the writing. Feandra Aversely Definition: The act of ingrafting a sprig or shoot of one...

          Ayherre Geografie Demografie Externe links Navigatiemenu43° 23′ NB, 1° 15′ WL43° 23′ NB, 1°...