首页天道酬勤,

,

admin 05-12 15:56 190次浏览

这是dgx A100工作站。 以这台机器为例。

cpu(s ) :逻辑核心数Thread(s ) per Core(s :每个物理cpu核心上, 逻辑核心sockets : CPU物理插槽数core ) s ) per socket :包含每个插槽的物理CPU核心数NUMA node(s ) s (线程)。以逻辑CPU核心组合的形式,将多个CPU组合在一起numanode0CPU(s ) : node0包含哪些逻辑CPU? 其中,节点0中包含的逻辑CPU编号为0-15、128-143。 根据以上信息,您可以看到这台计算机总共有两个CPU物理插槽,每个插槽有64个CPU物理内核。 也就是说,总共有128个CPU物理核心,但每个核心包含两个线程。 超线程,一个线程称为一个逻辑CPU核。 因此,这台机器包含128个CPU物理核心

这256个逻辑CPU核以NUMA NODE的形式组合起来,共有8个NODE,每个NODE包含32个逻辑CPU核。 也可以看到每个节点包含哪个CPU逻辑核。

APS @ dgx-a 100:~/Jin RF/test/NW chem/large _ offical $ numactl-s policy : defaultpreferrednode : currentphyscpubind 3360123456781011213141618192122224 25 26 26 6 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 8 6 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 1 27 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 15 6 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 1 94 195 196 197 198 199 200 201 2 02 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 2322332342352362372382392402412 422432432442445246247249250251253254255 CPU bind 336001234567 node bind 33600124457 node bind 33601:011144545456666 mem bind 3:6001 ~/JinRF/test/NWchem/large _ offical $ lscpuarchitecture 3360 x 86 _ 64 CPU 64位字节顺序控制器3360 littleendiancpu (s ) : 256On-line CPU(s ) ) s core ) s ) per 33602numanode(s )。33608 vendor id : authenticamdcpufamily :23 model :49 model name 3: ame 774264-codel 0 max MHz :2250.0000 cpuminmhz :1500.0000 bogomips 33604491.52虚拟化: amd-VL1dcache 336032 KL1icache 336032 KL2cache CPU(s ) :-15,128-143编号1 CPU ) s ) :16-31,144-159编号2 CPU ) s ) 3360330 160-175编号CPU(s 192-207编号5 CPU ) s ) 336080-95 224-239编号7 CPU (s ) : 112-127, 240-255 flags : fpuvmedepsetscmsrpaemcecx8apicsepmtrrpgemcacmovpse 36 clflushmxfxsrssesse2htsyscallnxmmxextfxsr _ opt PDR perperpse CX 16 SSE4_1ss E4 _2x2 apicmovbepopcntaesxsaveavxf 16 crdrandlahf _ LMC MP _ legacysvmextapiccrapic ftr _ nbbpextperfctr _ llll evibrsibpbstibpvmmcallfsgsbasebmi1av x2 sm epbm I2C mi2p _ llcc QM _ MBM _ total cqm _ MBM _ localclzeroirperfxsaveerptrwbnoinvddd 如果只想在cb cor smca个节点上的CPU中运行numactlnumactlrunsprocessesswithaspecificnumaschedulingormemoryplacementpolicy。

这是来自MAN的说明。 也就是说,NUMA可以控制进程运行到哪个CPU,从哪里获取内存。 这是因为非统一内存访问体系结构(numa )不一致内存访问体系结构,CPU和CPU不同,而不在同一节点的CPU访问同一位置的内存速度不同(当然还有其他区别)

这些选项包括

--membind=nodes, - mnodesonlyallocatememoryfromnodes.allocationwillfailwhenthereisnotenoughmemoryavailableonthesenodes.nodesmaybespeciedas ,- nnodesonlyexecutecommandonthecpusofnodes.notethatnodesmayconsistofmultiplecpus.nodesmaybespecifiedasn,n,n or on-on or or or n-nandsoforth.--physcpubind=CPUs,- ccpusonlyexecuteprocessoncpu.thisacceptscpunumbersasshownintheprocessorfieldsof orrelativecpusasinrelativetothecurrentcpuset.you may specify ' all ',whichmeansallcpusinthecurrentcpuset.physicalcpusmaybebes N-N or N-N,n-nandsoforth.relativecpusmaybespecifedasn,n,N or N-N or N,n-nandsoforth.theindicatesthathecpunumburth n-notationindicatestheinverseofn-n,inotherwordsallcpusexceptn-n.ifusedwithnotation,specify! N-N .使用以下命令,仅在NODE 2中的CPU上运行程序,并确保内存也只从NODE 2中的内存访问: 如果节点2内存不足,请解除内存访问限制。

numactl-- cpunodebind=2--mem bind=2--mpirun-NP $1nwchemsimple.NW|tee $ 2

, ,