Coder Social home page Coder Social logo

mantevo / minimd Goto Github PK

View Code? Open in Web Editor NEW
45.0 9.0 38.0 329 KB

MiniMD Molecular Dynamics Mini-App

Home Page: http://www.mantevo.org

Shell 5.11% Makefile 1.10% C++ 82.46% Batchfile 0.04% C 11.29%
snl-mini-apps molecular-dynamics molecular-dynamics-simulation mini-app mantevo

minimd's Introduction

Mantevo

Core Mantevo Repository containing common resources

minimd's People

Contributors

crtrott avatar nmhamster avatar pennycook avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

minimd's Issues

Supporting Large Problem sizes

We have discovered the number of particles in MiniMD is stored in a 32 bit integer: 4nxny*nz. This makes it difficult to set up larger problem sizes. Do you have any plan to use 64 bit integer to express the number of particles and other scalar entries in the code?

Criteria for successful runs.

I am Andreas Triantafyllos from Huawei and I would like to ask for some clarification about the evaluation of a simulation.

I was wondering if there are specific references that explain the criteria to consider a simulation run as successful.

In particular, I am referring to:

miniMD/ref/run_one_test

Lines 131 to 132 in 7576016

x=sqrt(2)*(0.5+atan2($1-d*'"${precision}"',50)/3.1415);\
v=sqrt($2*$2); if(v>stddev_t*x+add_t) t=t+1;\

How was the formula that takes into account the precision of floating-point numbers derived?

and

if(t+e+p>3*0.38*total) print " Failed (" t/total " ; " e/total " ; " p/total " ; Expected 0.32+-0.06)";}' out.compare

Why do total errors compared to the reference output have to be in the range 32% ± 6% in order to consider a run as successful? How was this range chosen?

I would be grateful if anyone could share any explanation or reference to the literature about the above.

NaN error and integer overflow in number of atoms

Hello,
I'd like to report two errors that I observed when running the MPI + Kokkos version of MiniMD (miniMD/kokkos).

The first error is the T and P values showing up as NaN, which causes some kernels to run abnormally fast.
The configuration is as the following, executed on 32 nodes of OLCF Summit:

$ jsrun -n192 -a1 -c1 -g1 -K3 -r6 -M -gpu ./miniMD -i in.lj.miniMD -gn 0 -nx 768 -ny 768 -nz 384 -n 100
# Create System:
# Done ....
# miniMD-Reference 1.2 (MPI+OpenMP) output ...
# Run Settings:
        # MPI processes: 192
        # Host Threads: 1
        # Inputfile: ../inputs/in.lj.miniMD
        # Datafile: None
# Physics Settings:
        # ForceStyle: LJ
        # Force Parameters: 1.00 1.00
        # Units: LJ
        # Atoms: 905969664
        # Atom types: 8
        # System size: 1289.93 1289.93 644.96 (unit cells: 768 768 384)
        # Density: 0.844200
        # Force cutoff: 2.500000
        # Timestep size: 0.005000
# Technical Settings:
        # Neigh cutoff: 2.800000
        # Half neighborlists: 1
        # Team neighborlist construction: 0
        # Neighbor bins: 460 460 230
        # Neighbor frequency: 1000
        # Sorting frequency: 1000
        # Thermo frequency: 100
        # Ghost Newton: 0 
        # Use intrinsics: 0
        # Do safe exchange: 0
        # Size of float: 8

# Starting dynamics ...   
# Timestep T U P Time
0 nan -6.773368e+00 nan  0.000
100 nan 0.000000e+00 nan  1.138


# Performance Summary:
# MPI_proc OMP_threads nsteps natoms t_total t_force t_neigh t_comm t_other performance perf/thread grep_string t_extra
192 1 100 905969664 1.137955 0.050640 0.000000 0.671161 0.416153 79613833194.819092 414655381.223016 PERF_SUMMARY 0.000000

The second error is an integer overflow error in the total number of atoms, with large problem sizes:

$ jsrun -n1536 -a1 -c1 -g1 -K3 -r6 -M -gpu ./miniMD -i in.lj.miniMD -gn 0 -nx 1536 -ny 1536 -nz 768 -n 100
# Create System:
# Done ....
# miniMD-Reference 1.2 (MPI+OpenMP) output ...
# Run Settings:
        # MPI processes: 1536
        # Host Threads: 1
        # Inputfile: ../inputs/in.lj.miniMD
        # Datafile: None
