function input_print ( chain_filename, chain_num, cr_num, gr_filename, ...
  gr_threshold, jumpstep, limits, gen_num, pair_num, par_num, printstep, ...
  restart_read_filename, restart_write_filename )

%*****************************************************************************80
%
%% INPUT_PRINT prints the data from the input file.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    22 January 2018
%
%  Author:
%
%    John Burkardt
%
%  Input parameters:
%
%    Input, string CHAIN_FILENAME, the "base" filename
%    to be used for the chain files.  If this is the empty string '',
%    then the chain files will not be written.  This name should 
%    include a string of 0s which will be replaced by the chain 
%    indices.  For example, "chain000.txt" would work as long as the
%    number of chains was 1000 or less.
%
%    Input, integer CHAIN_NUM, the total number of chains.
%    3 <= CHAIN_NUM.
%
%    Input, integer CR_NUM, the total number of CR values.
%    1 <= CR_NUM.
%
%    Input, string GR_FILENAME, the name of the file
%    in which values of the Gelman-Rubin statistic will be recorded,
%    or '' if no such file is to be created.
%
%    Input, real GR_THRESHOLD, the convergence tolerance for the
%    Gelman-Rubin statistic.
%
%    Input, integer JUMPSTEP, forces a "long jump" every
%    JUMPSTEP generations.
%
%    Input, real LIMITS(2,PAR_NUM), lower and upper limits
%    for each parameter.
%
%    Input, integer GEN_NUM, the total number of generations.
%    2 <= GEN_NUM.
%
%    Input, integer PAIR_NUM, the number of pairs of 
%    crossover chains.
%    0 <= PAIR_NUM.
%
%    Input, integer PAR_NUM, the total number of parameters.
%    1 <= PAR_NUM.
%
%    Input, integer PRINTSTEP, the interval between generations on 
%    which the Gelman-Rubin statistic will be computed and written to a file.
%
%    Input, string RESTART_READ_FILENAME, the name of the file
%    containing restart information, or '' if this is not a restart run.
%
%    Input, string RESTART_WRITE_FILENAME, the name of the file
%    to be written, containing restart information, or '' if a restart file 
%    is not to be written.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'INPUT_PRINT:\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Number of parameters\n' );
  fprintf ( 1, '  PAR_NUM = %d\n', par_num  );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Lower and upper limits for each parameter:\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '   Index       Lower           Upper\n' );
  fprintf ( 1, '\n' );
  for j = 1 : par_num
    fprintf ( 1, '  %6d  %14.6g  %14.6g\n', j, limits(1:2,j) );
  end
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Number of generations:\n' );
  fprintf ( 1, '  GEN_NUM = %d\n', gen_num );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Number of simultaneous chains:\n' );
  fprintf ( 1, '  CHAIN_NUM = %d\n', chain_num );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Chain filename (base):\n' );
  if ( length ( chain_filename ) == 0 )
    fprintf ( 1, '  CHAIN_FILENAME = "(None)".\n' );
  else
    fprintf ( 1, '  CHAIN_FILENAME = "%s"\n', chain_filename );
  end

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Number of pairs of chains for crossover:\n' );
  fprintf ( 1, '  PAIR_NUM = %d\n', pair_num );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Number of crossover values:\n' );
  fprintf ( 1, '  CR_NUM = %d\n', cr_num );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Number of steps til a long jump:\n' );
  fprintf ( 1, '  JUMPSTEP = %d\n', jumpstep );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Interval between Gelman-Rubin computations:\n' );
  fprintf ( 1, '  PRINTSTEP = %d\n', printstep );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Gelman-Rubin output filename:\n' );
  if ( length ( gr_filename ) == 0 )
    fprintf ( 1, '  GR_FILENAME = "(None)".\n' );
  else
    fprintf ( 1, '  GR_FILENAME = "%s"\n', gr_filename );
  end
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Gelman-Rubin convergence tolerance:\n' );
  fprintf ( 1, '  GR_THRESHOLD = %14.6g\n', gr_threshold );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Restart read filename:\n' );
  if ( length ( restart_read_filename ) == 0 )
    fprintf ( 1, '  RESTART_READ_FILENAME = "(None)".\n' );
  else
    fprintf ( 1, '  RESTART_READ_FILENAME = "%s"\n', restart_read_filename );
  end
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Restart write filename:\n' );
  if ( length ( restart_write_filename ) == 0 )
    fprintf ( 1, '  RESTART_WRITE_FILENAME = "(None)".\n' );
  else
    fprintf ( 1, '  RESTART_WRITE_FILENAME = "%s"\n', restart_write_filename );
  end

  return
end
