ORNL-Fusion / ips-wrappers

IPS wrapper / helper codes.
9 stars 4 forks source link

RESTART_FILES = * fails on directories. #26

Open dlg0 opened 9 years ago

dlg0 commented 9 years ago

@elwasif

I'd like to specify that all files and subdirectories be archived during the checkpointing function, i.e., specify that RESTART_FILES = *. This syntax seems to work, but fails on directories within the work directory, most likely because there is no recursive flag specified. At least that's my guess.

2015-07-21 09:40:06,573 driver__basic_time_step_driver_2 DEBUG    _invoke_service(): wait_call  (24L, True)
2015-07-21 09:40:06,580 nb__nubeam_6    DEBUG    _invoke_service(): sendEvent  ('_IPS_MONITOR', 'PORTAL_EVENT', {'sim_name': 'thisSim', 'portal_data': {'comment': "Files = * Exception raised : [Errno 21] Is a directory: '/global/project/projectdirs/atom/users/greendl1/diem_tsc_jm/work/nb__nubeam_6/PREACT'", 'code': 'nb__nubeam', 'ok': 'False', 'eventtype': 'IPS_STAGE_RESTART', 'state': 'Running', 'walltime': '647.80'}})
2015-07-21 09:40:06,591 nb__nubeam_6    ERROR    Error in stage_restart_files()
Traceback (most recent call last):
  File "/global/project/projectdirs/atom/atom-install-edison/ips-gnu-sf/bin/services.py", line 1648, in save_restart_files
    ipsutil.copyFiles(workdir, file_list, targetdir)
  File "/global/project/projectdirs/atom/atom-install-edison/ips-gnu-sf/bin/ipsutil.py", line 66, in copyFiles
    shutil.copy(src_file, target_file)
  File "/usr/common/usg/python/2.7.9/lib/python2.7/shutil.py", line 119, in copy
    copyfile(src, dst)
  File "/usr/common/usg/python/2.7.9/lib/python2.7/shutil.py", line 82, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 21] Is a directory: '/global/project/projectdirs/atom/users/greendl1/diem_tsc_jm/work/nb__nubeam_6/PREACT'