The cgp_mpi_comm function currently returns the value of ierr set in ADFH_Configure which if successful is NO_ERROR. This is passed back to cgio_configure which initialized the error value to CGIO_ERR_BAD_OPTION. The routines in that file that return successfully set the error value to CGIO_ERR_NONE.
I'm not sure what value cgp_mpi_comm should return if successful:
The current value of NO_ERROR doesn't seem right since that seems to be more of an internal error. It seems like CG_OK or CGIO_ERR_NONE would be the preferred return and either of these tends to make use of the API more consistent.