diff --git a/wetb/prepost/Simulations.py b/wetb/prepost/Simulations.py index eac23b85cf3fa07372372958719d92a3e41e122d..80cfd64b36b9d5132f6dc44064243e18df46e4a6 100755 --- a/wetb/prepost/Simulations.py +++ b/wetb/prepost/Simulations.py @@ -567,7 +567,7 @@ def prepare_launch(iter_dict, opt_tags, master, variable_tag_func, update_model_data=True, maxcpu=1, pyenv='wetb_py3', m=[3,4,6,8,9,10,12], postpro_node_zipchunks=True, postpro_node=False, exesingle=None, exechunks=None, - wine_arch='win32', wine_prefix='~/.wine32', + wine_arch='win32', wine_prefix='~/.wine32', prelude='', pyenv_cmd='source /home/python/miniconda3/bin/activate'): """ Create the htc files, pbs scripts and replace the tags in master file @@ -809,7 +809,7 @@ def prepare_launch(iter_dict, opt_tags, master, variable_tag_func, windows_nr_cpus=windows_nr_cpus, short_job_names=short_job_names, pbs_fname_appendix=pbs_fname_appendix, silent=silent, maxcpu=maxcpu, pyenv=pyenv, m=[3,4,6,8,9,10,12], - postpro_node_zipchunks=postpro_node_zipchunks, + postpro_node_zipchunks=postpro_node_zipchunks, prelude=prelude, postpro_node=postpro_node, exesingle=exesingle, exechunks=exechunks, wine_arch=wine_arch, wine_prefix=wine_prefix, pyenv_cmd=pyenv_cmd) @@ -818,7 +818,7 @@ def prepare_launch(iter_dict, opt_tags, master, variable_tag_func, def launch(cases, runmethod='none', verbose=False, copyback_turb=True, silent=False, check_log=True, windows_nr_cpus=2, qsub='time', pbs_fname_appendix=True, short_job_names=True, - maxcpu=1, pyenv='wetb_py3', m=[3,4,6,8,9,10,12], + maxcpu=1, pyenv='wetb_py3', m=[3,4,6,8,9,10,12], prelude='', postpro_node_zipchunks=True, postpro_node=False, exesingle=None, exechunks=None, wine_arch='win32', wine_prefix='~/.wine32', pyenv_cmd='source /home/python/miniconda3/bin/activate'): @@ -862,7 +862,7 @@ def launch(cases, runmethod='none', verbose=False, copyback_turb=True, # create the pbs object pbs = PBS(cases, short_job_names=short_job_names, pyenv=pyenv, pbs_fname_appendix=pbs_fname_appendix, qsub=qsub, - verbose=verbose, silent=silent, + verbose=verbose, silent=silent, prelude=prelude, m=m, postpro_node_zipchunks=postpro_node_zipchunks, postpro_node=postpro_node, exesingle=exesingle, exechunks=exechunks, wine_arch=wine_arch, @@ -1754,7 +1754,7 @@ class PBS(object): def __init__(self, cases, qsub='time', silent=False, pyenv='wetb_py3', pbs_fname_appendix=True, short_job_names=True, verbose=False, - m=[3,4,6,8,9,10,12], exesingle=None, + m=[3,4,6,8,9,10,12], exesingle=None, prelude='', postpro_node_zipchunks=True, postpro_node=False, exechunks=None, wine_arch='win32', wine_prefix='~/.wine32'): """ @@ -1791,16 +1791,22 @@ class PBS(object): self.pyenv_cmd = 'source /home/python/miniconda3/bin/activate' self.postpro_node_zipchunks = postpro_node_zipchunks self.postpro_node = postpro_node + # Prelude is executed just before HAWC2 is + self.prelude = prelude self.m = m # run in 32-bit or 64-bit mode. Note this uses the same assumptions # on how to configure wine in toolbox/pbsutils/config-wine-hawc2.sh wineparam = (wine_arch, wine_prefix) - self.winebase = 'time WINEARCH=%s WINEPREFIX=%s ' % wineparam - - self.wine = self.winebase + 'wine' - self.winenumactl = self.winebase + 'numactl --physcpubind=$CPU_NR wine' + if wine_arch==None or wine_prefix==None: + self.winebase = 'time ' + self.wine = self.winebase + self.winenumactl = self.winebase + 'numactl --physcpubind=$CPU_NR' + else: + self.winebase = 'time WINEARCH=%s WINEPREFIX=%s ' % wineparam + self.wine = self.winebase + 'wine' + self.winenumactl = self.winebase + 'numactl --physcpubind=$CPU_NR wine' # in case you want to redirect stdout to /dev/nul, append as follows: # '> /dev/null 2>&1' @@ -1819,10 +1825,12 @@ class PBS(object): self.secperiter = 0.012 # determine at runtime if winefix has to be ran - self.winefix = ' _HOSTNAME_=`hostname`\n' - self.winefix += ' if [[ ${_HOSTNAME_:0:1} == "j" ]] ; then\n' - self.winefix += ' WINEARCH=%s WINEPREFIX=%s winefix\n' % wineparam - self.winefix += ' fi\n' + self.winefix = '' + if wine_arch!=None or wine_prefix!=None: + self.winefix = ' _HOSTNAME_=`hostname`\n' + self.winefix += ' if [[ ${_HOSTNAME_:0:1} == "j" ]] ; then\n' + self.winefix += ' WINEARCH=%s WINEPREFIX=%s winefix\n' % wineparam + self.winefix += ' fi\n' # the output channels comes with a price tag. Each time step # will have a penelty depending on the number of output channels @@ -2166,6 +2174,7 @@ class PBS(object): fname_log=fname_log, fname_pbs_out=fname_pbs_out, winenumactl=self.winenumactl) + self.pbs += self.prelude self.pbs += " %s &\n" % execstr # # OLD METHOD # param = (self.wine, hawc2_exe, self.htc_dir+case) @@ -4738,6 +4747,12 @@ class Cases(object): save=save, check_datatypes=True, xlsx=xlsx, complib=self.complib) + # check if the power channel actually exists first! + if ch_powe not in dfs[chan_col_name].unique(): + msg = 'The defined channel for the electrical power does not ' + msg =+ 'exist: %s' % ch_powe + raise UserWarning(msg) + # and select only the power channels dfs_powe = dfs[dfs[chan_col_name]==ch_powe] diff --git a/wetb/prepost/dlctemplate.py b/wetb/prepost/dlctemplate.py index 56cb207fa10801dcc93d6a370a656c2269ce0e4f..2d91740bce5a626599c47d8f8983fdd7b34896b8 100644 --- a/wetb/prepost/dlctemplate.py +++ b/wetb/prepost/dlctemplate.py @@ -268,7 +268,7 @@ def launch_dlcs_excel(sim_id, silent=False, verbose=False, pbs_turb=False, walltime='04:00:00', postpro_node=False, compress=False, dlcs_dir='htc/DLCs', postpro_node_zipchunks=True, wine_arch='win32', wine_prefix='~/.wine32', - m=[3,4,6,8,9,10,12]): + m=[3,4,6,8,9,10,12], prelude='', linux=False): """ Launch load cases defined in Excel files """ @@ -282,6 +282,12 @@ def launch_dlcs_excel(sim_id, silent=False, verbose=False, pbs_turb=False, else: pyenv = None + # FIXME: THIS IS VERY MESSY, we have wine_prefix/arch and exesingle/chunks + if linux: + wine_arch = None + wine_prefix = None + prelude = 'module load mpi/openmpi_1.6.5_intelv14.0.0\n' + # if linux: # pyenv = 'wetb_py3' # pyenv_cmd = 'source /home/python/miniconda3/bin/activate' @@ -346,7 +352,7 @@ def launch_dlcs_excel(sim_id, silent=False, verbose=False, pbs_turb=False, pbs_fname_appendix=False, short_job_names=False, silent=silent, verbose=verbose, pyenv=pyenv, m=[3,4,6,8,9,10,12], postpro_node=postpro_node, - exechunks=None, exesingle=None, + exechunks=None, exesingle=None, prelude=prelude, postpro_node_zipchunks=postpro_node_zipchunks, wine_arch=wine_arch, wine_prefix=wine_prefix) @@ -367,11 +373,12 @@ def launch_dlcs_excel(sim_id, silent=False, verbose=False, pbs_turb=False, create_chunks_htc_pbs(cases, sort_by_values=sorts_on, queue='workq', ppn=20, nr_procs_series=3, walltime='20:00:00', chunks_dir='zip-chunks-jess', compress=compress, - wine_arch=wine_arch, wine_prefix=wine_prefix) - create_chunks_htc_pbs(cases, sort_by_values=sorts_on, queue='workq', - ppn=12, nr_procs_series=3, walltime='20:00:00', - chunks_dir='zip-chunks-gorm', compress=compress, - wine_arch=wine_arch, wine_prefix=wine_prefix) + wine_arch=wine_arch, wine_prefix=wine_prefix, + prelude=prelude) +# create_chunks_htc_pbs(cases, sort_by_values=sorts_on, queue='workq', +# ppn=12, nr_procs_series=3, walltime='20:00:00', +# chunks_dir='zip-chunks-gorm', compress=compress, +# wine_arch=wine_arch, wine_prefix=wine_prefix) df = sim.Cases(cases).cases2df() df.to_excel(os.path.join(POST_DIR, sim_id + '.xls')) @@ -423,6 +430,7 @@ def post_launch(sim_id, statistics=True, rem_failed=True, check_logs=True, # add_sigs = {name:expr} # in addition, sim_id and case_id are always added by default + # FIXME: HAS TO BE THE SAME AS required IN postpro_node_merge tags = ['[Case folder]', '[run_dir]', '[res_dir]', '[DLC]', '[wsp]', '[Windspeed]', '[wdir]'] add = None @@ -445,8 +453,18 @@ def post_launch(sim_id, statistics=True, rem_failed=True, check_logs=True, # load the statistics in case they are missing if not statistics: df_stats, Leq_df, AEP_df = cc.load_stats() + + # CAUTION: depending on the type output, electrical power can be two + # different things with the DTU Wind Energy Controller. + # Either manually set ch_powe to the correct value or use simple + # mechanism to figure out which one of two expected values it is. + if 'DLL-2-inpvec-2' in df_stats['channel'].unique(): + ch_powe = 'DLL-2-inpvec-2' + elif 'DLL-dtu_we_controller-inpvec-2' in df_stats['channel'].unique(): + ch_powe = 'DLL-dtu_we_controller-inpvec-2' + df_AEP = cc.AEP(df_stats, csv=csv, update=update, save=True, - ch_powe='DLL-2-inpvec-2') + ch_powe=ch_powe) if envelopeblade: ch_list = [] @@ -564,6 +582,7 @@ def postpro_node_merge(tqdm=False, zipchunks=False, m=[3,4,6,8,9,10,12]): store.close() # ------------------------------------------------------------------------- # merge missing cols onto stats + # FIXME: HAS TO BE THE SAME AS tags IN post_launch required = ['[DLC]', '[run_dir]', '[wdir]', '[Windspeed]', '[res_dir]', '[case_id]', '[Case folder]'] df = pd.read_hdf(fdf, 'table') @@ -706,6 +725,9 @@ if __name__ == '__main__': parser.add_argument('--wine_prefix', action='store', default='~/.wine32', type=str, dest='wine_prefix', help='WINEPREFIX: ' 'Directory used by wineserver. Default ~/.wine32') + parser.add_argument('--linux', action='store_true', default=False, + dest='linux', help='Do not use wine. Implies that ' + 'wine_prefix and wine_arch is set to None.') opt = parser.parse_args() # Wholer coefficients to be considered for the fatigue analysis @@ -757,7 +779,7 @@ if __name__ == '__main__': dlcs_dir=os.path.join(P_SOURCE, 'htc', 'DLCs'), postpro_node_zipchunks=opt.no_postpro_node_zipchunks, wine_arch=opt.wine_arch, wine_prefix=opt.wine_prefix, - compress=opt.compress) + compress=opt.compress, linux=opt.linux) # post processing: check log files, calculate statistics if opt.check_logs or opt.stats or opt.fatigue or opt.envelopeblade \ or opt.envelopeturbine or opt.AEP: diff --git a/wetb/prepost/simchunks.py b/wetb/prepost/simchunks.py index 47c27d5f21af511e4305b7e1ea934c12a4f83301..a6498c63ca8c6ab71da880e92729c4b14507fad3 100644 --- a/wetb/prepost/simchunks.py +++ b/wetb/prepost/simchunks.py @@ -39,7 +39,7 @@ def create_chunks_htc_pbs(cases, sort_by_values=['[Windspeed]'], ppn=20, i0=0, walltime='24:00:00', chunks_dir='zip-chunks-jess', wine_arch='win32', wine_prefix='~/.wine32', pyenv_cmd='source /home/python/miniconda3/bin/activate', - pyenv='wetb_py3'): + pyenv='wetb_py3', prelude=''): """Group a large number of simulations htc and pbs launch scripts into different zip files so we can run them with find+xargs on various nodes. """ @@ -214,6 +214,10 @@ def create_chunks_htc_pbs(cases, sort_by_values=['[Windspeed]'], ppn=20, i0=0, pbs = pbs.replace('[queue]', queue) pbs += '\necho "%s"\n' % ('-'*70) + # run prelude code + # ===================================================================== + pbs += prelude + # ===================================================================== # activate the python environment if pyenv is not None: @@ -224,13 +228,14 @@ def create_chunks_htc_pbs(cases, sort_by_values=['[Windspeed]'], ppn=20, i0=0, # is this because it is activated at the same time on another node? # check twice if the environment got activated for real, # but only do so for /home/python/miniconda - pbs += 'echo "CHECK 2x IF %s IS ACTIVE, IF NOT TRY AGAIN"\n' % pyenv - pbs += 'CMD=\"from distutils.sysconfig import get_python_lib;' - pbs += 'print (get_python_lib().find(\'/usr/lib/python\'))"\n' - pbs += 'ACTIVATED=`python -c "$CMD"`\n' - pbs += 'if [ $ACTIVATED -eq 0 ]; then %s %s;fi\n' % rpl - pbs += 'ACTIVATED=`python -c "$CMD"`\n' - pbs += 'if [ $ACTIVATED -eq 0 ]; then %s %s;fi\n' % rpl + if pyenv_cmd.find('miniconda') > -1: + pbs += 'echo "CHECK 2x IF %s IS ACTIVE, IF NOT TRY AGAIN"\n' % pyenv + pbs += 'CMD=\"from distutils.sysconfig import get_python_lib;' + pbs += 'print (get_python_lib().find(\'/usr/lib/python\'))"\n' + pbs += 'ACTIVATED=`python -c "$CMD"`\n' + pbs += 'if [ $ACTIVATED -eq 0 ]; then %s %s;fi\n' % rpl + pbs += 'ACTIVATED=`python -c "$CMD"`\n' + pbs += 'if [ $ACTIVATED -eq 0 ]; then %s %s;fi\n' % rpl # ===================================================================== # create all necessary directories at CPU_NR dirs @@ -397,7 +402,8 @@ def create_chunks_htc_pbs(cases, sort_by_values=['[Windspeed]'], ppn=20, i0=0, pbs += "echo 'current working directory:'\n" pbs += 'pwd\n' pbs += 'echo "START RUNNING JOBS IN find+xargs MODE"\n' - pbs += 'WINEARCH=%s WINEPREFIX=%s winefix\n' % wineparam + if wine_arch!=None or wine_prefix!=None: + pbs += 'WINEARCH=%s WINEPREFIX=%s winefix\n' % wineparam pbs += '# run all the PBS *.p files in find+xargs mode\n' pbs += 'echo "following cases will be run from following path:"\n' pbs += 'echo "%s"\n' % (os.path.join(sim_id, pbs_in_base)) @@ -479,11 +485,12 @@ def create_chunks_htc_pbs(cases, sort_by_values=['[Windspeed]'], ppn=20, i0=0, pbs += 'source deactivate\n' pbs += 'echo "DONE !!"\n' pbs += '\necho "%s"\n' % ('-'*70) - pbs += '# in case wine has crashed, kill any remaining wine servers\n' - pbs += '# caution: ALL the users wineservers will die on this node!\n' - pbs += 'echo "following wineservers are still running:"\n' - pbs += 'ps -u $USER -U $USER | grep wineserver\n' - pbs += 'killall -u $USER wineserver\n' + if wine_arch!=None or wine_prefix!=None: + pbs += '# in case wine has crashed, kill any remaining wine servers\n' + pbs += '# caution: ALL the users wineservers will die on this node!\n' + pbs += 'echo "following wineservers are still running:"\n' + pbs += 'ps -u $USER -U $USER | grep wineserver\n' + pbs += 'killall -u $USER wineserver\n' pbs += 'exit\n' rpl = (sim_id, ii) diff --git a/wetb/prepost/tests/data/demo_dlc/ref/zip-chunks-gorm/remote_chnk_00000.p b/wetb/prepost/tests/data/demo_dlc/ref/zip-chunks-gorm/remote_chnk_00000.p deleted file mode 100644 index 1e59d48fba61584dbe2b0011b166955a980e07ab..0000000000000000000000000000000000000000 --- a/wetb/prepost/tests/data/demo_dlc/ref/zip-chunks-gorm/remote_chnk_00000.p +++ /dev/null @@ -1,204 +0,0 @@ - -### Standard Output -#PBS -N remote_chnk_00000 -#PBS -o ./pbs_out_chunks/remote_chnk_00000.out -### Standard Error -#PBS -e ./pbs_out_chunks/remote_chnk_00000.err -#PBS -W umask=0003 -### Maximum wallclock time format HOURS:MINUTES:SECONDS -#PBS -l walltime=20:00:00 -#PBS -l nodes=1:ppn=12 -### Queue name -#PBS -q workq - - -echo "----------------------------------------------------------------------" -echo "activate python environment wetb_py3" -source /home/python/miniconda3/bin/activate wetb_py3 -echo "CHECK 2x IF wetb_py3 IS ACTIVE, IF NOT TRY AGAIN" -CMD="from distutils.sysconfig import get_python_lib;print (get_python_lib().find('/usr/lib/python'))" -ACTIVATED=`python -c "$CMD"` -if [ $ACTIVATED -eq 0 ]; then source /home/python/miniconda3/bin/activate wetb_py3;fi -ACTIVATED=`python -c "$CMD"` -if [ $ACTIVATED -eq 0 ]; then source /home/python/miniconda3/bin/activate wetb_py3;fi - -echo "----------------------------------------------------------------------" -cd /scratch/$USER/$PBS_JOBID/ -echo 'current working directory:' -pwd - -echo "create CPU directories on the scratch disk" -mkdir -p /scratch/$USER/$PBS_JOBID/remote/ -mkdir -p /scratch/$USER/$PBS_JOBID/0/ -mkdir -p /scratch/$USER/$PBS_JOBID/1/ -mkdir -p /scratch/$USER/$PBS_JOBID/2/ -mkdir -p /scratch/$USER/$PBS_JOBID/3/ -mkdir -p /scratch/$USER/$PBS_JOBID/4/ -mkdir -p /scratch/$USER/$PBS_JOBID/5/ -mkdir -p /scratch/$USER/$PBS_JOBID/6/ -mkdir -p /scratch/$USER/$PBS_JOBID/7/ -mkdir -p /scratch/$USER/$PBS_JOBID/8/ -mkdir -p /scratch/$USER/$PBS_JOBID/9/ -mkdir -p /scratch/$USER/$PBS_JOBID/10/ -mkdir -p /scratch/$USER/$PBS_JOBID/11/ - -echo "----------------------------------------------------------------------" -cd $PBS_O_WORKDIR -echo 'current working directory:' -pwd -echo "get the zip-chunk file from the PBS_O_WORKDIR" -cp ./zip-chunks-gorm/remote_chnk_00000.zip /scratch/$USER/$PBS_JOBID/ - -echo "----------------------------------------------------------------------" -cd /scratch/$USER/$PBS_JOBID/ -echo 'current working directory:' -pwd -echo "unzip chunk, create dirs in cpu and sim_id folders" -/usr/bin/unzip remote_chnk_00000.zip -d 0/. >> /dev/null -/usr/bin/unzip remote_chnk_00000.zip -d 1/. >> /dev/null -/usr/bin/unzip remote_chnk_00000.zip -d 2/. >> /dev/null -/usr/bin/unzip remote_chnk_00000.zip -d 3/. >> /dev/null -/usr/bin/unzip remote_chnk_00000.zip -d 4/. >> /dev/null -/usr/bin/unzip remote_chnk_00000.zip -d 5/. >> /dev/null -/usr/bin/unzip remote_chnk_00000.zip -d 6/. >> /dev/null -/usr/bin/unzip remote_chnk_00000.zip -d 7/. >> /dev/null -/usr/bin/unzip remote_chnk_00000.zip -d 8/. >> /dev/null -/usr/bin/unzip remote_chnk_00000.zip -d 9/. >> /dev/null -/usr/bin/unzip remote_chnk_00000.zip -d 10/. >> /dev/null -/usr/bin/unzip remote_chnk_00000.zip -d 11/. >> /dev/null -/usr/bin/unzip remote_chnk_00000.zip -d remote/. >> /dev/null - -echo "----------------------------------------------------------------------" -cd /scratch/$USER/$PBS_JOBID/remote/ -echo 'current working directory:' -pwd -echo "create turb_db directories" -mkdir -p ../turb/ - -echo "----------------------------------------------------------------------" -cd $PBS_O_WORKDIR -echo 'current working directory:' -pwd - -# copy to scratch db directory for [turb_db_dir], [turb_base_name] -cp ../turb/turb_s100_10ms* /scratch/$USER/$PBS_JOBID/remote/../turb/. -cp ../turb/turb_s101_11ms* /scratch/$USER/$PBS_JOBID/remote/../turb/. - -# copy to scratch db directory for [meander_db_dir], [meander_base_name] - -# copy to scratch db directory for [micro_db_dir], [micro_base_name] - -echo "----------------------------------------------------------------------" -cd /scratch/$USER/$PBS_JOBID/ -echo 'current working directory:' -pwd -echo "create turb directories in CPU dirs" -mkdir -p 0/turb/ -mkdir -p 0/turb_meander/ -mkdir -p 0/turb_micro/ -mkdir -p 1/turb/ -mkdir -p 1/turb_meander/ -mkdir -p 1/turb_micro/ -mkdir -p 2/turb/ -mkdir -p 2/turb_meander/ -mkdir -p 2/turb_micro/ -mkdir -p 3/turb/ -mkdir -p 3/turb_meander/ -mkdir -p 3/turb_micro/ -mkdir -p 4/turb/ -mkdir -p 4/turb_meander/ -mkdir -p 4/turb_micro/ -mkdir -p 5/turb/ -mkdir -p 5/turb_meander/ -mkdir -p 5/turb_micro/ -mkdir -p 6/turb/ -mkdir -p 6/turb_meander/ -mkdir -p 6/turb_micro/ -mkdir -p 7/turb/ -mkdir -p 7/turb_meander/ -mkdir -p 7/turb_micro/ -mkdir -p 8/turb/ -mkdir -p 8/turb_meander/ -mkdir -p 8/turb_micro/ -mkdir -p 9/turb/ -mkdir -p 9/turb_meander/ -mkdir -p 9/turb_micro/ -mkdir -p 10/turb/ -mkdir -p 10/turb_meander/ -mkdir -p 10/turb_micro/ -mkdir -p 11/turb/ -mkdir -p 11/turb_meander/ -mkdir -p 11/turb_micro/ - -echo "----------------------------------------------------------------------" -cd /scratch/$USER/$PBS_JOBID/remote/ -echo 'current working directory:' -pwd -echo "Link all turb files into CPU dirs" -find /scratch/$USER/$PBS_JOBID/remote/../turb/ -iname "*.bin" -exec ln -s {} /scratch/$USER/$PBS_JOBID/0/turb/ \; -find /scratch/$USER/$PBS_JOBID/remote/../turb/ -iname "*.bin" -exec ln -s {} /scratch/$USER/$PBS_JOBID/1/turb/ \; -find /scratch/$USER/$PBS_JOBID/remote/../turb/ -iname "*.bin" -exec ln -s {} /scratch/$USER/$PBS_JOBID/2/turb/ \; -find /scratch/$USER/$PBS_JOBID/remote/../turb/ -iname "*.bin" -exec ln -s {} /scratch/$USER/$PBS_JOBID/3/turb/ \; -find /scratch/$USER/$PBS_JOBID/remote/../turb/ -iname "*.bin" -exec ln -s {} /scratch/$USER/$PBS_JOBID/4/turb/ \; -find /scratch/$USER/$PBS_JOBID/remote/../turb/ -iname "*.bin" -exec ln -s {} /scratch/$USER/$PBS_JOBID/5/turb/ \; -find /scratch/$USER/$PBS_JOBID/remote/../turb/ -iname "*.bin" -exec ln -s {} /scratch/$USER/$PBS_JOBID/6/turb/ \; -find /scratch/$USER/$PBS_JOBID/remote/../turb/ -iname "*.bin" -exec ln -s {} /scratch/$USER/$PBS_JOBID/7/turb/ \; -find /scratch/$USER/$PBS_JOBID/remote/../turb/ -iname "*.bin" -exec ln -s {} /scratch/$USER/$PBS_JOBID/8/turb/ \; -find /scratch/$USER/$PBS_JOBID/remote/../turb/ -iname "*.bin" -exec ln -s {} /scratch/$USER/$PBS_JOBID/9/turb/ \; -find /scratch/$USER/$PBS_JOBID/remote/../turb/ -iname "*.bin" -exec ln -s {} /scratch/$USER/$PBS_JOBID/10/turb/ \; -find /scratch/$USER/$PBS_JOBID/remote/../turb/ -iname "*.bin" -exec ln -s {} /scratch/$USER/$PBS_JOBID/11/turb/ \; - -echo "----------------------------------------------------------------------" -cd /scratch/$USER/$PBS_JOBID/ -echo 'current working directory:' -pwd -echo "START RUNNING JOBS IN find+xargs MODE" -WINEARCH=win32 WINEPREFIX=~/.wine32 winefix -# run all the PBS *.p files in find+xargs mode -echo "following cases will be run from following path:" -echo "remote/pbs_in/dlc01_demos/" -export LAUNCH_PBS_MODE=false -/home/MET/sysalt/bin/find remote/pbs_in/dlc01_demos/ -type f -name '*.p' | sort -z - -echo "number of files to be launched: "`find remote/pbs_in/dlc01_demos/ -type f | wc -l` -/home/MET/sysalt/bin/find remote/pbs_in/dlc01_demos/ -type f -name '*.p' -print0 | sort -z | /home/MET/sysalt/bin/xargs -0 -I{} --process-slot-var=CPU_NR -n 1 -P 12 sh {} -echo "END OF JOBS IN find+xargs MODE" - - -echo "----------------------------------------------------------------------" -echo 'total scratch disk usage:' -du -hs /scratch/$USER/$PBS_JOBID/ -cd /scratch/$USER/$PBS_JOBID/remote -echo 'current working directory:' -pwd -echo "Results saved at sim_id directory:" -find . - -echo "move statsdel into compressed archive" -find res/dlc01_demos/ -name "*.csv" -print0 | xargs -0 tar --remove-files -rf prepost/statsdel_chnk_00000.tar -xz -z2 -T 12 prepost/statsdel_chnk_00000.tar - -echo "move log analysis into compressed archive" -find logfiles/dlc01_demos/ -name "*.csv" -print0 | xargs -0 tar --remove-files -rf prepost/loganalysis_chnk_00000.tar -xz -z2 -T 12 prepost/loganalysis_chnk_00000.tar - - -echo "----------------------------------------------------------------------" -cd /scratch/$USER/$PBS_JOBID/ -echo 'current working directory:' -pwd -echo "move results back from node scratch/sim_id to origin, but ignore htc, and pbs_in directories." -echo "copy from remote/* to $PBS_O_WORKDIR/" -time rsync -au --remove-source-files remote/* $PBS_O_WORKDIR/ \ - --exclude pbs_in/dlc01_demos/* \ - --exclude *.htc -source deactivate -echo "DONE !!" - -echo "----------------------------------------------------------------------" -# in case wine has crashed, kill any remaining wine servers -# caution: ALL the users wineservers will die on this node! -echo "following wineservers are still running:" -ps -u $USER -U $USER | grep wineserver -killall -u $USER wineserver -exit diff --git a/wetb/prepost/tests/data/demo_dlc/ref/zip-chunks-gorm/remote_chnk_00000.zip b/wetb/prepost/tests/data/demo_dlc/ref/zip-chunks-gorm/remote_chnk_00000.zip deleted file mode 100644 index b2c89af8c5e72e4214fbbd03741389525650e5ac..0000000000000000000000000000000000000000 Binary files a/wetb/prepost/tests/data/demo_dlc/ref/zip-chunks-gorm/remote_chnk_00000.zip and /dev/null differ diff --git a/wetb/prepost/tests/test_Simulations.py b/wetb/prepost/tests/test_Simulations.py index baa5f317af979946bfef5db376cf8ca2e2e3cb36..9630d997d2af25b83c621eaad556e1a93897e4ae 100644 --- a/wetb/prepost/tests/test_Simulations.py +++ b/wetb/prepost/tests/test_Simulations.py @@ -102,7 +102,7 @@ class TestGenerateInputs(Template): # directory structure withouth manually creating the empty dirs here for subdir in ['control', 'data', 'htc', 'pbs_in', 'pbs_in_turb', 'htc/_master', 'htc/dlc01_demos', 'pbs_in/dlc01_demos', - 'zip-chunks-jess', 'zip-chunks-gorm']: + 'zip-chunks-jess']: remote = os.path.join(p_root, tmpl.PROJECT, 'remote', subdir) ref = os.path.join(p_root, tmpl.PROJECT, 'ref', subdir) # the zipfiles are taken care of separately @@ -118,7 +118,6 @@ class TestGenerateInputs(Template): # compare the zip files for fname in ['demo_dlc_remote.zip', - 'zip-chunks-gorm/remote_chnk_00000.zip', 'zip-chunks-jess/remote_chnk_00000.zip']: remote = os.path.join(p_root, tmpl.PROJECT, 'remote', fname) ref = os.path.join(p_root, tmpl.PROJECT, 'ref', fname)