diff --git a/Overlap/eddy_graph.sh.in b/Overlap/eddy_graph.sh.in index 30afb733f10dc06c8648af531063bfa2bc58bf8a..f8f00b5bc4a74086b8652d9e9c37941f147a9e77 100644 --- a/Overlap/eddy_graph.sh.in +++ b/Overlap/eddy_graph.sh.in @@ -3,7 +3,7 @@ # This program creates the edge list for a given orientation of # eddies. -if (($# != 2)) +if (($# <= 1)) then echo "Usage: eddy_graph.sh N_PROC SHPC-directory [SHPC-directory] ..." exit 1 @@ -11,12 +11,14 @@ fi set -e ##set -x -${mpiexec:-mpiexec} -n $1 @CMAKE_CURRENT_BINARY_DIR@/eddy_graph $2 +n_proc=$1 +shift +${mpiexec:-mpiexec} -n $n_proc @CMAKE_CURRENT_BINARY_DIR@/eddy_graph $* rm -f isolated_nodes.txt edgelist_unsorted.csv rank=0 -while ((rank < $1)) +while ((rank < $n_proc)) do cat edgelist_$rank.csv >>edgelist_unsorted.csv cat isolated_nodes_$rank.txt >>isolated_nodes.txt