They are all process local.
Key values are unique in a process.
Once allocated, the key value can be used to associate attributes and access them on any locally defined communicator. I.e., the attribute value is copied, with no side-effects. The call is erroneous if there is no key with value keyval. On the other hand, the call is correct even if no attribute is currently attached to keyval on comm. The code above dedicates a statically allocated private communicator for the use of mcast.