Previous Section - SPPARKS WWW Site - SPPARKS Documentation - SPPARKS Commands - Next Section

9. Errors

This section describes the various kinds of errors you can encounter when using SPPARKS.

9.1 Common problems
9.2 Reporting bugs
9.3 Error & warning messages

9.1 Common problems

A SPPARKS simulation typically has two stages, setup and run. Many SPPARKS errors are detected at setup time; others may not occur until the middle of a run.

SPPARKS tries to flag errors and print informative error messages so you can fix the problem. Of course SPPARKS cannot figure out your physics mistakes, like choosing too big a timestep or setting up an invalid lattice. If you find errors that SPPARKS doesn't catch that you think it should flag, please send an email to the developers.

If you get an error message about an invalid command in your input script, you can determine what command is causing the problem by looking in the log.spparks file or using the echo command to see it on the screen. For example you can run your script as

spk_linux -echo screen < in.script 

For a given command, SPPARKS expects certain arguments in a specified order. If you mess this up, SPPARKS will often flag the error, but it may read a bogus argument and assign a value that is not what you wanted. E.g. if the input parser reads the string "abc" when expecting an integer value, it will assign the value of 0 to a variable.

Generally, SPPARKS will print a message to the screen and exit gracefully when it encounters a fatal error. Sometimes it will print a WARNING and continue on; you can decide if the WARNING is important or not. If SPPARKS crashes or hangs without spitting out an error message first then it could be a bug (see this section) or one of the following cases:

SPPARKS runs in the available memory each processor can allocate. All large memory allocations in the code are done via C-style malloc's which will generate an error message if you run out of memory. Smaller chunks of memory are allocated via C++ "new" statements. If you are unlucky you could run out of memory when one of these small requests is made, in which case the code will crash, since SPPARKS doesn't trap on those errors.

Illegal arithmetic can cause SPPARKS to run slow or crash. This is typically due to invalid physics and numerics that your simulation is computing. If you see wild energy values or NaN values in your SPPARKS output, something is wrong with your simulation.

In parallel, one way SPPARKS can hang is due to how different MPI implementations handle buffering of messages. If the code hangs without an error message, it may be that you need to specify an MPI setting or two (usually via an environment variable) to enable buffering or boost the sizes of messages that can be buffered.


9.2 Reporting bugs

If you are confident that you have found a bug in SPPARKS, please send an email to the developers.

First, check the "New features and bug fixes" section of the SPPARKS WWW site to see if the bug has already been reported or fixed.

If not, the most useful thing you can do for us is to isolate the problem. Run it on the smallest problem and fewest number of processors and with the simplest input script that reproduces the bug.

In your email, describe the problem and any ideas you have as to what is causing it or where in the code the problem might be. We'll request your input script and data files if necessary.


9.3 Error & warning messages

These are two alphabetic lists of the ERROR and WARNING messages SPPARKS prints out and the reason why. If the explanation here is not sufficient, the documentation for the offending command may help. Grepping the source files for the text of the error message and staring at the source code and comments is also not a bad idea! Note that sometimes the same message can be printed from multiple places in the code.

Errors:

