FLACS-CFD: Perbedaan antara revisi
Dari ALELEON by EFISON
WilsonLisan (bicara | kontrib) (Initial writing FLACS) |
WilsonLisan (bicara | kontrib) (Melengkapi tutorial) |
||
Baris 25: | Baris 25: | ||
== '''Menjalankan FLACS-CFD''' == | == '''Menjalankan FLACS-CFD''' == | ||
User dapat menjalankan FLACS-CFD melalui: | User dapat menjalankan FLACS-CFD melalui pilihan '''''(untuk tutorial lengkap klik judul)''''': | ||
=== [https://wiki.efisonlt.com/wiki/Menggunakan_ALELEON_Supercomputer_via_EFIRO#3_-_Menjalankan_Komputasi_ke_Compute_Node_via_Job_Composer EFIRO Job Composer] === | |||
Dengan pilihan template yang tersedia: | |||
{| class="wikitable" | |||
!Nama Template | |||
!Penjelasan | |||
|- | |||
|FLACS-CFD 21.3 | |||
|Menjalankan FLACS-CFD 21.3 standar | |||
|- | |||
|FLACS-CFD 21.3 Array | |||
|Menjalankan FLACS-CFD 21.3 dalam skema SLURM array | |||
|} | |||
=== [https://wiki.efisonlt.com/wiki/Menggunakan_ALELEON_Supercomputer_via_Terminal#4_-_Menjalankan_Komputasi_ke_Compute_Node_via_SLURM_sbatch SLURM sbatch via Terminal] === | |||
'''Berikut adalah contoh Submit Script menjalankan FLACS-CFD standar ''(diambil dari template EFIRO Job Composer)'':''' | |||
#!/bin/bash | |||
# ---------------------------------------------------------------------- | |||
# Template FLACS-CFD 21.3 | |||
# Catatan: | |||
# 1. User dapat mengisi parameter dengan mengganti bagian yang ditandai | |||
# 4 garing (////). Contoh: #SBATCH --mem=//// -> #SBATCH --mem=64GB | |||
# 2. Panduan mengisi template: | |||
# <nowiki>https://wiki.efisonlt.com/wiki/SLURM_Script_ALELEON_Supercomputer</nowiki> | |||
# ---------------------------------------------------------------------- | |||
#------------- SBATCH Partisi epyc / Compute Node CPU ----------------- | |||
# Alokasi node, core thread CPU, RAM | |||
#SBATCH --nodes=1 | |||
#SBATCH --ntasks=//// | |||
#SBATCH --mem=////GB | |||
# Time, nama output, dan error dapat diganti sesuai keinginan user | |||
#SBATCH --time=24:00:00 | |||
#SBATCH --output=result-%j.txt | |||
#SBATCH --error=error-%j.txt | |||
# Notifikasi ke e-mail user tentang status jalannya job | |||
#SBATCH --mail-user=//// | |||
#SBATCH --mail-type=begin | |||
#SBATCH --mail-type=end | |||
# ------------------------ RUN SCRIPT ---------------------------------- | |||
# Load FLACS CFD software | |||
module load flacs-cfd | |||
# Run command | |||
fgc - //// | |||
run_flacscfd_omp //// | |||
'''Berikut adalah contoh Submit Script menjalankan FLACS-CFD dalam skema array ''(diambil dari template EFIRO Job Composer)'':''' | |||
#!/bin/bash | |||
# ---------------------------------------------------------------------- | |||
# Template FLACS-CFD 21.3 Array | |||
# Catatan: | |||
# 1. User dapat mengisi parameter dengan mengganti bagian yang ditandai | |||
# 4 garing (////). Contoh: #SBATCH --mem=//// -> #SBATCH --mem=64GB | |||
# 2. Panduan mengisi template: | |||
# <nowiki>https://wiki.efisonlt.com/wiki/SLURM_Script_ALELEON_Supercomputer</nowiki> | |||
# ---------------------------------------------------------------------- | |||
#------------- SBATCH Partisi epyc / Compute Node CPU ----------------- | |||
# Alokasi node, core thread CPU, RAM | |||
#SBATCH --nodes=1 | |||
#SBATCH --ntasks=//// | |||
#SBATCH --mem=////GB | |||
# Jumlah job array, contoh: 1-128 | |||
#SBATCH --array=//// | |||
# Time, nama output, dan error dapat diganti sesuai keinginan user | |||
#SBATCH --time=24:00:00 | |||
#SBATCH --output=result-%j.txt | |||
#SBATCH --error=error-%j.txt | |||
# Notifikasi ke e-mail user tentang status jalannya job | |||
#SBATCH --mail-user=//// | |||
#SBATCH --mail-type=begin | |||
#SBATCH --mail-type=end | |||
# ------------------------ RUN SCRIPT ---------------------------------- | |||
# FLACS CS INPUT FILES WITH WILDCARD. Example: cs??????.dat3 | |||
INPUT_FILE='cs////.dat3' | |||
# Abbreviate some SLURM variables for brevity/readability | |||
TASK_MIN=${SLURM_ARRAY_TASK_MIN} | |||
TASK_MAX=${SLURM_ARRAY_TASK_MAX} | |||
TASK_ID=${SLURM_ARRAY_TASK_ID} | |||
TASK_COUNT=${SLURM_ARRAY_TASK_COUNT} | |||
# Form a list of relevant files, and check the number of array elements | |||
# matches the number of cases with 6-digit identifiers. | |||
CS_FILES=(`ls -1 ${INPUT_FILE}`) | |||
if test "${#CS_FILES[@]}" -ne "${TASK_COUNT}"; | |||
then | |||
printf "Number of files is: %s\n" "${#CS_FILES[@]}" | |||
printf "Number of array tasks is: %s\n" "${TASK_COUNT}" | |||
printf "Do not match!\n" | |||
fi | |||
# All tasks loop through the entire list to find their specific case. | |||
for (( jid = $((${TASK_MIN})); jid <= $((${TASK_MAX})); jid++ )); | |||
do | |||
if test "${TASK_ID}" -eq "${jid}"; | |||
then | |||
# File list index with offset zero | |||
file_id=$((${jid} - ${TASK_MIN})) | |||
# Form the substring file_id (recall syntax is :offset:length) | |||
my_file=${CS_FILES[${file_id}]} | |||
my_file_id=${my_file:2:6} | |||
fi | |||
done | |||
printf "Task %d has file %s id %s\n" "${TASK_ID}" "${my_file}" "${my_file_id}" | |||
# Load FLACS module | |||
module load flacs-cfd | |||
# Running fgc and FLACS CFD | |||
fgc - ${my_file_id} | |||
run_flacscfd_omp ${my_file_id} |
Revisi per 23 September 2022 06.16
FLACS-CFD adalah software industri CFD buatan Gexcon (in-house software) untuk pemodelan ledakan dan keamanan desain konstruksi pabrik khususnya dari sisi simulasi persebaran api, asap, dan gas beracun ketika terjadi kecelakaan.
Software ini berjalan di ALELEON Supercomputer melalui FLACS License Manager dengan izin lisensi dan dikelola oleh PT. Gexcon Indonesia. |
---|
Versi yang Tersedia
Versi | Nama Modul | Dukungan Hardware | |||
---|---|---|---|---|---|
CPU | GPU | OMP Threading | MPI Multi-Node | ||
21.3 | flacs-cfd | V | X | V | X |
Menjalankan FLACS-CFD
User dapat menjalankan FLACS-CFD melalui pilihan (untuk tutorial lengkap klik judul):
EFIRO Job Composer
Dengan pilihan template yang tersedia:
Nama Template | Penjelasan |
---|---|
FLACS-CFD 21.3 | Menjalankan FLACS-CFD 21.3 standar |
FLACS-CFD 21.3 Array | Menjalankan FLACS-CFD 21.3 dalam skema SLURM array |
SLURM sbatch via Terminal
Berikut adalah contoh Submit Script menjalankan FLACS-CFD standar (diambil dari template EFIRO Job Composer):
#!/bin/bash # ---------------------------------------------------------------------- # Template FLACS-CFD 21.3 # Catatan: # 1. User dapat mengisi parameter dengan mengganti bagian yang ditandai # 4 garing (////). Contoh: #SBATCH --mem=//// -> #SBATCH --mem=64GB # 2. Panduan mengisi template: # https://wiki.efisonlt.com/wiki/SLURM_Script_ALELEON_Supercomputer # ---------------------------------------------------------------------- #------------- SBATCH Partisi epyc / Compute Node CPU ----------------- # Alokasi node, core thread CPU, RAM #SBATCH --nodes=1 #SBATCH --ntasks=//// #SBATCH --mem=////GB # Time, nama output, dan error dapat diganti sesuai keinginan user #SBATCH --time=24:00:00 #SBATCH --output=result-%j.txt #SBATCH --error=error-%j.txt # Notifikasi ke e-mail user tentang status jalannya job #SBATCH --mail-user=//// #SBATCH --mail-type=begin #SBATCH --mail-type=end # ------------------------ RUN SCRIPT ---------------------------------- # Load FLACS CFD software module load flacs-cfd # Run command fgc - //// run_flacscfd_omp ////
Berikut adalah contoh Submit Script menjalankan FLACS-CFD dalam skema array (diambil dari template EFIRO Job Composer):
#!/bin/bash # ---------------------------------------------------------------------- # Template FLACS-CFD 21.3 Array # Catatan: # 1. User dapat mengisi parameter dengan mengganti bagian yang ditandai # 4 garing (////). Contoh: #SBATCH --mem=//// -> #SBATCH --mem=64GB # 2. Panduan mengisi template: # https://wiki.efisonlt.com/wiki/SLURM_Script_ALELEON_Supercomputer # ---------------------------------------------------------------------- #------------- SBATCH Partisi epyc / Compute Node CPU ----------------- # Alokasi node, core thread CPU, RAM #SBATCH --nodes=1 #SBATCH --ntasks=//// #SBATCH --mem=////GB # Jumlah job array, contoh: 1-128 #SBATCH --array=//// # Time, nama output, dan error dapat diganti sesuai keinginan user #SBATCH --time=24:00:00 #SBATCH --output=result-%j.txt #SBATCH --error=error-%j.txt # Notifikasi ke e-mail user tentang status jalannya job #SBATCH --mail-user=//// #SBATCH --mail-type=begin #SBATCH --mail-type=end # ------------------------ RUN SCRIPT ---------------------------------- # FLACS CS INPUT FILES WITH WILDCARD. Example: cs??????.dat3 INPUT_FILE='cs////.dat3' # Abbreviate some SLURM variables for brevity/readability TASK_MIN=${SLURM_ARRAY_TASK_MIN} TASK_MAX=${SLURM_ARRAY_TASK_MAX} TASK_ID=${SLURM_ARRAY_TASK_ID} TASK_COUNT=${SLURM_ARRAY_TASK_COUNT} # Form a list of relevant files, and check the number of array elements # matches the number of cases with 6-digit identifiers. CS_FILES=(`ls -1 ${INPUT_FILE}`) if test "${#CS_FILES[@]}" -ne "${TASK_COUNT}"; then printf "Number of files is: %s\n" "${#CS_FILES[@]}" printf "Number of array tasks is: %s\n" "${TASK_COUNT}" printf "Do not match!\n" fi # All tasks loop through the entire list to find their specific case. for (( jid = $((${TASK_MIN})); jid <= $((${TASK_MAX})); jid++ )); do if test "${TASK_ID}" -eq "${jid}"; then # File list index with offset zero file_id=$((${jid} - ${TASK_MIN})) # Form the substring file_id (recall syntax is :offset:length) my_file=${CS_FILES[${file_id}]} my_file_id=${my_file:2:6} fi done printf "Task %d has file %s id %s\n" "${TASK_ID}" "${my_file}" "${my_file_id}" # Load FLACS module module load flacs-cfd # Running fgc and FLACS CFD fgc - ${my_file_id} run_flacscfd_omp ${my_file_id}