Namespace the PETSc options or use something other than the command line (e.g., PETSC_OPTIONS env variable or a file). There is no way to know in advance all the options that could be requested through the PETSc options system. If the other app has a well-defined list of allowed options, you could whitelist those at program startup and leave everything else for PETSc.
Jacob Faibussowitsch <[email protected]> writes: > Hello all, > > I use petsc/slepc as the driver for running another library code and would > like to pass command line options through but this library takes the approach > of erroring out when it encounters an unknown option (i.e. some option that > petsc would use but it would not). My current way of dealing with the problem > is to run my script with “-help” option to save the output in a separate > ascii file, then next time the program is run remove any options found in the > file from the options passed through. > > Clearly this isn’t exactly a bulletproof scheme, so I’m wondering if there is > a smarter way to do it. > > Best regards, > > Jacob Faibussowitsch > (Jacob Fai - booss - oh - vitch) > Cell: (312) 694-3391
