diff --git a/expetator/experiment.py b/expetator/experiment.py
index 720a4bc941dd9aa2fb52eac7be0114ce04d90680..59762a11b00f87e530875dbb4f71f79484096c27 100755
--- a/expetator/experiment.py
+++ b/expetator/experiment.py
@@ -42,7 +42,6 @@ class Executor:
                 self.mpi_options = '-mca mtl psm2 -mca pml ^ucx,ofi -mca btl ^ofi,openib ' + self.mpi_options
             self.sudo = 'sudo-g5k'
             self.ssh = 'oarsh'
-        self.hosts(f'mkdir -p {self.tmp_dir}')
 
         with open(self.mpi_host_file, 'w') as file_id:
             for host in self.hostnames:
@@ -52,6 +51,8 @@ class Executor:
             for host in self.hostnames:
                 file_id.write(host+" slots=%s\n" % (self.nbcores//self.nbhosts))
 
+        self.hosts(f'mkdir -p {self.tmp_dir}')
+
     def local(self, cmd, shell=True, root=False):
         """Executes the cmd command and returns stdout after cmd exits"""
         if root: