def collectTiming(): created = os.path.isfile("collect_bisection.dat") f = open('collect.dat', 'a') if not created: f.write("numThreads mpi omp Nspheres runtime \n") from yade import timing f.write( str(numThreads) + " " + str(os.getenv('OMPI_COMM_WORLD_SIZE')) + " " + os.getenv('OMP_NUM_THREADS') + " " + str(nspheres) + " " + str(timing.runtime()) + "\n") f.close()
def collectTiming(): created = os.path.isfile("collect_2D_strongScalability" + timeStr + ".dat") f = open('collect_2D_strongScalability' + timeStr + '.dat', 'a') if not created: f.write("numThreads mpi omp Nspheres N M runtime\n") from yade import timing f.write( str(numThreads) + " " + str(os.getenv('OMPI_COMM_WORLD_SIZE')) + " " + os.getenv('OMP_NUM_THREADS') + " " + str(N * M * (numThreads - 1)) + " " + str(N) + " " + str(M) + " " + str(timing.runtime()) + "\n") f.close()
def collectTiming(Cundall): created = os.path.isfile("collect3D.dat") f = open('collect3D.dat', 'a') if not created: f.write("CuNumber numThreads mpi omp Nspheres L M N runtime \n") f.write( str(Cundall) + " " + str(int(os.getenv('OMP_NUM_THREADS'))) + " " + str(1) + " " + os.getenv('OMP_NUM_THREADS') + " " + str(N * M * L * (numThreads - 1)) + " " + str(L) + " " + str(M) + " " + str(N) + " " + str(timing.runtime()) + "\n") f.close()
def collectTiming(): created = os.path.isfile("collect_3D.dat") f = open('collect.dat', 'a') if not created: f.write("numThreads mpi omp Nspheres runtime force\n") from yade import timing f.write( str(globalDomain.numThreads) + " " + str(os.getenv('OMPI_COMM_WORLD_SIZE')) + " " + os.getenv('OMP_NUM_THREADS') + " " + str(len(O.bodies)) + " " + str(timing.runtime()) + " " + str(O.forces.f(WALL_ID)[1]) + "\n") f.close()
def collectTimingMPI(): created = os.path.isfile("collect_2D_weakScalability-" + timeStr + ".dat") f = open("collect_2D_weakScalability-" + timeStr + ".dat", 'a') if not created: f.write( "numThreads mpi omp Nspheres force TotalRuntime isendRecvForces sendRecvStates waitForces collisionChecker collider\n" ) from yade import timing #f.write(str(globalDomain.numThreads)+" "+str(os.getenv('OMPI_COMM_WORLD_SIZE'))+" "+os.getenv('OMP_NUM_THREADS')+" "+str(len(O.bodies))++" "+str(O.forces.f(WALL_ID)[1])+" "+str(timing.runtime())+" ""\n") f.write( "%s %s %s %g %g %g %g %g %g %g %g\n" % (numThreads, str(os.getenv('OMPI_COMM_WORLD_SIZE')), os.getenv('OMP_NUM_THREADS'), len(O.bodies), O.forces.f(WALL_ID)[1], timing.runtime() / 1e6, isendRecvForcesRunner.execTime / 1e6, sendRecvStatesRunner.execTime / 1e6, waitForcesRunner.execTime / 1e6, collisionChecker.execTime / 1e6, collider.execTime / 1e6)) f.close()