[petsc-dev] Fortran equivalent + separate output with output_file
Pierre Jolivet
pierre.jolivet at enseeiht.fr
Mon Jan 13 12:52:11 CST 2020
Sorry, this wasn’t very clear. Here is an actual example.
Two files: src/ksp/ksp/examples/tutorials/output/ex76_geneo_pc_hpddm_levels_1_eps_nev-*
One test: https://gitlab.com/petsc/petsc/blob/e3a9cad86c45dfe6b153c9deb31f048d223f14ce/src/ksp/ksp/examples/tutorials/ex76f.F90#L120-125 <https://gitlab.com/petsc/petsc/blob/e3a9cad86c45dfe6b153c9deb31f048d223f14ce/src/ksp/ksp/examples/tutorials/ex76f.F90#L120-125>
How not to hardwire -pc_hpddm_levels_1_eps_nev 5 in the Fortran test and use, as in C, -pc_hpddm_levels_1_eps_nev {{5 15}separate output}, while still using the C output files?
Thanks,
Pierre
> On 13 Jan 2020, at 5:42 PM, Scott Kruger <kruger at txcorp.com> wrote:
>
>
> On 1/13/20 8:32 AM, Pierre Jolivet wrote:
>> Hello,
>> This is actually two separate questions, sorry.
>> 1) I’m looking for the Fortran equivalent of the following, but I couldn’t get any help looking at the sources.
>> ierr = PetscOptionsBegin(PETSC_COMM_WORLD,"","","");CHKERRQ(ierr);
>> ierr = PetscOptionsFList("-mat_type","Matrix type","MatSetType",MatList,deft,type,256,&flg);CHKERRQ(ierr);
>> ierr = PetscOptionsEnd();CHKERRQ(ierr);
>> 2) I have Fortran tests which share the same outputs as my C tests. I want to use the same output_file, but my test has a separate output parameter. Is there someway to generate output_file dynamically?
>> ! test:
>> ! suffix: foo
>> ! output_file: output/ex76_foo_bar-%D.out <— how to?
>> ! nsize: 4
>> ! args: -bar {{5 15}separate output}
>> If it’s not possible in Fortran, but possible in C, I can switch things around of course.
>
> I don't understand the goal here. Why don't you always know the name?
>
> Scott
>
> --
> Tech-X Corporation kruger at txcorp.com <mailto:kruger at txcorp.com>
> 5621 Arapahoe Ave, Suite A Phone: (720) 974-1841
> Boulder, CO 80303 Fax: (303) 448-7756
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20200113/be2d1f06/attachment.html>
More information about the petsc-dev
mailing list