diff --git a/benchmarks/levante/LOG.benchmark_3d.run.774657.o_keep4reference b/benchmarks/levante/LOG.benchmark_3d.run.774657.o_keep4reference new file mode 100644 index 0000000000000000000000000000000000000000..24bd80e52929d2b81b86739e04df75197c7c2815 --- /dev/null +++ b/benchmarks/levante/LOG.benchmark_3d.run.774657.o_keep4reference @@ -0,0 +1,32 @@ +Working with /sw/spack-levante/mambaforge-4.11.0-0-Linux-x86_64-sobz6z/bin/python3 + +----------------------------------------- +Working on resolution of R10000m +Start cell: 264617 Search radius: 851 + +Time to read in 1 time step of data, including moving it onto the 3d x lev cubulated grid; done for 48 time steps +Mean: 0:00:37.790904 Min: 0:00:36.854732 Max: 0:00:38.395997 + +Time to do 3d connected component labeling with vertex connectivity for 1 time step; done for 48 time steps +Mean: 0:06:06.647231 Min: 0:05:47.607184 Max: 0:06:26.261884 + +Time to do 3d connected component labeling with edge connectivity for 1 time step; done for 48 time steps +Mean: 0:10:25.109824 Min: 0:09:42.041926 Max: 0:11:21.031920 +----------------------------------------- + + +----------------------------------------- +Working on resolution of R10000m +Start cell: 264617 Search radius: 851 + +Time to read in 1 time step of data, including moving it onto the 3d x lev cubulated grid; done for 48 time steps +Mean: 0:00:37.753456 Min: 0:00:37.042033 Max: 0:00:38.651186 + +Time to do 3d connected component labeling with vertex connectivity for 1 time step; done for 48 time steps +Mean: 0:06:08.706686 Min: 0:05:45.710407 Max: 0:06:26.488845 + +Time to do 3d connected component labeling with edge connectivity for 1 time step; done for 48 time steps +Mean: 0:10:25.774384 Min: 0:09:34.235645 Max: 0:11:17.364959 +----------------------------------------- + +slurmstepd: error: *** JOB 774657 ON l40311 CANCELLED AT 2022-06-12T08:51:18 DUE TO TIME LIMIT *** diff --git a/benchmarks/levante/LOG.benchmark_alternative_networkx_fullgraph.run.747768.o b/benchmarks/levante/LOG.benchmark_alternative_networkx_fullgraph.run.747768.o_keep4reference similarity index 100% rename from benchmarks/levante/LOG.benchmark_alternative_networkx_fullgraph.run.747768.o rename to benchmarks/levante/LOG.benchmark_alternative_networkx_fullgraph.run.747768.o_keep4reference diff --git a/benchmarks/levante/benchmark_3d.run b/benchmarks/levante/benchmark_3d.run index ebb1ce48d8917c96adf00e831ec0164ea28521d5..ab79b281930d305c31a9aaf29c9f2d2b32d0843a 100755 --- a/benchmarks/levante/benchmark_3d.run +++ b/benchmarks/levante/benchmark_3d.run @@ -25,10 +25,10 @@ echo "Working with" ${MYPYTHON} # $MYPYTHON benchmark_3d.py R40000m 18494 210 #done # -for i in {1..10}; do - $MYPYTHON benchmark_3d.py R20000m 69220 423 -done +#for i in {1..10}; do +# $MYPYTHON benchmark_3d.py R20000m 69220 423 +#done -for i in {1..1}; do - $MYPYTHON benchmark_3d.py R10000m 264617 851 +for i in {1..10}; do + $MYPYTHON benchmark_3d_10timesteps.py R10000m 264617 851 done diff --git a/benchmarks/levante/benchmark_3d_10timesteps.py b/benchmarks/levante/benchmark_3d_10timesteps.py new file mode 100644 index 0000000000000000000000000000000000000000..6cab7cfafb595a2b6cb9910012a4f42ac6738aab --- /dev/null +++ b/benchmarks/levante/benchmark_3d_10timesteps.py @@ -0,0 +1,75 @@ +# Perform benchmarking of 3d cloud data given a previously computed cubulation + +# parse command line parameters +import sys +resol = sys.argv[1] +startcell = int(sys.argv[2]) +searchrad = int(sys.argv[3]) + +# gridfile including path +gridfile = '/work/bb1018/from_Mistral/bb1018/b380459/NAWDEX/grids/icon-grid_nawdex_78w40e23n80n_'+resol+'.nc' + +# load other needed packages +import cc3d +sys.path.append('/home/b/b380459/tricco/') +import tricco +import datetime + +print(' ') +print('-----------------------------------------') +print('Working on resolution of', resol) +print('Start cell:', startcell, 'Search radius:', searchrad) + +# load previously computed cubulation +import numpy as np +cubulpath = '/scratch/b/b380459/tricco_output/' +cubulfile = cubulpath+'/icon-grid_nawdex_78w40e23n80n_'+resol+'_cubulation_start'+str(startcell)+'_radius'+str(searchrad)+'.npy' +cubulation = np.load(cubulfile, allow_pickle=True) + +# read in cloud data + +# cloud file depends on resolution +datapath={'R80000m': '/work/bb1018/from_Mistral/bb1018/b380459/NAWDEX/ICON_OUTPUT_NWP/nawdexnwp-80km-mis-0001/', + 'R40000m': '/work/bb1018/from_Mistral/bb1018/b380459/NAWDEX/ICON_OUTPUT_NWP/nawdexnwp-40km-mis-0001/', + 'R20000m': '/work/bb1018/from_Mistral/bb1018/b380459/NAWDEX/ICON_OUTPUT_NWP/nawdexnwp-20km-mis-0001/', + 'R10000m': '/work/bb1018/from_Mistral/bb1018/b380459/NAWDEX/ICON_OUTPUT_NWP/nawdexnwp-10km-mis-0001/'} +datafile={'R80000m': 'nawdexnwp-80km-mis-0001_2016092200_3dcloud_DOM01_ML_', + 'R40000m': 'nawdexnwp-40km-mis-0001_2016092200_3dcloud_DOM01_ML_', + 'R20000m': 'nawdexnwp-20km-mis-0001_2016092200_3dcloud_DOM01_ML_', + 'R10000m': 'nawdexnwp-10km-mis-0001_2016092200_3dcloud_DOM01_ML_'} + +dtime_dat = list() +dtime_ver = list() +dtime_edg = list() +# loop over 10 timesteps +for time in range(10,21): + # read in data + begin_time = datetime.datetime.now() + field, field_cube = tricco.prepare_field_lev(model='ICON', path=datapath[resol], + file=datafile[resol]+'00'+str(time)+'.nc', + var='clc', threshold=85.0, cubulation=cubulation) + end_time = datetime.datetime.now() + dtime_dat.append(end_time-begin_time) + # perform connected component analysis for vertex connectivity + begin_time = datetime.datetime.now() + _ = tricco.compute_connected_components_3d(cubulation, field_cube, connectivity = 'vertex') + end_time = datetime.datetime.now() + dtime_ver.append(end_time-begin_time) + # perform connected component analysis for edge connectivity + begin_time = datetime.datetime.now() + _ = tricco.compute_connected_components_3d(cubulation, field_cube, connectivity = 'edge') + end_time = datetime.datetime.now() + dtime_edg.append(end_time-begin_time) + +print(' ') +print('Time to read in 1 time step of data, including moving it onto the 3d x lev cubulated grid; done for 48 time steps') +print('Mean:', np.mean(dtime_dat), 'Min:', np.min(dtime_dat), 'Max:', np.max(dtime_dat)) +print(' ') +print('Time to do 3d connected component labeling with vertex connectivity for 1 time step; done for 48 time steps') +print('Mean:', np.mean(dtime_ver), 'Min:', np.min(dtime_ver), 'Max:', np.max(dtime_ver)) +print(' ') +print('Time to do 3d connected component labeling with edge connectivity for 1 time step; done for 48 time steps') +print('Mean:', np.mean(dtime_edg), 'Min:', np.min(dtime_edg), 'Max:', np.max(dtime_edg)) + +print('-----------------------------------------') +print(' ')