-
Notifications
You must be signed in to change notification settings - Fork 1
/
meshbuild_workflow.sh
30 lines (27 loc) · 1.07 KB
/
meshbuild_workflow.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
#move files to data repostiory
mv src/workflow/* data/ && mv build/MeshBuilder data/ && mv src/metis_builds/METIS/build/programs/gpmetis data/
cd data
# Prompt the user to input information
echo "Enter the path to the .in file to be used by MeshBuilder: "
read file_path
echo "Enter the number of computer nodes for partitioning: "
read nn
echo "Enter partitioning method,
1 --> SurfaceFlow (SF),
2 --> Surface-Subsurface Flow (SSF),
3 --> Surface-Subsurface Flow with Headwaters (SSF-H):"
read OPT_Part
echo "Enter simulation basename: "
read basename
# Check if the file exists
if [ -f "$file_path" ]; then
# If the file exists, execute the programs with the provided inputs
echo "Executing MeshBuilder with the file: $file_path"
./MeshBuilder "$file_path" # Replace "MeshBuilder" with the actual program name
echo "Executing run_metis.zsh with parameters: $nn, $OPT_Part, $basename"
./run_metis.zsh "$nn" "$OPT_Part" "$basename"
else
# If the file does not exist, display an error message
echo "Error: The specified file does not exist."
fi