Skip to content
Snippets Groups Projects
Commit 59008ee4 authored by Georges Da Costa's avatar Georges Da Costa
Browse files

Adds the capability to run on MacOS

parent 1fcdd4f3
No related branches found
No related tags found
1 merge request!1Devel
...@@ -15,8 +15,12 @@ from execo import Process ...@@ -15,8 +15,12 @@ from execo import Process
class Executor: class Executor:
'Allow access to the platform' 'Allow access to the platform'
def __init__(self): def __init__(self):
self.mpi_host_file = '/dev/shm/mpi_host_file' if os.path.isdir('/dev/shm'):
self.mpi_core_file = '/dev/shm/mpi_core_file' self.mpi_host_file = '/dev/shm/mpi_host_file'
self.mpi_core_file = '/dev/shm/mpi_core_file'
else:
self.mpi_host_file = '/tmp/expetator_mpi_host_file'
self.mpi_core_file = '/tmp/expetator_mpi_core_file'
self.mpi_options = '' self.mpi_options = ''
self.hostnames = ['localhost'] self.hostnames = ['localhost']
self.nbhosts = 1 self.nbhosts = 1
......
...@@ -93,7 +93,11 @@ class Mojitos: ...@@ -93,7 +93,11 @@ class Mojitos:
self.cmdline += ' -r' self.cmdline += ' -r'
if self.load: if self.load:
self.cmdline += ' -u' self.cmdline += ' -u'
self.cmdline += ' -o /dev/shm/monitoring_moj &' if os.path.isdir('/dev/shm'):
self.monitoring_file = '/dev/shm/monitoring_moj'
else:
self.monitoring_file = '/tmp/expetator_monitoring_moj'
self.cmdline += ' -o %s &' % self.monitoring_file
def start(self): def start(self):
...@@ -110,8 +114,8 @@ class Mojitos: ...@@ -110,8 +114,8 @@ class Mojitos:
os.makedirs(filename_moj, exist_ok=True) os.makedirs(filename_moj, exist_ok=True)
if len(self.executor.hostnames) > 1: if len(self.executor.hostnames) > 1:
for hostname in self.executor.hostnames: for hostname in self.executor.hostnames:
self.executor.local('oarcp %s:/dev/shm/monitoring_moj %s/%s_%s_%s' % self.executor.local('oarcp %s:%s %s/%s_%s_%s' %
(hostname, filename_moj, hostname, benchname, beg_time)) (hostname, self.monitoring_file, filename_moj, hostname, benchname, beg_time))
else: else:
self.executor.local('cp /dev/shm/monitoring_moj %s/%s_%s_%s' % self.executor.local('cp %s %s/%s_%s_%s' %
(filename_moj, 'localhost', benchname, beg_time)) (self.monitoring_file, filename_moj, 'localhost', benchname, beg_time))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment