Linux Commands Introduced in the Lectures
Linux Command Sheet 2
OpenMPI: Call Processes
● cd [directory name]
○ Change the current directory to a new directory
● sftp [user]@[IP address]
○ Log into a remote server using the secure file transfer protocol used to send
files to and retrieve files from a remote server
○ While using SFTP:
■ get [filename]
● Downloads the file to your current working directory
■ put [filename]
● Uploads a file from your current working directory
● mpicc [C script] o [output C executable]
○ Use MPI to compile a C / C++ program and create an executable file with the
name provided after the oparameter
○ Example: mpicc call_procs.c o call_procs
● mpiexec n [number] [C executable]
○ Run an MPIcompiled program, and use nnumber of specified threads
○ Example: mpiexec n 4 call_procs
OpenMPI: Calculate Pi
● time [command]
○ Report how long it took for the command to run
○ Example: time mpiexec H rpi0,rpi0,rpi0,rpi0 calc_pi
● mpiexec H [host1,host2,...] [C executable]
○ Specify the threads to run for a given C program each host listed specifies one
specific thread that will be created for that host
○ Example: time mpiexec H rpi0,rpi0,rpi0,rpi0 calc_pi