Problems with long chains

Hello,

I am trying to run LAMMPS simulations of melts with long polymer chains. I have a strange problem that is reproducible on multiple platforms. When I run certain long-chain geometries (with say 100K or 1M monomers per chain), then the simulation never makes it past the “Setting up run …” stage. It also keeps calling the grow() function until eventually running out of memory. Here is the call stack that leads to the failure:

LAMMPS_NS::Memory::grow () at …/memory.h:159

LAMMPS_NS::AtomVecMolecular::grow () at …/atom_vec_molecular.cpp:108
LAMMPS_NS::AtomVecMolecular::unpack_border_vel () at …/atom_vec_molecular.cpp:554
LAMMPS_NS::CommBrick::borders () at …/comm_brick.cpp:830
LAMMPS_NS::Verlet::setup () at …/verlet.cpp:107
LAMMPS_NS::Run::command () at …/run.cpp:170
LAMMPS_NS::Input::command_creator<LAMMPS_NS::Run> () at …/input.cpp:631
LAMMPS_NS::Input::execute_command () at …/input.cpp:614
LAMMPS_NS::Input::file () at …/input.cpp:225
in main () at …/main.cpp:31

I tried to figure out the problem, but that code is hard to follow. On a single process, I can reproduce the issue with the attached def.chain2 file (you should be able to type “./script.sh” to run everything). Note that the def.chain1 file, which contains 1 fewer atom, works fine. I’ve verified this on my home desktop, my university cluster, and Hopper at NERSC.

Can you please help me figure out what the problem is? Ideally, I’d like to run something like one 100K monomer chain per compute node, which should be well below the 32K atoms per process that was achieved here:
http://lammps.sandia.gov/bench.html#chain

Thanks,

  • Dave

PS - Also note that I changed line 24 of chain.f. Is that a bug, or is it intended to prevent from creating too large of a bead-chain system?

long_chain_issue.tgz (3.06 KB)

When I ran your version of the chain tool it produced a data file with this:

**********100.000015 xlo xhi
**********100.000015 ylo yhi
**********100.000015 zlo zhi

which will cause LAMMPS problems. It probably defined the simulation box from

0.0 to 100, instead of -100 to 100, causing massive overlaps in your atoms.

The *** is b/c the Fortran format statements in chain.f are too small. These work fine

and the system starts running:

900 format(a)
901 format(2f15.6,a)
902 format(i3,f5.1)
903 format(i10,i8,i8,3f10.4,3i4)
904 format(i9,i3,2i9)

PS - Also note that I changed line 24 of chain.f. Is that a bug, or is it intended to prevent from creating too large of a >bead-chain system?

This chain.f tool was written a million years ago when a simulation

of a million atoms (i6 instead of i9) was not common.

Steve

Hi Steve,

Great! I suppose I should have noticed that… Thanks so much for the very quick response.

  • Dave