mpicc: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On CentOS possible default full paths are:

/usr/bin/mpicc - from package: mpich2-devel
/usr/lib64/mpich2/bin/mpicc - from package: mpich2-devel
/usr/lib/mpich2/bin/mpicc - from package: mpich2-devel
/usr/lib64/mpich/bin/mpicc - from package: mpich-devel
/usr/lib/mpich/bin/mpicc - from package: mpich-devel
/usr/lib64/mvapich2/bin/mpicc - from package: mvapich2-devel
/usr/lib/mvapich2/bin/mpicc - from package: mvapich2-devel
/usr/lib64/mvapich2-psm/bin/mpicc - from package: mvapich2-psm-devel
/usr/lib64/mvapich/bin/mpicc - from package: mvapich-devel
/usr/lib/mvapich/bin/mpicc - from package: mvapich-devel
/usr/lib64/mvapich-psm/bin/mpicc - from package: mvapich-psm-devel

You may install the required package with command yum install {package}
Error in other languages:
mpicc: bevel nie gevind nie
mpicc: comandă negăsită
mpicc: comando não encontrado
mpicc: commande introuvable
mpicc: command not found
mpicc: käsku ei ole
mpicc: không tìm thấy lệnh
mpicc: komanda nerasta
mpicc: Kommando nicht gefunden.
mpicc: kommandot finns inte
mpicc: komut yok
mpicc: nie znaleziono polecenia
mpicc: níor aimsíodh an t-ordú
mpicc: no se encontró la orden
mpicc: no s'ha trobat l'ordre
mpicc: opdracht niet gevonden
mpicc: parancs nem található
mpicc: perintah tidak ditemukan
mpicc: príkaz nenájdený
mpicc: příkaz nenalezen
mpicc: команда не найдена
mpicc: командата не е открита
mpicc: 命令找不到
mpicc: コマンドが見つかりません