Ignore:
Timestamp:
07/02/20 17:39:46 (4 years ago)
Author:
yushan
Message:

trunk : change job_running criteria. Job name = XIOS_rev. Auto generate compile job scripts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/xios_test_suite/COMPILE/config_compile.py

    r1829 r1916  
    1010        if osstdout.returncode!=0: 
    1111                print(red(runthis+" FAILED")) 
    12                 print >> sys.stderr, osstdout.returncode 
     12                print(theInfo) 
    1313                sys.exit() 
    14         # else: 
    15         #       print(runthis+" OK") 
     14 
     15 
     16def generate_compile_job_irene(revision): 
     17    with open("job_compile_irene.sh", "w") as f: 
     18        f.write("#!/bin/bash\n") 
     19        f.write("#=====================================\n") 
     20        f.write("#script generated by config_compile.py\n") 
     21        f.write("#=====================================\n") 
     22        f.write("#MSUB -r XIOS_rev"+revision+"\n")         
     23        f.write("#MSUB -o client_output.out\n") 
     24        f.write("#MSUB -e client_error.err\n") 
     25        f.write("#MSUB -eo\n") 
     26        f.write("#MSUB -c 48\n") 
     27        f.write("#MSUB -n 1\n") 
     28        f.write("#MSUB -X\n") 
     29        f.write("#MSUB -x\n") 
     30        f.write("#MSUB -T 1800\n") 
     31        f.write("#MSUB -q skylake\n") 
     32        f.write("#MSUB -A gen0826\n") 
     33        f.write("#MSUB -Q test\n") 
     34        f.write("#MSUB -m work,scratch\n") 
     35        f.write("cd $BRIDGE_MSUB_PWD\n") 
     36        f.write("cmake .\n") 
     37        f.write("ctest -V\n") 
     38        f.write("exit\n") 
     39 
     40 
     41 
     42def generate_compile_job_jeanzay(revision):  
     43    print("generating compile job for jz") 
     44    with open("job_compile_jeanzay.sh", "w") as f: 
     45        f.write("#!/bin/bash\n") 
     46        f.write("#=====================================\n") 
     47        f.write("#script generated by config_compile.py\n") 
     48        f.write("#=====================================\n") 
     49        f.write("#SBATCH --ntasks=1\n") 
     50        f.write("#SBATCH --cpus-per-task=40\n") 
     51        f.write("#SBATCH --hint=nomultithread\n") 
     52        f.write("#SBATCH -t 00:30:00\n") 
     53        f.write("#SBATCH -o output.out\n")  
     54        f.write("#SBATCH -e error.err \n")  
     55        f.write("#SBATCH -A psl@cpu\n") 
     56        f.write("#SBATCH --job-name=XIOS_rev"+revision+"\n") 
     57        f.write("cd ${SLURM_SUBMIT_DIR}\n") 
     58        f.write("cmake .\n") 
     59        f.write("ctest -V\n") 
     60        f.write("exit\n") 
    1661 
    1762 
     
    4489                        configs[1] += 1 
    4590                        configs_arg[1].append(word) 
    46                                  
     91    f.close()                            
    4792 
    4893    f=open("CMakeLists.txt", "w") 
     
    73118     
    74119    f.close() 
    75      
    76      
     120 
     121    globals()['generate_compile_job_'+machine](revision) 
     122 
    77123if __name__== "__main__": 
    78124  main() 
Note: See TracChangeset for help on using the changeset viewer.