PRBonn / MaskPLS

Mask-Based Panoptic LiDAR Segmentation for Autonomous Driving, RA-L, 2023
MIT License
55 stars 8 forks source link

segmentation fault,could tell me how to fix it #8

Closed Zhangjyhhh closed 1 year ago

Zhangjyhhh commented 1 year ago

evaluate_model.py --w pretrained/mask_pls_kitti.ckpt /home/jyzhang/anaconda3/envs/maskpls/lib/python3.7/site-packages/MinkowskiEngine/__init__.py:42: UserWarning: The environment variableOMP_NUM_THREADSnot set. MinkowskiEngine will automatically setOMP_NUM_THREADS=16. If you want to setOMP_NUM_THREADSmanually, please export it on the command line before running a python script. e.g.export OMP_NUM_THREADS=12; python your_program.py. It is recommended to set it below 24. "It is recommended to set it below 24.", GPU available: True, used: True TPU available: False, using: 0 TPU cores IPU available: False, using: 0 IPUs LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0] Validating: 0%| | 0/4071 [00:00<?, ?it/s]段错误 (核心已转储)

rmarcuzzi commented 1 year ago

Hi! The message related to the OMP_NUM_THREADS is something coming from the MinkowskiEngine library. Apart from that, I can't see any error message.

russellyq commented 8 months ago

Hi @rmarcuzzi ,

I meet the same error when running.

"ython scripts/train_model.py /home/yanqiao/anaconda3/envs/sam/lib/python3.9/site-packages/MinkowskiEngine/init.py:36: UserWarning: The environment variable OMP_NUM_THREADS not set. MinkowskiEngine will automatically set OMP_NUM_THREADS=16. If you want to set OMP_NUM_THREADS manually, please export it on the command line before running a python script. e.g. export OMP_NUM_THREADS=12; python your_program.py. It is recommended to set it below 24. warnings.warn( GPU available: True, used: True TPU available: False, using: 0 TPU cores IPU available: False, using: 0 IPUs LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0,1]

| Name | Type | Params

0 | backbone | MinkEncoderDecoder | 21.7 M 1 | decoder | MaskedTransformerDecoder | 9.8 M 2 | mask_loss | MaskLoss | 0
3 | sem_loss | SemLoss | 0

31.5 M Trainable params 0 Non-trainable params 31.5 M Total params 126.174 Total estimated model params size (MB) Validation sanity check: 0it [00:00, ?it/s]/home/yanqiao/anaconda3/envs/sam/lib/python3.9/site-packages/pytorch_lightning/trainer/data_loading.py:116: UserWarning: The dataloader, val_dataloader 0, does not have many workers which may be a bottleneck. Consider increasing the value of the num_workers argument(try 24 which is the number of cpus on this machine) in theDataLoader` init to improve performance. rank_zero_warn( Validation sanity check: 0%| | 0/2 [00:00<?, ?it/s][1] 562526 segmentation fault (core dumped) python scripts/train_model.py"

I do not think "OMP_NUM_THREADS" matters since it only gives the warning information.

Also, do you have detailed python env inform including all packages installed.

Thanks.

rmarcuzzi commented 8 months ago

Hi, and thanks for your interest in our work! Indeed, OMP_NUM_THREADS is a warning that I also saw, you could try setting it to avoid the message but overall I didn't have any problem with it. Sadly I don't have the virtual environment that I used only for this project, so listing all the installed packages would be a bit confusing. In my case I first installed torch and MinkowskiEngine and later installed the rest of the packages.

I hope this is useful!

anhquancao commented 8 months ago

Hi, I remembered I got this problem before and I solved by setting OMP_NUM_THREADS=1

russellyq commented 8 months ago

Hi @anhquancao ,

Thanks for your answer. It still has the same error after setting OMP_NUM_THREADS=1.

"Validation sanity check: 0%| | 0/2 [00:00<?, ?it/s] [1] 704195 segmentation fault (core dumped) OMP_NUM_THREADS=1 python scripts/train_model.py"

anhquancao commented 8 months ago

And also you can try to set number of workers in dataloader to 1 or 0. I remembered the reason for me was I don't have enough memory to support many workers with several threads each in the dataloader.