Search code examples
c#cmdsudoopenmpimpich

How to install sudo and mpicc in windows?


I want to run a mpicc code written in C#. But to run the same I'll have to install sudo apt install mpich and to do that I need sudo command in windows cmd window. I tried using git bash and installed gsudo but didn't work. Is there any other way to run my file?
Commands to use to run my file:

mpicc p_mpi.c -o p_mpi
mpirun -np 4 ./p_mpi

Commands I used before using the above and failed:

sudo apt install mpich
winget install gsudo
gsudo apt install mpich

Solution

  • sudo is a linux command for running a program as administrator. It can not be used in windows.

    If you are using windows but need to use linux only programs i sugest trying out wsl.

    apt is also a program that does not work in windows. It is a program used for installing and updating programs in debian based linux distributions.