ec5e1b5576 | 9 months ago | |
---|---|---|
.. | ||
dataset | 9 months ago | |
Makefile | 9 months ago | |
README.md | 9 months ago | |
checkSort.exe | 1 year ago | |
doTest.sh | 9 months ago | |
main.cpp | 9 months ago | |
report.pdf | 9 months ago |
README.md
MPI C++ Sorting Program
This folder contains a C++ program for distributed sorting using MPI (Message Passing Interface). The program is designed to hopefully efficiently sort large files (more than available composed RAM) across multiple nodes, leveraging the parallel processing capabilities of MPI.
Features
- Parallel Sorting: MPI is utilized to distribute the sorting task across multiple nodes, enabling efficient sorting of large datasets.
- Slurm Integration: The included
Makefile
facilitates job submission using Slurm, allowing users to specify job parameters such as number of nodes, partition, time, memory, etc. - Optimized Compilation: Compiler flags (
-O3
) are configured for optimization, ensuring high-performance execution.
Usage
-
Clone the repository:
bash git clone https://git.phc.dm.unipi.it/3dY_0/Calcolo_Parallelo_Cluster_Steffe.git cd Calcolo_Parallelo_Cluster_Steffe/SortingAlg
-
Edit the
Makefile
to customize compiler options, file names, and other parameters based on your requirements. -
Compile the program:
bash make all
-
Run the program with MPI and Slurm:
bash make run NODES="1-5"
Make sure to replace
"1-5"
with the desired node range.It returns a file with extension '.sort' in the /mnt/raid/tmp/ directory. Make sure to have space before. Use arguments in the make as ARGS="stuff".
make run NODES="1-5,7-12" ARGS="/path/to/file.bin"
-
Monitor job status with
squeue
and cancel a job withscancel jobid
if needed.
Cleaning
-
Remove object files and temporary files:
make clean
-
Additionally, remove the executable and generated scripts:
make fclean
-
Remove all generated files, including Slurm output files:
make cleanall
Additional Information
-
View compiler and linker flags used by
mpicxx
:make detail
-
For a full clean, rebuild the executable using:
make re
Feel free to customize the program, explore the code, and adapt it to suit your specific sorting requirements. If you encounter any issues or have suggestions for improvement, please open an issue or submit a pull request. Happy sorting!