parent
19995a1f05
commit
7f716ffae6
|
@ -13,8 +13,8 @@ mpi: main.cpp Matrix.h Solver.h
|
||||||
all: seriel mpi
|
all: seriel mpi
|
||||||
|
|
||||||
test: seriel mpi
|
test: seriel mpi
|
||||||
./$(OUT)_seriel 1D 120 1000
|
./$(OUT)_seriel 1D 125 1000
|
||||||
mpirun -n 4 ./$(OUT)_mpi 2D 120 1000
|
mpirun -n 4 ./$(OUT)_mpi 2D 125 1000
|
||||||
# for script in *.R; do R --vanilla < $${script}; done
|
# for script in *.R; do R --vanilla < $${script}; done
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
|
@ -125,7 +125,7 @@ int main(int argn, char* argv[]) {
|
||||||
|
|
||||||
// Report grid topology
|
// Report grid topology
|
||||||
if (mpi_world_rank == 0) {
|
if (mpi_world_rank == 0) {
|
||||||
std::cout << "topology: " << dim << "D";
|
std::cout << "topology: " << dim << "D";
|
||||||
if (dim == 2) {
|
if (dim == 2) {
|
||||||
std::cout << " (" << mpi_dims[0] << " x " << mpi_dims[1] << ")";
|
std::cout << " (" << mpi_dims[0] << " x " << mpi_dims[1] << ")";
|
||||||
}
|
}
|
||||||
|
@ -159,8 +159,8 @@ int main(int argn, char* argv[]) {
|
||||||
mpi_comm_grid, // grid communicator
|
mpi_comm_grid, // grid communicator
|
||||||
0, // axis index (0 <-> X)
|
0, // axis index (0 <-> X)
|
||||||
1, // offset
|
1, // offset
|
||||||
&(mpi_neighbors.west), // negated offset neighbor
|
&(mpi_neighbors.west), // negated offset neighbor
|
||||||
&(mpi_neighbors.east) // offset neighbor
|
&(mpi_neighbors.east) // offset neighbor
|
||||||
);
|
);
|
||||||
// Get Y-direction (dim 1) neighbors
|
// Get Y-direction (dim 1) neighbors
|
||||||
MPI_Cart_shift(
|
MPI_Cart_shift(
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#SBATCH --time=00:10:00
|
||||||
|
#SBATCH -N 1 # Nr. of nodes
|
||||||
|
#SBATCH -n 10 # Total nr. of cores
|
||||||
|
|
||||||
|
DIM=2D
|
||||||
|
resolution=125
|
||||||
|
iterations=10
|
||||||
|
|
||||||
|
mpirun main_mpi $DIM $resolution $iterations
|
Loading…
Reference in New Issue