Adding site to bin it is not in
Internal SPPARKS error.
Adding site to illegal bin
Internal SPPARKS error.
All pair coeffs are not set
Self-explanatory.
All universe/uloop variables must have same # of values
Self-explanatory.
All variables in next command must be same style
Self-explanatory.
Another input script is already being processed
Cannot attempt to open a 2nd input script, when the original file is still being processed.
App cannot use both a KMC and rejection KMC solver
You cannot define both a solver and sweep option.
App did not set dt_sweep
Internal SPPARKS error.
App needs a KMC or rejection KMC solver
You must define either a solver or sweep option.
App relax requires a pair potential
Self-explanatory.
App style proc count is not valid for 1d simulation
There can only be 1 proc in y and z dimensions for 1d models.
App style proc count is not valid for 2d simulation
There can only be 1 proc in the z dimension for 2d models.
App_style command after simulation box is defined
Self-explanatory.
App_style specific command before app_style set
Self-explanatory.
Application cutoff is too big for processor sub-domain
There must be at least 2 bins per processor in each dimension where sectoring occurs.
Arccos of invalid value in variable formula
Argument of arccos() must be between -1 and 1.
Arcsin of invalid value in variable formula
Argument of arcsin() must be between -1 and 1.
Bad connectivity result
Internal SPPARKS error. Should not occur.
Box bounds are invalid
Lo bound >= hi bound.
Can only read neighbors for on-lattice applications
Self-explanatory.
Can only use ecoord command with app_style diffusion nonlinear
Self-explanatory.
Cannot color this combination of lattice and app
Coloring is not supported on this lattice for the neighbor dependencies of this application.
Cannot color wihtout a lattice definition of sites
Self-explanatory.
Cannot create box after simulation box is defined
Self-explanatory.
Cannot create box with this application style
This application does not support spatial domains.
Cannot create sites after sites already exist
Self-explanatory.
Cannot create sites with undefined lattice
Must use lattice commands first to define a lattice.
Cannot define Schwoebel barrier without Schwoebel model
Self-explanatory.
Cannot open diag style cluster dump file
Self-explanatory.
Cannot open diag_style cluster dump file
Self-explanatory.
Cannot open diag_style cluster output file
Self-explanatory.
Cannot open dump file
Self-explanatory.
Cannot open file %s
Self-explanatory.
Cannot open gzipped file
Self-explantory.
Cannot open input script %s
Self-explanatory.
Cannot open log.spparks
Self-explanatory.
Cannot open logfile %s
Self-explanatory.
Cannot open logfile
Self-explanatory.
Cannot open screen file
The screen file specified as a command-line argument cannot be opened. Check that the directory you are running in allows for files to be created.
Cannot open universe log file
For a multi-partition run, the master log file cannot be opened. Check that the directory you are running in allows for files to be created.
Cannot open universe screen file
For a multi-partition run, the master screen file cannot be opened. Check that the directory you are running in allows for files to be created.
Cannot read neighbors unless max neighbors is set
This is a setting in the header of the sites file.
Cannot read sites after sites already exist
Self-explanatory.
Cannot redefine variable as a different style
An equal-style variable can be re-defined but only if it was originally an equal-style variable.
Cannot run application until simulation box is defined
Self-explanatory.
Cannot use %s command until sites exist
This command requires sites exist before using it in an input script.
Cannot use KMC solver in parallel with no sectors
Self-explanatory.
Cannot use color/strict rejection KMC with sectors
Self-explanatory.
Cannot use create_sites basis with random lattice
Self-explanatory.
Cannot use diag_style cluster without a lattice defined
This diagnostic uses the lattice style to dump OpenDx files.
Cannot use dump_one for first snapshot in dump file
Self-explanatory.
Cannot use random rejection KMC in parallel with no sectors
Self-explanatory.
Cannot use raster rejection KMC in parallel with no sectors
Self-explanatory.
Cannot use region INF or EDGE when box does not exist
Can only define a region with these parameters after a simulation box has been defined.
Choice of sector stop led to no rKMC events
Self-explanatory.
Color stencil is incommensurate with lattice size
Since coloring induces a pattern of colors, this pattern must fit an integer number of times into a periodic lattice.
Could not find dump ID in dump_modify command
Self-explanatory.
Could not find dump ID in dump_one command
Self-explanatory.
Could not find dump ID in undump command
Self-explanatory.
Create_box command before app_style set
Self-explanatory.
Create_box region ID does not exist
Self-explanatory.
Create_box region must be of type inside
Self-explanatory.
Create_sites command before app_style set
Self-explanatory.
Create_sites command before simulation box is defined
Self-explanatory.
Create_sites region ID does not exist
Self-explanatory.
Creating a quantity application does not support
The application defines what variables it supports. You cannot set a variable with the create_sites command for a variable that isn't supported.
Diag dump_style does not work if ncluster > 2^31
Self-explanatory.
Diag dump_style incompatible with lattice style
Not all lattice styles can be output as OpenDx files.
Diag propensity requires KMC solve be performed
Only KMC solvers compute a propensity for sites and the system.
Diag style cluster dump file name too long
Self-explanatory.
Diag style incompatible with app style
The lattice styles of the diagnostic and the on-lattice application must match.
Diag cluster dvalue in neighboring clusters do not match
Internal SPPARKS error.
Diag cluster ivalue in neighboring clusters do not match
Internal SPPARKS error.
Diag_style command before app_style set
Self-explanatory.
Diag_style diffusion requires app_style diffusion
Self-explanatory.
Did not assign all sites correctly
One or more sites in the read_sites file were not assigned to a processor correctly.
Did not create correct number of sites
One or more created sites were not assigned to a processor correctly.
Dimension command after lattice is defined
Self-explanatory.
Dimension command after simulation box is defined
Self-explanatory.
Divide by 0 in variable formula
Self-explanatory.
Dump ID already exists
Self-explanatory.
Dump command before app_style set
Self-explanatory.
Dump command can only be used for spatial applications
Self-explanatory.
Dump requires propensity but no KMC solve performed
Only KMC solvers compute propensity for sites.
Dump_modify command before app_style set
Self-explanatory.
Dump_one command before app_style set
Self-explanatory.
Dumping a quantity application does not support
The application defines what variables it supports. You cannot output a variable in a dump that isn't supported.
Failed to allocate %ld bytes for array %s
Your SPPARKS simulation has run out of memory. You need to run a smaller simulation or on more processors.
Failed to reallocate %ld bytes for array %s
Your SPPARKS simulation has run out of memory. You need to run a smaller simulation or on more processors.
Ghost connection was not found
Internal SPPARKS error. Should not occur.
Ghost site was not found
Internal SPPARKS error. Should not occur.
Illegal ... command
Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running SPPARKS to see the offending line.
Incorrect args for pair coefficients
Self-explanatory.
Incorrect lattice neighbor count
Internal SPPARKS error.
Incorrect site format in data file
Self-explanatory.
Incorrect value format in data file
Self-explanatory.
Input line too long after variable substitution
This is a hard (very large) limit defined in the input.cpp file.
Input line too long: %s
This is a hard (very large) limit defined in the input.cpp file.
Invalid command-line argument
One or more command-line arguments is invalid. Check the syntax of the command you are using to launch SPPARKS.
Invalid dump_modify threshold operator
Self-explanatory.
Invalid event count for app_style test/group
Number of events must be > 0.
Invalid keyword in dump command
Self-explanatory.
Invalid math function in variable formula
The math function is not recognized.
Invalid number of sectors
Self-explanatory.
Invalid pair style
Self-explanatory.
Invalid probability bounds for app_style test/group
Self-explanatory.
Invalid probability bounds for solve_style group
Self-explanatory.
Invalid probability delta for app_style test/group
Self-explanatory.
Invalid region style
Self-explanatory.
Invalid site ID in Sites section of data file
Self-explanatory.
Invalid syntax in variable formula
Self-explanatory.
Invalid variable evaluation in variable formula
A variable used in a formula could not be evaluated.
Invalid variable in next command
Self-explanatory.
Invalid variable name in variable formula
Variable name is not recognized.
Invalid variable name
Variable name used in an input script line is invalid.
Invalid variable style with next command
Variable styles equal and world cannot be used in a next command.
Invalid volume setting
Volume must be set to value > 0.
KMC events are not implemented in app
Not every application supports KMC solvers.
Label wasn't found in input script
Self-explanatory.
Lattice command before app_style set
Self-explanatory.
Lattice style does not match dimension
Self-explanatory.
Log of zero/negative in variable formula
Self-explanatory.
Mask logic not implemented in app
Not every application supports masking.
Mismatch in counting for dbufclust
Self-explanatory.
Must read Sites before Neighbors
Self-explanatory.
Must read Sites before Values
Self-explanatory.
Must use -in switch with multiple partitions
A multi-partition simulation cannot read the input script from stdin. The -in command-line option must be used to specify a file.
Must use create_sites box for on-lattice applications
Self-explanatory.
Must use value option before basis option in create_sites command
Self-explanatory.
No reactions defined for chemistry app
Use the add_reaction command to specify one or more reactions.
No solver class defined
Self-explanatory.
Number of sites does not match existing sites
File being read by read_sites command is not consistent with sites already defined.
One or more sites have invalid values
The application only allows sites to be initialized with specific values.
PBC remap of site failed
Internal SPPARKS error.
Pair_coeff command before app_style set
Self-explanatory.
Pair_coeff command before pair_style is defined
Self-explanatory.
Pair_style command before app_style set
Self-explanatory.
Power by 0 in variable formula
Self-explanatory.
Processor partitions are inconsistent
The total number of processors in all partitions must match the number of processors LAMMPS is running on.
Processors command after simulation box is defined
Self-explanatory.
Random lattice has no connectivity
The cutoff distance is likely too short.
Reaction ID %s already exists
Cannot re-define a reaction.
Reaction cannot have more than MAX_PRODUCT products
Self-explanatory.
Reaction has no numeric rate
Self-explanatory.
Reaction must have 0,1,2 reactants
Self-explanatory.
Read_sites command before app_style set
Self-explanatory.
Read_sites simluation box different that current box
Self-explanatory.
Region command before app_style set
Self-explanatory.
Region intersect region ID does not exist
Self-explanatory.
Region union region ID does not exist
Self-explanatory.
Rejection events are not implemented in app
Self-explanatory.
Reset_time command before app_style set
Self-explanatory.
Reuse of region ID
Self-explanatory.
Run command before app_style set
Self-explanatory.
Run upto value is before current time
Self-explanatory.
Seed command has not been used
The seed command must be used if another command requires random numbers.
Set command before sites exist
Self-explanatory.
Set command region ID does not exist
Self-explanatory.
Set if test on quantity application does not support
The application defines what variables it supports. You cannot do an if test with the set command on a variable that isn't supported.
Setting a quantity application does not support
The application defines what variables it supports. You cannot set a variable with the set command on a variable that isn't supported.
Simulation box is not multiple of current lattice settings
This likely occurred because the lattice was re-defined after the simulation box was created.
Site not in my bin domain
Internal SPPARKS error.
Site-site interaction was not found
Internal SPPARKS error.
Solve_style command before app_style set
Self-explanatory.
Species ID %s already exists
Self-explanatory.
Species ID %s does not exist
Self-explanatory.
Sqrt of negative in variable formula
Self-explanatory.
Stats command before app_style set
Self-explanatory.
Substitution for illegal variable
Self-explanatory.
Threshold for a quantity application does not support
The application defines what variables it supports. You cannot do a threshold test with the dump command on a variable that isn't supported.
Too many neighbors per site
Internal SPPARKS error.
Unbalanced quotes in input line
No matching end double quote was found following a leading double quote.
Undump command before app_style set
Self-explanatory.
Unexpected end of data file
Self-explanatory.
Universe/uloop variable count < # of partitions
A universe or uloop style variable must specify a number of values >= to the number of processor partitions.
Unknown command: %s
The command is not known to SPPARKS. Check the input script.
Unknown identifier in data file: %s
Self-explanatory.
Unknown species in reaction command
Self-explanatory.
Unrecognized command
The command is assumed to be application specific, but is not known to SPPARKS. Check the input script.
Use of region with undefined lattice
The lattice command must be used before defining a geometric region.
Variable name must be alphanumeric or underscore characters
Self-explanatory.
World variable count doesn't match # of partitions
A world-style variable must specify a number of values equal to the number of processor partitions.

Warnings: