modified the mpi library check to resolve a situation where both mpich2 and openmpi packages are present.