由于进行CFD计算连接Rocks集群系统的CentOS 服务器计算集群,需要输入各种命令代码,十分繁琐且对于Linux小白很不友好,特编写了shell脚本来实现不同节点的连接、不同版本的fluent CFX启动、fluent CFX 进程的清理、CFX并行中系统变量的修改操作。
#!/bin/bash
#Compute Server Cluster Graphical Shell Script
#Time: 2019/04/29
#Version: V1.0
#Author: @Kevin WALKER
jiedian_select_animo=
function radiolist() {
DISTROS=$(whiptail --title "Chose Compute Node" --radiolist \
"Welcome to use the HOST compute cluster, please select the server node" 15 60 4 \
"No_1" "Mian Node: cluster0" ON \
"No_2" "Sub Node1: node1" OFF \
"No_3" "Sub Node2: node2" OFF 3>&1 1>&2 2>&3)
exitstatus=$?
if [ $exitstatus = 0 ]; then
jiedian_select_animo=$DISTROS
echo_green_enter "The compute node you selected is $jiedian_select_animo"
else
echo "You have chosen to cancel"
fi
}
function No_1 {
OPTION=$(whiptail --title "Menu" --menu \
"Please select the menu" 15 60 4 \
"1" "Fluent 12" \
"2" "Fluent 14" \
"3" "Fluent 15" \
"4" "Fluent 19" \
"5" "CFX 14" \
"6" "CFX 15" \
"7" "CFX 19" \
"8" "Kill Fluent Process" \
"9" "Kill CFX Process" \
"10" "CFX MPI" 3>&1 1>&2 2>&3)
exitstatus=$?
if [ $exitstatus = 0 ]; then
if [ $OPTION == 1 ];then
exit
exit
/share/apps/ansys_inc/v121/fluent/bin/fluent
echo "Fluent 12 is Runing!"
elif [ $OPTION == 2 ];then
exit
exit
/share/apps/ansys_inc/v140/fluent/bin/fluent
echo "Fluent 14 is