From 2b2a7cfe4c57d7064a5ca1dab4f53313ce6332b8 Mon Sep 17 00:00:00 2001 From: John Moustakas Date: Sat, 1 Feb 2025 07:26:31 -0800 Subject: [PATCH] log minutes not seconds --- bin/mpi-fastspecfit | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/bin/mpi-fastspecfit b/bin/mpi-fastspecfit index bce457b2..41676329 100755 --- a/bin/mpi-fastspecfit +++ b/bin/mpi-fastspecfit @@ -176,13 +176,11 @@ def run_fastspecfit(args, comm=None, fastphot=False, specprod_dir=None, makeqa=F with stdouterr_redirected(to=logfile, overwrite=args.overwrite, comm=None): err = fast(args=cmdargs.split(), comm=None) - if rank == 0: - log.info(f'Rank {rank} done in {time.time() - t1:.2f} sec') - if err != 0: - if not os.path.exists(outfile): - log.warning(f'Rank {rank} missing {outfile}') - raise IOError - + log.info(f'Rank {rank} done in {(time.time() - t1)/60.:.2f} min') + if err != 0: + if not os.path.exists(outfile): + log.warning(f'Rank {rank} missing {outfile}') + raise IOError except: log.warning(f'Rank {rank} raised an exception') import traceback