Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(StringUnlimitedMap), | intent(in) | :: | options | |||
type(cli_options), | intent(out) | :: | cli |
subroutine get_cli_options(options, cli) type(StringUnlimitedMap), intent(in) :: options type(cli_options), intent(out) :: cli class(*), pointer :: option logical :: tmp option => options%at("config_file") if (associated(option)) call cast(option, cli%config_file) option => options%at("nx") if (associated(option)) call cast(option, cli%nx) option => options%at("ny") if (associated(option)) call cast(option, cli%ny) option => options%at("im_world") if (associated(option)) call cast(option, cli%im_world) option => options%at("lm") if (associated(option)) call cast(option, cli%lm) option => options%at("num_writers") if (associated(option)) call cast(option, cli%num_writers) option => options%at("num_arrays") if (associated(option)) call cast(option, cli%num_arrays) option => options%at("ntrials") if (associated(option)) call cast(option, cli%n_trials) option => options%at("split_file") if (associated(option)) call cast(option, cli%split_file) option => options%at("gather_3d") if (associated(option)) call cast(option, cli%gather_3d) option => options%at("write_barrier") if (associated(option)) call cast(option, cli%write_barrier) option => options%at("static_data") if (associated(option)) call cast(option, tmp) cli%random_data = .not. tmp option => options%at("suppress_writes") if (associated(option)) call cast(option, tmp) cli%do_writes = .not. tmp option => options%at("write_binary") if (associated(option)) call cast(option, tmp) cli%netcdf_writes = .not. tmp option => options%at("no_chunking") if (associated(option)) call cast(option, tmp) cli%do_chunking = .not. tmp end subroutine get_cli_options