ParallelSorts
Comparison of parallel sort algorithms (bucket sort, merge sort, odd-even sort) implemented with MPI.
Install / Use
/learn @carolineKer/ParallelSortsREADME
parallelSorts
Comparison of parallel sort algorithms (bucket sort, merge sort, odd-even sort) implemented with MPI.
#######################################################
Check that it works (for 5 processors and 17 data)
####################################################### NB: the line "CFLAGS+=-DSAVE_DATA" must be uncommented in the Makefile. (This is the case by default)
Compile: if you have already compiled once without -DSAVE_DATA: make clean make
Run: (17 data on 5 processors) mpirun -np 5 ./merge_sort 17 mpirun -np 5 ./odd_even_sort 17 mpirun -np 5 ./bucket_sort 17
This will produce files with the unsorted data and the sorted data. To check that these results are correct, run:
./check_result.py merge_sort_data_P5_N17.txt merge_sort_result_P5_N17.txt ./check_result.py odd_even_sort_data_P5_N17.txt odd_even_sort_result_P5_N17.txt ./check_result.py bucket_sort_data_P5_N17.txt bucket_sort_result_P5_N17.txt
This should output "OK"
###################################
Plot speedups (for 10000000 data)
################################### WARNING: If you want to run the program with a lot of data (like 10000000), comment the line "CFLAGS+=-DSAVE_DATA" in the Makefile and do a make clean --> Otherwise the program will try to create really big data/result files.
Compile: make Run: ./run.bash 10000000
Plot the results: On a machine with python and matplotlib installed: In the Project directory, launch ./plot_speedup.py 10000000 This should create 3 png files containing graph of the speedup
Related Skills
node-connect
352.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
