Hello alogfans,
Thank you for posting your inquiry to the NVIDIA Developer Forums!
Using multiple contexts is possible within a single process (single threaded), or a multi-threaded application; however, it is not necessary. libibverbs is thread-safe. The below blog post goes into more detail on thread-safe functions/features, locking mechanisms, and internal implementation:
If you’re in need of further development assistance, or require assistance in building out a deployment, I would highly recommend engaging your account team. They can help put you in touch with resources within our Solutions and Engineering team, and provide you with a support bundle to suit your needs.
Have a great day,
NVIDIA Networking Support