firelab / windninja-mobile

Mobile application for WindNinja
0 stars 0 forks source link

Run fails after the momentum solver completes successfully #156

Closed nwagenbrenner closed 5 years ago

nwagenbrenner commented 5 years ago

The run fails after the outputs are written. This is job 418a2319d9ae49d0ade57a039562b8c1 on the dev server. I was watching as the WindNinja run completed and the outputs were being written to wncli/output. Then, when the runs were done it looked like the output folder was deleted and a new folder called "results" was created, but there is nothing in it. Is there some issue moving the outputs around? @fspataro

Log file attached:

windninja.log

related issue #133

fspataro-zz commented 5 years ago

I'm jumping on the server to take a look ... the log says:

WindNinjaCLI did not produce windninja ascii outputs for the job parameters

I'm also noticing that the stdout for the solver doesn't include the "simulation time" lines. The code after the CLI is totally dependent on the output of the date time stamp. It uses the following lines to determine what got generated and to appropriately time-zone the information for the client:

Run 1: Simulation time is 2019-Mar-07 09:00:00 MST

If the momentum solver generates results in a completely different manner than the basic solver, we'll have to generate a new pipeline for processing the results.

fspataro-zz commented 5 years ago

The job cli looks like it's creating all the outputs correctly and the error boils down to that missing line in the stdout. This is definitely a pretty fragile implementation but it was the only place to get the info. The core windninja parts are heavily biased to a "desktop client" where the user would already know this info. In the client-server architecture were the server, client and domain can all be in 3 different timezones, some way to get at this info explicitly would be helpful.

The other option is for the job processor to figure out all that info but it added a bunch of extra processing that was duplicated in the core WindNinja so we relied on stdout for the info.

image

How hard is it to get that line into the stdout when the momentum solver is running?

It would take a good day to rework and test the processing pipeline to handle the missing metadata. But then we'd be re-opening a number of client issues re: the time zone info in the app.

nwagenbrenner commented 5 years ago

Just added the simulation time output to the momentum solver stdout. I re-built and re-installed WindNinja. Looks like you edited some things on the server though (I see my foam path fix was commented out), so the runs are still failing. I think things should work now if you put them back the way they were.

fspataro-zz commented 5 years ago

Great!

I'm verifying the pre-commands can be set in the config file rather than in the py....

fspataro-zz commented 5 years ago

woot woot... looks good. I'm gettting "success" on that job with the pre-commands from the config file and the simulation time reads correctly.

nwagenbrenner commented 5 years ago

Sounds good. We'll do some testing to see what the job times are looking like.

nwagenbrenner commented 5 years ago

@fspataro Let's change the mesh_resolution to coarse while we're using the momentum solver. We can change it back to fine if we switch back to the other solver.

fspataro-zz commented 5 years ago

@nwagenbrenner right now we have the mesh_resolution as an option to the job api and the mobile app is setting hard coded value. I'll start a new issue so @CorbyHarkonnen can modify that in the phone. Then default config setting will take over.

nwagenbrenner commented 5 years ago

Okay, this is a setting we definitely want to be able to set/change on the server (without having to do a new release). Ideally, all of the CLI arguments should be this way.

fspataro-zz commented 5 years ago

just checked the code: we already migrated most of it out of the mobile app so it's good to go. The client can still override some values if it wants but right now all the server side defaults will be used. I'll configure the mesh to coarse.

fspataro-zz commented 5 years ago

ok all setup now: