|
| 1 | +# Copyright 2023 Google LLC |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +--- |
| 16 | + |
| 17 | +blueprint_name: ansys-fluent |
| 18 | + |
| 19 | +vars: |
| 20 | + project_id: ## Set GCP Project ID Here ## |
| 21 | + deployment_name: fluent-wl |
| 22 | + region: us-central1 |
| 23 | + zone: us-central1-c |
| 24 | + |
| 25 | +deployment_groups: |
| 26 | +- group: primary |
| 27 | + modules: |
| 28 | + - source: modules/scripts/startup-script |
| 29 | + kind: terraform |
| 30 | + id: startup_login |
| 31 | + settings: |
| 32 | + runners: |
| 33 | + - type: shell |
| 34 | + content: | |
| 35 | + #!/bin/bash |
| 36 | + google_mpi_tuning --hpcthroughput |
| 37 | + google_mpi_tuning --nomitigation |
| 38 | + 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 |
| 39 | +
|
| 40 | + destination: /tmp/install-deps.sh |
| 41 | + - type: shell |
| 42 | + content: | |
| 43 | + #!/bin/bash |
| 44 | + cat <<- "EOF" >> /etc/bashrc |
| 45 | + export LD_LIBRARY_PATH=/shared/apps/fluent/v222/TurboGrid/tools/Prime/lib/:${LD_LIBRARY_PATH} |
| 46 | + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/shared/apps/fluent/v222/commonfiles/fluids/lib/linx64/ |
| 47 | + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/shared/apps/fluent/v222/commonfiles/fluids/lib/linx64/ |
| 48 | + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/shared/apps/fluent/v222/fluent/fluent22.2.0/multiport/lnamd64/mpi/shared/ |
| 49 | + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/shared/apps/fluent/shared_files/syslib/linx64 |
| 50 | + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/shared/apps/fluent/v222/aisol/lib/linx64/ |
| 51 | + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/shared/apps/fluent/v222/polyflow/polyflow22.2.0/lnamd64/libs/ |
| 52 | + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/shared/apps/fluent/v222/tp/IntelMKL/2021.3.0/linx64/lib/intel64/ |
| 53 | + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/shared/apps/fluent/v222/fluent/lib/lnamd64/ |
| 54 | + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/shared/apps/fluent/v222/dcs/ |
| 55 | + export INTELMPI_ROOT=/shared/apps/intel/compilers_and_libraries_2018.5.274/linux/mpi/intel64 |
| 56 | + source /shared/apps/intel/parallel_studio_xe_2018.4.057/psxevars.sh |
| 57 | + EOF |
| 58 | +
|
| 59 | + destination: /tmp/install-bashrc.sh |
| 60 | + - type: shell |
| 61 | + content: | |
| 62 | + #!/bin/bash |
| 63 | + mkdir /tmp/intel |
| 64 | + cd /tmp/intel |
| 65 | + wget https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/13741/l_mpi_2018.4.274.tgz |
| 66 | + tar xvf l_mpi_2018.4.274.tgz |
| 67 | + cd l_mpi_2018.4.274 |
| 68 | + patch silent.cfg <<- "EOF1" |
| 69 | + 16:07:46.199308305 +0000 |
| 70 | + @@ -6,13 +6,13 @@ |
| 71 | + # snpat - the serial number pattern (ABCD-01234567) |
| 72 | +
|
| 73 | + # Accept EULA, valid values are: {accept, decline} |
| 74 | + -ACCEPT_EULA=decline |
| 75 | + +ACCEPT_EULA=accept |
| 76 | +
|
| 77 | + # Optional error behavior, valid values are: {yes, no} |
| 78 | + CONTINUE_WITH_OPTIONAL_ERROR=yes |
| 79 | +
|
| 80 | + # Install location, valid values are: {/opt/intel, filepat} |
| 81 | + -PSET_INSTALL_DIR=/opt/intel |
| 82 | + +PSET_INSTALL_DIR=/shared/apps/intel |
| 83 | +
|
| 84 | + # Continue with overwrite of existing installation directory, valid values are: {yes, no} |
| 85 | + CONTINUE_WITH_INSTALLDIR_OVERWRITE=yes |
| 86 | + EOF1 |
| 87 | +
|
| 88 | + sudo ./install.sh -s silent.cfg |
| 89 | +
|
| 90 | + destination: /tmp/install-mpi.sh |
| 91 | + |
| 92 | + - source: modules/scripts/startup-script |
| 93 | + kind: terraform |
| 94 | + id: startup |
| 95 | + settings: |
| 96 | + runners: |
| 97 | + - type: shell |
| 98 | + content: | |
| 99 | + #!/bin/bash |
| 100 | + google_mpi_tuning --hpcthroughput |
| 101 | + google_mpi_tuning --nomitigation |
| 102 | + 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 |
| 103 | +
|
| 104 | + destination: /tmp/install-deps.sh |
| 105 | + - type: shell |
| 106 | + content: | |
| 107 | + #!/bin/bash |
| 108 | + hostname >> /home/hosts.txt |
| 109 | + destination: /tmp/install-hosts.sh |
| 110 | + |
| 111 | + - source: modules/file-system/filestore |
| 112 | + kind: terraform |
| 113 | + id: homefs |
| 114 | + settings: |
| 115 | + network_name: "default" |
| 116 | + size_gb: 1024 |
| 117 | + filestore_tier: "BASIC_HDD" |
| 118 | + local_mount: /home |
| 119 | + |
| 120 | + - source: modules/file-system/filestore |
| 121 | + kind: terraform |
| 122 | + id: sharefs |
| 123 | + settings: |
| 124 | + network_name: "default" |
| 125 | + size_gb: 1024 |
| 126 | + filestore_tier: "BASIC_HDD" |
| 127 | + local_mount: /shared |
| 128 | + |
| 129 | + - source: modules/compute/vm-instance |
| 130 | + kind: terraform |
| 131 | + id: compute_1 |
| 132 | + use: |
| 133 | + - homefs |
| 134 | + - sharefs |
| 135 | + - startup |
| 136 | + settings: |
| 137 | + threads_per_core: 1 |
| 138 | + disable_public_ips: false |
| 139 | + bandwidth_tier: "gvnic_enabled" |
| 140 | + machine_type: c2-standard-60 |
| 141 | + instance_count: 4 |
| 142 | + name_prefix: fluent-compute |
| 143 | + placement_policy: |
| 144 | + vm_count: 4 # Note: should match instance count |
| 145 | + collocation: "COLLOCATED" |
| 146 | + availability_domain_count: null |
| 147 | + |
| 148 | + - source: modules/compute/vm-instance |
| 149 | + kind: terraform |
| 150 | + id: login |
| 151 | + use: |
| 152 | + - homefs |
| 153 | + - sharefs |
| 154 | + - startup_login |
| 155 | + settings: |
| 156 | + threads_per_core: 1 |
| 157 | + disable_public_ips: false |
| 158 | + bandwidth_tier: "gvnic_enabled" |
| 159 | + machine_type: c2-standard-8 |
| 160 | + instance_count: 1 |
| 161 | + name_prefix: fluent-login |
| 162 | + |
| 163 | + - source: community/modules/scripts/wait-for-startup |
| 164 | + kind: terraform |
| 165 | + id: wait |
| 166 | + settings: |
| 167 | + instance_name: ((module.compute_1.name[0])) |
0 commit comments