[d69b677] | 1 | #!/usr/bin/env python |
---|
[64cf353] | 2 | # -*- coding: utf-8 -*- |
---|
| 3 | #************************************************************************ |
---|
[ff99eae] | 4 | # ToDo AP |
---|
[64cf353] | 5 | # - create a class Installation and divide installation in 3 subdefs for |
---|
| 6 | # ecgate, local and cca seperatly |
---|
| 7 | # - Change History ist nicht angepasst ans File! Original geben lassen |
---|
| 8 | #************************************************************************ |
---|
[991df6a] | 9 | #******************************************************************************* |
---|
| 10 | # @Author: Leopold Haimberger (University of Vienna) |
---|
| 11 | # |
---|
| 12 | # @Date: November 2015 |
---|
| 13 | # |
---|
| 14 | # @Change History: |
---|
| 15 | # |
---|
| 16 | # February 2018 - Anne Philipp (University of Vienna): |
---|
| 17 | # - applied PEP8 style guide |
---|
| 18 | # - added documentation |
---|
[ff99eae] | 19 | # - moved install_args_and_control in here |
---|
[991df6a] | 20 | # |
---|
| 21 | # @License: |
---|
| 22 | # (C) Copyright 2015-2018. |
---|
| 23 | # |
---|
| 24 | # This software is licensed under the terms of the Apache Licence Version 2.0 |
---|
| 25 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. |
---|
| 26 | # |
---|
| 27 | # @Program Functionality: |
---|
| 28 | # Depending on the selected installation environment (locally or on the |
---|
| 29 | # ECMWF server ecgate or cca) the program extracts the commandline |
---|
| 30 | # arguments and the CONTROL file parameter and prepares the corresponding |
---|
| 31 | # environment. The necessary files are collected in a tar-ball and placed |
---|
| 32 | # at the target location. There its untared, the environment variables will |
---|
| 33 | # be set and the Fortran code will be compiled. If the ECMWF environment is |
---|
| 34 | # selected a job script is prepared and submitted for the remaining |
---|
| 35 | # configurations after putting the tar-ball to the target ECMWF server. |
---|
| 36 | # |
---|
| 37 | # @Program Content: |
---|
| 38 | # - main |
---|
| 39 | # - install_args_and_control |
---|
| 40 | # - install_via_gateway |
---|
| 41 | # |
---|
| 42 | #******************************************************************************* |
---|
| 43 | |
---|
[64cf353] | 44 | # ------------------------------------------------------------------------------ |
---|
| 45 | # MODULES |
---|
| 46 | # ------------------------------------------------------------------------------ |
---|
[991df6a] | 47 | import os |
---|
| 48 | import sys |
---|
| 49 | import glob |
---|
[d69b677] | 50 | import subprocess |
---|
| 51 | import inspect |
---|
[ff99eae] | 52 | from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter |
---|
[991df6a] | 53 | |
---|
| 54 | # software specific classes and modules from flex_extract |
---|
| 55 | from ControlFile import ControlFile |
---|
[d69b677] | 56 | |
---|
[ff99eae] | 57 | # add path to pythonpath so that python finds its buddies |
---|
| 58 | LOCAL_PYTHON_PATH = os.path.dirname(os.path.abspath( |
---|
| 59 | inspect.getfile(inspect.currentframe()))) |
---|
| 60 | if LOCAL_PYTHON_PATH not in sys.path: |
---|
| 61 | sys.path.append(LOCAL_PYTHON_PATH) |
---|
| 62 | |
---|
[64cf353] | 63 | # ------------------------------------------------------------------------------ |
---|
| 64 | # FUNCTIONS |
---|
| 65 | # ------------------------------------------------------------------------------ |
---|
[991df6a] | 66 | def main(): |
---|
| 67 | ''' |
---|
| 68 | @Description: |
---|
| 69 | Controls the installation process. Calls the installation function |
---|
| 70 | if target is specified. |
---|
| 71 | |
---|
| 72 | @Intput: |
---|
| 73 | <nothing> |
---|
| 74 | |
---|
| 75 | @Return: |
---|
| 76 | <nothing> |
---|
| 77 | ''' |
---|
| 78 | |
---|
[ff99eae] | 79 | os.chdir(LOCAL_PYTHON_PATH) |
---|
[991df6a] | 80 | args, c = install_args_and_control() |
---|
| 81 | |
---|
| 82 | if args.install_target is not None: |
---|
| 83 | install_via_gateway(c, args.install_target) |
---|
| 84 | else: |
---|
[ff99eae] | 85 | print 'Please specify installation target (local|ecgate|cca)' |
---|
| 86 | print 'use -h or --help for help' |
---|
[991df6a] | 87 | |
---|
| 88 | sys.exit() |
---|
| 89 | |
---|
| 90 | return |
---|
| 91 | |
---|
| 92 | |
---|
[efdb01a] | 93 | def install_args_and_control(): |
---|
| 94 | ''' |
---|
| 95 | @Description: |
---|
| 96 | Assigns the command line arguments for installation and reads |
---|
[991df6a] | 97 | CONTROL file content. Apply default values for non mentioned arguments. |
---|
[efdb01a] | 98 | |
---|
| 99 | @Input: |
---|
| 100 | <nothing> |
---|
| 101 | |
---|
| 102 | @Return: |
---|
| 103 | args: instance of ArgumentParser |
---|
| 104 | Contains the commandline arguments from script/program call. |
---|
| 105 | |
---|
[991df6a] | 106 | c: instance of class ControlFile |
---|
| 107 | Contains all necessary information of a CONTROL file. The parameters |
---|
[efdb01a] | 108 | are: DAY1, DAY2, DTIME, MAXSTEP, TYPE, TIME, STEP, CLASS, STREAM, |
---|
| 109 | NUMBER, EXPVER, GRID, LEFT, LOWER, UPPER, RIGHT, LEVEL, LEVELIST, |
---|
| 110 | RESOL, GAUSS, ACCURACY, OMEGA, OMEGADIFF, ETA, ETADIFF, DPDETA, |
---|
| 111 | SMOOTH, FORMAT, ADDPAR, WRF, CWC, PREFIX, ECSTORAGE, ECTRANS, |
---|
| 112 | ECFSDIR, MAILOPS, MAILFAIL, GRIB2FLEXPART, FLEXPARTDIR |
---|
| 113 | For more information about format and content of the parameter see |
---|
| 114 | documentation. |
---|
| 115 | ''' |
---|
| 116 | parser = ArgumentParser(description='Install ECMWFDATA software locally or \ |
---|
| 117 | on ECMWF machines', |
---|
| 118 | formatter_class=ArgumentDefaultsHelpFormatter) |
---|
| 119 | |
---|
| 120 | parser.add_argument('--target', dest='install_target', |
---|
| 121 | help="Valid targets: local | ecgate | cca , \ |
---|
| 122 | the latter two are at ECMWF") |
---|
| 123 | parser.add_argument("--makefile", dest="makefile", |
---|
| 124 | help='Name of Makefile to use for compiling CONVERT2') |
---|
| 125 | parser.add_argument("--ecuid", dest="ecuid", |
---|
| 126 | help='user id at ECMWF') |
---|
| 127 | parser.add_argument("--ecgid", dest="ecgid", |
---|
| 128 | help='group id at ECMWF') |
---|
| 129 | parser.add_argument("--gateway", dest="gateway", |
---|
| 130 | help='name of local gateway server') |
---|
| 131 | parser.add_argument("--destination", dest="destination", |
---|
| 132 | help='ecaccess destination, e.g. leo@genericSftp') |
---|
| 133 | |
---|
| 134 | parser.add_argument("--flexpart_root_scripts", dest="flexpart_root_scripts", |
---|
| 135 | help="FLEXPART root directory on ECMWF servers \ |
---|
| 136 | (to find grib2flexpart and COMMAND file)\n\ |
---|
| 137 | Normally ECMWFDATA resides in the scripts directory \ |
---|
| 138 | of the FLEXPART distribution, thus the:") |
---|
| 139 | |
---|
| 140 | # arguments for job submission to ECMWF, only needed by submit.py |
---|
| 141 | parser.add_argument("--job_template", dest='job_template', |
---|
| 142 | default="job.temp.o", |
---|
| 143 | help="job template file for submission to ECMWF") |
---|
| 144 | |
---|
| 145 | parser.add_argument("--controlfile", dest="controlfile", |
---|
| 146 | default='CONTROL.temp', |
---|
[991df6a] | 147 | help="file with CONTROL parameters") |
---|
[efdb01a] | 148 | |
---|
| 149 | args = parser.parse_args() |
---|
| 150 | |
---|
| 151 | try: |
---|
[991df6a] | 152 | c = ControlFile(args.controlfile) |
---|
[ff99eae] | 153 | except IOError: |
---|
| 154 | print 'Could not read CONTROL file "' + args.controlfile + '"' |
---|
| 155 | print 'Either it does not exist or its syntax is wrong.' |
---|
| 156 | print 'Try "' + sys.argv[0].split('/')[-1] + \ |
---|
| 157 | ' -h" to print usage information' |
---|
[efdb01a] | 158 | exit(1) |
---|
| 159 | |
---|
| 160 | if args.install_target != 'local': |
---|
[ff99eae] | 161 | if args.ecgid is None or args.ecuid is None or args.gateway is None \ |
---|
| 162 | or args.destination is None: |
---|
| 163 | print 'Please enter your ECMWF user id and group id as well as \ |
---|
[efdb01a] | 164 | the \nname of the local gateway and the ectrans \ |
---|
[ff99eae] | 165 | destination ' |
---|
| 166 | print 'with command line options --ecuid --ecgid \ |
---|
| 167 | --gateway --destination' |
---|
| 168 | print 'Try "' + sys.argv[0].split('/')[-1] + \ |
---|
| 169 | ' -h" to print usage information' |
---|
| 170 | print 'Please consult ecaccess documentation or ECMWF user support \ |
---|
| 171 | for further details' |
---|
[efdb01a] | 172 | sys.exit(1) |
---|
| 173 | else: |
---|
| 174 | c.ecuid = args.ecuid |
---|
| 175 | c.ecgid = args.ecgid |
---|
| 176 | c.gateway = args.gateway |
---|
| 177 | c.destination = args.destination |
---|
| 178 | |
---|
[ff99eae] | 179 | if args.makefile: |
---|
[efdb01a] | 180 | c.makefile = args.makefile |
---|
| 181 | |
---|
| 182 | if args.install_target == 'local': |
---|
| 183 | if args.flexpart_root_scripts is None: |
---|
| 184 | c.flexpart_root_scripts = '../' |
---|
| 185 | else: |
---|
| 186 | c.flexpart_root_scripts = args.flexpart_root_scripts |
---|
| 187 | |
---|
| 188 | if args.install_target != 'local': |
---|
| 189 | if args.flexpart_root_scripts is None: |
---|
| 190 | c.ec_flexpart_root_scripts = '${HOME}' |
---|
| 191 | else: |
---|
| 192 | c.ec_flexpart_root_scripts = args.flexpart_root_scripts |
---|
| 193 | |
---|
| 194 | return args, c |
---|
| 195 | |
---|
| 196 | |
---|
[991df6a] | 197 | def install_via_gateway(c, target): |
---|
[a4b6cef] | 198 | ''' |
---|
[991df6a] | 199 | @Description: |
---|
| 200 | Perform the actual installation on local machine or prepare data |
---|
| 201 | transfer to remote gate and submit a job script which will |
---|
| 202 | install everything on the remote gate. |
---|
[a4b6cef] | 203 | |
---|
[991df6a] | 204 | @Input: |
---|
| 205 | c: instance of class ControlFile |
---|
| 206 | Contains all necessary information of a CONTROL file. The parameters |
---|
| 207 | are: DAY1, DAY2, DTIME, MAXSTEP, TYPE, TIME, STEP, CLASS, STREAM, |
---|
| 208 | NUMBER, EXPVER, GRID, LEFT, LOWER, UPPER, RIGHT, LEVEL, LEVELIST, |
---|
| 209 | RESOL, GAUSS, ACCURACY, OMEGA, OMEGADIFF, ETA, ETADIFF, DPDETA, |
---|
| 210 | SMOOTH, FORMAT, ADDPAR, WRF, CWC, PREFIX, ECSTORAGE, ECTRANS, |
---|
| 211 | ECFSDIR, MAILOPS, MAILFAIL, GRIB2FLEXPART, FLEXPARTDIR |
---|
| 212 | For more information about format and content of the parameter see |
---|
| 213 | documentation. |
---|
| 214 | |
---|
| 215 | target: string |
---|
| 216 | The target where the installation should be processed. |
---|
| 217 | E.g. "local", "ecgate" or "cca" |
---|
[a4b6cef] | 218 | |
---|
[991df6a] | 219 | @Return: |
---|
| 220 | <nothing> |
---|
| 221 | ''' |
---|
[a4b6cef] | 222 | ecd = c.ecmwfdatadir |
---|
| 223 | template = ecd + 'python/compilejob.temp' |
---|
| 224 | job = ecd + 'python/compilejob.ksh' |
---|
| 225 | fo = open(job, 'w') |
---|
| 226 | #AP could do with open(template) as f, open(job, 'w') as fo: |
---|
| 227 | #AP or nested with statements |
---|
[d69b677] | 228 | with open(template) as f: |
---|
[a4b6cef] | 229 | fdata = f.read().split('\n') |
---|
| 230 | for data in fdata: |
---|
| 231 | if 'MAKEFILE=' in data: |
---|
| 232 | if c.makefile is not None: |
---|
| 233 | data = 'export MAKEFILE=' + c.makefile |
---|
| 234 | if 'FLEXPART_ROOT_SCRIPTS=' in data: |
---|
| 235 | if c.flexpart_root_scripts != '../': |
---|
| 236 | data = 'export FLEXPART_ROOT_SCRIPTS=' + \ |
---|
| 237 | c.flexpart_root_scripts |
---|
| 238 | else: |
---|
[ff99eae] | 239 | data = 'export FLEXPART_ROOT_SCRIPTS=$HOME' |
---|
[a4b6cef] | 240 | if target.lower() != 'local': |
---|
| 241 | if '--workdir' in data: |
---|
| 242 | data = '#SBATCH --workdir=/scratch/ms/' + c.ecgid + \ |
---|
| 243 | '/' + c.ecuid |
---|
| 244 | if '##PBS -o' in data: |
---|
| 245 | data = '##PBS -o /scratch/ms/' + c.ecgid + '/' + c.ecuid + \ |
---|
| 246 | 'flex_ecmwf.$Jobname.$Job_ID.out' |
---|
| 247 | if 'FLEXPART_ROOT_SCRIPTS=' in data: |
---|
| 248 | if c.ec_flexpart_root_scripts != '../': |
---|
| 249 | data = 'export FLEXPART_ROOT_SCRIPTS=' + \ |
---|
| 250 | c.ec_flexpart_root_scripts |
---|
| 251 | else: |
---|
| 252 | data = 'export FLEXPART_ROOT_SCRIPTS=$HOME' |
---|
| 253 | fo.write(data + '\n') |
---|
[d69b677] | 254 | f.close() |
---|
| 255 | fo.close() |
---|
[a4b6cef] | 256 | |
---|
| 257 | if target.lower() != 'local': |
---|
| 258 | template = ecd + 'python/job.temp.o' |
---|
[64cf353] | 259 | #AP hier eventuell Zeile für Zeile lesen und dann if Entscheidung |
---|
[a4b6cef] | 260 | with open(template) as f: |
---|
| 261 | fdata = f.read().split('\n') |
---|
| 262 | f.close() |
---|
| 263 | fo = open(template[:-2], 'w') |
---|
| 264 | for data in fdata: |
---|
| 265 | if '--workdir' in data: |
---|
| 266 | data = '#SBATCH --workdir=/scratch/ms/' + c.ecgid + \ |
---|
| 267 | '/' + c.ecuid |
---|
| 268 | if '##PBS -o' in data: |
---|
| 269 | data = '##PBS -o /scratch/ms/' + c.ecgid + '/' + \ |
---|
| 270 | c.ecuid + 'flex_ecmwf.$Jobname.$Job_ID.out' |
---|
| 271 | if 'export PATH=${PATH}:' in data: |
---|
[efdb01a] | 272 | data += c.ec_flexpart_root_scripts + '/ECMWFDATA7.1/python' |
---|
[a4b6cef] | 273 | if 'cat>>' in data or 'cat >>' in data: |
---|
| 274 | i = data.index('>') |
---|
| 275 | fo.write(data[:i] + data[i+1:] + '\n') |
---|
| 276 | fo.write('GATEWAY ' + c.gateway + '\n') |
---|
| 277 | fo.write('DESTINATION ' + c.destination + '\n') |
---|
| 278 | fo.write('EOF\n') |
---|
| 279 | |
---|
| 280 | fo.write(data + '\n') |
---|
| 281 | fo.close() |
---|
| 282 | |
---|
| 283 | job = ecd + 'python/ECMWF_ENV' |
---|
| 284 | with open(job, 'w') as fo: |
---|
| 285 | fo.write('ECUID ' + c.ecuid + '\n') |
---|
| 286 | fo.write('ECGID ' + c.ecgid + '\n') |
---|
| 287 | fo.write('GATEWAY ' + c.gateway + '\n') |
---|
| 288 | fo.write('DESTINATION ' + c.destination + '\n') |
---|
| 289 | fo.close() |
---|
| 290 | |
---|
| 291 | if target.lower() == 'local': |
---|
[d69b677] | 292 | # compile CONVERT2 |
---|
[a4b6cef] | 293 | if c.flexpart_root_scripts is None or c.flexpart_root_scripts == '../': |
---|
[ff99eae] | 294 | print 'Warning: FLEXPART_ROOT_SCRIPTS has not been specified' |
---|
| 295 | print 'Only CONVERT2 will be compiled in ' + ecd + '/../src' |
---|
[a4b6cef] | 296 | else: |
---|
| 297 | c.flexpart_root_scripts = os.path.expandvars(os.path.expanduser( |
---|
[ff99eae] | 298 | c.flexpart_root_scripts)) |
---|
[a4b6cef] | 299 | if os.path.abspath(ecd) != os.path.abspath(c.flexpart_root_scripts): |
---|
| 300 | os.chdir('/') |
---|
| 301 | p = subprocess.check_call(['tar', '-cvf', |
---|
[efdb01a] | 302 | ecd + '../ECMWFDATA7.1.tar', |
---|
[a4b6cef] | 303 | ecd + 'python', |
---|
| 304 | ecd + 'grib_templates', |
---|
| 305 | ecd + 'src']) |
---|
| 306 | try: |
---|
[efdb01a] | 307 | os.makedirs(c.flexpart_root_scripts + '/ECMWFDATA7.1') |
---|
[ff99eae] | 308 | finally: |
---|
[a4b6cef] | 309 | pass |
---|
[efdb01a] | 310 | os.chdir(c.flexpart_root_scripts + '/ECMWFDATA7.1') |
---|
[a4b6cef] | 311 | p = subprocess.check_call(['tar', '-xvf', |
---|
[efdb01a] | 312 | ecd + '../ECMWFDATA7.1.tar']) |
---|
| 313 | os.chdir(c.flexpart_root_scripts + '/ECMWFDATA7.1/src') |
---|
[a4b6cef] | 314 | |
---|
| 315 | os.chdir('../src') |
---|
[efdb01a] | 316 | print(('install ECMWFDATA7.1 software on ' + target + ' in directory ' |
---|
[a4b6cef] | 317 | + os.getcwd())) |
---|
| 318 | if c.makefile is None: |
---|
| 319 | makefile = 'Makefile.local.ifort' |
---|
| 320 | else: |
---|
| 321 | makefile = c.makefile |
---|
| 322 | flist = glob.glob('*.mod') + glob.glob('*.o') |
---|
| 323 | if flist: |
---|
| 324 | p = subprocess.check_call(['rm'] + flist) |
---|
[d69b677] | 325 | try: |
---|
[ff99eae] | 326 | print 'Using makefile: ' + makefile |
---|
[a4b6cef] | 327 | p = subprocess.check_call(['make', '-f', makefile]) |
---|
[ff99eae] | 328 | p = subprocess.check_call(['ls', '-l', 'CONVERT2']) |
---|
| 329 | except subprocess.CalledProcessError as e: |
---|
| 330 | print 'compile failed with the following error:' |
---|
| 331 | print e.output |
---|
| 332 | print 'please edit ' + makefile + \ |
---|
| 333 | ' or try another Makefile in the src directory.' |
---|
| 334 | print 'most likely GRIB_API_INCLUDE_DIR, GRIB_API_LIB \ |
---|
| 335 | and EMOSLIB must be adapted.' |
---|
| 336 | print 'Available Makefiles:' |
---|
| 337 | print glob.glob('Makefile*') |
---|
[a4b6cef] | 338 | elif target.lower() == 'ecgate': |
---|
[d69b677] | 339 | os.chdir('/') |
---|
[a4b6cef] | 340 | p = subprocess.check_call(['tar', '-cvf', |
---|
[efdb01a] | 341 | ecd + '../ECMWFDATA7.1.tar', |
---|
[a4b6cef] | 342 | ecd + 'python', |
---|
| 343 | ecd + 'grib_templates', |
---|
| 344 | ecd + 'src']) |
---|
| 345 | try: |
---|
| 346 | p = subprocess.check_call(['ecaccess-file-put', |
---|
[efdb01a] | 347 | ecd + '../ECMWFDATA7.1.tar', |
---|
| 348 | 'ecgate:/home/ms/' + c.ecgid + '/' + |
---|
| 349 | c.ecuid + '/ECMWFDATA7.1.tar']) |
---|
[ff99eae] | 350 | except subprocess.CalledProcessError as e: |
---|
| 351 | print 'ecaccess-file-put failed! \ |
---|
| 352 | Probably the eccert key has expired.' |
---|
| 353 | exit(1) |
---|
| 354 | |
---|
| 355 | try: |
---|
| 356 | p = subprocess.check_call(['ecaccess-job-submit', |
---|
| 357 | '-queueName', |
---|
| 358 | target, |
---|
| 359 | ecd + 'python/compilejob.ksh']) |
---|
| 360 | print 'compilejob.ksh has been submitted to ecgate for \ |
---|
| 361 | installation in ' + c.ec_flexpart_root_scripts + \ |
---|
| 362 | '/ECMWFDATA7.1' |
---|
| 363 | print 'You should get an email with subject flexcompile within \ |
---|
| 364 | the next few minutes' |
---|
| 365 | except subprocess.CalledProcessError as e: |
---|
| 366 | print 'ecaccess-job-submit failed!' |
---|
[a4b6cef] | 367 | exit(1) |
---|
| 368 | |
---|
| 369 | elif target.lower() == 'cca': |
---|
[d69b677] | 370 | os.chdir('/') |
---|
[a4b6cef] | 371 | p = subprocess.check_call(['tar', '-cvf', |
---|
[efdb01a] | 372 | ecd + '../ECMWFDATA7.1.tar', |
---|
[a4b6cef] | 373 | ecd + 'python', |
---|
| 374 | ecd + 'grib_templates', |
---|
| 375 | ecd + 'src']) |
---|
| 376 | try: |
---|
| 377 | p = subprocess.check_call(['ecaccess-file-put', |
---|
[efdb01a] | 378 | ecd + '../ECMWFDATA7.1.tar', |
---|
| 379 | 'cca:/home/ms/' + c.ecgid + '/' + |
---|
| 380 | c.ecuid + '/ECMWFDATA7.1.tar']) |
---|
[ff99eae] | 381 | except subprocess.CalledProcessError as e: |
---|
| 382 | print 'ecaccess-file-put failed! \ |
---|
| 383 | Probably the eccert key has expired.' |
---|
[a4b6cef] | 384 | exit(1) |
---|
| 385 | |
---|
[ff99eae] | 386 | try: |
---|
| 387 | p = subprocess.check_call(['ecaccess-job-submit', |
---|
| 388 | '-queueName', |
---|
| 389 | target, |
---|
| 390 | ecd + 'python/compilejob.ksh']) |
---|
| 391 | print 'compilejob.ksh has been submitted to cca for installation in ' +\ |
---|
| 392 | c.ec_flexpart_root_scripts + '/ECMWFDATA7.1' |
---|
| 393 | print 'You should get an email with subject flexcompile \ |
---|
| 394 | within the next few minutes' |
---|
| 395 | except subprocess.CalledProcessError as e: |
---|
| 396 | print 'ecaccess-job-submit failed!' |
---|
| 397 | exit(1) |
---|
[64cf353] | 398 | |
---|
[d69b677] | 399 | else: |
---|
[ff99eae] | 400 | print 'ERROR: unknown installation target ', target |
---|
| 401 | print 'Valid targets: ecgate, cca, local' |
---|
[a4b6cef] | 402 | |
---|
[d69b677] | 403 | return |
---|
| 404 | |
---|
[a4b6cef] | 405 | |
---|
[d69b677] | 406 | if __name__ == "__main__": |
---|
| 407 | main() |
---|