In order to get gcc 6.3 or gfortran 6.3 do below steps. (You cannot use gcc 6.3 or gfortran 6.3 with MPI programs.) Do not put below steps in your .bashrc or .bash_profile.
scl enable devtoolset-6 bash
Issue below command to verify that you have access to gcc 6.3 and gfortran 6.3: