Is it still same as what described in https://www.csm.ornl.gov/workshops/openshmem2014/documents/presentations_and_tutorials/Tutorials/Verbs%20programming%20t… https://www.csm.ornl.gov/workshops/openshmem2014/documents/presentations_and_tutorials/Tutorials/Verbs%20programming%20tutorial-final.pdf (as listed below) ? Or is there some improvement (less constraint) to support fork() since then?
- When possible, avoid using fork()
• fork() or other system calls that call fork(), for example: system(), popen(), etc.
- If fork() must be used, the next rules should be followed:
• Prepare libibverbs to work with fork():
- Call the verb ibv_fork_init()
or
Setting the environment variables RDMAV_FORK_SAFE or IBV_FORK_SAFE
- This will allocate internal structures in way which is more “fork()”-friendly
• RDMA should be used only in the parent process
• Child process should call immediately exec*() or exit()
• If huge pages are used, set the environment variable RDMAV_HUGEPAGES_SAFE as well
- Warning: Not following those rules may lead to data corruption or segmentation fault!