Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add a test for PAPI
authorAugustin Degomme <adegomme@gmail.com>
Wed, 3 Mar 2021 19:25:17 +0000 (20:25 +0100)
committerAugustin Degomme <adegomme@gmail.com>
Wed, 3 Mar 2021 19:27:04 +0000 (20:27 +0100)
next step : try to activate it on jenkins (for coverage, obviously)

teshsuite/smpi/CMakeLists.txt
teshsuite/smpi/coll-allreduce/coll-allreduce-papi.tesh [new file with mode: 0644]

index 912613e..e5aa7b1 100644 (file)
@@ -47,6 +47,7 @@ endforeach()
 set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/fort_args/fort_args.f90 PARENT_SCOPE)
 set(tesh_files    ${tesh_files}     ${CMAKE_CURRENT_SOURCE_DIR}/coll-allreduce/coll-allreduce-large.tesh
                                     ${CMAKE_CURRENT_SOURCE_DIR}/coll-allreduce/coll-allreduce-automatic.tesh
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/coll-allreduce/coll-allreduce-papi.tesh
                                     ${CMAKE_CURRENT_SOURCE_DIR}/coll-alltoall/clusters.tesh
                                     ${CMAKE_CURRENT_SOURCE_DIR}/pt2pt-pingpong/broken_hostfiles.tesh
                                     ${CMAKE_CURRENT_SOURCE_DIR}/pt2pt-pingpong/TI_output.tesh
@@ -134,9 +135,14 @@ if(enable_smpi)
   ADD_TESH(tesh-smpi-coll-allreduce-large --cfg smpi/allreduce:ompi_ring_segmented --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/coll-allreduce --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/coll-allreduce coll-allreduce-large.tesh)
   ADD_TESH(tesh-smpi-coll-allreduce-automatic --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/coll-allreduce --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/coll-allreduce coll-allreduce-automatic.tesh)
 
-  # Extra allreduce test: cluster-types
+  # Extra alltoall test: cluster-types
   ADD_TESH(tesh-smpi-cluster-types --cfg smpi/alltoall:mvapich2 --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/coll-alltoall --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/coll-alltoall clusters.tesh)
 
+  # Extra allreduce test : PAPI tracing
+  if (HAVE_PAPI)
+    ADD_TESH(tesh-smpi-papi-tracing --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/coll-allreduce --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi/coll-allreduce ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/coll-allreduce/coll-allreduce-papi.tesh)
+  endif()
+
   # Extra pt2pt pingpong test: broken usage ti-tracing
   ADD_TESH_FACTORIES(tesh-smpi-broken  "thread"   --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/pt2pt-pingpong --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/pt2pt-pingpong broken_hostfiles.tesh)
   ADD_TESH(tesh-smpi-replay-ti-tracing            --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/pt2pt-pingpong --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi/pt2pt-pingpong ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/pt2pt-pingpong/TI_output.tesh)
diff --git a/teshsuite/smpi/coll-allreduce/coll-allreduce-papi.tesh b/teshsuite/smpi/coll-allreduce/coll-allreduce-papi.tesh
new file mode 100644 (file)
index 0000000..2d9f594
--- /dev/null
@@ -0,0 +1,60 @@
+# Smpi Allreduce collectives tests
+! output sort
+
+p Test allreduce with papi events activated - needs papi installed, simgrid compiled with it, and sudo or sudo sh -c "echo 0 > /proc/sys/kernel/perf_event_paranoid"
+$ ${bindir:=.}/../../../smpi_script/bin/smpirun -map -hostfile ../hostfile_coll -platform ${platfdir:=.}/small_platform.xml -np 16 -trace --log=xbt_cfg.thres:critical ${bindir:=.}/coll-allreduce --log=smpi_config.thres:warning --log=smpi_coll.thres:error --log=smpi_mpi.thres:error --log=smpi_pmpi.thres:error --cfg=smpi/papi-events:default:PAPI_L3_LDM:PAPI_L2_LDM  
+> [rank 0] -> Tremblay
+> [rank 1] -> Tremblay
+> [rank 2] -> Tremblay
+> [rank 3] -> Tremblay
+> [rank 4] -> Jupiter
+> [rank 5] -> Jupiter
+> [rank 6] -> Jupiter
+> [rank 7] -> Jupiter
+> [rank 8] -> Fafard
+> [rank 9] -> Fafard
+> [rank 10] -> Fafard
+> [rank 11] -> Fafard
+> [rank 12] -> Ginette
+> [rank 13] -> Ginette
+> [rank 14] -> Ginette
+> [rank 15] -> Ginette
+> [0] sndbuf=[0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ]
+> [1] sndbuf=[16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ]
+> [2] sndbuf=[32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 ]
+> [3] sndbuf=[48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 ]
+> [4] sndbuf=[64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 ]
+> [5] sndbuf=[80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 ]
+> [6] sndbuf=[96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 ]
+> [7] sndbuf=[112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 ]
+> [8] sndbuf=[128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 ]
+> [9] sndbuf=[144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 ]
+> [10] sndbuf=[160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 ]
+> [11] sndbuf=[176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 ]
+> [12] sndbuf=[192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 ]
+> [13] sndbuf=[208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 ]
+> [14] sndbuf=[224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 ]
+> [15] sndbuf=[240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 ]
+> [0] rcvbuf=[1920 1936 1952 1968 1984 2000 2016 2032 2048 2064 2080 2096 2112 2128 2144 2160 ]
+> [1] rcvbuf=[1920 1936 1952 1968 1984 2000 2016 2032 2048 2064 2080 2096 2112 2128 2144 2160 ]
+> [2] rcvbuf=[1920 1936 1952 1968 1984 2000 2016 2032 2048 2064 2080 2096 2112 2128 2144 2160 ]
+> [3] rcvbuf=[1920 1936 1952 1968 1984 2000 2016 2032 2048 2064 2080 2096 2112 2128 2144 2160 ]
+> [4] rcvbuf=[1920 1936 1952 1968 1984 2000 2016 2032 2048 2064 2080 2096 2112 2128 2144 2160 ]
+> [5] rcvbuf=[1920 1936 1952 1968 1984 2000 2016 2032 2048 2064 2080 2096 2112 2128 2144 2160 ]
+> [6] rcvbuf=[1920 1936 1952 1968 1984 2000 2016 2032 2048 2064 2080 2096 2112 2128 2144 2160 ]
+> [7] rcvbuf=[1920 1936 1952 1968 1984 2000 2016 2032 2048 2064 2080 2096 2112 2128 2144 2160 ]
+> [8] rcvbuf=[1920 1936 1952 1968 1984 2000 2016 2032 2048 2064 2080 2096 2112 2128 2144 2160 ]
+> [9] rcvbuf=[1920 1936 1952 1968 1984 2000 2016 2032 2048 2064 2080 2096 2112 2128 2144 2160 ]
+> [10] rcvbuf=[1920 1936 1952 1968 1984 2000 2016 2032 2048 2064 2080 2096 2112 2128 2144 2160 ]
+> [11] rcvbuf=[1920 1936 1952 1968 1984 2000 2016 2032 2048 2064 2080 2096 2112 2128 2144 2160 ]
+> [12] rcvbuf=[1920 1936 1952 1968 1984 2000 2016 2032 2048 2064 2080 2096 2112 2128 2144 2160 ]
+> [13] rcvbuf=[1920 1936 1952 1968 1984 2000 2016 2032 2048 2064 2080 2096 2112 2128 2144 2160 ]
+> [14] rcvbuf=[1920 1936 1952 1968 1984 2000 2016 2032 2048 2064 2080 2096 2112 2128 2144 2160 ]
+> [15] rcvbuf=[1920 1936 1952 1968 1984 2000 2016 2032 2048 2064 2080 2096 2112 2128 2144 2160 ]
+
+p Just check we have events in the trace, we can't check anything else.
+$ grep -q "PAPI_L3_LDM" ${bindir:=.}/smpi_simgrid.trace
+
+$ grep -q "^8 " ${bindir:=.}/smpi_simgrid.trace
+
+$ rm -f ${bindir:=.}/smpi_simgrid.trace
\ No newline at end of file