Changeset 1893


Ignore:
Timestamp:
06/11/20 16:58:59 (4 years ago)
Author:
yushan
Message:

trunk : update on Jeanzay

Location:
XIOS/trunk/xios_test_suite/TEST_SUITE
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/xios_test_suite/TEST_SUITE/job_jeanzay.sh

    r1818 r1893  
    11#!/bin/bash 
    22##SBATCH --nodes=2 
    3 #SBATCH --ntasks=8              # Nombre total de processus MPI 
    4 #SBATCH --ntasks-per-node=16 
     3#SBATCH --ntasks=32              # Nombre total de processus MPI 
     4##SBATCH --ntasks-per-node=16 
    55##SBATCH --cpus-per-task=1 
    66#SBATCH --hint=nomultithread 
     
    2222export mode=prod 
    2323 
    24 ./run_test 
     24time ./run_test 
    2525 
    2626 
     
    3030export mode=debug 
    3131 
    32 ./run_test 
     32time ./run_test 
  • XIOS/trunk/xios_test_suite/TEST_SUITE/job_jeanzay_local.sh

    r1833 r1893  
    11#!/bin/bash 
    22##SBATCH --nodes=2 
    3 #SBATCH --ntasks=8              # Nombre total de processus MPI 
     3#SBATCH --ntasks=32              # Nombre total de processus MPI 
    44#SBATCH --ntasks-per-node=16 
    55##SBATCH --cpus-per-task=1 
     
    2222export mode=prod 
    2323 
    24 ./run_test_local 
     24time ./run_test_local 
    2525 
    2626 
     
    3030export mode=debug 
    3131 
    32 ./run_test_local 
     32time ./run_test_local 
  • XIOS/trunk/xios_test_suite/TEST_SUITE/my_prod.sh

    r1892 r1893  
    1616 
    1717python3 step1.py 
    18 cmd=$(ccc_msub full_job_${arch}_${mode}.sh) 
    19 jobid="${cmd//[!0-9]/}" 
    20 #jobid=9999999 
    2118 
    22 i=0 
    23 output=$(ccc_mpp | grep ${jobid}) 
    24 while [ ! -z "$output" ] 
    25 do 
    26 echo "job" $jobid "running for about" ${i} seconds 
    27 sleep 5 
    28 ((i+=5)) 
    29 output=$(ccc_mpp | grep ${jobid}) 
    30 done 
    3119 
    32 python3 step2.py 
     20if [[ ${xios_machine_name} == "irene" ]]; then 
     21  cmd=$(ccc_msub full_job_${arch}_${mode}.sh) 
     22  jobid="${cmd//[!0-9]/}" 
     23  #jobid=9999999 
     24 
     25  i=0 
     26  output=$(ccc_mpp | grep ${jobid}) 
     27  while [ ! -z "$output" ] 
     28  do 
     29    echo "job" $jobid "running for about" ${i} seconds 
     30    sleep 5 
     31    ((i+=5)) 
     32    output=$(ccc_mpp | grep ${jobid}) 
     33  done 
     34fi 
     35 
     36if [[ ${xios_machine_name} == "jeanzay" ]]; then 
     37  cmd=$(sbatch full_job_${arch}_${mode}.sh) 
     38  jobid="${cmd//[!0-9]/}" 
     39  #jobid=99999 
     40  i=0 
     41  output=$(squeue -u rpsl954 | grep ${jobid}) 
     42  while [ ! -z "$output" ] 
     43  do 
     44    echo "job" $jobid "running for about" ${i} seconds 
     45    sleep 5 
     46    ((i+=5)) 
     47    output=$(squeue -u rpsl954 | grep ${jobid}) 
     48  done 
     49fi 
     50 
     51 
     52#python3 step2.py 
  • XIOS/trunk/xios_test_suite/TEST_SUITE/run_test

    r1886 r1893  
    8181 
    8282cmake . 
    83 ctest -V  
     83ctest -V -j16 
    8484#ctest --output-on-failure 
    8585make report 
  • XIOS/trunk/xios_test_suite/TEST_SUITE/run_test_jeanzay

    r1887 r1893  
    11#!/bin/bash 
     2module load subversion 
     3module load python/3.7.3 
    24 
    3 sbatch --wait job_jeanzay.sh  
     5export arch=X64_JEANZAY 
     6export mode=prod 
     7export build_dir=xios_test_suite/RUN_TEST_SUITE/build_${arch}_${mode} 
     8export svnR=$(svn info --show-item revision ../../) 
     9export ref_location=/gpfswork/rech/psl/rpsl954/cron_xios 
     10export ref_file=reference.tar.gz 
     11 
     12echo "Start Building XIOS ... " 
     13bash -c "cd ../.. && ./make_xios --arch_path `pwd`/../ARCH --arch ${arch} --${mode} --build_dir ${build_dir} --job 4" 
     14 
     15export build_status=$? 
     16if [[ ${build_status} == 0 ]] 
     17then 
     18  echo "XIOS Build Finished. Start Unit Tests" 
     19  bash ./my_prod.sh 
     20  rundir=${xios_test_suite_repository}/RUN 
     21  mkdir -p $rundir ; CHMOD  $rundir 
     22  mkdir -p ${rundir}/test_${xios_machine_name} ; CHMOD ${rundir}/test_${xios_machine_name} 
     23 
     24  cp report_${svnR}_${arch}_${mode}.txt ${rundir}/test_${xios_machine_name}/test_${svnR}_${xios_machine_name}_${arch}_${mode}.txt 
     25 
     26  CHMOD ${rundir}/test_${xios_machine_name}/test_${svnR}_${xios_machine_name}_${arch}_${mode}.txt 
     27 
     28  mkdir -p ${rundir}/def_files ;  CHMOD ${rundir}/def_files 
     29  mkdir -p ${rundir}/def_files/${svnR} ;  CHMOD ${rundir}/def_files/${svnR} 
     30 
     31  for i in $(ls -d test_*/) 
     32  do 
     33    mkdir -p ${rundir}/def_files/${svnR}/${i%%} 
     34    cp ${i%%}/user_param.json ${rundir}/def_files/${svnR}/${i%%} 
     35    for j in $(ls -d ${i%%/}/CONFIG_*) 
     36    do 
     37      mkdir -p ${rundir}/def_files/${svnR}/${j%%} 
     38      cp ${j%%}/all_param.def ${rundir}/def_files/${svnR}/${j%%} 
     39    done 
     40    CHMOD ${rundir}/def_files 
     41  done 
     42 
     43 
     44else 
     45  echo "XIOS Build Failed. Skip Unit Tests" 
     46fi 
     47 
     48 
     49#sbatch --wait job_jeanzay.sh  
    450 
    551#bash -c "python generate_test.py" 
  • XIOS/trunk/xios_test_suite/TEST_SUITE/setup.py

    r1841 r1893  
    115115        f.write("set_tests_properties("+foldername+"_config"+repr(x)+" PROPERTIES\n") 
    116116        f.write("                      FAIL_REGULAR_EXPRESSION \"check.py failed;execution failed;failed;setup.sh failed; machine unknown\")\n\n") 
    117  
     117         
    118118        g=open("run_test_"+repr(x)+".py", "w") 
    119119        g.write("##############################\n") 
  • XIOS/trunk/xios_test_suite/TEST_SUITE/step1.py

    r1891 r1893  
    1212mode=os.getenv("mode") 
    1313arch=os.getenv("arch") 
     14machine=os.getenv("xios_machine_name") 
     15my_counter=1 
     16portion=0 
     17 
     18nb_proc_irene=20 # this must be >= NumberClients+NumberServers for all configs for all test folders 
     19nb_proc_jz=36 # this must be >= sum(NumberClients+NumberServers) for each test folder 
    1420 
    1521def OSinfo(runthis): 
     
    3440    return default_param[0] 
    3541 
    36 def generate_job_irene(fn, n): 
    37     with open(fn, "w") as fh: 
    38         fh.write("#!/bin/bash\n") 
    39         fh.write("#MSUB -r XIOS\n") 
    40         fh.write("#MSUB -eo\n") 
    41         fh.write("#MSUB -o client_output.out\n") 
    42         fh.write("#MSUB -e client_error.out\n") 
    43         fh.write("#MSUB -c 1\n") 
    44         fh.write("#MSUB -n 24\n") 
    45         fh.write("#MSUB -X\n") 
    46         fh.write("#MSUB -x\n") 
    47         fh.write("#MSUB -T 1800\n") 
    48         fh.write("#MSUB -q skylake\n")      
    49         fh.write("#MSUB -A gen0826\n") 
    50         fh.write("#MSUB -Q test\n") 
    51         fh.write("#MSUB -m work,scratch\n") 
    52         fh.write("source ../../../BUILD/build_"+arch+"_"+mode+"/arch.env\n") 
    53         fh.write("ccc_mprun -n "+str(n)+" generic_testcase.exe\n") 
     42def generate_job(fn, n): 
     43    if machine=="irene": 
     44        with open(fn, "w") as fh: 
     45            fh.write("#!/bin/bash\n") 
     46            fh.write("#MSUB -r XIOS\n") 
     47            fh.write("#MSUB -eo\n") 
     48            fh.write("#MSUB -o client_output.out\n") 
     49            fh.write("#MSUB -e client_error.out\n") 
     50            fh.write("#MSUB -c 1\n") 
     51            fh.write("#MSUB -n "+str(n)+"\n") 
     52            fh.write("#MSUB -X\n") 
     53            fh.write("#MSUB -x\n") 
     54            fh.write("#MSUB -T 1800\n") 
     55            fh.write("#MSUB -q skylake\n")      
     56            fh.write("#MSUB -A gen0826\n") 
     57            fh.write("#MSUB -Q test\n") 
     58            fh.write("#MSUB -m work,scratch\n") 
     59            fh.write("source ../../../BUILD/build_"+arch+"_"+mode+"/arch.env\n") 
     60            fh.write("ccc_mprun -n "+str(n)+" generic_testcase.exe\n") 
     61 
     62    if machine=="jeanzay": 
     63        with open(fn, "w") as fh: 
     64            fh.write("#!/bin/bash\n") 
     65            fh.write("#SBATCH --ntasks="+str(n)+"\n") 
     66            fh.write("#SBATCH --hint=nomultithread\n") 
     67            fh.write("#SBATCH -o output.out\n") 
     68            fh.write("#SBATCH -e error.out\n") 
     69            fh.write("#SBATCH -t 00:10:00\n") 
     70            fh.write("#SBATCH --account=psl@cpu\n") 
     71            fh.write("ulimit -c 0\n") 
     72            fh.write("cd ${SLURM_SUBMIT_DIR}\n") 
     73            fh.write("source ../../../BUILD/build_"+arch+"_"+mode+"/arch.env\n") 
     74            fh.write("source $I_MPI_ROOT/intel64/bin/mpivars.sh release_mt") 
     75            fh.write("srun generic_testcase.exe") 
    5476 
    5577 
    5678def update_full_job(location, n): 
    57     with open("full_job_"+arch+"_"+mode+".sh", "a") as fh: 
     79    global my_counter 
     80    if machine=="irene": 
     81        with open("full_job_"+arch+"_"+mode+".sh", "a") as fh: 
    5882            fh.write("\ncd ${location}/"+location+"; ccc_mprun -E \'--exclusive\' -n "+str(n)+" generic_testcase.exe > output.out 2> error.out &\n") 
    5983            fh.write("PIDS+=($!)\n") 
    6084            fh.write("CONFIGS+=("+location+")\n") 
    61  
     85    if machine=="jeanzay": 
     86        with open("full_job_"+arch+"_"+mode+".sh", "a") as fh: 
     87            fh.write("\ncd ${location}/"+location+"; srun --exclusive -n "+str(n)+" generic_testcase.exe > output.out 2> error.out &\n") 
     88            #fh.write("echo \"test progress "+str(my_counter*portion)+"% \"\n") 
     89            #my_counter = my_counter+1 
    6290 
    6391def main(): 
    64     with open("full_job_"+arch+"_"+mode+".sh", "w") as fh: 
    65         fh.write("#!/bin/bash\n") 
    66         fh.write("#MSUB -r XIOS\n") 
    67         fh.write("#MSUB -eo\n") 
    68         fh.write("#MSUB -o client_output.out\n") 
    69         fh.write("#MSUB -e client_error.err\n") 
    70         fh.write("#MSUB -c 1\n") 
    71         fh.write("#MSUB -n 24\n") 
    72         fh.write("#MSUB -X\n") 
    73         fh.write("#MSUB -x\n") 
    74         fh.write("#MSUB -T 1800\n") 
    75         fh.write("#MSUB -q skylake\n")      
    76         fh.write("#MSUB -A gen0826\n") 
    77         fh.write("#MSUB -Q test\n") 
    78         fh.write("#MSUB -m work,scratch\n") 
    79         fh.write("export location="+os.getcwd()+"\n") 
    80         fh.write("export log_location="+os.getcwd()+"\n") 
    81         fh.write("source ../BUILD/build_"+arch+"_"+mode+"/arch.env\n") 
    82         fh.write("echo \"parallel launch arch="+arch+" mode="+mode+"\" >> ${log_location}/Log.txt\n") 
    83         fh.write("date >> ${log_location}/Log.txt\n") 
    84      
     92    global portion 
     93    tmp_list=glob.glob("test_*/CONFIG_*") 
     94    nb_configs = len(tmp_list) 
     95    portion = 100.0/nb_configs 
     96 
     97    if machine=="irene": 
     98        with open("full_job_"+arch+"_"+mode+".sh", "w") as fh: 
     99            fh.write("#!/bin/bash\n") 
     100            fh.write("#MSUB -r XIOS\n") 
     101            fh.write("#MSUB -eo\n") 
     102            fh.write("#MSUB -o client_output.out\n") 
     103            fh.write("#MSUB -e client_error.err\n") 
     104            fh.write("#MSUB -c 1\n") 
     105            fh.write("#MSUB -n "+str(nb_proc_irene)+"\n") 
     106            fh.write("#MSUB -X\n") 
     107            fh.write("#MSUB -x\n") 
     108            fh.write("#MSUB -T 1800\n") 
     109            fh.write("#MSUB -q skylake\n")      
     110            fh.write("#MSUB -A gen0826\n") 
     111            fh.write("#MSUB -Q test\n") 
     112            fh.write("#MSUB -m work,scratch\n") 
     113            fh.write("export location="+os.getcwd()+"\n") 
     114            fh.write("export log_location="+os.getcwd()+"\n") 
     115            fh.write("source ../BUILD/build_"+arch+"_"+mode+"/arch.env\n") 
     116            fh.write("echo \"parallel launch arch="+arch+" mode="+mode+"\" >> ${log_location}/Log.txt\n") 
     117            fh.write("date >> ${log_location}/Log.txt\n") 
     118      
     119    if machine=="jeanzay": 
     120        with open("full_job_"+arch+"_"+mode+".sh", "w") as fh: 
     121            fh.write("#!/bin/bash\n") 
     122            fh.write("#SBATCH --ntasks="+str(nb_proc_jz)+"\n") 
     123            fh.write("#SBATCH --hint=nomultithread\n") 
     124            fh.write("#SBATCH -t 00:10:00\n") 
     125            fh.write("#SBATCH --account=psl@cpu\n") 
     126            fh.write("ulimit -c 0\n") 
     127            fh.write("cd ${SLURM_SUBMIT_DIR}\n") 
     128            fh.write("source ../BUILD/build_"+arch+"_"+mode+"/arch.env\n") 
     129            fh.write("source $I_MPI_ROOT/intel64/bin/mpivars.sh release_mt\n") 
     130            fh.write("export location="+os.getcwd()+"\n") 
     131            fh.write("export log_location="+os.getcwd()+"\n") 
     132            fh.write("echo \"parallel launch arch="+arch+" mode="+mode+"\" >> ${log_location}/Log.txt\n") 
     133            fh.write("date >> ${log_location}/Log.txt\n") 
     134 
     135 
     136 
    85137    test_folder_list = glob.glob('test_*') 
    86138    all_config=dict() 
     
    153205                fh.write("/\n") 
    154206 
    155             generate_job_irene(test_folder+"/CONFIG_"+mystr+"/job.sh", full_config['NumberClients']+full_config['NumberServers']) 
     207            generate_job(test_folder+"/CONFIG_"+mystr+"/job.sh", full_config['NumberClients']+full_config['NumberServers']) 
    156208            update_full_job(test_folder+"/CONFIG_"+mystr, full_config['NumberClients']+full_config['NumberServers']) 
    157209 
    158210        #print(config_name) 
     211        with open("full_job_"+arch+"_"+mode+".sh", "a") as fh: 
     212            fh.write("wait\nwait\n") 
     213            fh.write("echo \"tests in "+test_folder+" finished\"\n") 
    159214        all_config[test_folder] = config_name 
    160  
    161     with open("full_job_"+arch+"_"+mode+".sh", "a") as fh: 
    162         fh.write("\nfor pid in ${PIDS[@]}; do\n") 
    163         fh.write("wait ${pid}\n") 
    164         fh.write("STATUS+=($?)\ndone\n") 
    165         fh.write("\ni=0\n") 
    166         fh.write("#for st in ${STATUS[@]}; do\n") 
    167         fh.write("#if [[ ${st} -ne 0 ]]; then\n") 
    168         fh.write("#echo \"${CONFIGS[${i}]} -1\" >> ${location}/plain_report.txt\n") 
    169         fh.write("#else\n") 
    170         fh.write("#echo \"${CONFIGS[${i}]} 1\" >> ${location}/plain_report.txt\n") 
    171         fh.write("#fi\n") 
    172         fh.write("#((i+=1))\n") 
    173         fh.write("#done\n\n") 
    174         fh.write("#wait\n") 
    175         fh.write("date >> ${log_location}/Log.txt\n") 
    176  
     215  
     216 
     217    if machine=="irene": 
     218        with open("full_job_"+arch+"_"+mode+".sh", "a") as fh: 
     219            fh.write("\nfor pid in ${PIDS[@]}; do\n") 
     220            fh.write("wait ${pid}\n") 
     221            fh.write("STATUS+=($?)\ndone\n") 
     222            fh.write("\ni=0\n") 
     223            fh.write("#for st in ${STATUS[@]}; do\n") 
     224            fh.write("#if [[ ${st} -ne 0 ]]; then\n") 
     225            fh.write("#echo \"${CONFIGS[${i}]} -1\" >> ${location}/plain_report.txt\n") 
     226            fh.write("#else\n") 
     227            fh.write("#echo \"${CONFIGS[${i}]} 1\" >> ${location}/plain_report.txt\n") 
     228            fh.write("#fi\n") 
     229            fh.write("#((i+=1))\n") 
     230            fh.write("#done\n\n") 
     231            fh.write("#wait\n") 
     232            fh.write("date >> ${log_location}/Log.txt\n") 
     233    if machine=="jeanzay": 
     234        with open("full_job_"+arch+"_"+mode+".sh", "a") as fh: 
     235            fh.write("date >> ${log_location}/Log.txt\n") 
     236 
     237     
    177238    #print(all_config) 
    178239 
Note: See TracChangeset for help on using the changeset viewer.