ExtremeFLOW / neko

/ᐠ. 。.ᐟ\ᵐᵉᵒʷˎˊ˗
https://neko.cfd/
Other
161 stars 29 forks source link

Reducing output frequency in the tgv example #1144

Open Mittagskogel opened 6 months ago

Mittagskogel commented 6 months ago

I'm running the tgv example with the following case file:

&NEKO_CASE                                                                                                        
mesh_file= '32768.nmsh'                                                                                           
fluid_scheme='pnpn'                                                                                               
lx = 8                                                                                                            
source_term = 'noforce'                                                                                           
initial_condition = 'user'                                                                                        
/                                                                                                                 
&NEKO_PARAMETERS                                                                                                  
dt = 1d-3                                                                                                         
T_end = 2                                                                                                         
nsamples = 1                                                                                                      
write_at_end = .false.                                                                                            
output_chkp = .false.                                                                                             
uinf= 0.0,0.0,0.0                                                                                                 
Re = 1600                                                                                                         
pc_vel = 'jacobi'                                                                                                 
pc_prs = 'hsmg'                                                                                                   
proj_prs_dim = 8                                                                                                  
dealias = .true.                                                                                                  
/

I've tried to reduce the output frequency by adding the following lines in the NEKO_PARAMETERS section:

output_control = 'nsamples'
output_value = '10'

But this does not change the amount of output seen in stdout. How can I adjust this?

Especially funky is that setting output_control to never slows down execution of the tgv example to about 60%, but has no other effect.

timofeymukha commented 6 months ago

You seem to be using an old version of neko with the old case file format (not json). output_control 'never' was not supported there.

timofeymukha commented 6 months ago

In your case file nsamples is already at 1, so that is the minimal value.

njansson commented 6 months ago

In your case file nsamples is already at 1, so that is the minimal value.

Zero should also work I recall.

timfelle commented 6 months ago

The output control you have been adjusting is the frequency at which the solution is saved to a nek5000 fluid file. It is not the amount of information printed to the user.

In the more recent versions of Neko, one can set the environment variable NEKO_LOG_LEVEL to adjust some of the outputs printed to the user. The minimal level (0) only displays the time spent for each iteration and which step is currently being computed. It is still rather crude but it might help you a bit.

$> export NEKO_LOG_LEVEL=0 
$> neko casefile.case
Mittagskogel commented 6 months ago

Ah I see, I was not aware of the NEKO_LOG_LEVEL variable, thank you for pointing that out. What is the earliest version of Neko that supports this? I'm currently on 0.6.1.

timfelle commented 6 months ago

It is present in 0.6.1, but was only utilized to increase information output for debugging purposes. We relatively recently extended the use of it to also allow a reduction in output, so it is not part of a release yet. It is present in develop for any commit later than December 1st, 2023.