Skip to content

Commit

Permalink
merge from devel
Browse files Browse the repository at this point in the history
  • Loading branch information
andre-merzky committed Nov 26, 2024
2 parents 09a51ba + ec79ef6 commit 0a42a74
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 2 deletions.
31 changes: 31 additions & 0 deletions src/radical/pilot/configs/resource_debug.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,37 @@
"gpus_per_node" : 1,
"fake_resources" : true,
"system_architecture" : {"n_partitions": 1}
},

"radical": {
"description" : "",
"notes" : "",
"default_schema" : "ssh",
"schemas" : {
"ssh" : {
"job_manager_endpoint": "ssh://95.217.193.116/",
"filesystem_endpoint" : "sftp://95.217.193.116/"
},
"local" : {
"job_manager_endpoint": "fork://localhost/",
"filesystem_endpoint" : "file://localhost/"
}
},
"default_remote_workdir" : "$HOME",
"resource_manager" : "FORK",
"agent_config" : "default",
"agent_scheduler" : "CONTINUOUS",
"agent_spawner" : "POPEN",
"launch_methods" : {
"order": ["FORK"],
"FORK" : {}
},
"rp_version" : "local",
"virtenv_mode" : "create",
"python_dist" : "default",
"cores_per_node" : 64,
"gpus_per_node" : 0,
"fake_resources" : true
}
}

16 changes: 14 additions & 2 deletions src/radical/pilot/utils/staging_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,31 @@ def __init__(self, log):


def mkdir(self, tgt, flags=None):
self._log.debug('mkdir %s', tgt)
self._backend.mkdir(tgt, flags)

def rmdir(self, tgt, flags=None):
self._log.debug('rmdir %s', tgt)
self._backend.rmdir(tgt, flags)

def copy(self, src, tgt, flags=None):
self._log.debug('copy %s %s', src, tgt)
self._backend.copy(src, tgt, flags)

def move(self, src, tgt, flags=None):
self._log.debug('move %s %s', src, tgt)
self._backend.move(src, tgt, flags)

def link(self, src, tgt, flags=None):
self._log.debug('link %s %s', src, tgt)
self._backend.link(src, tgt, flags)

def delete(self, tgt, flags=None):
self._log.debug('rm %s', tgt)
self._backend.delete(tgt, flags)

def sh_callout(self, url, cmd):
self._log.debug('shcmd %s %s', url, cmd)
return self._backend.sh_callout(url, cmd)

def handle_staging_directive(self, sd):
Expand Down Expand Up @@ -83,7 +90,6 @@ def rmdir(self, tgt, flags):
os.rmdir(tgt)

def copy(self, src, tgt, flags):
self._log.debug('copy %s %s', src, tgt)
src = ru.Url(src).path
tgt = ru.Url(tgt).path
self.mkdir(os.path.dirname(tgt), flags)
Expand Down Expand Up @@ -115,7 +121,8 @@ def sh_callout(self, url, cmd):
class StagingHelper_SAGA(object):

try:
import saga.filesystem as _rsfs
import radical.saga.filesystem as _rsfs
import radical.saga.utils.misc as _rsum
import radical.saga.utils.pty_shell as _rsup
_has_saga = True
except:
Expand All @@ -135,6 +142,10 @@ def rmdir(self, tgt, flags):


def copy(self, src, tgt, flags):

# # FIXME: why??
# flags = 0

assert self._has_saga

tmp = ru.Url(tgt)
Expand All @@ -146,6 +157,7 @@ def copy(self, src, tgt, flags):
if os.path.isdir(src) or src.endswith('/'):
flags |= self._rsfs.RECURSIVE

# self._log.debug("copy %s 1 -> %s [%s]" % (src, tgt, flags))
fs.copy(src, tgt, flags=flags)

def move(self, src, tgt, flags):
Expand Down

0 comments on commit 0a42a74

Please sign in to comment.