From 03e680ecf6fefde47920fe48f00f7ed42f404482 Mon Sep 17 00:00:00 2001 From: Ross Thomson Date: Tue, 24 Jan 2023 10:03:25 -0500 Subject: [PATCH 1/4] Added Fluent tutorial --- community/examples/fluent-tutorial.yaml | 169 ++++++++++++++++++++++++ examples/README.md | 13 +- 2 files changed, 181 insertions(+), 1 deletion(-) create mode 100644 community/examples/fluent-tutorial.yaml diff --git a/community/examples/fluent-tutorial.yaml b/community/examples/fluent-tutorial.yaml new file mode 100644 index 0000000000..503c31b054 --- /dev/null +++ b/community/examples/fluent-tutorial.yaml @@ -0,0 +1,169 @@ +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- + +blueprint_name: ansys-fluent + +vars: + project_id: ## Set GCP Project ID Here ## + deployment_name: fluent-wl + region: us-central1 + zone: us-central1-c + +deployment_groups: +- group: primary + modules: + - source: ./modules/scripts/startup-script + kind: terraform + id: startup_login + settings: + runners: + - type: shell + content: | + #!/bin/bash + google_mpi_tuning --hpcthroughput + google_mpi_tuning --nomitigation + yum -y install mesa-libGLU-devel libExt nmap openssl libXrandr mesa-libGL libX11-devel libSM-devel libICE-devel libXinerama libXcursor hdf5-devel dkms zlib-devel libXext-devel libGLU-devel libXt-devel libXrender-devel libXinerama-devel libpng-devel libXrandr-devel libXi-devel libXft-devel libjpeg-turbo-devel libXcursor-devel readline-devel ncurses-devel python python-devel cmake qt-devel qt-assistant mpfr-devel gmp-devel htop wget screen vim xorg-x11-drv-dummy xorg-x11-server-utils libXp-devel xorg-x11-fonts-cyrillic.noarch xterm.x86_64 motif-devel compat-libstdc++-33.x86_64 libstdc++.x86_64 libstdc++.i686 gcc-c++.x86_64 compat-libstdc++-33.i686 libstdc++-devel.x86_64 libstdc++-devel.i686 compat-gcc-34.x86_64 gtk2.i686 libXxf86vm.i686 libSM.i686 xorg-x11-fonts-ISO8859-1-75dpi.no xorg-x11-fonts-iso8859-1-75dpi.no gdm gnome-session gnome-classic-session gnome-session-xsession xorg-x11-server-Xorg xorg-x11-drv-dummy xorg-x11-fonts-Type1 xorg-x11-utils gnome-terminal gnu-free-fonts-common gnu-free-mono-fonts gnu-free-sans-fonts gnu-free-serif-fonts alsa-plugins-pulseaudio alsa-utils hdf5-devel + + destination: /tmp/install-deps.sh + - type: shell + content: | + #!/bin/bash + cat <<- "EOF" >> /etc/bashrc + export LD_LIBRARY_PATH=/shared/apps/fluent/v222/TurboGrid/tools/Prime/lib/:${LD_LIBRARY_PATH} + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/shared/apps/fluent/v222/commonfiles/fluids/lib/linx64/ + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/shared/apps/fluent/v222/commonfiles/fluids/lib/linx64/ + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/shared/apps/fluent/v222/fluent/fluent22.2.0/multiport/lnamd64/mpi/shared/ + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/shared/apps/fluent/shared_files/syslib/linx64 + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/shared/apps/fluent/v222/aisol/lib/linx64/ + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/shared/apps/fluent/v222/polyflow/polyflow22.2.0/lnamd64/libs/ + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/shared/apps/fluent/v222/tp/IntelMKL/2021.3.0/linx64/lib/intel64/ + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/shared/apps/fluent/v222/fluent/lib/lnamd64/ + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/shared/apps/fluent/v222/dcs/ + export INTELMPI_ROOT=/shared/apps/intel/compilers_and_libraries_2018.5.274/linux/mpi/intel64 + source /shared/apps/intel/parallel_studio_xe_2018.4.057/psxevars.sh + EOF + + destination: /tmp/install-bashrc.sh + - type: shell + content: | + #!/bin/bash + mkdir /tmp/intel + cd /tmp/intel + wget https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/13741/l_mpi_2018.4.274.tgz + tar xvf l_mpi_2018.4.274.tgz + cd l_mpi_2018.4.274 + patch silent.cfg <<- "EOF1" + 16:07:46.199308305 +0000 + @@ -6,13 +6,13 @@ + # snpat - the serial number pattern (ABCD-01234567) + + # Accept EULA, valid values are: {accept, decline} + -ACCEPT_EULA=decline + +ACCEPT_EULA=accept + + # Optional error behavior, valid values are: {yes, no} + CONTINUE_WITH_OPTIONAL_ERROR=yes + + # Install location, valid values are: {/opt/intel, filepat} + -PSET_INSTALL_DIR=/opt/intel + +PSET_INSTALL_DIR=/shared/apps/intel + + # Continue with overwrite of existing installation directory, valid values are: {yes, no} + CONTINUE_WITH_INSTALLDIR_OVERWRITE=yes + EOF1 + + sudo ./install.sh -s silent.cfg + + destination: /tmp/install-mpi.sh + + - source: ./modules/scripts/startup-script + kind: terraform + id: startup + settings: + runners: + - type: shell + content: | + #!/bin/bash + google_mpi_tuning --hpcthroughput + google_mpi_tuning --nomitigation + yum -y install mesa-libGLU-devel libExt nmap openssl libXrandr mesa-libGL libX11-devel libSM-devel libICE-devel libXinerama libXcursor hdf5-devel dkms zlib-devel libXext-devel libGLU-devel libXt-devel libXrender-devel libXinerama-devel libpng-devel libXrandr-devel libXi-devel libXft-devel libjpeg-turbo-devel libXcursor-devel readline-devel ncurses-devel python python-devel cmake qt-devel qt-assistant mpfr-devel gmp-devel htop wget screen vim xorg-x11-drv-dummy xorg-x11-server-utils libXp-devel xorg-x11-fonts-cyrillic.noarch xterm.x86_64 motif-devel compat-libstdc++-33.x86_64 libstdc++.x86_64 libstdc++.i686 gcc-c++.x86_64 compat-libstdc++-33.i686 libstdc++-devel.x86_64 libstdc++-devel.i686 compat-gcc-34.x86_64 gtk2.i686 libXxf86vm.i686 libSM.i686 xorg-x11-fonts-ISO8859-1-75dpi.no xorg-x11-fonts-iso8859-1-75dpi.no gdm gnome-session gnome-classic-session gnome-session-xsession xorg-x11-server-Xorg xorg-x11-drv-dummy xorg-x11-fonts-Type1 xorg-x11-utils gnome-terminal gnu-free-fonts-common gnu-free-mono-fonts gnu-free-sans-fonts gnu-free-serif-fonts alsa-plugins-pulseaudio alsa-utils hdf5-devel + + destination: /tmp/install-deps.sh + - type: shell + content: | + #!/bin/bash + hostname >> /home/hosts.txt + destination: /tmp/install-hosts.sh + + - source: modules/file-system/filestore + kind: terraform + id: homefs + settings: + network_name: "default" + size_gb: 1024 + filestore_tier: "BASIC_HDD" + local_mount: /home + + - source: modules/file-system/filestore + kind: terraform + id: sharefs + settings: + network_name: "default" + size_gb: 1024 + filestore_tier: "BASIC_HDD" + local_mount: /shared + + - source: modules/compute/vm-instance + kind: terraform + id: compute_1 + use: + - homefs + - sharefs + - startup + + settings: + threads_per_core: 1 + disable_public_ips: false + bandwidth_tier: "gvnic_enabled" + machine_type: c2-standard-60 + instance_count: 4 + name_prefix: fluent-compute + placement_policy: + vm_count: 4 # Note: should match instance count + collocation: "COLLOCATED" + availability_domain_count: null + + - source: modules/compute/vm-instance + kind: terraform + id: login + use: + - homefs + - sharefs + - startup_login + + settings: + threads_per_core: 1 + disable_public_ips: false + bandwidth_tier: "gvnic_enabled" + machine_type: c2-standard-8 + instance_count: 1 + name_prefix: fluent-login + + - source: community/modules/scripts/wait-for-startup + kind: terraform + id: wait + settings: + instance_name: ((module.compute_1.name[0])) \ No newline at end of file diff --git a/examples/README.md b/examples/README.md index e169ea4780..a241b04b84 100644 --- a/examples/README.md +++ b/examples/README.md @@ -30,6 +30,7 @@ md_toc github examples/README.md | sed -e "s/\s-\s/ * /" * [htcondor-pool.yaml](#htcondor-poolyaml--) ![community-badge] ![experimental-badge] * [quantum-circuit-simulator.yaml](#quantum-circuit-simulatoryaml-) ![community-badge] * [starccm-tutorial.yaml](#starccm-tutorialyaml--) ![community-badge] ![experimental-badge] + * [fluent-tutorial.yaml](#fluent-tutorialyaml--) ![community-badge] ![experimental-badge] * [Blueprint Schema](#blueprint-schema) * [Writing an HPC Blueprint](#writing-an-hpc-blueprint) * [Blueprint Boilerplate](#blueprint-boilerplate) @@ -729,10 +730,20 @@ python /var/tmp/qsim-example.py This blueprint provisions a simple cluster for use with a Simcenter StarCCM+ tutorial. -> **_NOTE:_** The tutorial has not yet been published. +> The main tutorial is described on the [HPC Toolkit website](https://cloud.google.com/hpc-toolkit/docs/simcenter-star-ccm/run-workload). [starccm-tutorial.yaml]: ../community/examples/starccm-tutorial.yaml + +### [fluent-tutorial.yaml] ![community-badge] ![experimental-badge] + +This blueprint provisions a simple cluster for use with an Ansys Fluent +tutorial. + +> **_NOTE:_** The tutorial has not yet been published. + +[fluent-tutorial.yaml]: ../community/examples/fluent-tutorial.yaml + ## Blueprint Schema Similar documentation can be found on From 2a9a6a7d5a8f43e6fe805ba5f6a7b743f80bdb1a Mon Sep 17 00:00:00 2001 From: Ross Thomson Date: Tue, 24 Jan 2023 15:44:18 -0500 Subject: [PATCH 2/4] Updated link. --- examples/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/README.md b/examples/README.md index a241b04b84..c3da767e93 100644 --- a/examples/README.md +++ b/examples/README.md @@ -740,7 +740,7 @@ tutorial. This blueprint provisions a simple cluster for use with an Ansys Fluent tutorial. -> **_NOTE:_** The tutorial has not yet been published. +> The main tutorial is described on the [HPC Toolkit website](https://cloud.google.com/hpc-toolkit/docs/tutorials/ansys-fluent). [fluent-tutorial.yaml]: ../community/examples/fluent-tutorial.yaml From 45c93624629aeed33f8961e0b68e7da3541914fc Mon Sep 17 00:00:00 2001 From: Ross Thomson Date: Tue, 24 Jan 2023 16:15:49 -0500 Subject: [PATCH 3/4] Whitespace updates. --- community/examples/fluent-tutorial.yaml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/community/examples/fluent-tutorial.yaml b/community/examples/fluent-tutorial.yaml index 503c31b054..5558b69833 100644 --- a/community/examples/fluent-tutorial.yaml +++ b/community/examples/fluent-tutorial.yaml @@ -25,7 +25,7 @@ vars: deployment_groups: - group: primary modules: - - source: ./modules/scripts/startup-script + - source: modules/scripts/startup-script kind: terraform id: startup_login settings: @@ -63,29 +63,29 @@ deployment_groups: mkdir /tmp/intel cd /tmp/intel wget https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/13741/l_mpi_2018.4.274.tgz - tar xvf l_mpi_2018.4.274.tgz + tar xvf l_mpi_2018.4.274.tgz cd l_mpi_2018.4.274 patch silent.cfg <<- "EOF1" 16:07:46.199308305 +0000 @@ -6,13 +6,13 @@ # snpat - the serial number pattern (ABCD-01234567) - + # Accept EULA, valid values are: {accept, decline} -ACCEPT_EULA=decline +ACCEPT_EULA=accept - + # Optional error behavior, valid values are: {yes, no} CONTINUE_WITH_OPTIONAL_ERROR=yes - + # Install location, valid values are: {/opt/intel, filepat} -PSET_INSTALL_DIR=/opt/intel +PSET_INSTALL_DIR=/shared/apps/intel - + # Continue with overwrite of existing installation directory, valid values are: {yes, no} CONTINUE_WITH_INSTALLDIR_OVERWRITE=yes EOF1 - sudo ./install.sh -s silent.cfg + sudo ./install.sh -s silent.cfg destination: /tmp/install-mpi.sh @@ -133,7 +133,6 @@ deployment_groups: - homefs - sharefs - startup - settings: threads_per_core: 1 disable_public_ips: false @@ -153,7 +152,6 @@ deployment_groups: - homefs - sharefs - startup_login - settings: threads_per_core: 1 disable_public_ips: false @@ -166,4 +164,4 @@ deployment_groups: kind: terraform id: wait settings: - instance_name: ((module.compute_1.name[0])) \ No newline at end of file + instance_name: ((module.compute_1.name[0])) From 06619bbdc24856c407488fc7ea3949bf302a8c78 Mon Sep 17 00:00:00 2001 From: Ross Thomson Date: Wed, 25 Jan 2023 10:04:41 -0500 Subject: [PATCH 4/4] Fixed formatting and file location --- community/examples/fluent-tutorial.yaml | 2 +- examples/README.md | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/community/examples/fluent-tutorial.yaml b/community/examples/fluent-tutorial.yaml index 5558b69833..acca3aab56 100644 --- a/community/examples/fluent-tutorial.yaml +++ b/community/examples/fluent-tutorial.yaml @@ -89,7 +89,7 @@ deployment_groups: destination: /tmp/install-mpi.sh - - source: ./modules/scripts/startup-script + - source: modules/scripts/startup-script kind: terraform id: startup settings: diff --git a/examples/README.md b/examples/README.md index c3da767e93..2d184389b1 100644 --- a/examples/README.md +++ b/examples/README.md @@ -734,7 +734,6 @@ tutorial. [starccm-tutorial.yaml]: ../community/examples/starccm-tutorial.yaml - ### [fluent-tutorial.yaml] ![community-badge] ![experimental-badge] This blueprint provisions a simple cluster for use with an Ansys Fluent