function hello_parfor_test ( )

%*****************************************************************************80
%
%% hello_parfor_test() uses parpool() to run the hello() code in parallel.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    10 December 2023
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../hello_parfor' );

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'hello_parfor_test():\n' );
  fprintf ( 1, '  hello_parfor() simply prints "Hello, world!" multiple times.\n' );
  fprintf ( 1, '  The parfor() function is used for parallel execution.\n' );
  fprintf ( 1, '\n' );

  w = 4;
  n = 10;
  pool = parpool ( w );
  hello_parfor ( n );
  delete ( pool );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'hello_parfor_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  timestamp ( );

  rmpath ( '../hello_parfor' );

  return
end
function timestamp ( )

%*****************************************************************************80
%
%% timestamp() prints the YhelloHMS date as a timestamp.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 November 2022
%
%  Author:
%
%    John Burkardt
%
  t = now ( );
  c = datevec ( t );
  s = datestr ( c, 0 );
  fprintf ( 1, '%s\n', s );

  return
end

