Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collected small changes for stable release #1475

Merged
merged 6 commits into from
May 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions doc/src/Errors_messages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5828,6 +5828,12 @@ Must have periodic x,y dimensions and non-periodic z dimension to use
Must have periodic x,y dimensions and non-periodic z dimension to use
2d slab option with pppm/disp. :dd

{Incorrect conversion in format string} :dt

A format style variable was not using either a %f, a %g, or a %e conversion.
Or an immediate variable with format suffix was not using either
a %f, a %g or a %e conversion in the format suffix. :dd

{Incorrect element names in ADP potential file} :dt

The element names in the ADP file do not match those requested. :dd
Expand Down
42 changes: 21 additions & 21 deletions doc/src/Packages_details.txt
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ available on your system.
[Install:]

This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#compress on the "Build
extras"_Build_extras.html doc page.

[Supporting info:]
Expand Down Expand Up @@ -358,7 +358,7 @@ developed the pair style.
[Install:]

This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#kim on the "Build
extras"_Build_extras.html doc page.

[Supporting info:]
Expand Down Expand Up @@ -404,7 +404,7 @@ lib/kokkos.
[Install:]

This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#kokkos on the "Build
extras"_Build_extras.html doc page.

[Supporting info:]
Expand Down Expand Up @@ -477,7 +477,7 @@ Cawkwell, Anders Niklasson, and Christian Negre.
[Install:]

This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#latte on the "Build
extras"_Build_extras.html doc page.

[Supporting info:]
Expand Down Expand Up @@ -654,7 +654,7 @@ University of Chicago.
[Install:]

This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#mscg on the "Build
extras"_Build_extras.html doc page.

[Supporting info:]
Expand Down Expand Up @@ -686,7 +686,7 @@ and Vincent Natoli (Stone Ridge Technolgy).
[Install:]

This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#opt on the "Build
extras"_Build_extras.html doc page.

[Supporting info:]
Expand Down Expand Up @@ -743,7 +743,7 @@ connections at hinge points.
[Install:]

This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#poems on the "Build
extras"_Build_extras.html doc page.

[Supporting info:]
Expand Down Expand Up @@ -775,7 +775,7 @@ lib/python/README for more details.
[Install:]

This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#python on the "Build
extras"_Build_extras.html doc page.

[Supporting info:]
Expand Down Expand Up @@ -965,7 +965,7 @@ and LBNL.
[Install:]

This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#voronoi on the "Build
extras"_Build_extras.html doc page.

[Supporting info:]
Expand Down Expand Up @@ -1017,7 +1017,7 @@ atomic information to continuum fields.
[Install:]

This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#user-atc on the "Build
extras"_Build_extras.html doc page.

[Supporting info:]
Expand All @@ -1044,7 +1044,7 @@ model.
[Install:]

This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#user-awpmd on the "Build
extras"_Build_extras.html doc page.

[Supporting info:]
Expand Down Expand Up @@ -1184,7 +1184,7 @@ Tribello.
[Install:]

This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#user-plumed on the "Build
extras"_Build_extras.html doc page.

[Supporting info:]
Expand Down Expand Up @@ -1362,7 +1362,7 @@ H5MD format.
[Install:]

This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#user-h5md on the "Build
extras"_Build_extras.html doc page.

[Supporting info:]
Expand Down Expand Up @@ -1400,7 +1400,7 @@ NOTE: the USER-INTEL package contains styles that require using the
[Install:]

This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#user-intel on the "Build
extras"_Build_extras.html doc page.

[Supporting info:]
Expand Down Expand Up @@ -1620,7 +1620,7 @@ at
[Install:]

This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#user-molfile on the "Build
extras"_Build_extras.html doc page.

[Supporting info:]
Expand Down Expand Up @@ -1660,7 +1660,7 @@ tools:
[Install:]

This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#user-netcdf on the "Build
extras"_Build_extras.html doc page.

[Supporting info:]
Expand Down Expand Up @@ -1704,7 +1704,7 @@ install/un-install the package and build LAMMPS in the usual manner:
[Install:]

This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#user-omp on the "Build
extras"_Build_extras.html doc page.

[Supporting info:]
Expand Down Expand Up @@ -1788,7 +1788,7 @@ without changes to LAMMPS itself.
[Install:]

