If you see the official user guides from MVAPICH you won’t find a section to uninstall MVAPICH2 from your system. But by detailed Googling you can end up into some mailing list archive and may find what I am entailing here. So here are the steps:
Locate where you have installed the MVAPICH2 (MPI).
which mpirun #you can put any other mpi related command
For my system it’s located in
/opt/mvapich2-1.8.1/bin/mpirun. Go to the base directory of mvapich2.
cd /opt/mvapich2-1.8.1 #cd base_directory_of_mvapich2
Browse through that directory and look for
sbin directory. Go to that directory.
Check for the executable named
mpeuninstall. Run it with root privilages. It may ask for root password.
You will see some remove commands being run. This will uninstall most of the man pages and the sbin folder but still you can see configuration files and important binaries available.
To remove remaining files, you have to do it manually with root permission.
sudo rm -rf /opt/mvapich2-1.8.1/ # rm -rf mvapich_base_directory
Now it’s completely uninstalled.
To install a fresh version you can follow the user guide :).
Certain times we come across the situation where we want to run multiple processes and we can’t wait for them to complete. So we need them to run in background so that we can specify the next process to be run.
Usually the symbol & is specified at the end of the program name to make it run in the background. But still the program may have some standard output or error which it may show in the current shell. To avoid so we should specify the command the following manner
nohup yourprogram -p parameters >>/dev/null 2>>/dev/null &
The nohup command ensures that your process is not killed when you log out of the system.
/dev/null or the null device is a special file that discards all data written to it but reports that the write operation succeeded.
>>/dev/null redirects the standard output to the null device.
2>>/dev/null redirects the standard error to the null device.