From 26cd2c9ae16be61499b8c28a46a31ce7d97a862e Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 5 Dec 2022 15:39:03 -0500 Subject: [PATCH] Nedela --- dn5/Makefile | 2 +- dn5/server.c | 70 +++++++++++++++++++++++++++++++++++++ dn5/server.c_b | 95 -------------------------------------------------- 3 files changed, 71 insertions(+), 96 deletions(-) create mode 100644 dn5/server.c delete mode 100644 dn5/server.c_b diff --git a/dn5/Makefile b/dn5/Makefile index b8db7d8..5d37328 100644 --- a/dn5/Makefile +++ b/dn5/Makefile @@ -15,4 +15,4 @@ push: run_remote: ssh nsc 'cd $(DESTINATION); make clean;module load OpenMPI/4.0.5-GCC-10.2.0; make server;' - ssh nsc 'srun --mpi=pmix --reservation=fri -n2 $(DESTINATION)/server' + ssh nsc 'module load OpenMPI/4.0.5-GCC-10.2.0; mpirun -N 2 $(DESTINATION)/server' diff --git a/dn5/server.c b/dn5/server.c new file mode 100644 index 0000000..74a3518 --- /dev/null +++ b/dn5/server.c @@ -0,0 +1,70 @@ +#include +#include +#include + +#define buffsize 650 + +int main(int argc, char* argv[]) +{ + int taskid, ntasks; + int *buff; + double inittime, totaltime; + + MPI_Init(&argc, &argv); + + MPI_Comm_rank(MPI_COMM_WORLD, &taskid); + MPI_Comm_size(MPI_COMM_WORLD, &ntasks); + + buff = (int *)malloc(sizeof(int)*buffsize); + for (int i=0; i -#include -#include - -#define buffsize 650 - -int main(int argc, char* argv[]) -{ - int taskid, ntasks; - int i; - int *buff; - double inittime, totaltime; - MPI_Request sendrequest, recvrequest; - int done; - - MPI_Init(&argc, &argv); - - MPI_Comm_rank(MPI_COMM_WORLD, &taskid); - MPI_Comm_size(MPI_COMM_WORLD, &ntasks); - - - buff = (int *)malloc(sizeof(int)*buffsize); - for (i=0; i