From 8f51332adfcd6a5745c846682995edb94d2a1219 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Fri, 22 Nov 2013 17:34:49 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11045 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- doc/Section_howto.html | 11 ++++---- doc/Section_howto.txt | 11 ++++---- doc/Section_start.html | 18 ++++++++++++- doc/Section_start.txt | 18 ++++++++++++- doc/Section_tools.html | 22 +++++++++++----- doc/Section_tools.txt | 22 +++++++++++----- doc/read_dump.html | 6 ++--- doc/read_dump.txt | 6 ++--- doc/read_restart.html | 26 +++++++++--------- doc/read_restart.txt | 26 +++++++++--------- doc/restart.html | 60 +++++++++++++++++++++++++++++++++--------- doc/restart.txt | 55 ++++++++++++++++++++++++++++---------- doc/write_data.html | 5 +--- doc/write_data.txt | 5 +--- doc/write_restart.html | 54 +++++++++++++++++++++++++++++-------- doc/write_restart.txt | 52 +++++++++++++++++++++++++++--------- 16 files changed, 281 insertions(+), 116 deletions(-) diff --git a/doc/Section_howto.html b/doc/Section_howto.html index 74f4917096..69c8add025 100644 --- a/doc/Section_howto.html +++ b/doc/Section_howto.html @@ -51,10 +51,9 @@ run will continue from where the previous run left off. Or binary restart files can be saved to disk using the restart command. At a later time, these binary files can be read via a read_restart command in a new script. Or they can -be converted to text data files and read by a -read_data command in a new script. This -section discusses the restart2data tool that is -used to perform the conversion. +be converted to text data files using the -r command-line +switch and read by a +read_data command in a new script.

