Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian-Belkner committed Jul 2, 2023
1 parent 54f294e commit 5f16321
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 1 addition & 2 deletions delensalot/core/mpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ def enable():
global disabled, verbose, has_key, mpisupport, name
disabled = False
verbose = True
print(os.environ.keys())
has_key = lambda key : key in os.environ.keys()
mpisupport = 'srun' in os.environ['_'] or 'mpirun' in os.environ['_']
pmisupport = 'PMI_CRAY_NO_SMP_ORDER' in os.environ.keys()
Expand Down Expand Up @@ -88,7 +87,7 @@ def disable():
rank = 0
size = 1
finalize = lambda: -1
log.info('mpi.py : diabled, rank %s in %s' % (rank, size))
log.info('mpi.py : disabled, rank %s in %s' % (rank, size))

def init():

Expand Down
7 changes: 6 additions & 1 deletion delensalot/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,24 +112,29 @@ def purge_TEMPconf(self):
if __name__ == '__main__':
"""Entry point for the command line
"""
os.environ['USE_PLANCKLENS_MPI'] = "False"
lparser = lerepi_parser()
if lparser.validate():
parser = lparser.get_parser()

config_handler = config_handler(parser)
print(1)
if dh.dev_subr in parser.__dict__:
dh.dev(parser, config_handler.TEMP)
sys.exit()

print(1.1)
if mpi.size > 1:
print(1.2)
if mpi.rank == 0:
print(1.3)
mpi.disable()
config_handler.collect_models()
mpi.enable()
[mpi.send(1, dest=dest) for dest in range(0,mpi.size) if dest!=mpi.rank]
else:
mpi.receive(None, source=mpi.ANY_SOURCE)
config_handler.collect_models()
print(2)

try:
config_handler.run()
Expand Down

0 comments on commit 5f16321

Please sign in to comment.