nansencenter / DAPPER

Data Assimilation with Python: a Package for Experimental Research
https://nansencenter.github.io/DAPPER
MIT License
341 stars 119 forks source link

fixes issue #61 #62

Closed yumengch closed 3 years ago

yumengch commented 3 years ago

In the end, I realise the non-canonical mode still works in WSL so I simply use select instead of setting VMIN and VTIME to 0. This leads to very little change in the code.

I also added the disable_user_interaction output.

patnr commented 3 years ago

Looks promising. I'm a little surprised that select works all the way. As you saw in the gist, previously I could only get it to work for on my Unix-like system. But indeed, your PR works fine for me on Ubuntu now. I will test on MacOS tonight.

yumengch commented 3 years ago

Otherwise I think the thread-based method is the way to go.

There are 51 commits in this PR, most of which have long since been merged. I don't know why. But it does not look good for the history, and slightly complicates discussions. So we need to fix this. Please let me know if the issue is caused on my side.

  • Indeed it is my fault. I squashed some commits and I think I should properly organize my repo and rebase commits after this pull request.
patnr commented 3 years ago

Works like a charm, also on Mac 😁

Congrats and thanks!

So, if I've understood correctly: this

    TS_new[6][termios.VMIN] = 0
    TS_new[6][termios.VTIME] = 0

seems to have caused an issue on WSL, while the new solution using select does not seem to cause issues on any platform that we have tested.

yumengch commented 3 years ago

So, if I've understood correctly: this

    TS_new[6][termios.VMIN] = 0
    TS_new[6][termios.VTIME] = 0

seems to have caused an issue on WSL, while the new solution using select does not seem to cause issues on any platform that we have tested.

Good news. Yes, this seems to be the problem.