Here we give examples of 2 scripts that read either a binary restart file or a converted data file and then issue a new run command to @@ -100,9 +99,9 @@ notice that the thermodynamic data match at step 50 (if you also put a uses random numbers in a way that does not allow for perfect restarts.

As an alternate approach, the restart file could be converted to a data -file using this tool: +file as follows:

-
restart2data tmp.restart.50 tmp.restart.data 
+
lmp_g++ -r tmp.restart.50 tmp.restart.data 
 

Then, this script could be used to re-run the last 50 steps:

diff --git a/doc/Section_howto.txt b/doc/Section_howto.txt index 9d1ba9911b..b52d2244d3 100644 --- a/doc/Section_howto.txt +++ b/doc/Section_howto.txt @@ -47,10 +47,9 @@ run will continue from where the previous run left off. Or binary restart files can be saved to disk using the "restart"_restart.html command. At a later time, these binary files can be read via a "read_restart"_read_restart.html command in a new script. Or they can -be converted to text data files and read by a -"read_data"_read_data.html command in a new script. "This -section"_Section_tools.html discusses the {restart2data} tool that is -used to perform the conversion. +be converted to text data files using the "-r command-line +switch"_Section_start.html#start_7 and read by a +"read_data"_read_data.html command in a new script. Here we give examples of 2 scripts that read either a binary restart file or a converted data file and then issue a new run command to @@ -96,9 +95,9 @@ notice that the thermodynamic data match at step 50 (if you also put a uses random numbers in a way that does not allow for perfect restarts. As an alternate approach, the restart file could be converted to a data -file using this tool: +file as follows: -restart2data tmp.restart.50 tmp.restart.data :pre +lmp_g++ -r tmp.restart.50 tmp.restart.data :pre Then, this script could be used to re-run the last 50 steps: diff --git a/doc/Section_start.html b/doc/Section_start.html index 230c8644ed..887b950630 100644 --- a/doc/Section_start.html +++ b/doc/Section_start.html @@ -1018,7 +1018,8 @@ letter abbreviation can be used:
  • -p or -partition
  • -pl or -plog
  • -ps or -pscreen -
  • -r or -reorder +
  • -r or -restart +
  • -ro or -reorder
  • -sc or -screen
  • -sf or -suffix
  • -v or -var @@ -1138,6 +1139,21 @@ sub-directory (-pscreen replica_files/screen). If this option is not used the screen file for partition N is screen.N or whatever is specified by the -screen command-line option.

    +
    -restart restartfile datafile 
    +
    +

    Convert the restart file into a data file and immediately exit. This +is the same operation as if the following 2-line input script were +run: +

    +
    read_restart restartfile
    +write_data datafile 
    +
    +

    Note that the specified restartfile and datafile can have wild-card +characters ("*",%") as described by the +read_restart and write_data +commands. But a filename such as file.* will need to be enclosed in +quotes to avoid shell expansion of the "*" character. +

    -reorder nth N
     -reorder custom filename 
     
    diff --git a/doc/Section_start.txt b/doc/Section_start.txt index f785d4d103..f3e1bc778d 100644 --- a/doc/Section_start.txt +++ b/doc/Section_start.txt @@ -1009,7 +1009,8 @@ letter abbreviation can be used: -p or -partition -pl or -plog -ps or -pscreen --r or -reorder +-r or -restart +-ro or -reorder -sc or -screen -sf or -suffix -v or -var :ul @@ -1129,6 +1130,21 @@ sub-directory (-pscreen replica_files/screen). If this option is not used the screen file for partition N is screen.N or whatever is specified by the -screen command-line option. +-restart restartfile datafile :pre + +Convert the restart file into a data file and immediately exit. This +is the same operation as if the following 2-line input script were +run: + +read_restart restartfile +write_data datafile :pre + +Note that the specified restartfile and datafile can have wild-card +characters ("*",%") as described by the +"read_restart"_read_restart.html and "write_data"_write_data.html +commands. But a filename such as file.* will need to be enclosed in +quotes to avoid shell expansion of the "*" character. + -reorder nth N -reorder custom filename :pre diff --git a/doc/Section_tools.html b/doc/Section_tools.html index fbbf46d10a..5c72e09e76 100644 --- a/doc/Section_tools.html +++ b/doc/Section_tools.html @@ -417,12 +417,22 @@ the README.txt file for more info.

    restart2data tool

    -

    IMPORTANT NOTE: LAMMPS now has a write_data command, -which can create a data file from within an input script. This means -a two line input script can read a restart file, and write it as a -data file. When the write_data command is fully functional, the -restart2data tool will be obsolete, and will be retired from the -distribution. +

    IMPORTANT NOTE: This tool is now obsolete and is not included in the +current LAMMPS distribution. This is becaues there is now a +write_data command, which can create a data file +from within an input script. Running LAMMPS with the "-r" +command-line switch as follows: +

    +

    lmp_g++ -r restartfile datafile +

    +

    is the same as running a 2-line input script: +

    +

    read_restart restartfile +write_data datafile +

    +

    which will produce the same data file that the restart2data tool used +to create. The following information is included in case you have an +older version of LAMMPS which still includes the restart2data tool.

    The file restart2data.cpp converts a binary LAMMPS restart file into an ASCII data file. The syntax for running the tool is diff --git a/doc/Section_tools.txt b/doc/Section_tools.txt index 0f794fab38..c2383a29e8 100644 --- a/doc/Section_tools.txt +++ b/doc/Section_tools.txt @@ -413,12 +413,22 @@ These tools were written by Aidan Thompson at Sandia. restart2data tool :h4,link(restart) -IMPORTANT NOTE: LAMMPS now has a "write_data"_write_data.html command, -which can create a data file from within an input script. This means -a two line input script can read a restart file, and write it as a -data file. When the write_data command is fully functional, the -restart2data tool will be obsolete, and will be retired from the -distribution. +IMPORTANT NOTE: This tool is now obsolete and is not included in the +current LAMMPS distribution. This is becaues there is now a +"write_data"_write_data.html command, which can create a data file +from within an input script. Running LAMMPS with the "-r" +"command-line switch"_Section_start.html#start_7 as follows: + +lmp_g++ -r restartfile datafile + +is the same as running a 2-line input script: + +read_restart restartfile +write_data datafile + +which will produce the same data file that the restart2data tool used +to create. The following information is included in case you have an +older version of LAMMPS which still includes the restart2data tool. The file restart2data.cpp converts a binary LAMMPS restart file into an ASCII data file. The syntax for running the tool is diff --git a/doc/read_dump.html b/doc/read_dump.html index 323defc696..be9f384ee6 100644 --- a/doc/read_dump.html +++ b/doc/read_dump.html @@ -71,9 +71,9 @@ coordinates, and optionally the atom velocities and image flags and the simluation box dimensions. This is useful for restarting a run from a particular snapshot in a dump file. See the read_restart and read_data -commands and the restart2data tool for -alternative methods to do this. Also see the rerun -command for a means of reading multiple snapshots from a dump file. +commands for alternative methods to do this. Also see the +rerun command for a means of reading multiple snapshots +from a dump file.

    Note that a simulation box must already be defined before using the read_dump command. This can be done by the diff --git a/doc/read_dump.txt b/doc/read_dump.txt index a7cddc6dfd..4a8a4a16ca 100644 --- a/doc/read_dump.txt +++ b/doc/read_dump.txt @@ -61,9 +61,9 @@ coordinates, and optionally the atom velocities and image flags and the simluation box dimensions. This is useful for restarting a run from a particular snapshot in a dump file. See the "read_restart"_read_restart.html and "read_data"_read_data.html -commands and the "restart2data"_Section_tools.html#restart tool for -alternative methods to do this. Also see the "rerun"_rerun.html -command for a means of reading multiple snapshots from a dump file. +commands for alternative methods to do this. Also see the +"rerun"_rerun.html command for a means of reading multiple snapshots +from a dump file. Note that a simulation box must already be defined before using the read_dump command. This can be done by the diff --git a/doc/read_restart.html b/doc/read_restart.html index 2c76ce6bf9..8b70735df2 100644 --- a/doc/read_restart.html +++ b/doc/read_restart.html @@ -61,9 +61,9 @@ produced the restart file, it could be a LAMMPS bug, so consider wrong.

    Because restart files are binary, they may not be portable to other -machines. They can be converted to ASCII data files using the -restart2data tool in the tools -sub-directory of the LAMMPS distribution. +machines. In this case, you can use the -r command-line +switch to convert a restart file to a data +file.

    Similar to how restart files are written (see the write_restart and restart @@ -81,16 +81,16 @@ set of multiple files to exist. The restart and write_restart commands explain how such sets are created. Read_restart will first read a filename where "%" is replaced by "base". This file tells LAMMPS how many processors -created the set. Read_restart then reads the additional files. For -example, if the restart file was specified as save.% when it was -written, then read_restart reads the files save.base, save.0, save.1, -... save.P-1, where P is the number of processors that created the -restart file. The processors in the current LAMMPS simulation share -the work of reading these files; each reads a roughly equal subset of -the files. The number of processors which created the set can be -different the number of processors in the current LAMMPS simulation. -This can be a fast mode of input on parallel machines that support -parallel I/O. +created the set and how many files are in it. Read_restart then reads +the additional files. For example, if the restart file was specified +as save.% when it was written, then read_restart reads the files +save.base, save.0, save.1, ... save.P-1, where P is the number of +processors that created the restart file. The processors in the +current LAMMPS simulation share the work of reading these files; each +reads a roughly equal subset of the files. The number of processors +which created the set can be different the number of processors in the +current LAMMPS simulation. This can be a fast mode of input on +parallel machines that support parallel I/O.


    diff --git a/doc/read_restart.txt b/doc/read_restart.txt index cc7a95d656..dd0a293dab 100644 --- a/doc/read_restart.txt +++ b/doc/read_restart.txt @@ -58,9 +58,9 @@ produced the restart file, it could be a LAMMPS bug, so consider wrong. Because restart files are binary, they may not be portable to other -machines. They can be converted to ASCII data files using the -"restart2data tool"_Section_tools.html#restart in the tools -sub-directory of the LAMMPS distribution. +machines. In this case, you can use the "-r command-line +switch"_Section_start.html#start_7 to convert a restart file to a data +file. Similar to how restart files are written (see the "write_restart"_write_restart.html and "restart"_restart.html @@ -78,16 +78,16 @@ set of multiple files to exist. The "restart"_restart.html and "write_restart"_write_restart.html commands explain how such sets are created. Read_restart will first read a filename where "%" is replaced by "base". This file tells LAMMPS how many processors -created the set. Read_restart then reads the additional files. For -example, if the restart file was specified as save.% when it was -written, then read_restart reads the files save.base, save.0, save.1, -... save.P-1, where P is the number of processors that created the -restart file. The processors in the current LAMMPS simulation share -the work of reading these files; each reads a roughly equal subset of -the files. The number of processors which created the set can be -different the number of processors in the current LAMMPS simulation. -This can be a fast mode of input on parallel machines that support -parallel I/O. +created the set and how many files are in it. Read_restart then reads +the additional files. For example, if the restart file was specified +as save.% when it was written, then read_restart reads the files +save.base, save.0, save.1, ... save.P-1, where P is the number of +processors that created the restart file. The processors in the +current LAMMPS simulation share the work of reading these files; each +reads a roughly equal subset of the files. The number of processors +which created the set can be different the number of processors in the +current LAMMPS simulation. This can be a fast mode of input on +parallel machines that support parallel I/O. :line diff --git a/doc/restart.html b/doc/restart.html index 2b651482a5..7091c9f3cc 100644 --- a/doc/restart.html +++ b/doc/restart.html @@ -14,13 +14,27 @@

    Syntax:

    restart 0
    -restart N root
    -restart N file1 file2 
    +restart N root keyword value ...
    +restart N file1 file2 keyword value ... 
     
    -
    • N = write a restart file every this many timesteps -
    • N can be a variable (see below) -
    • root = filename to which timestep # is appended +
      • N = write a restart file every this many timesteps + +
      • N can be a variable (see below) + +
      • root = filename to which timestep # is appended +
      • file1,file2 = two full filenames, toggle between them when writing file + +
      • zero or more keyword/value pairs may be appended + +
      • keyword = fileper or nfile + +
          fileper arg = Np
        +    Np = write one file for every this many processors
        +  nfile arg = Nf
        +    Nf = write this many files, one from each of Nf processors 
        +
        +

      Examples:

      @@ -67,7 +81,8 @@ For example, the files written on step 1000 for filename restart.% would be restart.base.1000, restart.0.1000, restart.1.1000, ..., restart.P-1.1000. This creates smaller files and can be a fast mode of output and subsequent input on parallel machines that support -parallel I/O. +parallel I/O. The optional fileper and nfile keywords discussed +below can alter the number of files written.

      Restart files are written on timesteps that are a multiple of N but not on the first timestep of a run or minimization. You can use the @@ -99,18 +114,37 @@ restart v_s tmp.restart


      See the read_restart command for information about -what is stored in a restart file. +what is stored in a restart file.

      Restart files can be read by a read_restart command to restart a simulation from a particular state. Because the file is binary (to enable exact restarts), it may not be readable on -another machine. In this case, the restart2data -program in the tools directory can be used -to convert a restart file to an ASCII data file. Both the -read_restart command and restart2data tool can read in a restart file -that was written with the "%" character so that multiple files were -created. +another machine. In this case, you can use the -r command-line +switch to convert a restart file to a data +file.

      +
      + +

      The optional nfile or fileper keywords can be used in conjunction +with the "%" wildcard character in the specified restart file name(s). +As explained above, the "%" character causes the restart file to be +written in pieces, one piece for each of P processors. By default P = +the number of processors the simulation is running on. The nfile or +fileper keyword can be used to set P to a smaller value, which can +be more efficient when running on a large number of processors. +

      +

      The nfile keyword sets P to the specified Nf value. For example, if +Nf = 4, and the simulation is running on 100 processors, 4 files will +be written, by processors 0,25,50,75. Each will collect information +from itself and the next 24 processors and write it to a restart file. +

      +

      For the fileper keyword, the specified value of Np means write one +file for every Np processors. For example, if Np = 4, every 4th +processor (0,4,8,12,etc) will collect information from itself and the +next 3 processors and write it to a restart file. +

      +
      +

      Restrictions: none

      Related commands: diff --git a/doc/restart.txt b/doc/restart.txt index 64caa28850..46104b8999 100644 --- a/doc/restart.txt +++ b/doc/restart.txt @@ -11,13 +11,20 @@ restart command :h3 [Syntax:] restart 0 -restart N root -restart N file1 file2 :pre +restart N root keyword value ... +restart N file1 file2 keyword value ... :pre -N = write a restart file every this many timesteps -N can be a variable (see below) -root = filename to which timestep # is appended -file1,file2 = two full filenames, toggle between them when writing file :ul +N = write a restart file every this many timesteps :ulb,l +N can be a variable (see below) :l +root = filename to which timestep # is appended :l +file1,file2 = two full filenames, toggle between them when writing file :l +zero or more keyword/value pairs may be appended :l +keyword = {fileper} or {nfile} :l + {fileper} arg = Np + Np = write one file for every this many processors + {nfile} arg = Nf + Nf = write this many files, one from each of Nf processors :pre +:ule [Examples:] @@ -64,7 +71,8 @@ For example, the files written on step 1000 for filename restart.% would be restart.base.1000, restart.0.1000, restart.1.1000, ..., restart.P-1.1000. This creates smaller files and can be a fast mode of output and subsequent input on parallel machines that support -parallel I/O. +parallel I/O. The optional {fileper} and {nfile} keywords discussed +below can alter the number of files written. Restart files are written on timesteps that are a multiple of N but not on the first timestep of a run or minimization. You can use the @@ -96,17 +104,36 @@ restart v_s tmp.restart :pre :line See the "read_restart"_read_restart.html command for information about -what is stored in a restart file. +what is stored in a restart file. Restart files can be read by a "read_restart"_read_restart.html command to restart a simulation from a particular state. Because the file is binary (to enable exact restarts), it may not be readable on -another machine. In this case, the "restart2data -program"_Section_tools.html#restart in the tools directory can be used -to convert a restart file to an ASCII data file. Both the -read_restart command and restart2data tool can read in a restart file -that was written with the "%" character so that multiple files were -created. +another machine. In this case, you can use the "-r command-line +switch"_Section_start.html#start_7 to convert a restart file to a data +file. + +:line + +The optional {nfile} or {fileper} keywords can be used in conjunction +with the "%" wildcard character in the specified restart file name(s). +As explained above, the "%" character causes the restart file to be +written in pieces, one piece for each of P processors. By default P = +the number of processors the simulation is running on. The {nfile} or +{fileper} keyword can be used to set P to a smaller value, which can +be more efficient when running on a large number of processors. + +The {nfile} keyword sets P to the specified Nf value. For example, if +Nf = 4, and the simulation is running on 100 processors, 4 files will +be written, by processors 0,25,50,75. Each will collect information +from itself and the next 24 processors and write it to a restart file. + +For the {fileper} keyword, the specified value of Np means write one +file for every Np processors. For example, if Np = 4, every 4th +processor (0,4,8,12,etc) will collect information from itself and the +next 3 processors and write it to a restart file. + +:line [Restrictions:] none diff --git a/doc/write_data.html b/doc/write_data.html index c17f749e79..64ecc40b42 100644 --- a/doc/write_data.html +++ b/doc/write_data.html @@ -65,10 +65,7 @@ original input script. restart, write_restart, and read_restart commands. You can also convert binary restart files to text data files, after a simulation has run, -using the restart2data tool in the -tools directory. When the write_data command is fully implemented -(see NOTE above), the restart2data command will be obsolete and will -be removed from the LAMMPS distribution. +using the -r command-line switch.

      IMPORTANT NOTE: Only limited information about a simulation is stored in a data file. For example, no information about atom diff --git a/doc/write_data.txt b/doc/write_data.txt index bb5655476d..d914fe4b6c 100644 --- a/doc/write_data.txt +++ b/doc/write_data.txt @@ -58,10 +58,7 @@ If you want to do more exact restarts, using binary files, see the "restart"_restart.html, "write_restart"_write_restart.html, and "read_restart"_read_restart.html commands. You can also convert binary restart files to text data files, after a simulation has run, -using the "restart2data"_Section_tools.html#restart2data tool in the -tools directory. When the write_data command is fully implemented -(see NOTE above), the restart2data command will be obsolete and will -be removed from the LAMMPS distribution. +using the "-r command-line switch"_Section_start.html#start_7. IMPORTANT NOTE: Only limited information about a simulation is stored in a data file. For example, no information about atom diff --git a/doc/write_restart.html b/doc/write_restart.html index b3cfabddd6..16bd95cdf0 100644 --- a/doc/write_restart.html +++ b/doc/write_restart.html @@ -13,23 +13,34 @@

      Syntax:

      -
      write_restart file 
      +
      write_restart file keyword value ... 
       
      • file = name of file to write restart information to + +
      • zero or more keyword/value pairs may be appended + +
      • keyword = fileper or nfile + +
          fileper arg = Np
        +    Np = write one file for every this many processors
        +  nfile arg = Nf
        +    Nf = write this many files, one from each of Nf processors 
        +
        +

      Examples:

      write_restart restart.equil
      -write_restart poly.%.* 
      +write_restart poly.%.* nfile 10 
       

      Description:

      Write a binary restart file of the current state of the simulation.

      During a long simulation, the restart command is -typically used to dump restart files periodically. The write_restart -command is useful after a minimization or whenever you wish to write -out a single current restart file. +typically used to output restart files periodically. The +write_restart command is useful after a minimization or whenever you +wish to write out a single current restart file.

      Similar to dump files, the restart filename can contain two wild-card characters. If a "*" appears in the filename, it is @@ -41,16 +52,15 @@ contains global information. For example, the files written for filename restart.% would be restart.base, restart.0, restart.1, ... restart.P-1. This creates smaller files and can be a fast mode of output and subsequent input on parallel machines that support parallel -I/O. +I/O. The optional fileper and nfile keywords discussed below can +alter the number of files written.

      Restart files can be read by a read_restart command to restart a simulation from a particular state. Because the file is binary (to enable exact restarts), it may not be readable on -another machine. In this case, the restart2data program in the tools -directory can be used to convert a restart file to an ASCII data file. -Both the read_restart command and restart2data tool can read in a -restart file that was written with the "%" character so that multiple -files were created. +another machine. In this case, you can use the -r command-line +switch to convert a restart file to a data +file.

      IMPORTANT NOTE: Although the purpose of restart files is to enable restarting a simulation from where it left off, not all information @@ -63,6 +73,28 @@ in order to re-use that information. See the read_restart command for information about what is stored in a restart file.

      +
      + +

      The optional nfile or fileper keywords can be used in conjunction +with the "%" wildcard character in the specified restart file name. +As explained above, the "%" character causes the restart file to be +written in pieces, one piece for each of P processors. By default P = +the number of processors the simulation is running on. The nfile or +fileper keyword can be used to set P to a smaller value, which can +be more efficient when running on a large number of processors. +

      +

      The nfile keyword sets P to the specified Nf value. For example, if +Nf = 4, and the simulation is running on 100 processors, 4 files will +be written, by processors 0,25,50,75. Each will collect information +from itself and the next 24 processors and write it to a restart file. +

      +

      For the fileper keyword, the specified value of Np means write one +file for every Np processors. For example, if Np = 4, every 4th +processor (0,4,8,12,etc) will collect information from itself and the +next 3 processors and write it to a restart file. +

      +
      +

      Restrictions:

      This command requires inter-processor communication to migrate atoms diff --git a/doc/write_restart.txt b/doc/write_restart.txt index fcb99e4f39..8e3378681f 100644 --- a/doc/write_restart.txt +++ b/doc/write_restart.txt @@ -10,23 +10,30 @@ write_restart command :h3 [Syntax:] -write_restart file :pre +write_restart file keyword value ... :pre -file = name of file to write restart information to :ul +file = name of file to write restart information to :ulb,l +zero or more keyword/value pairs may be appended :l +keyword = {fileper} or {nfile} :l + {fileper} arg = Np + Np = write one file for every this many processors + {nfile} arg = Nf + Nf = write this many files, one from each of Nf processors :pre +:ule [Examples:] write_restart restart.equil -write_restart poly.%.* :pre +write_restart poly.%.* nfile 10 :pre [Description:] Write a binary restart file of the current state of the simulation. During a long simulation, the "restart"_restart.html command is -typically used to dump restart files periodically. The write_restart -command is useful after a minimization or whenever you wish to write -out a single current restart file. +typically used to output restart files periodically. The +write_restart command is useful after a minimization or whenever you +wish to write out a single current restart file. Similar to "dump"_dump.html files, the restart filename can contain two wild-card characters. If a "*" appears in the filename, it is @@ -38,16 +45,15 @@ contains global information. For example, the files written for filename restart.% would be restart.base, restart.0, restart.1, ... restart.P-1. This creates smaller files and can be a fast mode of output and subsequent input on parallel machines that support parallel -I/O. +I/O. The optional {fileper} and {nfile} keywords discussed below can +alter the number of files written. Restart files can be read by a "read_restart"_read_restart.html command to restart a simulation from a particular state. Because the file is binary (to enable exact restarts), it may not be readable on -another machine. In this case, the restart2data program in the tools -directory can be used to convert a restart file to an ASCII data file. -Both the read_restart command and restart2data tool can read in a -restart file that was written with the "%" character so that multiple -files were created. +another machine. In this case, you can use the "-r command-line +switch"_Section_start.html#start_7 to convert a restart file to a data +file. IMPORTANT NOTE: Although the purpose of restart files is to enable restarting a simulation from where it left off, not all information @@ -60,6 +66,28 @@ in order to re-use that information. See the "read_restart"_read_restart.html command for information about what is stored in a restart file. +:line + +The optional {nfile} or {fileper} keywords can be used in conjunction +with the "%" wildcard character in the specified restart file name. +As explained above, the "%" character causes the restart file to be +written in pieces, one piece for each of P processors. By default P = +the number of processors the simulation is running on. The {nfile} or +{fileper} keyword can be used to set P to a smaller value, which can +be more efficient when running on a large number of processors. + +The {nfile} keyword sets P to the specified Nf value. For example, if +Nf = 4, and the simulation is running on 100 processors, 4 files will +be written, by processors 0,25,50,75. Each will collect information +from itself and the next 24 processors and write it to a restart file. + +For the {fileper} keyword, the specified value of Np means write one +file for every Np processors. For example, if Np = 4, every 4th +processor (0,4,8,12,etc) will collect information from itself and the +next 3 processors and write it to a restart file. + +:line + [Restrictions:] This command requires inter-processor communication to migrate atoms