File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,12 @@ CYAN='\033[0;36m'
11
11
BOLD=' \033[1m'
12
12
RESET=' \033[0m' # Reset color
13
13
14
+ if [[ -z " $CONDA_PREFIX " ]]; then
15
+ echo -e " ${RED} Error: No Conda environment detected.${NC} "
16
+ echo -e " ${YELLOW} Please activate a Conda environment that includes MPI (OpenMPI or MPICH).${NC} "
17
+ exit 1
18
+ fi
19
+
14
20
if [ $# -lt 2 ]; then
15
21
echo -e " ${RED} Usage: $0 <Fortran file> <mpiexec arguments>${RESET} "
16
22
exit 1
Original file line number Diff line number Diff line change @@ -7,6 +7,12 @@ MPIEXEC=${CONDA_PREFIX}/bin/mpiexec
7
7
cp ${POT3D_HOME} /testsuite/${TEST} /input/* ${POT3D_HOME} /testsuite/${TEST} /run/
8
8
cd ${POT3D_HOME} /testsuite/${TEST} /run
9
9
10
+ if [[ -z " $CONDA_PREFIX " ]]; then
11
+ echo -e " ${RED} Error: No Conda environment detected.${NC} "
12
+ echo -e " ${YELLOW} Please activate a Conda environment that includes MPI (OpenMPI or MPICH).${NC} "
13
+ exit 1
14
+ fi
15
+
10
16
# detect MPI implementation
11
17
MPI_VERSION=$( $MPIEXEC --version 2>&1 )
12
18
if echo " $MPI_VERSION " | grep -q " Open MPI" ; then
Original file line number Diff line number Diff line change @@ -22,6 +22,12 @@ while [[ $# -gt 0 ]]; do
22
22
esac
23
23
done
24
24
25
+ if [[ -z " $CONDA_PREFIX " ]]; then
26
+ echo -e " ${RED} Error: No Conda environment detected.${NC} "
27
+ echo -e " ${YELLOW} Please activate a Conda environment that includes MPI (OpenMPI or MPICH).${NC} "
28
+ exit 1
29
+ fi
30
+
25
31
MPIEXEC=${CONDA_PREFIX} /bin/mpiexec
26
32
27
33
# detect MPI implementation
You can’t perform that action at this time.
0 commit comments