Skip to content
Snippets Groups Projects
Commit 454cd962 authored by FKHals's avatar FKHals
Browse files

Modify rank-swapper-agent to run on a docker image

parent 771c9f42
No related branches found
No related tags found
No related merge requests found
export OMPI := /<path-to-my-openmpi-installation>/openmpi-install export OMPI := /home/openmpi-install
export PATH := $(PATH):$(OMPI)/bin export PATH := $(PATH):$(OMPI)/bin
export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(OMPI)/bin export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(OMPI)/bin
# requirement: GNU make, see https://unix.stackexchange.com/questions/11530/adding-directory-to-path-through-makefile/261844#261844 # requirement: GNU make, see https://unix.stackexchange.com/questions/11530/adding-directory-to-path-through-makefile/261844#261844
......
#!/bin/bash #!/bin/bash
export OMPI=/<path-to-my-openmpi-installation>/openmpi-install export OMPI=/home/openmpi-install
export PATH=$PATH:$OMPI/bin export PATH=$PATH:$OMPI/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OMPI/bin export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OMPI/bin
PROCESSES=1 PROCESSES=1
HOSTFILE="--hostfile hostfile.txt" HOSTFILE="--hostfile hostfile.txt"
# makes the usage of hardware-threads instead of just cores possible
ENABLE_HYPERTHREADING="--bind-to hwthread" ENABLE_HYPERTHREADING="--bind-to hwthread"
ALLOW_OVERLOAD="--bind-to core:overload-allowed" ALLOW_OVERLOAD="--bind-to core:overload-allowed"
ENABLE_OVERSUBSCRIBE="--map-by :OVERSUBSCRIBE" ENABLE_OVERSUBSCRIBE="--map-by :OVERSUBSCRIBE"
# --bind-to hwthread: makes the usage of threads instead of just cores possible #FIXME run as root is necessary for running it inside docker but it should be disabled for production!
mpirun --np $PROCESSES $ALLOW_OVERLOAD $ENABLE_OVERSUBSCRIBE $HOSTFILE hello ALLOW_RUN_AS_ROOT="--allow-run-as-root"
mpirun --np $PROCESSES $ALLOW_OVERLOAD $ENABLE_OVERSUBSCRIBE $HOSTFILE $ALLOW_RUN_AS_ROOT hello
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include "mpi.h" #include "mpi.h"
#define SOCKET_PATH "/home/beach/Dokumente/Uni/Informatik_BA/Bachelorarbeit_MPI/sockets_mpi_test/socket" #define SOCKET_PATH "/home/ompi/openmpi-rank-swapper-agent/socket"
#define BUFFLEN 64 #define BUFFLEN 64
/* Spawn Modes (dynamic job spawning): /* Spawn Modes (dynamic job spawning):
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include <time.h> #include <time.h>
#include <unistd.h> #include <unistd.h>
#define SOCKET_PATH "/home/beach/Dokumente/Uni/Informatik_BA/Bachelorarbeit_MPI/sockets_mpi_test/socket" #define SOCKET_PATH "/home/ompi/openmpi-rank-swapper-agent/socket"
#define MAX_CONNECTIONS 10 #define MAX_CONNECTIONS 10
#define RANK_STR_LEN 8 #define RANK_STR_LEN 8
#define BUFFLEN 64 #define BUFFLEN 64
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment