kokkos / kokkos-tutorials

Tutorials for the Kokkos C++ Performance Portability Programming Ecosystem
https://kokkos.org
Other
301 stars 100 forks source link

miniMD: Fix Kokkos initialization #71

Closed dalg24 closed 1 year ago

dalg24 commented 1 year ago

Kokkos::InitArguments is deprecated since Kokkos 3.7

I suggest we just pass all command line arguments through to Kokkos instead of all these shenanigans

dalg24 commented 1 year ago

You should also adjust run_one_test to update the commandline arguments.

Please suggest a fix for it.

masterleinad commented 1 year ago

Please suggest a fix for it.

Something like

diff --git a/Exercises/tools_minimd/miniMD b/Exercises/tools_minimd/miniMD
index e6a5b6f..ebe8cb8 100755
Binary files a/Exercises/tools_minimd/miniMD and b/Exercises/tools_minimd/miniMD differ
diff --git a/Exercises/tools_minimd/run_one_test b/Exercises/tools_minimd/run_one_test
old mode 100644
new mode 100755
index 2b53389..978f2b9
--- a/Exercises/tools_minimd/run_one_test
+++ b/Exercises/tools_minimd/run_one_test
@@ -44,10 +44,10 @@ if [ ! -x ${1} ]; then
 fi

 #echo the commandline to run the test
-echo "${MPISTART} -np $2 ${MPIOPTIONS} ./$1 -ng 2 --skip_gpu 1 -dm -t $3 -s $4 -n $5 --half_neigh $6 -gn $7 --yaml_output 0 -dm -i in.$8.miniMD"
+echo "${MPISTART} -np $2 ${MPIOPTIONS} ./$1 --kokkos-num-threads=$3 -s $4 -n $5 --half_neigh $6 -gn $7 --yaml_output 0 -dm -i in.$8.miniMD"

 #do the testrun
-${MPISTART} -np $2 ${MPIOPTIONS} ./$1 -ng 2 --skip_gpu 1 -dm -t $3 -s $4 -n $5 --half_neigh $6 -gn $7 --yaml_output 0 -dm -i in.$8.miniMD > out.test
+${MPISTART} -np $2 ${MPIOPTIONS} ./$1 --kokkos-num-threads=$3 -s $4 -n $5 --half_neigh $6 -gn $7 --yaml_output 0 -dm -i in.$8.miniMD > out.test

 #get the filename of the equivalent reference output
diff --git a/Exercises/tools_minimd/run_tests b/Exercises/tools_minimd/run_tests
old mode 100644
new mode 100755
index e292fec..cdb7afb
--- a/Exercises/tools_minimd/run_tests
+++ b/Exercises/tools_minimd/run_tests
@@ -24,7 +24,7 @@ echo "  <val>=99:  run both test 4 and 14 "
 echo "             and varying system size"

 echo " "
-echo " You might need to edit the run_ont_test script to set the correct options for your MPI installation."
+echo " You might need to edit the run_one_test script to set the correct options for your MPI installation."
 echo " "

 nexe=0
@@ -188,4 +188,4 @@ do
     bash run_one_test ${exe} 8 ${threads} 60 ${nsteps} ${neighlist} ${ghostcomm} ${input}
   fi
 done
-fi
\ No newline at end of file
+fi
dalg24 commented 1 year ago

Please push directly to my branch. So just dropping all the GPU related options? (I don't have an issue with it)