# Urban Air Pollution pilot TOSCA blueprint V1.5 for HiPEAC # (c) 2020, MathSO # tosca_definitions_version: cloudify_dsl_1_3 imports: # to speed things up, it is possible to download this file, - http://www.getcloudify.org/spec/cloudify/4.1/types.yaml # HPC pluging - https://gitlab.tilb.sze.hu/mathso_v2/cloudify-hpc-plugin/raw/master/plugin.yaml inputs: hpc_wm_config: default: country_tz: "Europe/Budapest" workload_manager: "SLURM" hpc_wm_credentials: default: host: plexi.sze.hu user: 'awd' password: '***' ## ## User Input Parameters ## pilot_url: default: INPUT: name: UAP Pilot URL description: UAP Pilot URL version 1.5 default: "http://plexi.sze.hu/uap/uap-foam-v1.5-hipeac.zip" type: string group: basic order: 1 optional: false model_list: default: INPUT: name: Model dataset definition description: City model definition type: list choices: - first: name: Bologna value: bologna group: basic order: 2 optional: false mesh_list: default: INPUT: name: Mesh Resolution description: City model definition type: list choices: - first: name: Low Resolution Mesh value: low group: basic order: 3 optional: false gentraffic: default: INPUT: name: Generate Random Traffic description: If checked, a random generator will be used to generate traffic default: true type: bool group: basic order: 4 optional: false genwind: default: INPUT: name: Generate Wind From Wind Profile description: If checked, a user generated weather data will be used (see weather for more data) default: true type: bool group: basic order: 4 optional: false simdate: default: INPUT: name: Date of using Real Life Weather data from ECMWF description: "Download ECMWF data for wind generation (2018-09-01 -- 2018-09-31)" default: "2018-09-17" type: string group: basic order: 6 optional: false simstarttime: default: INPUT: name: Simulation Start time description: "When will the simulation started on the given date" default: "06:00:00" type: string group: basic order: 7 optional: false simendtime: default: INPUT: name: Simulation End time description: "When will the simulation stopped on the given date" default: "08:00:00" type: string group: basic order: 8 optional: false cfdsolver_list: default: INPUT: name: CFD Solver description: "Choose the used CFD Software" type: list choices: - first: name: OpenFOAM-6 value: OPENFOAM group: CFD order: 9 optional: false #3dpostproc: # default: # INPUT: # name: Enable 3D Post processing # description: "Enable 3D Post processing from encas files" # default: false # type: bool # group: postproc # order: 10 execution_id: default: INPUT: name: Execution ID, do not Modify!! description: "Execution ID, do not Modify!!" default: "" type: string group: advanced order: 23 optional: true node_templates: sze_node: type: hpc.nodes.WorkloadManager properties: config: { get_input: hpc_wm_config } credentials: { get_input: hpc_wm_credentials } skip_cleanup: true #simulate: True # COMMENT to test against a real HPC workdir_prefix: "uap_hipeac" copying: type: hpc.nodes.Job properties: job_options: type: 'SRUN' command: { concat: [ 'wget ', { get_input: pilot_url }," && ", 'unzip *.zip' ] } nodes: 1 tasks: 1 tasks_per_node: 1 max_time: '00:05:00' deployment: inputs: - { get_input: pilot_url } skip_cleanup: true relationships: - type: job_managed_by_wm target: sze_node sim_conf: type: hpc.nodes.Job properties: job_options: type: 'SRUN' #command: { concat: [ 'hipeac-gencfg.sh ', { get_input: model_list }," ", { get_input: mesh_list }," ", { get_input: gentraffic }," ", { get_input: genwind }," ", { get_input: simdate }," ", { get_input: simstarttime }," ", { get_input: simendtime }," ", { get_input: cfdsolver_list }," ", { get_input: 3dpostproc }," ", { get_input: execution_id } ] } command: { concat: [ 'hipeac-gencfg.sh ', { get_input: model_list }," ", { get_input: mesh_list }," ", { get_input: gentraffic }," ", { get_input: genwind }," ", { get_input: simdate }," ", { get_input: simstarttime }," ", { get_input: simendtime }," ", { get_input: cfdsolver_list }," ", { get_input: execution_id } ] } nodes: 1 tasks: 1 tasks_per_node: 1 max_time: '00:40:00' deployment: inputs: - { get_input: model_list } - { get_input: mesh_list } - { get_input: gentraffic } - { get_input: genwind } - { get_input: simdate } - { get_input: simstarttime } - { get_input: simendtime } - { get_input: cfdsolver_list } #- { get_input: 3dpostproc } - { get_input: execution_id } skip_cleanup: true relationships: - type: job_managed_by_wm target: sze_node - type: job_depends_on target: copying preproc: type: hpc.nodes.Job properties: job_options: type: 'SRUN' command: 'run.sh' nodes: 1 tasks: 1 tasks_per_node: 1 max_time: '02:00:00' deployment: skip_cleanup: true relationships: - type: job_managed_by_wm target: sze_node - type: job_depends_on target: sim_conf sim: type: hpc.nodes.Job properties: job_options: type: 'SBATCH' command: 'cfd/simulate.job' max_time: '02:00:00' deployment: skip_cleanup: true relationships: - type: job_managed_by_wm target: sze_node - type: job_depends_on target: preproc