I have an extensive fortan/C parallel code (uses OpenMPI 4.2) and to run it I use a shell script (run.sh file). Here is how the inside of the run.sh file looks like: