dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #16947
Re: parsing parameters
On Tue, Dec 8, 2009 at 1:00 PM, Anders Logg <logg@xxxxxxxxx> wrote:
> On Tue, Dec 08, 2009 at 12:42:20PM -0600, Andy Ray Terrel wrote:
>> Am I doing something wrong here or is this a bug?
>>
>> dolfin/demo/parameters/cpp$ ./demo --foo 1.0
>>
>> results in:
>>
>> Parsing command-line arguments...
>> terminate called after throwing an instance of
>> 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::program_options::unknown_option>
>> >'
>> what(): unknown option foo
>>
>>
>> this is happens on both my mac and ubuntu boxes.
>>
>> -- Andy
>
> You're doing it all wrong! It should be "bar", not "foo".
>
> --
> Anders
>
Shouldn't foo work or is there some other way to specify it on the
command line. I have this trouble with all reals. From the demo:
Parameters application_parameters("application_parameters");
// Create application parameters
application_parameters.add("foo", 1.0);
application_parameters.add("bar", 100);
application_parameters.add("pc", "amg");
// Parse command-line options
application_parameters.parse(argc, argv);
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAkseojgACgkQTuwUCDsYZdGtnACgl0gyt4U1qk5pYLoE/zOCtEuV
> 2O4An1pAdHfgcoNQeJm6jPUgZ178fox5
> =aj6q
> -----END PGP SIGNATURE-----
>
>
Follow ups
References