The modex code was unfortunately written solely for PMI1 when updated to minimize calls to PMI_get - add the required PMI2 code