This repository contains the work of MNA for the course High Performance Computing.
The main directory contains the following files and folders:
README.md config_master.txt n_body_final_config.f90 plot_energy_binary.py ang_mom data_comparewith_cluster n_body_master.f90 plot_traj.py animate_binary.py dynamic_chunk10_elapsed_comparison.png nbody_sim sample_trajectories_xy.png center_of_mass_drift.png energy plot_ang_mom.py starting_config.py center_of_mass_vs_time.png hpc_final_cluster plot_com.png com_plot.py initial_configuration_spin.gif plot_comparison.py
-
.png and .gif files
These are example outputs generated by the Python plotting scripts found throughout the repository and its subfolders. -
Python scripts (.py)
These scripts are used to read the binary outputs from the Fortran programs and generate various plots and visualizations. Similar scripts are also present in the subfolders. -
Fortran source and executable
- n_body_master.f90: Example Fortran source code
- nbody_sim: Example compiled executable
-
Binary output files
- ang_mom: Angular momentum data
- energy: Energy data
- n_body: Positional and velocity data
These files are also generated for each run and are present inside the corresponding subfolders.
-
hpc_final_cluster/ (large sized)
Contains all runs and generated data from the CompuPhys cluster. Almost all of these outputs have been verified to be correct. -
data_comparewith_cluster/ (large sized) Contains all runs and generated data from computations performed on my personal laptop.
-
Shell scripts (.sh)
Inside the subfolders, several .sh scripts are used to automate multiple runs. These scripts also generate log files, which are included in the corresponding directories.
Python scripts can be run using:
python3 filename.py
or, depending on device and environment:
python filename.py
Fortran files can be compiled using:
gfortran -On -fopenmp -o output_name filename.f90
Replace:
- n with the desired optimization level (e.g., -O2, -O3)
- output_name with your preferred executable name
- filename.f90 with the source file name
Different compiler might be used.
The .sh scripts can be run as-is, but should not be moved from their original locations, they rely on relative paths.
Make them executable with:
chmod +x filename.sh
Then run:
./filename.sh