This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#user-qmmm on the "Build
extras"_Build_extras.html doc page.

[Supporting info:]
Expand Down Expand Up @@ -1846,7 +1846,7 @@ on your system.
[Install:]

This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#user-quip on the "Build
extras"_Build_extras.html doc page.

[Supporting info:]
Expand Down Expand Up @@ -1964,7 +1964,7 @@ Dynamics, Ernst Mach Institute, Germany).
[Install:]

This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#user-smd on the "Build
extras"_Build_extras.html doc page.

[Supporting info:]
Expand Down Expand Up @@ -2090,7 +2090,7 @@ system.
[Install:]

This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#user-vtk on the "Build
extras"_Build_extras.html doc page.

[Supporting info:]
Expand Down
8 changes: 8 additions & 0 deletions src/STUBS/mpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,20 @@ int MPI_Finalize()

double MPI_Wtime()
{
#if defined(_MSC_VER)
double t;

t = GetTickCount();
t /= 1000.0;
return t;
#else
double time;
struct timeval tv;

gettimeofday(&tv,NULL);
time = 1.0 * tv.tv_sec + 1.0e-6 * tv.tv_usec;
return time;
#endif
}

/* ---------------------------------------------------------------------- */
Expand Down
8 changes: 8 additions & 0 deletions src/USER-REAXC/reaxc_tool_box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,16 @@ double t_end;

double Get_Time( )
{
#if defined(_MSC_VER)
double t;

t = GetTickCount();
t /= 1000.0;
return t;
#else
gettimeofday(&tim, NULL );
return( tim.tv_sec + (tim.tv_usec / 1000000.0) );
#endif
}

int Tokenize( char* s, char*** tok )
Expand Down
6 changes: 6 additions & 0 deletions src/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#include "accelerator_kokkos.h"
#include "error.h"
#include "memory.h"
#include "utils.h"

#ifdef _OPENMP
#include <omp.h>
Expand Down Expand Up @@ -526,6 +527,11 @@ void Input::substitute(char *&str, char *&str2, int &max, int &max2, int flag)
*fmtflag='\0';
}

// quick check for proper format string

if (!utils::strmatch(fmtstr,"%[0-9 ]*\\.[0-9]+[efgEFG]"))
error->all(FLERR,"Incorrect conversion in format string");

snprintf(immediate,256,fmtstr,variable->compute_equal(var));
value = immediate;

Expand Down
5 changes: 5 additions & 0 deletions src/input.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@ E: Unbalanced quotes in input line
No matching end double quote was found following a leading double
quote.

E: Incorrect conversion in format string

An immediate variable with format suffix was not using
either a %f, a %g, or a %e conversion in the format suffix.

E: Input line quote not followed by white-space

An end quote must be followed by white-space.
Expand Down
4 changes: 2 additions & 2 deletions src/lmpwindows.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
#define pclose _pclose
#define strdup _strdup

// the following functions ared defined to get rid of
// 'ambiguous call to overloaded function' error in VSS for mismathched type arguments
// the following functions are defined to get rid of
// 'ambiguous call to overloaded function' error in VSS for mismatched type arguments
#if !defined(__MINGW32__)
inline double pow(int i, int j){
return pow((double)i,j);
Expand Down
3 changes: 3 additions & 0 deletions src/variable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include "memory.h"
#include "info.h"
#include "error.h"
#include "utils.h"

using namespace LAMMPS_NS;
using namespace MathConst;
Expand Down Expand Up @@ -383,6 +384,8 @@ void Variable::set(int narg, char **arg)
num[nvar] = 3;
which[nvar] = 0;
pad[nvar] = 0;
if (!utils::strmatch(arg[2],"%[0-9 ]*\\.[0-9]+[efgEFG]"))
error->all(FLERR,"Incorrect conversion in format string");
data[nvar] = new char*[num[nvar]];
copy(2,&arg[2],data[nvar]);
data[nvar][2] = new char[VALUELENGTH];
Expand Down
4 changes: 4 additions & 0 deletions src/variable.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,10 @@ E: Invalid variable style with next command
Variable styles {equal} and {world} cannot be used in a next
command.

E: Incorrect conversion in format string

A format style variable was not using either a %f, a %g, or a %e conversion.

E: Next command must list all universe and uloop variables

This is to insure they stay in sync.
Expand Down