Merge branch 'develop' into always-exceptions

This commit is contained in:
Axel Kohlmeyer
2023-04-25 09:08:21 -04:00
195 changed files with 5989 additions and 7483 deletions

View File

@ -33,7 +33,6 @@ These are the sub-directories included in this directory:
simple simple example of driver code calling LAMMPS as a lib
multiple example of driver code calling multiple instances of LAMMPS
plugin example for loading LAMMPS at runtime from a shared library
lammps_quest MD with quantum forces, coupling to Quest DFT code
lammps_spparks grain-growth Monte Carlo with strain via MD,
coupling to SPPARKS kinetic MC code
library collection of useful inter-code communication routines

View File

@ -1,47 +0,0 @@
# Makefile for MD with quantum forces via LAMMPS <-> Quest coupling
SHELL = /bin/sh
# System-specific settings
LAMMPS = /home/sjplimp/lammps
CC = g++
CCFLAGS = -g -O -DMPICH_IGNORE_CXX_SEEK -I../library
DEPFLAGS = -M
LINK = g++
LINKFLAGS = -g -O -L../library -L${LAMMPS}/src
USRLIB = -lcouple -llammps_g++
SYSLIB = -lfftw -lmpich -lpthread
ARCHIVE = ar
ARFLAGS = -rc
SIZE = size
# Files
EXE = lmpqst
SRC = $(wildcard *.cpp)
INC = $(wildcard *.h)
OBJ = $(SRC:.cpp=.o)
# Targets
$(EXE): $(OBJ)
$(LINK) $(LINKFLAGS) $(OBJ) $(USRLIB) $(SYSLIB) -o $(EXE)
$(SIZE) $(EXE)
clean:
rm $(EXE) *.o
# Compilation rules
%.o:%.cpp
$(CC) $(CCFLAGS) -c $<
%.d:%.cpp
$(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@
# Individual dependencies
DEPENDS = $(OBJ:.o=.d)
include $(DEPENDS)

View File

@ -1,70 +0,0 @@
IMPORTANT NOTE: This example has not been updated since 2014,
so it is not likely to work anymore out of the box. There have
been changes to LAMMPS and its library interface that would need
to be applied. Please see the manual for the documentation of
the library interface.
This directory has an application that runs classical MD via LAMMPS,
but uses quantum forces calculated by the Quest DFT (density
functional) code in place of the usual classical MD forces calculated
by a pair style in LAMMPS.
lmpqst.cpp main program
it links LAMMPS as a library
it invokes Quest as an executable
in.lammps LAMMPS input script, without the run command
si_111.in Quest input script for an 8-atom Si unit cell
lmppath.h contains path to LAMMPS home directory
qstexe.h contains full pathname to Quest executable
After editing the Makefile, lmppath.h, and qstexe.h to make them
suitable for your box, type:
make -f Makefile.g++
and you should get the lmpqst executable.
NOTE: To run this coupled application, you must of course, have Quest
built on your system. It's WWW site is http://dft.sandia.gov/Quest.
It is not an open-source code, buy you can contact its authors to
obtain a copy.
You can run lmpqst in serial or parallel as:
% lmpqst Niter in.lammps in.quest
% mpirun -np 4 lmpqst Niter in.lammps in.quest
where
Niter = # of MD iterations
in.lammps = LAMMPS input script
in.quest = Quest input script
The log files are for this run:
% lmpqst 10 in.lammps si_111.in
This application is an example of a coupling where the driver code
(lmpqst) runs one code (LAMMPS) as an outer code and facilitates it
calling the other code (Quest) as an inner code. Specifically, the
driver (lmpqst) invokes one code (LAMMPS) to perform its timestep
loop, and grabs information from the other code (Quest) during its
timestep. This is done in LAMMPS using the fix external command,
which makes a "callback" to the driver application (lmpqst), which in
turn invokes Quest with new atom coordinates, lets Quest compute
forces, and returns those forces to the LAMMPS fix external.
The driver code launches LAMMPS in parallel. But Quest is only run on
a single processor. It would be possible to change this by using a
parallel build of Quest.
Since Quest does not currently have a library interface, the driver
code interfaces with Quest via input and output files.
Note that essentially 100% of the run time for this coupled
application is spent in Quest, as the quantum calculation of forces
dominates the calculation.
You can look at the log files in the directory to see sample LAMMPS
output for this simulation. Dump files produced by LAMMPS are stored
as dump.md.

View File

@ -1,20 +0,0 @@
# LAMMPS input for coupling MD/Quantum
units metal
dimension 3
atom_style atomic
atom_modify sort 0 0.0
lattice diamond 5.43
region box block 0 1 0 1 0 1
create_box 1 box
create_atoms 1 box
mass 1 28.08
velocity all create 300.0 87293 loop geom
fix 1 all nve
fix 2 all external pf/callback 1 1
dump 1 all custom 1 dump.md id type x y z fx fy fz
thermo 1

View File

@ -1 +0,0 @@
#define LMPPATH /home/sjplimp/lammps

View File

@ -1,270 +0,0 @@
// lmpqst = umbrella driver to couple LAMMPS + Quest
// for MD using quantum forces
// Syntax: lmpqst Niter in.lammps in.quest
// Niter = # of MD iterations
// in.lammps = LAMMPS input script
// in.quest = Quest input script
#include <mpi.h>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include "stdint.h"
#include "many2one.h"
#include "one2many.h"
#include "files.h"
#include "memory.h"
#include "error.h"
#define QUOTE_(x) #x
#define QUOTE(x) QUOTE_(x)
#include "lmppath.h"
#include QUOTE(LMPPATH/src/lammps.h)
#include QUOTE(LMPPATH/src/library.h)
#include QUOTE(LMPPATH/src/input.h)
#include QUOTE(LMPPATH/src/modify.h)
#include QUOTE(LMPPATH/src/fix.h)
#include QUOTE(LMPPATH/src/fix_external.h)
#include "qstexe.h"
using namespace LAMMPS_NS;
#define ANGSTROM_per_BOHR 0.529
#define EV_per_RYDBERG 13.6056923
void quest_callback(void *, bigint, int, int *, double **, double **);
struct Info {
int me;
Memory *memory;
LAMMPS *lmp;
char *quest_input;
};
/* ---------------------------------------------------------------------- */
int main(int narg, char **arg)
{
int n;
char str[128];
// setup MPI
MPI_Init(&narg,&arg);
MPI_Comm comm = MPI_COMM_WORLD;
int me,nprocs;
MPI_Comm_rank(comm,&me);
MPI_Comm_size(comm,&nprocs);
Memory *memory = new Memory(comm);
Error *error = new Error(comm);
// command-line args
if (narg != 4) error->all("Syntax: lmpqst Niter in.lammps in.quest");
int niter = atoi(arg[1]);
n = strlen(arg[2]) + 1;
char *lammps_input = new char[n];
strcpy(lammps_input,arg[2]);
n = strlen(arg[3]) + 1;
char *quest_input = new char[n];
strcpy(quest_input,arg[3]);
// instantiate LAMMPS
LAMMPS *lmp = new LAMMPS(0,NULL,MPI_COMM_WORLD);
// create simulation in LAMMPS from in.lammps
lmp->input->file(lammps_input);
// make info available to callback function
Info info;
info.me = me;
info.memory = memory;
info.lmp = lmp;
info.quest_input = quest_input;
// set callback to Quest inside fix external
// this could also be done thru Python, using a ctypes callback
int ifix = lmp->modify->find_fix("2");
FixExternal *fix = (FixExternal *) lmp->modify->fix[ifix];
fix->set_callback(quest_callback,&info);
// run LAMMPS for Niter
// each time it needs forces, it will invoke quest_callback
sprintf(str,"run %d",niter);
lmp->input->one(str);
// clean up
delete lmp;
delete memory;
delete error;
delete [] lammps_input;
delete [] quest_input;
MPI_Finalize();
}
/* ----------------------------------------------------------------------
callback to Quest with atom IDs and coords from each proc
invoke Quest to compute forces, load them into f for LAMMPS to use
f can be NULL if proc owns no atoms
------------------------------------------------------------------------- */
void quest_callback(void *ptr, bigint ntimestep,
int nlocal, int *id, double **x, double **f)
{
int i,j;
char str[128];
Info *info = (Info *) ptr;
// boxlines = LAMMPS box size converted into Quest lattice vectors
char **boxlines = NULL;
if (info->me == 0) {
boxlines = new char*[3];
for (i = 0; i < 3; i++) boxlines[i] = new char[128];
}
double boxxlo = *((double *) lammps_extract_global(info->lmp,"boxxlo"));
double boxxhi = *((double *) lammps_extract_global(info->lmp,"boxxhi"));
double boxylo = *((double *) lammps_extract_global(info->lmp,"boxylo"));
double boxyhi = *((double *) lammps_extract_global(info->lmp,"boxyhi"));
double boxzlo = *((double *) lammps_extract_global(info->lmp,"boxzlo"));
double boxzhi = *((double *) lammps_extract_global(info->lmp,"boxzhi"));
double boxxy = *((double *) lammps_extract_global(info->lmp,"xy"));
double boxxz = *((double *) lammps_extract_global(info->lmp,"xz"));
double boxyz = *((double *) lammps_extract_global(info->lmp,"yz"));
double xprd = (boxxhi-boxxlo)/ANGSTROM_per_BOHR;
double yprd = (boxyhi-boxylo)/ANGSTROM_per_BOHR;
double zprd = (boxzhi-boxzlo)/ANGSTROM_per_BOHR;
double xy = boxxy/ANGSTROM_per_BOHR;
double xz = boxxz/ANGSTROM_per_BOHR;
double yz = boxyz/ANGSTROM_per_BOHR;
if (info->me == 0) {
sprintf(boxlines[0],"%g %g %g\n",xprd,0.0,0.0);
sprintf(boxlines[1],"%g %g %g\n",xy,yprd,0.0);
sprintf(boxlines[2],"%g %g %g\n",xz,yz,zprd);
}
// xlines = x for atoms on each proc converted to text lines
// xlines is suitable for insertion into Quest input file
// convert LAMMPS Angstroms to Quest bohr
int natoms;
MPI_Allreduce(&nlocal,&natoms,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD);
Many2One *lmp2qst = new Many2One(MPI_COMM_WORLD);
lmp2qst->setup(nlocal,id,natoms);
char **xlines = NULL;
double **xquest = NULL;
if (info->me == 0) {
xquest = info->memory->create_2d_double_array(natoms,3,"lmpqst:xquest");
xlines = new char*[natoms];
for (i = 0; i < natoms; i++) xlines[i] = new char[128];
}
if (info->me == 0) lmp2qst->gather(&x[0][0],3,&xquest[0][0]);
else lmp2qst->gather(&x[0][0],3,NULL);
if (info->me == 0) {
for (i = 0; i < natoms; i++) {
xquest[i][0] /= ANGSTROM_per_BOHR;
xquest[i][1] /= ANGSTROM_per_BOHR;
xquest[i][2] /= ANGSTROM_per_BOHR;
}
for (i = 0; i < natoms; i++) {
sprintf(xlines[i],"%d %d %g %g %g\n",i+1,1,
xquest[i][0],xquest[i][1],xquest[i][2]);
}
}
// one-processor tasks:
// whack all lcao.* files
// cp quest_input to lcao.in
// replace atom coords section of lcao.in with new atom coords
// run Quest on one proc, save screen output to file
// flines = atom forces extracted from Quest screen file
// fquest = atom forces
// convert Quest Ryd/bohr to LAMMPS eV/Angstrom
char **flines = NULL;
double **fquest = NULL;
if (info->me == 0) {
fquest = info->memory->create_2d_double_array(natoms,3,"lmpqst:fquest");
flines = new char*[natoms];
for (i = 0; i < natoms; i++) flines[i] = new char[128];
}
if (info->me == 0) {
system("rm lcao.*");
sprintf(str,"cp %s lcao.in",info->quest_input);
system(str);
sprintf(str,"cp %s lcao.x",QUOTE(QUEST));
system(str);
replace("lcao.in","primitive lattice vectors",3,boxlines);
replace("lcao.in","atom, type, position vector",natoms,xlines);
system("lcao.x > lcao.screen");
extract("lcao.screen","atom x force "
"y force z force",natoms,flines);
int itmp;
for (i = 0; i < natoms; i++)
sscanf(flines[i],"%d %lg %lg %lg",&itmp,
&fquest[i][0],&fquest[i][1],&fquest[i][2]);
for (i = 0; i < natoms; i++) {
fquest[i][0] *= EV_per_RYDBERG / ANGSTROM_per_BOHR;
fquest[i][1] *= EV_per_RYDBERG / ANGSTROM_per_BOHR;
fquest[i][2] *= EV_per_RYDBERG / ANGSTROM_per_BOHR;
}
}
// convert fquest on one proc into f for atoms on each proc
One2Many *qst2lmp = new One2Many(MPI_COMM_WORLD);
qst2lmp->setup(natoms,nlocal,id);
double *fvec = NULL;
if (f) fvec = &f[0][0];
if (info->me == 0) qst2lmp->scatter(&fquest[0][0],3,fvec);
else qst2lmp->scatter(NULL,3,fvec);
// clean up
// some data only exists on proc 0
delete lmp2qst;
delete qst2lmp;
info->memory->destroy_2d_double_array(xquest);
info->memory->destroy_2d_double_array(fquest);
if (boxlines) {
for (i = 0; i < 3; i++) delete [] boxlines[i];
delete [] boxlines;
}
if (xlines) {
for (i = 0; i < natoms; i++) delete [] xlines[i];
delete [] xlines;
}
if (flines) {
for (i = 0; i < natoms; i++) delete [] flines[i];
delete [] flines;
}
}

View File

@ -1,58 +0,0 @@
LAMMPS (20 Sep 2010)
# LAMMPS input for coupling MD/Quantum
units metal
dimension 3
atom_style atomic
atom_modify sort 0 0.0
lattice diamond 5.43
Lattice spacing in x,y,z = 5.43 5.43 5.43
region box block 0 1 0 1 0 1
create_box 1 box
Created orthogonal box = (0 0 0) to (5.43 5.43 5.43)
1 by 1 by 1 processor grid
create_atoms 1 box
Created 8 atoms
mass 1 28.08
velocity all create 300.0 87293 loop geom
fix 1 all nve
fix 2 all external
dump 1 all custom 1 dump.md id type x y z fx fy fz
thermo 1
run 10
Memory usage per processor = 1.25982 Mbytes
Step Temp E_pair E_mol TotEng Press
0 300 0 0 0.2714463 1810.9378
1 298.22165 0 0 0.26983722 1800.2029
2 293.2839 0 0 0.26536943 1770.3964
3 286.18537 0 0 0.25894654 1727.5464
4 277.61576 0 0 0.25119258 1675.8163
5 267.3325 0 0 0.24188807 1613.7418
6 254.94702 0 0 0.23068142 1538.9774
7 240.91176 0 0 0.21798202 1454.2541
8 226.27996 0 0 0.20474287 1365.9298
9 212.1059 0 0 0.19191788 1280.3687
10 199.27609 0 0 0.18030919 1202.922
Loop time of 80.663 on 1 procs for 10 steps with 8 atoms
Pair time (%) = 0 (0)
Neigh time (%) = 0 (0)
Comm time (%) = 4.91142e-05 (6.08882e-05)
Outpt time (%) = 0.00111485 (0.0013821)
Other time (%) = 80.6618 (99.9986)
Nlocal: 8 ave 8 max 8 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 10 ave 10 max 10 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 0 ave 0 max 0 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 0
Ave neighs/atom = 0
Neighbor list builds = 0
Dangerous builds = 0

View File

@ -1,58 +0,0 @@
LAMMPS (20 Sep 2010)
# LAMMPS input for coupling MD/Quantum
units metal
dimension 3
atom_style atomic
atom_modify sort 0 0.0
lattice diamond 5.43
Lattice spacing in x,y,z = 5.43 5.43 5.43
region box block 0 1 0 1 0 1
create_box 1 box
Created orthogonal box = (0 0 0) to (5.43 5.43 5.43)
1 by 2 by 2 processor grid
create_atoms 1 box
Created 8 atoms
mass 1 28.08
velocity all create 300.0 87293 loop geom
fix 1 all nve
fix 2 all external
dump 1 all custom 1 dump.md id type x y z fx fy fz
thermo 1
run 10
Memory usage per processor = 1.25928 Mbytes
Step Temp E_pair E_mol TotEng Press
0 300 0 0 0.2714463 1810.9378
1 298.22166 0 0 0.26983722 1800.2029
2 293.28391 0 0 0.26536944 1770.3964
3 286.18538 0 0 0.25894655 1727.5464
4 277.61578 0 0 0.25119259 1675.8164
5 267.33252 0 0 0.24188809 1613.7419
6 254.94703 0 0 0.23068143 1538.9774
7 240.91175 0 0 0.21798202 1454.254
8 226.27997 0 0 0.20474287 1365.9299
9 212.10594 0 0 0.19191791 1280.3689
10 199.27613 0 0 0.18030923 1202.9223
Loop time of 79.8256 on 4 procs for 10 steps with 8 atoms
Pair time (%) = 0 (0)
Neigh time (%) = 0 (0)
Comm time (%) = 0.000365376 (0.000457718)
Outpt time (%) = 0.00169969 (0.00212925)
Other time (%) = 79.8236 (99.9974)
Nlocal: 2 ave 2 max 2 min
Histogram: 4 0 0 0 0 0 0 0 0 0
Nghost: 5 ave 5 max 5 min
Histogram: 4 0 0 0 0 0 0 0 0 0
Neighs: 0 ave 0 max 0 min
Histogram: 4 0 0 0 0 0 0 0 0 0
Total # of neighbors = 0
Ave neighs/atom = 0
Neighbor list builds = 0
Dangerous builds = 0

View File

@ -1 +0,0 @@
#define QUEST /home/sjplimp/csrf/quest/src/lcao.x

View File

@ -1,161 +0,0 @@
do setup
do iters
do force
no relax
setup data
title
Si 1x1x1 unit cell
functional
PBE
dimensions of system (0=cluster ... 3=bulk)
3
primitive lattice vectors
10.261212 0.000000 0.000000
0.000000 10.261212 0.000000
0.000000 0.000000 10.261212
grid dimensions
10 10 10
atom types
1
type number, label:
1 Si_pbe
notes5
Originally constructed by Peter A. Schultz, 12Apr01
potential generated by new Hamann program PUNSLDX
Cite use with: D.R. Hamann, unpublished.
Potential: "standard" setting out to l=2
Basis: amended Jun05 for better (2d/1d not 1d/1d) d-function
effective nuclear charge (s2p2 to 10.0)
4.00000000d+00
pseudopotentials: Lmax, and effective gaussian range
2 0.86000000d+00
functional type used in generating potential:
PBE
radial mesh: number of points for local and non-local pot integrals
80 67
mesh points for nuclear potential; ham2dh
0.02500000 0.02696978 0.02909477 0.03138719 0.03386023 0.03652812
0.03940622 0.04251109 0.04586060 0.04947402 0.05337215 0.05757741
0.06211402 0.06700807 0.07228773 0.07798338 0.08412779 0.09075634
0.09790716 0.10562140 0.11394345 0.12292121 0.13260635 0.14305458
0.15432605 0.16648562 0.17960325 0.19375443 0.20902061 0.22548964
0.24325628 0.26242278 0.28309943 0.30540522 0.32946852 0.35542780
0.38343245 0.41364362 0.44623518 0.48139466 0.51932441 0.56024270
0.60438500 0.65200533 0.70337773 0.75879783 0.81858456 0.88308197
0.95266121 1.02772271 1.10869840 1.19605428 1.29029305 1.39195702
1.50163124 1.61994684 1.74758469 1.88527930 2.03382306 2.19407079
2.36694466 2.55343950 2.75462852 2.97166951 3.20581145 3.45840177
3.73089402 4.02485632 4.34198031 4.68409093 5.05315693 5.45130215
5.88081777 6.34417553 6.84404189 7.38329340 7.96503329 8.59260927
9.26963282 10.00000000
radwts: weights for radial points
0.00189603 0.00204542 0.00220659 0.00238045 0.00256800 0.00277034
0.00298862 0.00322410 0.00347813 0.00375218 0.00404781 0.00436675
0.00471081 0.00508198 0.00548240 0.00591436 0.00638036 0.00688308
0.00742541 0.00801047 0.00864162 0.00932251 0.01005704 0.01084945
0.01170429 0.01262649 0.01362135 0.01469459 0.01585240 0.01710143
0.01844888 0.01990249 0.02147064 0.02316234 0.02498733 0.02695611
0.02908002 0.03137128 0.03384307 0.03650961 0.03938625 0.04248955
0.04583736 0.04944895 0.05334510 0.05754823 0.06208254 0.06697411
0.07225109 0.07794385 0.08408515 0.09071034 0.09785753 0.10556786
0.11388570 0.12285891 0.13253914 0.14298208 0.15424783 0.16640123
0.17951222 0.19365623 0.20891467 0.22537535 0.24313298 0.26228977
0.28295594 0.30525043 0.32930153 0.35524766 0.38323811 0.41343397
0.44600900 0.48115067 0.51906119 0.55995874 0.60407867 0.65167486
0.70302122 0.75841323
non-local potential: l,potential*integration weight
0 0.62022930 0.62128855 0.62243016 0.62366033 0.62498568 0.62641328
0.62795061 0.62960563 0.63138673 0.63330275 0.63536294 0.63757692
0.63995464 0.64250630 0.64524218 0.64817253 0.65130735 0.65465605
0.65822713 0.66202767 0.66606269 0.67033437 0.67484108 0.67957602
0.68452576 0.68966817 0.69497006 0.70038419 0.70584566 0.71126756
0.71653578 0.72150290 0.72598113 0.72973436 0.73246932 0.73382636
0.73337030 0.73058243 0.72485505 0.71549107 0.70171167 0.68267654
0.65752236 0.62542611 0.58570073 0.53792896 0.48213811 0.41900888
0.35009536 0.27800640 0.20646172 0.14009458 0.08384960 0.04186877
0.01596164 0.00423035 0.00115036 0.00066636 0.00047879 0.00029939
0.00016329 0.00007995 0.00003517 0.00001362 0.00000445 0.00000111
0.00000016 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
0.00000000 0.00000000
non-local potential: l,potential*integration weight
1 0.59551624 0.59463303 0.59368033 0.59265268 0.59154422 0.59034862
0.58905906 0.58766819 0.58616811 0.58455033 0.58280567 0.58092430
0.57889565 0.57670833 0.57435015 0.57180802 0.56906791 0.56611482
0.56293268 0.55950435 0.55581158 0.55183493 0.54755377 0.54294628
0.53798942 0.53265896 0.52692951 0.52077458 0.51416671 0.50707751
0.49947790 0.49133817 0.48262822 0.47331766 0.46337588 0.45277197
0.44147437 0.42945016 0.41666374 0.40307468 0.38863443 0.37328165
0.35693601 0.33949042 0.32080256 0.30068740 0.27891443 0.25521609
0.22931791 0.20100526 0.17024474 0.13737521 0.10336405 0.07007167
0.04035673 0.01767907 0.00470635 0.00076638 0.00047880 0.00029939
0.00016329 0.00007995 0.00003517 0.00001362 0.00000445 0.00000111
0.00000016 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
0.00000000 0.00000000
non-local potential: l,potential*integration weight
2 0.56305372 0.55961728 0.55591134 0.55191498 0.54760572 0.54295941
0.53795013 0.53255008 0.52672947 0.52045641 0.51369682 0.50641433
0.49857022 0.49012333 0.48103004 0.47124429 0.46071759 0.44939919
0.43723624 0.42417413 0.41015690 0.39512792 0.37903070 0.36181001
0.34341340 0.32379300 0.30290805 0.28072780 0.25723539 0.23243242
0.20634465 0.17902876 0.15058041 0.12114359 0.09092117 0.06018665
0.02929636 -0.00129833 -0.03104046 -0.05926034 -0.08517498 -0.10789810
-0.12646610 -0.13988656 -0.14721657 -0.14767751 -0.14080976 -0.12666296
-0.10600305 -0.08049270 -0.05276798 -0.02629475 -0.00486427 0.00837657
0.01228139 0.00892332 0.00342796 0.00074936 0.00047880 0.00029939
0.00016329 0.00007995 0.00003517 0.00001362 0.00000445 0.00000111
0.00000016 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
0.00000000 0.00000000
number of radial functions **** Si PBE Ham-II basis 20Feb01-PAS ****
5
angular momentum, number of alphas
0 4
alphas - s - 4s/2/4s407 (bulk Si dzp Eopt+reopt c1)
0.10460000d+00 0.27226300d+00 1.30050800d+00 2.60103000d+00
wave function coefficients
0.20995300d+00 0.55978200d+00 -0.99128200d+00 0.33487100d+00
angular momentum, number of alphas
1 3
alphas - p - 3p/2/3p492 (bulk Si dzp Eopt + reopt c1)
0.09424100d+00 0.31767900d+00 1.56114500d+00
wave function coefficients
0.06761600d+00 0.31821200d+00 -0.06638300d+00
angular momentum, number of alphas
0 1
alphas - s - second zeta s polarization
0.10460000d+00
wave function coefficients
1.00000000d+00
angular momentum, number of alphas
1 1
alphas - p - second zeta p polarization
0.09424100d+00
wave function coefficients
1.00000000d+00
angular momentum, number of alphas
2 2
alphas - d - angular polarization (dzp Eopt)
0.32000000d+00 1.40000000d+00
wave function coefficients
0.31557000d+00 1.00000000d+00
shell occupancies for this silicon, Si: s(2.00)p(2.00)
2.00000000 2.00000000 0.00000000 0.00000000 0.00000000 0.00000000
end atom file
number of atoms in unit cell
8
atom, type, position vector
1 1 0.0000000000 0.0000000000 0.0000000000
2 1 5.1306060590 5.1306060590 0.0000000000
3 1 5.1306060590 0.0000000000 5.1306060590
4 1 0.0000000000 5.1306060590 5.1306060590
5 1 2.5653030295 2.5653030295 2.5653030295
6 1 7.6959090885 7.6959090885 2.5653030295
7 1 7.6959090885 2.5653030295 7.6959090885
8 1 2.5653030295 7.6959090885 7.6959090885
kgrid
0 0 0
end setup phase data
run phase input data
end of run phase data

View File

@ -2,18 +2,20 @@
SHELL = /bin/sh
# Paths to your local LAMMPS and SPPARKS home directories
LAMMPS = /home/sjplimp/lammps/git
SPPARKS = /home/sjplimp/spparks/git
# System-specific settings
LAMMPS = /home/sjplimp/lammps
SPPARKS = /home/sjplimp/spparks
CC = g++
CC = mpicxx
CCFLAGS = -g -O -DMPICH_IGNORE_CXX_SEEK -I../library
DEPFLAGS = -M
LINK = g++
LINK = mpicxx
LINKFLAGS = -g -O -L../library -L${LAMMPS}/src -L${SPPARKS}/src
USRLIB = -lcouple -llmp_g++ -lspk_g++
SYSLIB = -lfftw -lmpich -lpthread
USRLIB = -lcouple -llammps_mpi -lspparks_mpi
SYSLIB =
ARCHIVE = ar
ARFLAGS = -rc
SIZE = size

View File

@ -1,44 +1,67 @@
IMPORTANT NOTE: This example has not been updated since 2013,
so it is not likely to work anymore out of the box. There have
been changes to LAMMPS and its library interface that would need
to be applied. Please see the manual for the documentation of
the library interface.
This directory has an application that models grain growth in the
presence of strain.
The grain growth is simulated by a Potts model in a kinetic Monte
Carlo code SPPARKS. Clusters of like spins on a lattice represent
grains. The Hamiltonian for the energy due of a collection of spins
includes a strain term and is described on this page in the SPPARKS
documentation:
The grain growth is simulated by a Potts model in the kinetic Monte
Carlo code SPPARKS -- https://spparks.github.io
http://spparks.sandia.gov/doc/app_potts_strain.html.
Clusters of like spins on a lattice represent grains. The Hamiltonian
for the energy due of a collection of spins includes a strain term and
is described on this page in the SPPARKS documentation:
The strain is computed by the molecular dynamics code LAMMPS as a
particle displacement where pairs of atoms across a grain boundary are
of different types and thus push off from each other due to a
Lennard-Jones sigma between particles of different types that is
larger than the sigma between particles of the same type (interior to
grains).
https://spparks.github.io/doc/app_potts_strain.html
The strain is computed by the LAMMPS molecular dynamics code --
https://www.lammps.org -- as a particle displacement where pairs of
atoms across a grain boundary are of different types and thus push off
from each other due to a Lennard-Jones sigma between particles of
different types that is larger than the sigma between particles of the
same type (interior to grains).
lmpspk.cpp main program
it links LAMMPS and SPPARKS as libraries
it links to LAMMPS and SPPARKS as libraries
in.spparks SPPARKS input script, without the run command
lmppath.h contains path to LAMMPS home directory
spkpath.h contains path to SPPARKS home directory
After editing the Makefile, lmppath.h, and spkpath.h to make them
suitable for your box, type:
-----------------------------------
make -f Makefile.g++
(1) To build and run this coupled application, you must have SPPARKS
built on your system. It's WWW site is https://spparks.github.io and
it can be downloaded as a tarball or cloned as a local Git repo.
and you should get the lmpspk executable.
To build SPPARKS, do the following:
NOTE: To build and run this coupled application, you must of course,
have SPPARKS built on your system. It's WWW site is
http://www.sandia.gov/~sjplimp/spparks.html. It is an open-source
code, written by two of the LAMMPS authors.
% cd spparks/src
% make mpi
% make mode=lib mpi # build SPPARKS as a library
-----------------------------------
(2) You must also build the coupling library in
lammps/examples/COUPLE/library.
To build the coupling library, do the following:
% cd lammps/examples/COUPLE/library
% make -f Makefile.mpi
-----------------------------------
(3) Edit the Makefile.mpi, lmppath.h, and spkpath.h files in this
directory to make them suitable for your box. Each of the 3 files
has a comment telling you what to do.
-----------------------------------
(4) Build the coupled lmpspk application in this directory.
% make -f Makefile.mpi
This should give you a lmpspk executable.
-----------------------------------
(5) Run the test simulation
You can run lmpspk in serial or parallel as:
@ -52,7 +75,7 @@ Ndelta = time to run MC in each iteration
Sfactor = multiplier on strain effect
in.spparks = SPPARKS input script
The log files are for this run:
The log files included in this directory are for this run:
% lmpspk 20 10.0 1 in.spparks
@ -70,11 +93,15 @@ The driver code launches both SPPARKS and LAMMPS in parallel and they
both decompose their spatial domains in the same manner. The datums
in SPPARKS (lattice sites) are the same as the datums in LAMMPS
(coarse-grained particles). If this were not the case, more
sophisticated inter-code communication could be performed.
sophisticated inter-code communication could be performed. Note that
the in.lammps and data.lammps files are not inputs; they are generated
by the lmpspk driver.
You can look at the log files in the directory to see sample LAMMPS
and SPPARKS output for this simulation. Dump files produced by the
run are stored as dump.mc and dump.md. The image*.png files show
snapshots from both the LAMMPS and SPPARKS output. Note that the
in.lammps and data.lammps files are not inputs; they are generated by
the lmpspk driver.
You can look at the log files in the directory to see LAMMPS and
SPPARKS output for this simulation run on 1 and 4 processors. Dump
files produced by the run are named dump.mc and dump.md. The image
PPM files show snapshots from the SPPARKS and LAMMPS output. Compare
the image_spparks.0019.ppm and image_lammps.0190.ppm file. They were
written at the same point in the simulation by both codes. The color
maps for the 2 codes are not the same, but the morphology of the
grains is.

View File

@ -111,4 +111,6 @@ pair_coeff 100 100 1.0 1.0
compute da all displace/atom
dump 1 all atom 10 dump.md
dump 2 all image 10 image_lammps.*.ppm type type zoom 1.6
dump_modify 2 pad 4 acolor * red/green/blue/aqua/magenta/yellow
thermo 1

View File

@ -20,4 +20,8 @@ diag_style energy
temperature 1.0
stats 10.0
dump 1 10.0 dump.mc
dump 1 text 10.0 dump.mc id site x y
dump 2 image 1000 image_spparks.*.ppm site site view 0 0 box no 0.1 &
crange 1 100 drange 1 1 shape cube zoom 1.5 size 512 512
dump_modify 2 pad 4

View File

@ -1 +1,3 @@
#define LMPPATH /home/sjplimp/lammps
// path to your LAMMPS home directory
#define LMPPATH /home/sjplimp/lammps/git

View File

@ -14,8 +14,8 @@
#include "lammps_data_write.h"
#include "many2many.h"
#include "memory.h"
#include "error.h"
#include "memorylib.h"
#include "errorlib.h"
#define QUOTE_(x) #x
#define QUOTE(x) QUOTE_(x)
@ -51,8 +51,8 @@ int main(int narg, char **arg)
MPI_Comm_rank(comm,&me);
MPI_Comm_size(comm,&nprocs);
Memory *memory = new Memory(comm);
Error *error = new Error(comm);
MemoryLib *memory = new MemoryLib(comm);
ErrorLib *error = new ErrorLib(comm);
// command-line args
@ -83,28 +83,28 @@ int main(int narg, char **arg)
double **xyz;
double *strain;
dimension = *((int *) spparks_extract(spk,"dimension"));
nglobal = *((int *) spparks_extract(spk,"nglobal"));
nlocal_spparks = *((int *) spparks_extract(spk,"nlocal"));
dimension = *((int *) spparks_extract(spk,(char *) "dimension"));
nglobal = *((int *) spparks_extract(spk,(char *) "nglobal"));
nlocal_spparks = *((int *) spparks_extract(spk,(char *) "nlocal"));
boxxlo = *((double *) spparks_extract(spk,"boxxlo"));
boxxhi = *((double *) spparks_extract(spk,"boxxhi"));
boxylo = *((double *) spparks_extract(spk,"boxylo"));
boxyhi = *((double *) spparks_extract(spk,"boxyhi"));
boxxlo = *((double *) spparks_extract(spk,(char *) "boxxlo"));
boxxhi = *((double *) spparks_extract(spk,(char *) "boxxhi"));
boxylo = *((double *) spparks_extract(spk,(char *) "boxylo"));
boxyhi = *((double *) spparks_extract(spk,(char *) "boxyhi"));
if (dimension == 3) {
boxzlo = *((double *) spparks_extract(spk,"boxzlo"));
boxzhi = *((double *) spparks_extract(spk,"boxzhi"));
boxzlo = *((double *) spparks_extract(spk,(char *) "boxzlo"));
boxzhi = *((double *) spparks_extract(spk,(char *) "boxzhi"));
} else {
boxzlo = -0.5;
boxzhi = 0.5;
}
id_spparks = (int *) spparks_extract(spk,"id");
spins = (int *) spparks_extract(spk,"site");
xyz = (double **) spparks_extract(spk,"xyz");
id_spparks = (int *) spparks_extract(spk,(char *) "id");
spins = (int *) spparks_extract(spk,(char *) "site");
xyz = (double **) spparks_extract(spk,(char *) "xyz");
nspins = *((int *) spparks_extract(spk,"nspins"));
strain = (double *) spparks_extract(spk,"strain");
nspins = *((int *) spparks_extract(spk,(char *) "nspins"));
strain = (double *) spparks_extract(spk,(char *) "strain");
// write a LAMMPS input script using SPPARKS params
@ -114,7 +114,7 @@ int main(int narg, char **arg)
fprintf(fp,"units lj\n");
sprintf(str,"dimension %d\n",dimension);
fprintf(fp,str);
fprintf(fp,"%s",str);
fprintf(fp,"atom_style atomic\n\n");
fprintf(fp,"read_data data.lammps\n");
@ -124,12 +124,14 @@ int main(int narg, char **arg)
fprintf(fp,"pair_coeff * * 1.0 1.2\n");
for (i = 0; i < nspins; i++) {
sprintf(str,"pair_coeff %d %d 1.0 1.0\n",i+1,i+1);
fprintf(fp,str);
fprintf(fp,"%s",str);
}
fprintf(fp,"\n");
fprintf(fp,"compute da all displace/atom\n\n");
fprintf(fp,"dump 1 all atom 10 dump.md\n");
fprintf(fp,"dump 2 all image 10 image_lammps.*.ppm type type zoom 1.6\n");
fprintf(fp,"dump_modify 2 pad 4 acolor * red/green/blue/aqua/magenta/yellow\n");
fprintf(fp,"thermo 1\n");
fclose(fp);
@ -138,12 +140,12 @@ int main(int narg, char **arg)
// write a LAMMPS data file using SPPARKS data
LAMMPSDataWrite *lwd = new LAMMPSDataWrite(MPI_COMM_WORLD);
lwd->file("data.lammps");
lwd->header("%d atoms",nglobal);
lwd->header("%d atom types",nspins);
lwd->header("%g %g xlo xhi",boxxlo,boxxhi);
lwd->header("%g %g ylo yhi",boxylo,boxyhi);
lwd->header("%g %g zlo zhi",boxzlo,boxzhi);
lwd->file((char *) "data.lammps");
lwd->header((char *) "%d atoms",nglobal);
lwd->header((char *) "%d atom types",nspins);
lwd->header((char *) "%g %g xlo xhi",boxxlo,boxxhi);
lwd->header((char *) "%g %g ylo yhi",boxylo,boxyhi);
lwd->header((char *) "%g %g zlo zhi",boxzlo,boxzhi);
lwd->atoms(nlocal_spparks);
lwd->atoms(id_spparks);
lwd->atoms(spins);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
SPPARKS (26 Aug 2010)
SPPARKS (19 Sept 2022)
# SPPARKS input for coupling MD/MC
seed 56789
@ -28,244 +28,246 @@ diag_style energy
temperature 1.0
stats 10.0
dump 1 10.0 dump.mc
dump 1 text 10.0 dump.mc id site x y
run 10Setting up run ...
Running with 32-bit site IDs
Memory usage per processor = 2.375 Mbytes
Time Naccept Nreject Nsweeps CPU Energy
0 0 0 0 0 19766
10 17929 0 0 0.0776 5324
Loop time of 0.077626 on 1 procs
10 18978 0 13 0.0259 5500
Loop time of 0.0258905 on 1 procs
Solve time (%) = 0.0070138 (9.03537)
Solve time (%) = 0.00155363 (6.00079)
Update time (%) = 0 (0)
Comm time (%) = 0.00146031 (1.88122)
Outpt time (%) = 0.00415015 (5.34634)
App time (%) = 0.0614648 (79.1807)
Other time (%) = 0.00353694 (4.55639)
Comm time (%) = 0.000642316 (2.4809)
Outpt time (%) = 0.000680321 (2.62769)
App time (%) = 0.0226682 (87.5542)
Other time (%) = 0.000346003 (1.33641)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
10 17929 0 0 0 5324
20 24582 0 0 0.0279 4750
Loop time of 0.027904 on 1 procs
10 18978 0 13 0 5500
20 25374 0 18 0.00709 4552
Loop time of 0.00708869 on 1 procs
Solve time (%) = 0.00271416 (9.72676)
Solve time (%) = 0.000496193 (6.99978)
Update time (%) = 0 (0)
Comm time (%) = 0.000461817 (1.65502)
Outpt time (%) = 0.0042181 (15.1165)
App time (%) = 0.0191288 (68.5521)
Other time (%) = 0.00138116 (4.94967)
Comm time (%) = 0.000158039 (2.22945)
Outpt time (%) = 0.0006739 (9.50669)
App time (%) = 0.00564639 (79.6535)
Other time (%) = 0.000114167 (1.61055)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
20 24582 0 0 0 4750
30 30109 0 0 0.0234 4264
Loop time of 0.023375 on 1 procs
20 25374 0 18 0 4552
30 30752 0 23 0.00575 4096
Loop time of 0.00575649 on 1 procs
Solve time (%) = 0.00216675 (9.2695)
Solve time (%) = 0.000415252 (7.21363)
Update time (%) = 0 (0)
Comm time (%) = 0.000342846 (1.46672)
Outpt time (%) = 0.00416183 (17.8046)
App time (%) = 0.015563 (66.5796)
Other time (%) = 0.00114059 (4.87954)
Comm time (%) = 0.00013092 (2.2743)
Outpt time (%) = 0.000662723 (11.5126)
App time (%) = 0.00445117 (77.3244)
Other time (%) = 9.6422e-05 (1.67501)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
30 30109 0 0 0 4264
40 35032 0 0 0.0208 3880
Loop time of 0.020786 on 1 procs
30 30752 0 23 0 4096
40 35529 0 27 0.00589 3596
Loop time of 0.00589801 on 1 procs
Solve time (%) = 0.0019896 (9.57182)
Solve time (%) = 0.000424563 (7.19841)
Update time (%) = 0 (0)
Comm time (%) = 0.000316858 (1.52438)
Outpt time (%) = 0.00413609 (19.8984)
App time (%) = 0.0132952 (63.962)
Other time (%) = 0.00104833 (5.04341)
Comm time (%) = 0.000114131 (1.93508)
Outpt time (%) = 0.000763593 (12.9466)
App time (%) = 0.0044969 (76.2443)
Other time (%) = 9.8828e-05 (1.67562)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
40 35032 0 0 0 3880
50 39543 0 0 0.0193 3784
Loop time of 0.0193491 on 1 procs
40 35529 0 27 0 3596
50 39736 0 31 0.00444 3298
Loop time of 0.00444854 on 1 procs
Solve time (%) = 0.00185919 (9.60865)
Solve time (%) = 0.000323247 (7.26637)
Update time (%) = 0 (0)
Comm time (%) = 0.000333071 (1.72138)
Outpt time (%) = 0.00412297 (21.3083)
App time (%) = 0.0120728 (62.3946)
Other time (%) = 0.000961065 (4.96698)
Comm time (%) = 9.6777e-05 (2.17548)
Outpt time (%) = 0.000637529 (14.3312)
App time (%) = 0.00331502 (74.5193)
Other time (%) = 7.5967e-05 (1.70769)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
50 39543 0 0 0 3784
60 43899 0 0 0.0187 3706
Loop time of 0.018713 on 1 procs
50 39736 0 31 0 3298
60 43567 0 35 0.00507 3296
Loop time of 0.0050729 on 1 procs
Solve time (%) = 0.00176001 (9.40526)
Solve time (%) = 0.000354098 (6.98019)
Update time (%) = 0 (0)
Comm time (%) = 0.000314474 (1.68051)
Outpt time (%) = 0.00413895 (22.118)
App time (%) = 0.0116153 (62.0706)
Other time (%) = 0.000884295 (4.72556)
Comm time (%) = 0.000114818 (2.26336)
Outpt time (%) = 0.000893366 (17.6106)
App time (%) = 0.00362051 (71.3697)
Other time (%) = 9.0105e-05 (1.7762)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
60 43899 0 0 0 3706
70 48028 0 0 0.0179 3392
Loop time of 0.0178769 on 1 procs
60 43567 0 35 0 3296
70 47305 0 39 0.00417 3174
Loop time of 0.00417405 on 1 procs
Solve time (%) = 0.00174618 (9.76781)
Solve time (%) = 0.00030627 (7.33747)
Update time (%) = 0 (0)
Comm time (%) = 0.000296593 (1.65909)
Outpt time (%) = 0.00414801 (23.2032)
App time (%) = 0.0108221 (60.5367)
Other time (%) = 0.000864029 (4.83322)
Comm time (%) = 9.1156e-05 (2.18387)
Outpt time (%) = 0.000689193 (16.5114)
App time (%) = 0.00301511 (72.2347)
Other time (%) = 7.232e-05 (1.73261)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
70 48028 0 0 0 3392
80 51900 0 0 0.017 3208
Loop time of 0.0169971 on 1 procs
70 47305 0 39 0 3174
80 51214 0 43 0.00437 3252
Loop time of 0.00437516 on 1 procs
Solve time (%) = 0.00157022 (9.23819)
Solve time (%) = 0.000332427 (7.59805)
Update time (%) = 0 (0)
Comm time (%) = 0.000290394 (1.70849)
Outpt time (%) = 0.00416803 (24.522)
App time (%) = 0.0101995 (60.0076)
Other time (%) = 0.0007689 (4.52371)
Comm time (%) = 9.1593e-05 (2.09348)
Outpt time (%) = 0.00064481 (14.738)
App time (%) = 0.00323051 (73.8375)
Other time (%) = 7.5822e-05 (1.73301)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
80 51900 0 0 0 3208
90 55450 0 0 0.0159 3162
Loop time of 0.0158761 on 1 procs
80 51214 0 43 0 3252
90 54863 0 47 0.00417 3016
Loop time of 0.00417621 on 1 procs
Solve time (%) = 0.0014894 (9.38143)
Solve time (%) = 0.000285188 (6.82887)
Update time (%) = 0 (0)
Comm time (%) = 0.000301123 (1.89671)
Outpt time (%) = 0.00413799 (26.0644)
App time (%) = 0.00924802 (58.2514)
Other time (%) = 0.00069952 (4.40613)
Comm time (%) = 9.0115e-05 (2.15782)
Outpt time (%) = 0.000719767 (17.2349)
App time (%) = 0.00301373 (72.1642)
Other time (%) = 6.7413e-05 (1.61421)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
90 55450 0 0 0 3162
100 59009 0 0 0.0158 3038
Loop time of 0.0158172 on 1 procs
90 54863 0 47 0 3016
100 58060 0 51 0.00369 2766
Loop time of 0.00369187 on 1 procs
Solve time (%) = 0.00142503 (9.00938)
Solve time (%) = 0.000253511 (6.86674)
Update time (%) = 0 (0)
Comm time (%) = 0.000296831 (1.87664)
Outpt time (%) = 0.00412178 (26.0589)
App time (%) = 0.00923729 (58.4004)
Other time (%) = 0.000736237 (4.65467)
Comm time (%) = 8.878e-05 (2.40475)
Outpt time (%) = 0.000686238 (18.5878)
App time (%) = 0.00260318 (70.5111)
Other time (%) = 6.0163e-05 (1.62961)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
100 59009 0 0 0 3038
110 62454 0 0 0.0155 3066
Loop time of 0.015537 on 1 procs
100 58060 0 51 0 2766
110 61110 0 55 0.00349 2840
Loop time of 0.00349695 on 1 procs
Solve time (%) = 0.00135612 (8.72834)
Solve time (%) = 0.000239587 (6.85131)
Update time (%) = 0 (0)
Comm time (%) = 0.000293732 (1.89053)
Outpt time (%) = 0.00415182 (26.7221)
App time (%) = 0.00904965 (58.2457)
Other time (%) = 0.000685692 (4.41328)
Comm time (%) = 8.1517e-05 (2.33109)
Outpt time (%) = 0.000719507 (20.5753)
App time (%) = 0.0023994 (68.614)
Other time (%) = 5.6943e-05 (1.62836)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
110 62454 0 0 0 3066
120 65856 0 0 0.0152 2898
Loop time of 0.0152211 on 1 procs
110 61110 0 55 0 2840
120 64087 0 59 0.00325 2714
Loop time of 0.00324861 on 1 procs
Solve time (%) = 0.00139046 (9.13505)
Solve time (%) = 0.000225271 (6.93437)
Update time (%) = 0 (0)
Comm time (%) = 0.000291109 (1.91253)
Outpt time (%) = 0.0041492 (27.2595)
App time (%) = 0.00871038 (57.2257)
Other time (%) = 0.00067997 (4.46728)
Comm time (%) = 8.3445e-05 (2.56863)
Outpt time (%) = 0.000647543 (19.9329)
App time (%) = 0.00223748 (68.8748)
Other time (%) = 5.4877e-05 (1.68924)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
120 65856 0 0 0 2898
130 68856 0 0 0.0137 2798
Loop time of 0.0137191 on 1 procs
120 64087 0 59 0 2714
130 67004 0 63 0.00333 2664
Loop time of 0.00333198 on 1 procs
Solve time (%) = 0.00130701 (9.52695)
Solve time (%) = 0.00022963 (6.89169)
Update time (%) = 0 (0)
Comm time (%) = 0.000296831 (2.16364)
Outpt time (%) = 0.00412989 (30.1032)
App time (%) = 0.00742817 (54.1448)
Other time (%) = 0.000557184 (4.06138)
Comm time (%) = 9.0368e-05 (2.71214)
Outpt time (%) = 0.000650383 (19.5194)
App time (%) = 0.00230627 (69.2163)
Other time (%) = 5.5328e-05 (1.66051)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
130 68856 0 0 0 2798
140 71967 0 0 0.0141 2700
Loop time of 0.0141542 on 1 procs
130 67004 0 63 0 2664
140 69933 0 67 0.00324 2680
Loop time of 0.00324401 on 1 procs
Solve time (%) = 0.00132799 (9.38232)
Solve time (%) = 0.000227399 (7.00982)
Update time (%) = 0 (0)
Comm time (%) = 0.000284195 (2.00785)
Outpt time (%) = 0.00414681 (29.2974)
App time (%) = 0.00777125 (54.9042)
Other time (%) = 0.000623941 (4.40817)
Comm time (%) = 8.818e-05 (2.71824)
Outpt time (%) = 0.000638812 (19.6921)
App time (%) = 0.00223398 (68.8649)
Other time (%) = 5.5635e-05 (1.71501)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
140 71967 0 0 0 2700
150 74773 0 0 0.0132 2644
Loop time of 0.0131881 on 1 procs
140 69933 0 67 0 2680
150 72830 0 71 0.00314 2664
Loop time of 0.0031476 on 1 procs
Solve time (%) = 0.00111961 (8.48956)
Solve time (%) = 0.000213509 (6.78324)
Update time (%) = 0 (0)
Comm time (%) = 0.000277758 (2.10612)
Outpt time (%) = 0.00413394 (31.3459)
App time (%) = 0.00711513 (53.951)
Other time (%) = 0.000541687 (4.10738)
Comm time (%) = 8.6263e-05 (2.7406)
Outpt time (%) = 0.000676177 (21.4823)
App time (%) = 0.00211915 (67.326)
Other time (%) = 5.2495e-05 (1.66778)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
150 74773 0 0 0 2644
160 77662 0 0 0.0134 2616
Loop time of 0.0133891 on 1 procs
150 72830 0 71 0 2664
160 75877 0 75 0.00386 2640
Loop time of 0.00386614 on 1 procs
Solve time (%) = 0.00116301 (8.68621)
Solve time (%) = 0.000262699 (6.79487)
Update time (%) = 0 (0)
Comm time (%) = 0.00027895 (2.08341)
Outpt time (%) = 0.00415397 (31.025)
App time (%) = 0.00725079 (54.1544)
Other time (%) = 0.000542402 (4.05107)
Comm time (%) = 0.000115859 (2.99676)
Outpt time (%) = 0.000745615 (19.2858)
App time (%) = 0.00267785 (69.2643)
Other time (%) = 6.4111e-05 (1.65827)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
160 77662 0 0 0 2616
170 80475 0 0 0.0131 2538
Loop time of 0.0130939 on 1 procs
160 75877 0 75 0 2640
170 78733 0 79 0.00555 2486
Loop time of 0.0055484 on 1 procs
Solve time (%) = 0.00108457 (8.28296)
Solve time (%) = 0.000407211 (7.33925)
Update time (%) = 0 (0)
Comm time (%) = 0.000279665 (2.13583)
Outpt time (%) = 0.00412798 (31.5259)
App time (%) = 0.00700951 (53.5324)
Other time (%) = 0.000592232 (4.52294)
Comm time (%) = 0.000168943 (3.04489)
Outpt time (%) = 0.000823976 (14.8507)
App time (%) = 0.00404893 (72.9746)
Other time (%) = 9.9346e-05 (1.79053)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
170 80475 0 0 0 2538
180 83407 0 0 0.0136 2660
Loop time of 0.0136199 on 1 procs
170 78733 0 79 0 2486
180 81400 0 83 0.00291 2396
Loop time of 0.00291697 on 1 procs
Solve time (%) = 0.00117278 (8.61079)
Solve time (%) = 0.000197105 (6.75718)
Update time (%) = 0 (0)
Comm time (%) = 0.000262737 (1.92907)
Outpt time (%) = 0.00413108 (30.3312)
App time (%) = 0.0074532 (54.7229)
Other time (%) = 0.0006001 (4.40605)
Comm time (%) = 8.6733e-05 (2.97339)
Outpt time (%) = 0.000641861 (22.0044)
App time (%) = 0.00194335 (66.6221)
Other time (%) = 4.7923e-05 (1.6429)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
180 83407 0 0 0 2660
190 86407 0 0 0.0138 2656
Loop time of 0.013859 on 1 procs
180 81400 0 83 0 2396
190 84097 0 86 0.00291 2418
Loop time of 0.00290961 on 1 procs
Solve time (%) = 0.00119066 (8.59124)
Solve time (%) = 0.000198685 (6.82859)
Update time (%) = 0 (0)
Comm time (%) = 0.000247717 (1.7874)
Outpt time (%) = 0.00414801 (29.93)
App time (%) = 0.00767326 (55.3665)
Other time (%) = 0.000599384 (4.32486)
Comm time (%) = 6.5496e-05 (2.25103)
Outpt time (%) = 0.000671627 (23.0831)
App time (%) = 0.00192582 (66.1883)
Other time (%) = 4.7978e-05 (1.64895)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
190 86407 0 0 0 2656
200 88961 0 0 0.0124 2374
Loop time of 0.0124531 on 1 procs
190 84097 0 86 0 2418
200 86656 0 90 0.00332 2442
Loop time of 0.00332468 on 1 procs
Solve time (%) = 0.00107932 (8.6671)
Solve time (%) = 0.000220838 (6.64238)
Update time (%) = 0 (0)
Comm time (%) = 0.000233412 (1.87433)
Outpt time (%) = 0.00414777 (33.3072)
App time (%) = 0.00648117 (52.0447)
Other time (%) = 0.000511408 (4.10668)
Comm time (%) = 9.3912e-05 (2.82469)
Outpt time (%) = 0.000744786 (22.4017)
App time (%) = 0.00221113 (66.5064)
Other time (%) = 5.402e-05 (1.62482)

View File

@ -1,4 +1,4 @@
SPPARKS (26 Aug 2010)
SPPARKS (19 Sept 2022)
# SPPARKS input for coupling MD/MC
seed 56789
@ -28,244 +28,246 @@ diag_style energy
temperature 1.0
stats 10.0
dump 1 10.0 dump.mc
dump 1 text 10.0 dump.mc id site x y
run 10Setting up run ...
Running with 32-bit site IDs
Memory usage per processor = 2.375 Mbytes
Time Naccept Nreject Nsweeps CPU Energy
0 0 0 0 0 19766
10 18695 0 0 0.024 5696
Loop time of 0.0240365 on 4 procs
10 18709 0 14 0.00995 5410
Loop time of 0.00996147 on 4 procs
Solve time (%) = 0.0017997 (7.48737)
Solve time (%) = 0.000401817 (4.03371)
Update time (%) = 0 (0)
Comm time (%) = 0.00263286 (10.9536)
Outpt time (%) = 0.00416493 (17.3275)
App time (%) = 0.0137114 (57.044)
Other time (%) = 0.00172764 (7.18756)
Comm time (%) = 0.00184758 (18.5473)
Outpt time (%) = 0.000835493 (8.38724)
App time (%) = 0.00643178 (64.5665)
Other time (%) = 0.000444804 (4.46524)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
10 18695 0 0 0 5696
20 25730 0 0 0.0114 4806
Loop time of 0.0113776 on 4 procs
10 18709 0 14 0 5410
20 25405 0 20 0.00348 4414
Loop time of 0.00348928 on 4 procs
Solve time (%) = 0.000647247 (5.68877)
Solve time (%) = 0.000145149 (4.15985)
Update time (%) = 0 (0)
Comm time (%) = 0.0013088 (11.5033)
Outpt time (%) = 0.00417346 (36.6812)
App time (%) = 0.0045594 (40.0733)
Other time (%) = 0.000688732 (6.05338)
Comm time (%) = 0.000562263 (16.114)
Outpt time (%) = 0.0007944 (22.7669)
App time (%) = 0.00176801 (50.6697)
Other time (%) = 0.000219463 (6.28963)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
20 25730 0 0 0 4806
30 31377 0 0 0.00985 4308
Loop time of 0.00987101 on 4 procs
20 25405 0 20 0 4414
30 30724 0 25 0.00314 4092
Loop time of 0.00314216 on 4 procs
Solve time (%) = 0.000525832 (5.32704)
Solve time (%) = 0.000123228 (3.92176)
Update time (%) = 0 (0)
Comm time (%) = 0.0012235 (12.3949)
Outpt time (%) = 0.00415748 (42.1181)
App time (%) = 0.00343758 (34.825)
Other time (%) = 0.000526607 (5.33489)
Comm time (%) = 0.000561445 (17.8681)
Outpt time (%) = 0.00079681 (25.3586)
App time (%) = 0.00146373 (46.5835)
Other time (%) = 0.000196952 (6.26804)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
30 31377 0 0 0 4308
40 36311 0 0 0.0092 3840
Loop time of 0.00922179 on 4 procs
30 30724 0 25 0 4092
40 35289 0 30 0.00256 3496
Loop time of 0.0025659 on 4 procs
Solve time (%) = 0.000474155 (5.14168)
Solve time (%) = 9.47535e-05 (3.6928)
Update time (%) = 0 (0)
Comm time (%) = 0.00114667 (12.4344)
Outpt time (%) = 0.00414455 (44.943)
App time (%) = 0.00293165 (31.7905)
Other time (%) = 0.000524759 (5.69043)
Comm time (%) = 0.000508415 (19.8143)
Outpt time (%) = 0.000788757 (30.74)
App time (%) = 0.00106383 (41.4604)
Other time (%) = 0.000110143 (4.29259)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
40 36311 0 0 0 3840
50 40886 0 0 0.00891 3534
Loop time of 0.0089252 on 4 procs
40 35289 0 30 0 3496
50 39511 0 35 0.00252 3294
Loop time of 0.00252512 on 4 procs
Solve time (%) = 0.000433862 (4.86109)
Solve time (%) = 8.7092e-05 (3.44903)
Update time (%) = 0 (0)
Comm time (%) = 0.00113171 (12.68)
Outpt time (%) = 0.00413698 (46.3517)
App time (%) = 0.00268257 (30.0561)
Other time (%) = 0.000540078 (6.05116)
Comm time (%) = 0.000631729 (25.0178)
Outpt time (%) = 0.000780138 (30.8952)
App time (%) = 0.000963016 (38.1375)
Other time (%) = 6.31405e-05 (2.5005)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
50 40886 0 0 0 3534
60 44888 0 0 0.00831 3306
Loop time of 0.00833625 on 4 procs
50 39511 0 35 0 3294
60 43241 0 40 0.00254 3158
Loop time of 0.00254794 on 4 procs
Solve time (%) = 0.000383437 (4.59963)
Solve time (%) = 8.5528e-05 (3.35675)
Update time (%) = 0 (0)
Comm time (%) = 0.00106108 (12.7285)
Outpt time (%) = 0.00413227 (49.5699)
App time (%) = 0.00232393 (27.8774)
Other time (%) = 0.000435531 (5.22455)
Comm time (%) = 0.000598337 (23.4831)
Outpt time (%) = 0.000777931 (30.5317)
App time (%) = 0.000940118 (36.8971)
Other time (%) = 0.00014603 (5.73128)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
60 44888 0 0 0 3306
70 48583 0 0 0.00806 3078
Loop time of 0.0080772 on 4 procs
60 43241 0 40 0 3158
70 46797 0 44 0.00248 3060
Loop time of 0.00248266 on 4 procs
Solve time (%) = 0.000353277 (4.37375)
Solve time (%) = 8.14515e-05 (3.28081)
Update time (%) = 0 (0)
Comm time (%) = 0.00102895 (12.739)
Outpt time (%) = 0.0041061 (50.8357)
App time (%) = 0.00213838 (26.4742)
Other time (%) = 0.000450492 (5.57732)
Comm time (%) = 0.000482648 (19.4407)
Outpt time (%) = 0.000991271 (39.9277)
App time (%) = 0.00085854 (34.5814)
Other time (%) = 6.87532e-05 (2.76933)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
70 48583 0 0 0 3078
80 52044 0 0 0.00786 2998
Loop time of 0.00788343 on 4 procs
70 46797 0 44 0 3060
80 50183 0 48 0.0024 3102
Loop time of 0.00240397 on 4 procs
Solve time (%) = 0.000333607 (4.23175)
Solve time (%) = 8.22802e-05 (3.42268)
Update time (%) = 0 (0)
Comm time (%) = 0.00101435 (12.8669)
Outpt time (%) = 0.00420028 (53.2799)
App time (%) = 0.00198931 (25.234)
Other time (%) = 0.000345886 (4.3875)
Comm time (%) = 0.000494873 (20.5856)
Outpt time (%) = 0.00085299 (35.4825)
App time (%) = 0.000883469 (36.7504)
Other time (%) = 9.03613e-05 (3.75883)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
80 52044 0 0 0 2998
90 55352 0 0 0.0083 3026
Loop time of 0.00831437 on 4 procs
80 50183 0 48 0 3102
90 53732 0 52 0.00272 3028
Loop time of 0.00272017 on 4 procs
Solve time (%) = 0.00031358 (3.77154)
Solve time (%) = 9.94713e-05 (3.6568)
Update time (%) = 0 (0)
Comm time (%) = 0.00111783 (13.4445)
Outpt time (%) = 0.00467652 (56.2462)
App time (%) = 0.00188529 (22.6751)
Other time (%) = 0.00032115 (3.86259)
Comm time (%) = 0.000613542 (22.5553)
Outpt time (%) = 0.000800183 (29.4166)
App time (%) = 0.00108281 (39.8067)
Other time (%) = 0.000124164 (4.56456)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
90 55352 0 0 0 3026
100 58494 0 0 0.00733 2742
Loop time of 0.00735307 on 4 procs
90 53732 0 52 0 3028
100 57112 0 56 0.0023 2942
Loop time of 0.00230787 on 4 procs
Solve time (%) = 0.000297189 (4.0417)
Solve time (%) = 7.58975e-05 (3.28864)
Update time (%) = 0 (0)
Comm time (%) = 0.000801027 (10.8938)
Outpt time (%) = 0.00418043 (56.8529)
App time (%) = 0.00179577 (24.422)
Other time (%) = 0.000278652 (3.7896)
Comm time (%) = 0.000502726 (21.7831)
Outpt time (%) = 0.000796114 (34.4956)
App time (%) = 0.000828819 (35.9127)
Other time (%) = 0.000104316 (4.51999)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
100 58494 0 0 0 2742
110 61498 0 0 0.00732 2636
Loop time of 0.00733691 on 4 procs
100 57112 0 56 0 2942
110 60445 0 60 0.00192 2850
Loop time of 0.00192261 on 4 procs
Solve time (%) = 0.000282168 (3.84587)
Solve time (%) = 6.89883e-05 (3.58826)
Update time (%) = 0 (0)
Comm time (%) = 0.000877678 (11.9625)
Outpt time (%) = 0.00414526 (56.4987)
App time (%) = 0.00174332 (23.7609)
Other time (%) = 0.000288486 (3.93199)
Comm time (%) = 0.000257782 (13.4079)
Outpt time (%) = 0.000791242 (41.1545)
App time (%) = 0.000735212 (38.2403)
Other time (%) = 6.9388e-05 (3.60905)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
110 61498 0 0 0 2636
120 64343 0 0 0.00719 2518
Loop time of 0.00721735 on 4 procs
110 60445 0 60 0 2850
120 63603 0 64 0.00193 2866
Loop time of 0.00193198 on 4 procs
Solve time (%) = 0.000270605 (3.74937)
Solve time (%) = 6.44032e-05 (3.33354)
Update time (%) = 0 (0)
Comm time (%) = 0.00078702 (10.9046)
Outpt time (%) = 0.00416625 (57.7254)
App time (%) = 0.00162369 (22.497)
Other time (%) = 0.000369787 (5.12359)
Comm time (%) = 0.00027428 (14.1969)
Outpt time (%) = 0.000812462 (42.0534)
App time (%) = 0.000682923 (35.3484)
Other time (%) = 9.79088e-05 (5.0678)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
120 64343 0 0 0 2518
130 66901 0 0 0.00709 2480
Loop time of 0.00710845 on 4 procs
120 63603 0 64 0 2866
130 66749 0 68 0.0022 2710
Loop time of 0.00220226 on 4 procs
Solve time (%) = 0.000247002 (3.47476)
Solve time (%) = 8.013e-05 (3.63854)
Update time (%) = 0 (0)
Comm time (%) = 0.00100386 (14.1221)
Outpt time (%) = 0.00416774 (58.6307)
App time (%) = 0.00143349 (20.166)
Other time (%) = 0.00025636 (3.60641)
Comm time (%) = 0.000362387 (16.4552)
Outpt time (%) = 0.000819649 (37.2186)
App time (%) = 0.000844146 (38.3309)
Other time (%) = 9.59462e-05 (4.35672)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
130 66901 0 0 0 2480
140 69617 0 0 0.00723 2462
Loop time of 0.00725645 on 4 procs
130 66749 0 68 0 2710
140 69868 0 72 0.00276 2822
Loop time of 0.00276561 on 4 procs
Solve time (%) = 0.000262678 (3.61992)
Solve time (%) = 8.8444e-05 (3.19799)
Update time (%) = 0 (0)
Comm time (%) = 0.000848353 (11.691)
Outpt time (%) = 0.00418752 (57.7076)
App time (%) = 0.00152171 (20.9704)
Other time (%) = 0.000436187 (6.01102)
Comm time (%) = 0.000566006 (20.4659)
Outpt time (%) = 0.00100224 (36.2395)
App time (%) = 0.000938724 (33.9427)
Other time (%) = 0.000170192 (6.15388)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
140 69617 0 0 0 2462
150 72516 0 0 0.0077 2368
Loop time of 0.00771403 on 4 procs
140 69868 0 72 0 2822
150 72809 0 77 0.00203 2530
Loop time of 0.00203296 on 4 procs
Solve time (%) = 0.000279188 (3.61922)
Solve time (%) = 6.10922e-05 (3.00508)
Update time (%) = 0 (0)
Comm time (%) = 0.00115103 (14.9212)
Outpt time (%) = 0.00420797 (54.5495)
App time (%) = 0.00164241 (21.2911)
Other time (%) = 0.000433445 (5.61892)
Comm time (%) = 0.000430907 (21.196)
Outpt time (%) = 0.000773949 (38.07)
App time (%) = 0.000649508 (31.9488)
Other time (%) = 0.000117508 (5.78011)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
150 72516 0 0 0 2368
160 75201 0 0 0.00745 2384
Loop time of 0.00747746 on 4 procs
150 72809 0 77 0 2530
160 75490 0 82 0.00243 2560
Loop time of 0.00243939 on 4 procs
Solve time (%) = 0.00026089 (3.48901)
Solve time (%) = 7.29237e-05 (2.98943)
Update time (%) = 0 (0)
Comm time (%) = 0.00115579 (15.457)
Outpt time (%) = 0.00416714 (55.7293)
App time (%) = 0.0015164 (20.2796)
Other time (%) = 0.000377238 (5.045)
Comm time (%) = 0.000533877 (21.8857)
Outpt time (%) = 0.000900521 (36.9159)
App time (%) = 0.000753532 (30.8902)
Other time (%) = 0.000178534 (7.31879)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
160 75201 0 0 0 2384
170 77794 0 0 0.00709 2286
Loop time of 0.00710869 on 4 procs
160 75490 0 82 0 2560
170 78382 0 86 0.00203 2424
Loop time of 0.00203432 on 4 procs
Solve time (%) = 0.000261724 (3.68175)
Solve time (%) = 6.05745e-05 (2.97762)
Update time (%) = 0 (0)
Comm time (%) = 0.000879705 (12.3751)
Outpt time (%) = 0.00419676 (59.0371)
App time (%) = 0.00145274 (20.4362)
Other time (%) = 0.000317752 (4.46992)
Comm time (%) = 0.000357404 (17.5687)
Outpt time (%) = 0.000830967 (40.8473)
App time (%) = 0.000642883 (31.6018)
Other time (%) = 0.000142495 (7.00454)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
170 77794 0 0 0 2286
180 80320 0 0 0.00723 2186
Loop time of 0.00725418 on 4 procs
170 78382 0 86 0 2424
180 81046 0 90 0.00266 2450
Loop time of 0.00266286 on 4 procs
Solve time (%) = 0.000241041 (3.32279)
Solve time (%) = 7.05732e-05 (2.65028)
Update time (%) = 0 (0)
Comm time (%) = 0.00100464 (13.8491)
Outpt time (%) = 0.00413877 (57.0535)
App time (%) = 0.00144053 (19.8579)
Other time (%) = 0.000429213 (5.91677)
Comm time (%) = 0.000638214 (23.9672)
Outpt time (%) = 0.00102986 (38.6749)
App time (%) = 0.000760398 (28.5557)
Other time (%) = 0.000163817 (6.15191)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
180 80320 0 0 0 2186
190 82621 0 0 0.00686 2204
Loop time of 0.00687295 on 4 procs
180 81046 0 90 0 2450
190 83562 0 94 0.00216 2402
Loop time of 0.0021675 on 4 procs
Solve time (%) = 0.000222385 (3.23565)
Solve time (%) = 6.2358e-05 (2.87696)
Update time (%) = 0 (0)
Comm time (%) = 0.000860512 (12.5203)
Outpt time (%) = 0.00418121 (60.8357)
App time (%) = 0.00126499 (18.4053)
Other time (%) = 0.000343859 (5.00308)
Comm time (%) = 0.000536287 (24.7422)
Outpt time (%) = 0.000802317 (37.0158)
App time (%) = 0.000649124 (29.9481)
Other time (%) = 0.000117412 (5.41694)
run 10Setting up run ...
Time Naccept Nreject Nsweeps CPU Energy
190 82621 0 0 0 2204
200 84907 0 0 0.00681 2276
Loop time of 0.0068413 on 4 procs
190 83562 0 94 0 2402
200 86036 0 98 0.0021 2306
Loop time of 0.00210625 on 4 procs
Solve time (%) = 0.000233412 (3.4118)
Solve time (%) = 5.94018e-05 (2.82026)
Update time (%) = 0 (0)
Comm time (%) = 0.000758171 (11.0823)
Outpt time (%) = 0.00421125 (61.5562)
App time (%) = 0.00125164 (18.2953)
Other time (%) = 0.000386834 (5.65439)
Comm time (%) = 0.000492842 (23.399)
Outpt time (%) = 0.000817012 (38.7899)
App time (%) = 0.000597335 (28.3601)
Other time (%) = 0.00013966 (6.63072)

View File

@ -1 +1,3 @@
#define SPKPATH /home/sjplimp/spparks
// path to your SPPARKS home directory
#define SPKPATH /home/sjplimp/spparks/git

View File

@ -6,7 +6,7 @@ SPPARKS applications in 2 sister directories.
The library dir has a Makefile (which you may need to edit for your
box). If you type
g++ -f Makefile.g++
make -f Makefile.mpi
you should create libcouple.a, which the other coupled applications
link to.

View File

@ -1,11 +1,11 @@
#include <mpi.h>
#include <cstdio>
#include <cstdlib>
#include "error.h"
#include "errorlib.h"
/* ---------------------------------------------------------------------- */
Error::Error(MPI_Comm caller)
ErrorLib::ErrorLib(MPI_Comm caller)
{
comm = caller;
MPI_Comm_rank(comm,&me);
@ -15,7 +15,7 @@ Error::Error(MPI_Comm caller)
called by all procs
------------------------------------------------------------------------- */
void Error::all(const char *str)
void ErrorLib::all(const char *str)
{
if (me == 0) printf("ERROR: %s\n",str);
MPI_Finalize();
@ -26,7 +26,7 @@ void Error::all(const char *str)
called by one proc
------------------------------------------------------------------------- */
void Error::one(const char *str)
void ErrorLib::one(const char *str)
{
printf("ERROR on proc %d: %s\n",me,str);
MPI_Abort(comm,1);
@ -36,7 +36,7 @@ void Error::one(const char *str)
called by one proc
------------------------------------------------------------------------- */
void Error::warning(const char *str)
void ErrorLib::warning(const char *str)
{
printf("WARNING: %s\n",str);
}

View File

@ -1,11 +1,11 @@
#ifndef ERROR_H
#define ERROR_H
#ifndef ERRORLIB_H
#define ERRORLIB_H
#include <mpi.h>
class Error {
class ErrorLib {
public:
Error(MPI_Comm);
ErrorLib(MPI_Comm);
void all(const char *);
void one(const char *);

View File

@ -29,7 +29,7 @@ void replace(char *file, char *header, int n, char **lines)
/* ---------------------------------------------------------------------- */
char **extract(char *file, char *header, int n, char **lines)
void extract(char *file, char *header, int n, char **lines)
{
FILE *fp = fopen(file,"r");

View File

@ -1,5 +1,5 @@
#ifndef FILES_H
#define FILES_H
void replace(char *, char *, int, char **);
char **extract(char *, char *, int, char **);
void extract(char *, char *, int, char **);
#endif

View File

@ -2,8 +2,8 @@
#include <cstdlib>
#include <cstring>
#include "irregular.h"
#include "memory.h"
#include "error.h"
#include "memorylib.h"
#include "errorlib.h"
#define MAX(A,B) ((A) > (B)) ? (A) : (B)
@ -18,8 +18,8 @@ Irregular::Irregular(MPI_Comm caller)
MPI_Comm_rank(comm,&me);
MPI_Comm_size(comm,&nprocs);
memory = new Memory(comm);
error = new Error(comm);
memory = new MemoryLib(comm);
error = new ErrorLib(comm);
init();

View File

@ -46,8 +46,8 @@ class Irregular {
MPI_Status *status; // MPI statuses for Waitall
MPI_Comm comm; // MPI communicator for all communication
class Memory *memory;
class Error *error;
class MemoryLib *memory;
class ErrorLib *error;
void exchange_same(char *, char *);
void exchange_varying(char *, char *);

View File

@ -2,8 +2,8 @@
#include <cstdlib>
#include <cstring>
#include "lammps_data_write.h"
#include "memory.h"
#include "error.h"
#include "memorylib.h"
#include "errorlib.h"
#define DELTA 4;

View File

@ -3,8 +3,8 @@
#include <cstdio>
#include "many2many.h"
#include "irregular.h"
#include "memory.h"
#include "error.h"
#include "memorylib.h"
#include "errorlib.h"
#include <map>
@ -18,8 +18,8 @@ Many2Many::Many2Many(MPI_Comm caller)
MPI_Comm_rank(comm,&me);
MPI_Comm_size(comm,&nprocs);
memory = new Memory(comm);
error = new Error(comm);
memory = new MemoryLib(comm);
error = new ErrorLib(comm);
src_own = dest_own = NULL;
src_off = dest_off = NULL;

View File

@ -15,8 +15,8 @@ class Many2Many {
protected:
int me,nprocs;
MPI_Comm comm;
class Memory *memory;
class Error *error;
class MemoryLib *memory;
class ErrorLib *error;
int nown; // # of IDs common to src and dest
int nsrc_off,ndest_off; // # of off-processor IDs

View File

@ -2,7 +2,7 @@
#include <cstdio>
#include <cstdlib>
#include "many2one.h"
#include "memory.h"
#include "memorylib.h"
/* ---------------------------------------------------------------------- */
@ -12,7 +12,7 @@ Many2One::Many2One(MPI_Comm caller_comm)
MPI_Comm_rank(comm,&me);
MPI_Comm_size(comm,&nprocs);
memory = new Memory(comm);
memory = new MemoryLib(comm);
if (me == 0) {
counts = new int[nprocs];

View File

@ -14,7 +14,7 @@ class Many2One {
protected:
int me,nprocs;
MPI_Comm comm;
class Memory *memory;
class MemoryLib *memory;
int nsrc,nall;
int *counts,*multicounts;

View File

@ -1,19 +1,19 @@
#include <mpi.h>
#include <cstdlib>
#include <cstdio>
#include "memory.h"
#include "error.h"
#include "memorylib.h"
#include "errorlib.h"
/* ---------------------------------------------------------------------- */
Memory::Memory(MPI_Comm comm)
MemoryLib::MemoryLib(MPI_Comm comm)
{
error = new Error(comm);
error = new ErrorLib(comm);
}
/* ---------------------------------------------------------------------- */
Memory::~Memory()
MemoryLib::~MemoryLib()
{
delete error;
}
@ -22,7 +22,7 @@ Memory::~Memory()
safe malloc
------------------------------------------------------------------------- */
void *Memory::smalloc(int n, const char *name)
void *MemoryLib::smalloc(int n, const char *name)
{
if (n == 0) return NULL;
void *ptr = malloc(n);
@ -38,7 +38,7 @@ void *Memory::smalloc(int n, const char *name)
safe free
------------------------------------------------------------------------- */
void Memory::sfree(void *ptr)
void MemoryLib::sfree(void *ptr)
{
if (ptr == NULL) return;
free(ptr);
@ -48,7 +48,7 @@ void Memory::sfree(void *ptr)
safe realloc
------------------------------------------------------------------------- */
void *Memory::srealloc(void *ptr, int n, const char *name)
void *MemoryLib::srealloc(void *ptr, int n, const char *name)
{
if (n == 0) {
sfree(ptr);
@ -68,7 +68,7 @@ void *Memory::srealloc(void *ptr, int n, const char *name)
create a 2d double array
------------------------------------------------------------------------- */
double **Memory::create_2d_double_array(int n1, int n2, const char *name)
double **MemoryLib::create_2d_double_array(int n1, int n2, const char *name)
{
double *data = (double *) smalloc(n1*n2*sizeof(double),name);
@ -89,7 +89,7 @@ double **Memory::create_2d_double_array(int n1, int n2, const char *name)
if either dim is 0, return NULL
------------------------------------------------------------------------- */
double **Memory::grow_2d_double_array(double **array,
double **MemoryLib::grow_2d_double_array(double **array,
int n1, int n2, const char *name)
{
@ -111,7 +111,7 @@ double **Memory::grow_2d_double_array(double **array,
free a 2d double array
------------------------------------------------------------------------- */
void Memory::destroy_2d_double_array(double **array)
void MemoryLib::destroy_2d_double_array(double **array)
{
if (array == NULL) return;

View File

@ -1,12 +1,12 @@
#ifndef MEMORY_H
#define MEMORY_H
#ifndef MEMORY_LIB_H
#define MEMORY_LIB_H
#include <mpi.h>
class Memory {
class MemoryLib {
public:
Memory(MPI_Comm);
~Memory();
MemoryLib(MPI_Comm);
~MemoryLib();
void *smalloc(int n, const char *);
void sfree(void *);
@ -17,7 +17,7 @@ class Memory {
void destroy_2d_double_array(double **);
private:
class Error *error;
class ErrorLib *error;
};
#endif

View File

@ -1,7 +1,7 @@
#include <mpi.h>
#include <cstdlib>
#include "one2many.h"
#include "memory.h"
#include "memorylib.h"
#include <map>
@ -13,7 +13,7 @@ One2Many::One2Many(MPI_Comm caller_comm)
MPI_Comm_rank(comm,&me);
MPI_Comm_size(comm,&nprocs);
memory = new Memory(comm);
memory = new MemoryLib(comm);
hash = new std::map<int,int>();
}

View File

@ -16,7 +16,7 @@ class One2Many {
protected:
int me,nprocs;
MPI_Comm comm;
class Memory *memory;
class MemoryLib *memory;
std::map<int,int> *hash;
int nsrc;
};

View File

@ -2,8 +2,8 @@
#include <cstdlib>
#include <cstdio>
#include "send2one.h"
#include "memory.h"
#include "error.h"
#include "memorylib.h"
#include "errorlib.h"
/* ---------------------------------------------------------------------- */
@ -13,8 +13,8 @@ Send2One::Send2One(MPI_Comm caller_comm)
MPI_Comm_rank(comm,&me);
MPI_Comm_size(comm,&nprocs);
memory = new Memory(comm);
error = new Error(comm);
memory = new MemoryLib(comm);
error = new ErrorLib(comm);
buf = NULL;
maxbuf = 0;

View File

@ -13,8 +13,8 @@ class Send2One {
protected:
int me,nprocs;
MPI_Comm comm;
class Memory *memory;
class Error *error;
class MemoryLib *memory;
class ErrorLib *error;
int maxbuf;
char *buf;