I get a "Unable to open file" error:
"Cannot open PetscViewer file: 
\\cygdrive\\c\\some_path_that_exists\\petsc_log.txt".

My input to PETSc was "-log_view 
/cygdrive/c/some_path_that_exists/petsc_log.txt" so the path gets converted 
into windows "\\" separators.

I tried and looked for a way to avoid using a colon but could not find one.
Milan

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Le lundi 22 novembre 2021 à 5:05 PM, Matthew Knepley <[email protected]> a 
écrit :

> On Mon, Nov 22, 2021 at 10:36 AM Milan Pelletier 
> <[email protected]> wrote:
>
>> Matt,
>> Thanks for the answer. I could fix my issue regarding unbalanced events - 
>> and so SNES ex5 does work well too.
>> By the way, such imbalance does not trigger errors when log_view is using 
>> plain ascii output, but it does fail when ascii_xml is used instead.
>
> Yes, we have a "failsafe" for the regular logging, but the XML is 
> specifically hierarchical and we do not know how to close it. We could take 
> another look at that.
>
>> Unfortunately, regarding absolute paths, I had also tried to use cygwin 
>> paths (`/cygdrive/c/...`) but that does not work either.
>
> Hmm, that should work I think. Satish, do we have a machine to login and test 
> something like this?
>
> Thanks,
>
> Matt
>
>> Best,
>> Milan
>>
>> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
>> Le lundi 22 novembre 2021 à 2:39 PM, Matthew Knepley <[email protected]> a 
>> écrit :
>>
>>> On Mon, Nov 22, 2021 at 5:38 AM Milan Pelletier via petsc-users 
>>> <[email protected]> wrote:
>>>
>>>> Dear PETSc team,
>>>>
>>>> The way some options are passed to PETSc can be an issue on Windows, in 
>>>> particular regarding the "log_view" option.
>>>> Since the colon ':' character is used as a separator, I do not see how 
>>>> absolute paths should be provided on Windows (since the drive name 
>>>> includes a colon). Is there a trick / workaround to overcome this?
>>>
>>> I thought we used Cygwin paths, but maybe one of the Windows people knows 
>>> better.
>>>
>>>> Besides, when I try to use the ascii_xml format, it crashes in file 
>>>> xmllogevent.c, on line 751:
>>>> illegalEvent = 1+nestedEvents[nNestedEvents-1].nstEvent;
>>>> (since nestedEvents is NULL).
>>>
>>> This likely means that you have unbalanced events. I can run this on 
>>> examples. For instance does SNES ex5 work for you?
>>>
>>> Thanks,
>>>
>>> Matt
>>>
>>>> I'm using PETSc version 3.16.1 (using `git checkout tags/v3.16.1`).
>>>>
>>>> Thanks for your help,
>>>> Best regards,
>>>> Milan Pelletier
>>>
>>> --
>>>
>>> What most experimenters take for granted before they begin their 
>>> experiments is infinitely more interesting than any results to which their 
>>> experiments lead.
>>> -- Norbert Wiener
>>>
>>> [https://www.cse.buffalo.edu/~knepley/](http://www.cse.buffalo.edu/~knepley/)
>
> --
>
> What most experimenters take for granted before they begin their experiments 
> is infinitely more interesting than any results to which their experiments 
> lead.
> -- Norbert Wiener
>
> [https://www.cse.buffalo.edu/~knepley/](http://www.cse.buffalo.edu/~knepley/)

Reply via email to