I am facing issue with openMP in C++. I have one process in Linux server, am setting 1GB virtual memory for that process using setrlimit() function and openmp is used in the code base. During execution, process got crashed, core file is generated. I have debugged the core file and found that crash is happening in the "#pragma omp parallel for" line. I think virtual memory is exceeded in openmp statement and bad_alloc exception is raised and not it handled or openmp is not raising bad_alloc exception . I have tried to add this "#pragma omp parallel for" line in inside try block and added catch block with bad_alloc exception but it is not catching. Even I tired with catch(...) but no luck.
Can all share your view on whether openMP will raise the exceptions in this scenario and also share your suggestion to resolve this issue.
Thanks in advance.