Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop particle par #13

Open
wants to merge 5 commits into
base: develop-particle
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,8 @@ bin/*

# VSCode
.vscode

# Job files
output.txt
error.txt
*.pbs
28 changes: 24 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
## Compilers and Flags
CC := CC
#CC := mpic++
CFLAGS := -g -Wall -Wextra -std=c++20 -O3 -march=native -Wno-unknown-pragmas -Wno-deprecated-enum-enum-conversion
#CC := mpic++
CFLAGS := -g -w -std=c++20 -O3 -march=native -Wno-unknown-pragmas -Wno-deprecated-enum-enum-conversion
#CFLAGS := -g -w -std=c++20 -O3 -march=native #nvc++
#CFLAGS := -g -std=c++20 -O0 -l -Wno-unknown-pragmas -Wno-deprecated-enum-enum-conversion -fno-inline -pg #profiling
#CFLAGS := -g -Wall -Wextra -std=c++17 -O3 -Wno-unknown-pragmas
#CFLAGS := -g -Wall -std=c++17 -Ofast -xHost -xHost -qopt-report-phase=vec,loop -qopt-report=5
LIB := -Lbuild/
EIGEN=-I/home/br-hwaugh/repos/eigen/
LIB := -Lbuild/ -ltbb
EIGEN=-I/lustre/home/br-cward/repos/eigen
INC := -Iinclude/ $(EIGEN)


# Nvidia compiler 22.9 only supports up to C++17 - range support was added in C++20
# std::execution port: https://github.com/nvidia/stdexec
# std::mdspan port: https://github.com/kokkos/mdspan
# std::ranges port: https://github.com/ericniebler/range-v3.git

# Set the include directories
INCLUDE_DIRS := $(HOME)/repos/range-v3/

# Find all subdirectories of the include directories
SUBDIRS := $(shell find $(INCLUDE_DIRS) -type d)

# Generate the necessary -I flags for all the subdirectories
INCLUDES += $(addprefix -I,$(SUBDIRS))



## Directories
SRC := src
Expand Down Expand Up @@ -51,6 +68,9 @@ clean:
@echo "Cleaning..."
rm -rf build/* $(EXE)
@echo ""
rm output.txt error.txt callgrind.out.*

cleant:
rm output.txt error.txt callgrind.out.*

.PHONY: clean
Empty file modified env.sh
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions include/flow/FlowSolver.inl
Original file line number Diff line number Diff line change
Expand Up @@ -2057,7 +2057,7 @@ namespace minicombust::flow

grad_time += MPI_Wtime();
halo_time -= MPI_Wtime();
exchange_phi_halos();
//exchange_phi_halos();
halo_time += MPI_Wtime();

if ((timestep_count % comms_timestep) == 0)
Expand All @@ -2083,7 +2083,7 @@ namespace minicombust::flow
}
}

calculate_UVW();
//calculate_UVW();

// calculate_pressure();

Expand Down
260 changes: 199 additions & 61 deletions include/particles/ParticleSolver.inl

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions job.pbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
#PBS -N minicombust
#PBS -o output.txt
#PBS -l select=1:ncpus=10:mpiprocs=10
#PBS -e error.txt
#PBS -q milanq
#PBS -l walltime=0:15:00

echo $PBS_O_WORKDIR
cd $PBS_O_WORKDIR

echo runnnig mpirun
module load IntelOneApi/modulefiles/tbb/2021.10.0

aprun -n 10 ./bin/minicombust 5 100 20 100
#aprun -n 10 ./bin/minicombust 5
#mpirun -np 10 ./bin/minicombust 5 100 20 100
#mpirun -np 10 ./bin/minicombust 5

#export GMON_OUT_PREFIX=gmon.out-
#aprun -n 10 ./bin/minicombust 7


6 changes: 6 additions & 0 deletions src/minicombust.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ int main (int argc, char ** argv)
MPI_Comm_rank(mpi_config.world, &mpi_config.rank);
MPI_Comm_size(mpi_config.world, &mpi_config.world_size);

std::cout << "Rank: " << mpi_config.rank << " World size: " << mpi_config.world_size <<std::endl;

// if (mpi_config.rank == 0) {
// std::cout << "World size: " << mpi_config.world_size << std::endl;
// }

int particle_ranks = atoi(argv[1]);
int flow_ranks = mpi_config.world_size - particle_ranks;

Expand Down