I am using a unix workstation with C shell. There were two compilers of mpif90, one compiled with ifort and one with gfortran, installed on the system. The default mpi compiler was the one compiled with gfortran.
Now, I want to change the default compiler to the ifort compiled one. It was stored in the folder "/usr/local/mvapich2-icc/bin". So I added the following to the ~/.cshrc file:
setenv mpif90 /usr/local/mvapich2-icc/bin/mpif90
and run "source ~/.cshrc" on the terminal. However, this seems not to have any effect. When I type "which mpif90", the path shown was still the gfortran compiled one.
How shall I set the environment properly so that the default compiler called was the ifort compiled one?
Any help would be appreciated. Thanks.