# Physics Settings:
        # ForceStyle: LJ
        # Force Parameters: 1.00 1.00
        # Units: LJ
        # Atoms: -1342177280
        # Atom types: 8
        # System size: 2579.86 2579.86 1289.93 (unit cells: 1536 1536 768)
        # Density: 0.844200
        # Force cutoff: 2.500000
        # Timestep size: 0.005000
# Technical Settings:
        # Neigh cutoff: 2.800000
        # Half neighborlists: 1
        # Team neighborlist construction: 0
        # Neighbor bins: 921 921 460
        # Neighbor frequency: 1000
        # Sorting frequency: 1000
        # Thermo frequency: 100
        # Ghost Newton: 0
        # Use intrinsics: 0
        # Do safe exchange: 0
        # Size of float: 8

# Starting dynamics ...
# Timestep T U P Time
0 1.440000e+00 3.657619e+01 -6.220309e+00  0.000
100 1.435069e+00 3.657569e+01 -6.219723e+00  2.041


# Performance Summary:
# MPI_proc OMP_threads nsteps natoms t_total t_force t_neigh t_comm t_other performance perf/thread grep_string t_extra
1536 1 100 -1342177280 2.040788 0.056916 0.000000 0.852597 1.131275 -65767589680.726250 -42817441.198389 PERF_SUMMARY 0.000000

Crash with latest kokkos and CUDA

Hi all,

I'm trying to test our Score-P Kokkos prototype against a variety of mini-apps, including MiniMD, and my first step was to try to get an uninstrumented build of MiniMD running with Kokkos using the CUDA back end. With the change from #10 applied, and with the nvcc-wrapper from Kokkos applied throughout, I'm able to build MiniMD; I selected the latest architecture (Turing) that Kokkos supports to run on our Tesla nodes. When I run, however, MiniMD crashes (and apparently pretty early):

wwilliam@tauruslogin3:/scratch/ws/wwilliam-kokkos_tealeaf/miniMD/kokkos> srun -n1 --gres=gpu:1 miniMD 
srun: job 19197979 queued and waiting for resources
srun: job 19197979 has been allocated resources
Kokkos::Cuda::initialize WARNING: running kernels compiled for compute capability 0.0 on device with compute capability 3.5 , this will likely reduce potential performance.
terminate called after throwing an instance of 'std::runtime_error'
  what():  cudaMemcpyToSymbol(Kokkos::Impl::g_device_cuda_lock_arrays, &Kokkos::Impl::g_host_cuda_lock_arrays, sizeof(Kokkos::Impl::CudaLockArrays)) error( cudaErrorInvalidSymbol): invalid device symbol /scratch/ws/wwilliam-kokkos_tealeaf/kokkos/core/src/Cuda/Kokkos_Cuda_Locks.cpp:94
Traceback functionality not available

I'm also somewhat suspicious of the "kernels compiled for compute capability 0.0" warning...

(If this is properly a Kokkos issue, let me know and I'll move it to the appropriate repository.)

"MPI_Send" should be "MPI_Sendrecv" at miniMD/kokkos/comm.cpp:334

Function call should be changed from "MPI_Send" to "MPI_Sendrecv" at miniMD/kokkos/comm.cpp:334

333      MPI_Datatype type = (sizeof(MMD_float) == 4) ? MPI_FLOAT : MPI_DOUBLE;
334      MPI_Send(buf_send.data(), reverse_send_size[iswap], type, recvproc[iswap], 0,
335               buf_recv.data(), reverse_recv_size[iswap], type, sendproc[iswap], 0,
336               MPI_COMM_WORLD, MPI_STATUS_IGNORE);
337
338      buf = buf_recv;
339    } else buf = buf_send;

ForceLJ::compute_fullneigh

Hi there ,,,

It may there is an issue with the ForceLJ::compute_fullneigh function in computing on the following lines

f[iPAD+0]+=fix
f[i
PAD+1]+=fiy
f[i*PAD+2]+=fiz

they are should be protected similarly to half neighbour list force computation by using
#pragma omp atomic
f[iPAD+0]+=fix
#pragma omp atomic
f[i
PAD+1]+=fiy
#pragma omp atomic
f[i*PAD+2]+=fiz

I know this have been highlighted as non-threaded function but still with mpi one processor it shows the different results for the same physical configuration ... you may compare the results between threaded halfneighbor and the fullneighbor results are different ...

the other option ofcourse to create threaded function for fullneighbor as have been done for halfneighbor.

please confirm if should be fixed or you have another opinion on this point.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.