PSLmodels / OG-USA

Overlapping-generations macroeconomic model for evaluating fiscal policy in the United States
https://pslmodels.github.io/OG-USA/
Creative Commons Zero v1.0 Universal
19 stars 34 forks source link

Getting a crash on Wayland/display issues when running run_og_usa.py example #100

Open talumbau opened 5 months ago

talumbau commented 5 months ago

Not really sure what's going on but I'm getting a crash when running the example with a recently synced version of OG-USA + OG-Core. I'm running in a Linux terminal through tmux which can have odd behavior if you are running a program that has any sort of GUI feature. I didn't anticipate that such a thing would happen with OG-USA, but it appears that the program is attempting to do something with a windowing component. Here is the crash message:

Finished tax function loop through 11 years and 80 ages per year.                                                                                         
Tax function estimation time: 55.551 sec                                                                                                                  
ETR :  0  observations tagged as outliers.                                                                                                                
MTRx :  6  observations tagged as outliers.                                                                                                               
MTRx :  After second round,  7  observations tagged as outliers (cumulative).                                                                             
MTRy :  1  observations tagged as outliers.                                                                                                               
MTRy :  After second round,  2  observations tagged as outliers (cumulative).                                                                             
Big S:  80                                                                                                                                                
max age, min age:  100 21                                                                                                                                 
/usr/local/google/home/talumbau/src/OG-USA/ogusa/macro_params.py:110: FutureWarning: The default fill_method='pad' in Series.pct_change is deprecated and 
will be removed in a future version. Either fill in any non-leading NA values prior to calling pct_change or specify 'fill_method=None' to not fill NA val
ues.                                                                                                                                                      
  fred_data_q["GDP Per Capita"].pct_change(periods=4, freq="QE").mean()                                                                                   
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.                                                
qt.qpa.xcb: could not connect to display                                                                                                                  
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.                                                                
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.                   

Available platform plugins are: eglfs, minimal, minimalegl, offscreen, vnc, webgl, xcb.                                                                   

Aborted                                                   

I'm wondering if something has recently changed in OG-USA to, for example, bring in some matplotlib command automatically. Anything with automatic plot generation or drawing to a component that would need a GUI library like Qt. Is this familiar to you @jdebacker or @rickecon ?

talumbau commented 5 months ago

I found this issue when trying to test https://github.com/PSLmodels/OG-Core/pull/925 which should provide a speedup for TPI.

talumbau commented 5 months ago

I confirm that when I ran the example run_og_usa.py in a terminal using the desktop environment of my Linux workstation (I think it's based on Gnome), the code was able to run but with this warning:

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.

so I think there is something in the example that expects a GUI capability to be present in the environment. This will need some kind of fix (at least for my use case) because I need a persistent shell session (as provided by tmux) to execute long running jobs.

jdebacker commented 5 months ago

@talumbau I think PR #101 should fix this.

talumbau commented 5 months ago

thank you! Will try and report results.