Deadlock
This shows a race condition and a deadlock.
If A is locked by one thread and B by another, you have deadlock.
If the same thread gets both locks, you get a race condition - i.e. different behavior depending on detailed interleaving of the thread.
Avoid nesting different locks.
CALL OMP_INIT_LOCK (LCKA)
CALL OMP_INIT_LOCK (LCKB)
CALL OMP_UNSET_LOCK(LCKB)
CALL OMP_UNSET_LOCK(LCKA)
CALL OMP_UNSET_LOCK(LCKA)
CALL OMP_UNSET_LOCK(LCKB)