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