vc-bonn / Spline_PINN

91 stars 21 forks source link

Problem with running wave_test.py #6

Closed alabaykazakh closed 1 year ago

alabaykazakh commented 1 year ago

First, I tried to install required packages to my environment and run the following command: (ki1_vm) bash-4.2$ python wave_test.py --net=Wave_model --stiffness=10 --damping=0.1

I got the following error:

Parameters: {'n_epochs': 100000, 'n_batches_per_epoch': 10000, 'batch_size': 50, 'n_samples': 10, 'dataset_size': 1000, 'average_sequence_length': 5000, 'resolution_factor': 8, 'loss_bound': 20, 'loss_bound_reg': 0, 'loss_domain_res': 10, 'loss_domain_up': 0, 'loss_domain_p': 0, 'loss_wave': 1, 'loss_v': 100, 'loss_mean_a': 0, 'loss_mean_p': 0, 'border_weight': 0, 'lr': 0.0001, 'clip_grad_norm': None, 'clip_grad_value': None, 'cuda': False, 'detach': False, 'log_loss': True, 'net': 'Wave_model', 'hidden_size': 20, 'orders_v': 2, 'orders_p': 2, 'orders_z': 2, 'rho': 1, 'mu': 1, 'dt': 1, 'stiffness': 10.0, 'damping': 0.1, 'width': None, 'height': None, 'max_speed': 1, 'plot': False, 'log': True, 'load_date_time': None, 'load_index': None, 'n_warmup_steps': None, 'load_optimizer': False, 'load_latest': False}
no buffers available
: cannot connect to X server

Then I tried to create a new environment as you mentioned in instructions (my_cool_fluid_env) bash-4.2$ python wave_test.py --net=Wave_model --stiffness=10 --damping=0.1 --cuda=f but got the following error:

Parameters: {'n_epochs': 100000, 'n_batches_per_epoch': 10000, 'batch_size': 50, 'n_samples': 10, 'dataset_size': 1000, 'average_sequence_length': 5000, 'resolution_factor': 8, 'loss_bound': 20, 'loss_bound_reg': 0, 'loss_domain_res': 10, 'loss_domain_up': 0, 'loss_domain_p': 0, 'loss_wave': 1, 'loss_v': 100, 'loss_mean_a': 0, 'loss_mean_p': 0, 'border_weight': 0, 'lr': 0.0001, 'clip_grad_norm': None, 'clip_grad_value': None, 'cuda': False, 'detach': False, 'log_loss': True, 'net': 'Wave_model', 'hidden_size': 20, 'orders_v': 2, 'orders_p': 2, 'orders_z': 2, 'rho': 1, 'mu': 1, 'dt': 1, 'stiffness': 10.0, 'damping': 0.1, 'width': None, 'height': None, 'max_speed': 1, 'plot': False, 'log': True, 'load_date_time': None, 'load_index': None, 'n_warmup_steps': None, 'load_optimizer': False, 'load_latest': False}
no buffers available
/home/users/medvedev/.conda/envs/my_cool_fluid_env/lib/python3.10/site-packages/torch/functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at /opt/conda/conda-bld/pytorch_1670525493953/work/aten/src/ATen/native/TensorShape.cpp:3190.)
  return _VF.meshgrid(tensors, **kwargs)  # type: ignore[attr-defined]
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/users/medvedev/.conda/envs/my_cool_fluid_env/lib/python3.10/site-packages/cv2/qt/plugins" 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: xcb.

Aborted (core dumped)
wandeln commented 1 year ago

Hi, this seems to be a problem with the graphical user interface... Did you try to launch the script via ssh? In that case: make sure to forward X (check out for example: https://unix.stackexchange.com/questions/12755/how-to-forward-x-over-ssh-to-run-graphics-applications-remotely) ... I hope that helps, best regards, Nils

YupingQiu commented 1 year ago

hello,when i run your wave_test.py, and i already use your pre-trained model, i encounter this problem: superres_kernels[:,:,:,i::resolution_factor,j::resolution_factor] = kernels RuntimeError: The expanded size of the tensor (5) must match the existing size (6) at non-singleton dimension 1. Target sizes: [1, 5, 18, 2, 2]. Tensor sizes: [6, 18, 2, 2] can you give me some advices?

wandeln commented 1 year ago

Hi Yuping, thanks for pointing out this issue! It should be fixed by now :) Best regards, Nils