Commit 980f7e3b authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

Merge branch 'collected-small-changes' into collected-post-stable-patches

parents e39ba20e 34e0c05b
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -626,10 +626,10 @@ over time or the atom count becomes very small.

[Default:]

The keyword defaults are tchain = 3, pchain = 3, mtk = yes, tloop =
The keyword defaults are tchain = 3, pchain = 3, mtk = yes, tloop = 1,
ploop = 1, nreset = 0, drag = 0.0, dilate = all, couple = none,
scaleyz = scalexz = scalexy = yes if periodic in 2nd dimension and
not coupled to barostat, otherwise no.
flip = yes, scaleyz = scalexz = scalexy = yes if periodic in 2nd
dimension and not coupled to barostat, otherwise no.

:line

+9 −4
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ style = {delete} or {block} or {cone} or {cylinder} or {plane} or {prism} or {sp
    dim = {x} or {y} or {z} = axis of cylinder
    c1,c2 = coords of cylinder axis in other 2 dimensions (distance units)
    radius = cylinder radius (distance units)
      radius can be a variable (see below)
      c1,c2, and radius can be a variable (see below)
    lo,hi = bounds of cylinder in dim (distance units)
  {plane} args = px py pz nx ny nz
    px,py,pz = point on the plane (distance units)
@@ -39,7 +39,7 @@ style = {delete} or {block} or {cone} or {cylinder} or {plane} or {prism} or {sp
  {sphere} args = x y z radius
    x,y,z = center of sphere (distance units)
    radius = radius of sphere (distance units)
      radius can be a variable (see below)
      x,y,z, and radius can be a variable (see below)
  {union} args = N reg-ID1 reg-ID2 ...
    N = # of regions to follow, must be 2 or greater
    reg-ID1,reg-ID2, ... = IDs of regions to join together
@@ -179,12 +179,17 @@ The {radius} value for style {sphere} and {cylinder} can be specified
as an equal-style "variable"_variable.html.  If the value is a
variable, it should be specified as v_name, where name is the variable
name.  In this case, the variable will be evaluated each timestep, and
its value used to determine the radius of the region.
its value used to determine the radius of the region. For style {sphere}
also the x-, y-, and z- coordinate of the center of the sphere and for
style {cylinder} the two center positions c1 and c2 for the location of
the cylinder axes can be a variable with the same kind of effect and
requirements than for the radius.

Equal-style variables can specify formulas with various mathematical
functions, and include "thermo_style"_thermo_style.html command
keywords for the simulation box parameters and timestep and elapsed
time.  Thus it is easy to specify a time-dependent radius.
time.  Thus it is easy to specify a time-dependent radius or have
a time dependent position of the sphere or cylinder region.

See the "Howto tricilinc"_Howto_triclinic.html doc page for a
geometric description of triclinic boxes, as defined by LAMMPS, and
+79 −38
Original line number Diff line number Diff line
@@ -262,11 +262,20 @@ void Info::command(int narg, char **arg)
  if (flags & CONFIG) {
    fprintf(out,"\nLAMMPS version: %s / %s\n\n",
            universe->version, universe->num_ver);

    char *infobuf = get_os_info();
    fprintf(out,"OS information: %s\n\n",infobuf);
    delete[] infobuf;

    fprintf(out,"sizeof(smallint): %3d-bit\n",(int)sizeof(smallint)*8);
    fprintf(out,"sizeof(imageint): %3d-bit\n",(int)sizeof(imageint)*8);
    fprintf(out,"sizeof(tagint):   %3d-bit\n",(int)sizeof(tagint)*8);
    fprintf(out,"sizeof(bigint):   %3d-bit\n",(int)sizeof(bigint)*8);

    infobuf = get_compiler_info();
    fprintf(out,"\nCompiler: %s\n",infobuf);
    delete[] infobuf;

    fputs("\nActive compile time flags:\n\n",out);
    if (has_gzip_support()) fputs("-DLAMMPS_GZIP\n",out);
    if (has_png_support()) fputs("-DLAMMPS_PNG\n",out);
@@ -274,6 +283,14 @@ void Info::command(int narg, char **arg)
    if (has_ffmpeg_support()) fputs("-DLAMMPS_FFMPEG\n",out);
    if (has_exceptions()) fputs("-DLAMMPS_EXCEPTIONS\n",out);

#if defined(LAMMPS_BIGBIG)
    fputs("-DLAMMPS_BIGBIG\n",out);
#elif defined(LAMMPS_SMALLBIG)
    fputs("-DLAMMPS_SMALLBIG\n",out);
#else // defined(LAMMPS_SMALLSMALL)
    fputs("-DLAMMPS_SMALLSMALL\n",out);
#endif

    const char *pkg;
    int ncword, ncline = 0;

@@ -288,44 +305,6 @@ void Info::command(int narg, char **arg)
      ncline += ncword + 1;
    }
    fputs("\n",out);

#if defined(_WIN32)
    DWORD fullversion,majorv,minorv,buildv=0;

    fullversion = GetVersion();
    majorv = (DWORD) (LOBYTE(LOWORD(fullversion)));
    minorv = (DWORD) (HIBYTE(LOWORD(fullversion)));
    if (fullversion < 0x80000000)
      buildv = (DWORD) (HIWORD(fullversion));

    SYSTEM_INFO si;
    GetSystemInfo(&si);

    const char *machine;
    switch (si.wProcessorArchitecture) {
    case PROCESSOR_ARCHITECTURE_AMD64:
      machine = (const char *) "x86_64";
      break;
    case PROCESSOR_ARCHITECTURE_ARM:
      machine = (const char *) "arm";
      break;
    case PROCESSOR_ARCHITECTURE_IA64:
      machine = (const char *) "ia64";
      break;
    case PROCESSOR_ARCHITECTURE_INTEL:
      machine = (const char *) "i386";
      break;
    default:
      machine = (const char *) "(unknown)";
    }
    fprintf(out,"\nOS information: Windows %d.%d (%d) on %s\n",
            majorv,minorv,buildv,machine);
#else
    struct utsname ut;
    uname(&ut);
    fprintf(out,"\nOS information: %s %s on %s\n",
            ut.sysname, ut.release, ut.machine);
#endif
  }

  if (flags & MEMORY) {
@@ -1103,6 +1082,68 @@ bool Info::has_package(const char * package_name) {
  return false;
}

/* ---------------------------------------------------------------------- */
#define _INFOBUF_SIZE 256

char *Info::get_os_info()
{
  char *buf = new char[_INFOBUF_SIZE];

#if defined(_WIN32)
  DWORD fullversion,majorv,minorv,buildv=0;

  fullversion = GetVersion();
  majorv = (DWORD) (LOBYTE(LOWORD(fullversion)));
  minorv = (DWORD) (HIBYTE(LOWORD(fullversion)));
  if (fullversion < 0x80000000)
    buildv = (DWORD) (HIWORD(fullversion));

  SYSTEM_INFO si;
  GetSystemInfo(&si);

  const char *machine;
  switch (si.wProcessorArchitecture) {
  case PROCESSOR_ARCHITECTURE_AMD64:
    machine = (const char *) "x86_64";
    break;
  case PROCESSOR_ARCHITECTURE_ARM:
    machine = (const char *) "arm";
    break;
  case PROCESSOR_ARCHITECTURE_IA64:
    machine = (const char *) "ia64";
    break;
  case PROCESSOR_ARCHITECTURE_INTEL:
    machine = (const char *) "i386";
    break;
  default:
    machine = (const char *) "(unknown)";
  }
  snprintf(buf,_INFOBUF_SIZE,"Windows %d.%d (%d) on %s",
           majorv,minorv,buildv,machine);
#else
  struct utsname ut;
  uname(&ut);
  snprintf(buf,_INFOBUF_SIZE,"%s %s on %s",
           ut.sysname, ut.release, ut.machine);
#endif
  return buf;
}

char *Info::get_compiler_info()
{
  char *buf = new char[_INFOBUF_SIZE];
#if __clang__
  snprintf(buf,_INFOBUF_SIZE,"Clang C++ %s", __VERSION__);
#elif __INTEL_COMPILER
  snprintf(buf,_INFOBUF_SIZE,"Intel C++ %s", __VERSION__);
#elif __GNUC__
  snprintf(buf,_INFOBUF_SIZE,"GNU C++ %s",   __VERSION__);
#else
  snprintf(buf,_INFOBUF_SIZE,"(Unknown)");
#endif
  return buf;
}

/* ---------------------------------------------------------------------- */

char **Info::get_variable_names(int &num) {
+3 −0
Original line number Diff line number Diff line
@@ -40,6 +40,9 @@ class Info : protected Pointers {
  static bool has_exceptions();
  static bool has_package(const char * package_name);

  static char *get_os_info();
  static char *get_compiler_info();

  char **get_variable_names(int &num);

private:
+36 −28
Original line number Diff line number Diff line
@@ -415,7 +415,7 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator) :
      }
    }

    if (universe->me == 0) {
    if ((universe->me == 0) && !helpflag) {
      if (screen) fprintf(screen,"LAMMPS (%s)\n",universe->version);
      if (logfile) fprintf(logfile,"LAMMPS (%s)\n",universe->version);
    }
@@ -489,7 +489,7 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator) :

    // screen and logfile messages for universe and world

    if (universe->me == 0) {
    if ((universe->me == 0) && (!helpflag)) {
      if (universe->uscreen) {
        fprintf(universe->uscreen,"LAMMPS (%s)\n",universe->version);
        fprintf(universe->uscreen,"Running on %d partitions of processors\n",
@@ -502,7 +502,7 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator) :
      }
    }

    if (me == 0) {
    if ((me == 0) && (!helpflag)) {
      if (screen) {
        fprintf(screen,"LAMMPS (%s)\n",universe->version);
        fprintf(screen,"Processor partition = %d\n",universe->iworld);
@@ -587,16 +587,15 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator) :
    memory->destroy(plast);
  }

  // allocate top-level classes

  create();
  post_create();

  // if helpflag set, print help and quit with "success" status
  // otherwise allocate top level classes.

  if (helpflag) {
    if (universe->me == 0 && screen) help();
    error->done(0);
  } else {
    create();
    post_create();
  }

  // if either restart conversion option was used, invoke 2 commands and quit
@@ -762,7 +761,7 @@ void LAMMPS::post_create()
  // check that KOKKOS package classes were instantiated
  // check that GPU, INTEL, USER-OMP fixes were compiled with LAMMPS

  if (!suffix_enable) return;
  if (suffix_enable) {

    if (strcmp(suffix,"gpu") == 0 && !modify->check_package("GPU"))
      error->all(FLERR,"Using suffix gpu without GPU package installed");
@@ -783,6 +782,7 @@ void LAMMPS::post_create()
      if (strcmp(suffix2,"intel") == 0) input->one("package intel 1");
      if (strcmp(suffix2,"omp") == 0) input->one("package omp 0");
    }
  }

  // invoke any command-line package commands

@@ -1082,6 +1082,14 @@ void LAMMPS::print_config(FILE *fp)
  const char *pkg;
  int ncword, ncline = 0;

  char *infobuf = Info::get_os_info();
  fprintf(fp,"OS: %s\n\n",infobuf);
  delete[] infobuf;

  infobuf = Info::get_compiler_info();
  fprintf(fp,"Compiler: %s\n\n",infobuf);
  delete[] infobuf;

  fputs("Active compile time flags:\n\n",fp);
  if (Info::has_gzip_support()) fputs("-DLAMMPS_GZIP\n",fp);
  if (Info::has_png_support()) fputs("-DLAMMPS_PNG\n",fp);
Loading