-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Description
Script output:
mpi_cores = 1: len - 131144
mpi_cores = 4: len - 32448
Script itself:
#!/bin/python3
from pylammpsmpi import LammpsLibrary
import numpy as np
lmp1 = LammpsLibrary(cores=1)
lmp2 = LammpsLibrary(cores=4)
def run_cmds(lmp):
lmp.command("units metal")
lmp.command("dimension 3")
lmp.command("boundary p p m")
lmp.command("atom_style atomic")
lmp.command("variable width equal 13")
lmp.command("lattice diamond 5.43 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1")
lmp.command("region box block -${width} ${width} -${width} ${width} -${width} ${width} units lattice")
lmp.command("create_box 1 box")
lmp.command("region Si block -${width} ${width} -${width} ${width} $(-v_width + 1) $(v_width - 1) units lattice")
lmp.command("create_atoms 1 region Si")
lmp.mass(1, 28.0855)
lmp.command("variable ids atom id")
lmp.run(0)
return len(lmp.extract_variable("ids", "all", 1))
print("mpi_cores = 1: len -", run_cmds(lmp1))
print("mpi_cores = 4: len -", run_cmds(lmp2))
Metadata
Metadata
Assignees
Labels
No labels