How to submit N jobs at one time from Portal?

From UGP-Wiki

Jump to: navigation, search

Multi-Jobs Submission Portlet

Principle:

1. If you need run job in different directories, define UGP_DIR in the environment field. You can use UGP_DIR as variable in arguments and directory field. You can define UGP_DIR in the environment field : e.g. UGP_DIR *


2. If you need change the index in the arguments, you can define UGP_START, UGP_STEP, UGP_END. They must be integer.

Examples:

1. Executable : test.sh

   Arguments:    myParam=UGP_DIR
   Directory:    Test
   Environment:  UGP_DIR *
   
   Directory $HOME/Test  and three subdirectories d1 , d2 , d3
   
   Jobs submitted:  
                 cd Test; $HOME/test.sh myParam=d1
                 cd Test; $HOME/test.sh myParam=d2
                 cd Test; $HOME/test.sh myParam=d3


2. Executable : test.sh

   Arguments:    
   Directory:    Test/UGP_DIR
   Environment:  UGP_DIR *
   
   Directory $HOME/Test  and three subdirectories d1 , d2 , d3
   
   Jobs submitted:  
                 cd Test/d1; $HOME/test.sh 
                 cd Test/d2; $HOME/test.sh 
                 cd Test/d3; $HOME/test.sh 


3. Executable : test.sh

   Arguments:    aParam=UGP_START bParam=UGP_DIR
   Directory:    Test
   Environment:  UGP_DIR * UGP_START 10 UGP_STEP 20
   
   Directory $HOME/Test  and three subdirectories d1 , d2 , d3
   
   Jobs submitted:  
                 cd Test; $HOME/test.sh aParam=10 bParam=d1
                 cd Test; $HOME/test.sh aParam=30 bParam=d2
                 cd Test; $HOME/test.sh aParam=50 bParam=d3


4. Executable : test.sh

   Arguments:    aParam=UGP_START   
   Directory:    Test/UGP_DIR
   Environment:  UGP_DIR * UGP_START 10 UGP_STEP 20
   
   Directory $HOME/Test  and three subdirectories d1 , d2 , d3
   
   Jobs submitted:  
                 cd Test/d1; $HOME/test.sh aParam=10 
                 cd Test/d2; $HOME/test.sh aParam=30
                 cd Test/d3; $HOME/test.sh aParam=50

5. Executable : test.sh

   Arguments:    aParam=UGP_START  
   Directory:    Test
   Environment:  UGP_START 10 UGP_STEP 20 UGP_STEP 50
   
   Directory $HOME/Test  and three subdirectories d1 , d2 , d3
   
   Jobs submitted:  
                 cd Test; $HOME/test.sh aParam=10  
                 cd Test; $HOME/test.sh aParam=30 
                 cd Test; $HOME/test.sh aParam=50 


6. Executable : test.sh

   Arguments:    aParam=UGP_START bParam=UGP_END  
   Directory:    Test
   Environment:  UGP_START 10 UGP_STEP 20 UGP_STEP 50
   
   Directory $HOME/Test  and three subdirectories d1 , d2 , d3
   
   Jobs submitted:  
                 cd Test; $HOME/test.sh aParam=10 bParam=50 
                 cd Test; $HOME/test.sh aParam=30 bParam=50
                 cd Test; $HOME/test.sh aParam=50 bParam=50

7. Executable : test.sh

   Arguments:    myParam=UGP_DIR
   Directory:    Test
   Environment:  UGP_DIR *K
   
   Directory $HOME/Test  and three subdirectories d1 , d2 , 50K, 60K
   
   Jobs submitted:  
                 cd Test; $HOME/test.sh myParam=50K
                 cd Test; $HOME/test.sh myParam=60K


8. Executable : test.sh

   Arguments:    
   Directory:    Test/UGP_DIR
   Environment:  UGP_DIR *K
   
   Directory $HOME/Test  and three subdirectories d1 , d2 , 50K, 60K
   
   Jobs submitted:  
                 cd Test/50K; $HOME/test.sh
                 cd Test/60K; $HOME/test.sh


Note you can only have one executable. Currently you cannot run different executables in different directories.

Personal tools