... | ... | @@ -124,7 +124,7 @@ Now compile the code : |
|
|
` mpicc -o mpi3hello mpihello.c`
|
|
|
|
|
|
For MPICH2 we need to use the parallel environment mpich2. To submit a mpich2 job with qsub and 10 slots you need a shell script: The option -rmk sge is important to use, and the environment variable QRSH_WRAPPER.
|
|
|
The submit script would look like this, mpich2-qsub.sh
|
|
|
The submit script would look like this, **mpich2-qsub.sh**
|
|
|
|
|
|
```
|
|
|
#!/bin/bash
|
... | ... | @@ -146,4 +146,16 @@ You can now submit this script with qsub: |
|
|
|
|
|
`qsub mpich2-qsub.sh`
|
|
|
|
|
|
If you get an error in your mpich2_tst.e<job_id> file like this:
|
|
|
|
|
|
```
|
|
|
[proxy:0:0@greenlandshark] HYDU_create_process (utils/launch/launch.c:75): execvp error on file mpi3hello (No such file or directory)
|
|
|
```
|
|
|
|
|
|
You can solve this by using the absolute path to your mpi3hello file.
|
|
|
If for example you saved your mpi3hello file in /home/<username>/mpi3hello
|
|
|
Use this location in your submit script **mpich2-qsub.sh**
|
|
|
|
|
|
```
|
|
|
mpiexec -rmk sge -np $NSLOTS /home/<username>/mpi3hello
|
|
|
``` |