Step 1 : If you haven't installed XCODE. Download and Install XCODE
Step 2 :
Install Open MPI. Download the latest stable release of Open MPI from the Open Source High Performance Computing website.
Step 3:
Open terminal and Go to the downloaded directory
Extract the downloaded archive :
tar -zxvf openmpi-1.6.5.tar.gz
Open terminal and Go to the extracted directory:
cd /path/to/extracted/openmpi-1.6.5
Run the following commands
./configure --prefix=/usr/local
make all
sudo make install
Step 4: Add OpenMPI path to your path, run the following commands
export
PATH=/usr/local/openmpi/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/openmpi/lib:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH
Step 5: Compile your C/C++ program
For C:
mpicc -o myProgExe myProg.c
For C++:
mpic++ -o myProgExe myProg.cpp
Step 6: Run, where -np is the number of processor to run on.
mpirun -np 8 myProgExe
Subscribe to:
Post Comments (Atom)
Python contextlib for Timing Python code
If you've ever found yourself needing to measure the execution time of specific portions of your Python code, the `contextlib` module o...
-
If you get the following error while installing FFMPEG or other packages on CentOS 7. Requires: libva.so.1(VA_API_0.33.0)(64bit) Follow...
-
Common error: fallocate: fallocate failed: Text file busy in ubuntu OS Check the allocation: free -m or sudo swapon --show Make sure ...
-
How to fix Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' Apparently, Ma...
No comments:
Post a Comment