Skip to content

Commit

Permalink
log minutes not seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
moustakas committed Feb 1, 2025
1 parent 869956a commit 2b2a7cf
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions bin/mpi-fastspecfit
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2b2a7cf

Please sign in to comment.