parse_arguments Function

public function parse_arguments() result(options)

Arguments

None

Return Value type(StringUnlimitedMap)


Calls

proc~~parse_arguments~~CallsGraph proc~parse_arguments parse_arguments add_argument add_argument proc~parse_arguments->add_argument argparser argparser proc~parse_arguments->argparser initialize initialize proc~parse_arguments->initialize parse_args parse_args proc~parse_arguments->parse_args

Called by

proc~~parse_arguments~~CalledByGraph proc~parse_arguments parse_arguments program~checkpoint_tester checkpoint_tester program~checkpoint_tester->proc~parse_arguments

Source Code

   function parse_arguments() result(options)

      type(StringUnlimitedMap) :: options
      type(ArgParser), target :: parser

      call parser%initialize('checkpoint_simulator.x')
      parser = ArgParser()

      call parser%add_argument("--config_file", &
         help="The configuration file to use", &
         action="store", &
         type="string")

      call parser%add_argument("--nx", &
         help="The number of cells in the x direction (default: 4)", &
         action="store", &
         type="integer", &
         default=4)

      call parser%add_argument("--ny", &
         help="The number of cells in the y direction (default: 4)", &
         action="store", &
         type="integer", &
         default=4)

      call parser%add_argument("--im_world", &
         help="The resolution of the cubed sphere (default: 90)", &
         action="store", &
         type="integer", &
         default=90)

      call parser%add_argument("--lm", &
         help="The number of levels in each 3D variable (default: 137)", &
         action="store", &
         type="integer", &
         default=137)

      call parser%add_argument("--num_readers", &
         help="The number of processes that will read (default: 1)", &
         action="store", &
         type="integer", &
         default=1)

      call parser%add_argument("--num_arrays", &
         help="The number of 3D arrays to read (default: 5)", &
         action="store", &
         type="integer", &
         default=5)

      call parser%add_argument("--ntrials", &
         help="The number of trials to run (default: 3)", &
         action="store", &
         type="integer", &
         default=3)

      call parser%add_argument("--split_file", &
         help="Read split files instead of a single file (default: read single file)", &
         action="store_true", &
         default=.false.)

      call parser%add_argument("--scatter_3d", &
         help="Scatter all the levels at once instead of one at a time (default: scatter one at a time)", &
         action="store_true", &
         default=.false.)

      call parser%add_argument("--read_barrier", &
         help="Add a barrier after every read (default: no barrier)", &
         action="store_true", &
         default=.false.)

      call parser%add_argument("--static_data", &
         help="Use static data (rank of process) instead of random data (default: random data)", &
         action="store_true", &
         default=.false.)

      call parser%add_argument("--suppress_reads", &
         help="Do not read data (default: read data)", &
         action="store_true", &
         default=.false.)

      call parser%add_argument("--read_binary", &
         help="Read binary data instead of netCDF (default: netCDF data)", &
         action="store_true", &
         default=.false.)

      options = parser%parse_args()

   end function parse_arguments