Failure when more than one pilot is used on TITAN
Very strange phenomenon. It happens only when I use more than one pilot.
I have already tried to delete ve_titan.
This is the error that I found in the bootstraps:
```
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/lustre/atlas2/csc108/scratch/aleang9/radical.pilot.sandbox/ve_titan/rp_install/lib/python2.7/site-packages/radical/pilot/__init__.py", line 18, in <module>
  File "/lustre/atlas2/csc108/scratch/aleang9/radical.pilot.sandbox/ve_titan/rp_install/lib/python2.7/site-packages/radical/pilot/session.py", line 23, in <module>
    from .unit_manager    import UnitManager
  File "/lustre/atlas2/csc108/scratch/aleang9/radical.pilot.sandbox/ve_titan/rp_install/lib/python2.7/site-packages/radical/pilot/unit_manager.py", line 26, in <module>
    from .controller   import UnitManagerController
  File "/lustre/atlas2/csc108/scratch/aleang9/radical.pilot.sandbox/ve_titan/rp_install/lib/python2.7/site-packages/radical/pilot/controller/__init__.py", line 10, in <module>
    from pilot_manager_controller import PilotManagerController
  File "/lustre/atlas2/csc108/scratch/aleang9/radical.pilot.sandbox/ve_titan/rp_install/lib/python2.7/site-packages/radical/pilot/controller/pilot_manager_controller.py", line 27, in <module>
    from .pilot_launcher_worker import PilotLauncherWorker
  File "/lustre/atlas2/csc108/scratch/aleang9/radical.pilot.sandbox/ve_titan/rp_install/lib/python2.7/site-packages/radical/pilot/controller/pilot_launcher_worker.py", line 27, in <module>
    _, _, _, rp_sdist_name, rp_sdist_path = ru.get_version([root, pwd])
  File "/lustre/atlas2/csc108/scratch/aleang9/radical.pilot.sandbox/ve_titan/rp_install/lib/python2.7/site-packages/radical/utils/get_version.py", line 85, in get_version
    raise RuntimeError ("Cannot determine version from %s" % paths)
RuntimeError: Cannot determine version from ['/lustre/atlas2/csc108/scratch/aleang9/radical.pilot.sandbox/ve_titan/rp_install/lib/python2.7/site-packages/radical/pilot/controller/../', '/lustre/atlas2/csc108/scratch/aleang9/radical.pilot.sandbox/ve_titan/rp_install/lib/python2.7/site-packages/radical/pilot/controller']
```
diff --git a/src/radical/pilot/bootstrapper/bootstrap_1.sh b/src/radical/pilot/bootstrapper/bootstrap_1.sh
index def8ba7d1..7913f021c 100755
--- a/src/radical/pilot/bootstrapper/bootstrap_1.sh
+++ b/src/radical/pilot/bootstrapper/bootstrap_1.sh
@@ -429,8 +429,8 @@ virtenv_setup()
     virtenv_mode="$3"
     python_dist="$4"
 
-    virtenv_create=UNDEFINED
-    virtenv_update=UNDEFINED
+    ve_create=UNDEFINED
+    ve_update=UNDEFINED
 
     if test "$virtenv_mode" = "private"
     then
@@ -439,18 +439,18 @@ virtenv_setup()
             printf "\nERROR: private virtenv already exists at $virtenv\n\n"
             exit 1
         fi
-        virtenv_create=TRUE
-        virtenv_update=FALSE
+        ve_create=TRUE
+        ve_update=FALSE
 
     elif test "$virtenv_mode" = "update"
     then
-        virtenv_create=FALSE
-        virtenv_update=TRUE
-        test -d "$virtenv/" || virtenv_create=TRUE
+        ve_create=FALSE
+        ve_update=TRUE
+        test -d "$virtenv/" || ve_create=TRUE
     elif test "$virtenv_mode" = "create"
     then
-        virtenv_create=TRUE
-        virtenv_update=FALSE
+        ve_create=TRUE
+        ve_update=FALSE
 
     elif test "$virtenv_mode" = "use"
     then
@@ -459,29 +459,29 @@ virtenv_setup()
             printf "\nERROR: given virtenv does not exist at $virtenv\n\n"
             exit 1
         fi
-        virtenv_create=FALSE
-        virtenv_update=FALSE
+        ve_create=FALSE
+        ve_update=FALSE
 
     elif test "$virtenv_mode" = "recreate"
     then
         test -d "$virtenv/" && rm -r "$virtenv"
-        virtenv_create=TRUE
-        virtenv_update=FALSE
+        ve_create=TRUE
+        ve_update=FALSE
     else
-        virtenv_create=FALSE
-        virtenv_update=FALSE
+        ve_create=FALSE
+        ve_update=FALSE
         printf "\nERROR: virtenv mode invalid: $virtenv_mode\n\n"
         exit 1
     fi
 
-    if test "$virtenv_create" = 'TRUE'
+    if test "$ve_create" = 'TRUE'
     then
         # no need to update a fresh ve
-        virtenv_update=FALSE
+        ve_update=FALSE
     fi
 
-    echo "virtenv_create   : $virtenv_create"
-    echo "virtenv_update   : $virtenv_update"
+    echo "virtenv_create   : $ve_create"
+    echo "virtenv_update   : $ve_update"
 
 
     # radical_pilot installation and update is governed by PILOT_VERSION.  If
@@ -492,18 +492,6 @@ virtenv_setup()
     case "$RP_VERSION" in
 
         local)
-            for sdist in `echo $SDISTS | tr ':' ' '`
-            do
-                src=${sdist%.tgz}
-                src=${sdist%.tar.gz}
-                tar zxmf $sdist
-                RP_INSTALL_SOURCES="$RP_INSTALL_SOURCES $src/"
-            done
-            RP_INSTALL_TARGET='VIRTENV'
-            RP_INSTALL_SDIST='TRUE'
-            ;;
-
-        debug)
             for sdist in `echo $SDISTS | tr ':' ' '`
             do
                 src=${sdist%.tgz}
@@ -517,7 +505,7 @@ virtenv_setup()
 
         release)
             RP_INSTALL_SOURCES='radical.pilot'
-            RP_INSTALL_TARGET='VIRTENV'
+            RP_INSTALL_TARGET='SANDBOX'
             RP_INSTALL_SDIST='FALSE'
             ;;
 
@@ -533,7 +521,7 @@ virtenv_setup()
                 echo "         Setting 'rp_version' to 'release'"
                 RP_VERSION='release'
                 RP_INSTALL_SOURCES='radical.pilot'
-                RP_INSTALL_TARGET='VIRTENV'
+                RP_INSTALL_TARGET='SANDBOX'
                 RP_INSTALL_SDIST='FALSE'
             fi
             ;;
@@ -545,7 +533,7 @@ virtenv_setup()
             git clone https://github.com/radical-cybertools/radical.pilot.git
             (cd radical.pilot; git checkout $RP_VERSION)
             RP_INSTALL_SOURCES="radical.pilot/"
-            RP_INSTALL_TARGET='VIRTENV'
+            RP_INSTALL_TARGET='SANDBOX'
             RP_INSTALL_SDIST='FALSE'
     esac
 
@@ -590,7 +578,7 @@ virtenv_setup()
 
 
     # create virtenv if needed.  This also activates the virtenv.
-    if test "$virtenv_create" = "TRUE"
+    if test "$ve_create" = "TRUE"
     then
         if ! test -d "$virtenv/"
         then
@@ -616,7 +604,7 @@ virtenv_setup()
 
 
     # update virtenv if needed.  This also activates the virtenv.
-    if test "$virtenv_update" = "TRUE"
+    if test "$ve_update" = "TRUE"
     then
         echo 'rp lock for ve update'
         lock "$pid" "$virtenv" # use default timeout
@@ -899,21 +887,16 @@ virtenv_update()
 #   @tag/@branch/@commit: # no sdist staging
 #       git clone $github_base radical.pilot.src
 #       (cd radical.pilot.src && git checkout token)
-#       pip install -t $VIRTENV/rp_install/ radical.pilot.src
+#       pip install -t $SANDBOX/rp_install/ radical.pilot.src
 #       rm -rf radical.pilot.src
-#       export PYTHONPATH=$VIRTENV/rp_install:$PYTHONPATH
+#       export PYTHONPATH=$SANDBOX/rp_install:$PYTHONPATH
 #
 #   release: # no sdist staging
-#       pip install -t $VIRTENV/rp_install radical.pilot
-#       export PYTHONPATH=$VIRTENV/rp_install:$PYTHONPATH
+#       pip install -t $SANDBOX/rp_install radical.pilot
+#       export PYTHONPATH=$SANDBOX/rp_install:$PYTHONPATH
 #
 #   local: # needs sdist staging
 #       tar zxmf $sdist.tgz
-#       pip install -t $VIRTENV/rp_install $sdist/
-#       export PYTHONPATH=$VIRTENV/rp_install:$PYTHONPATH
-#
-#   debug: # needs sdist staging
-#       tar zxmf $sdist.tgz
 #       pip install -t $SANDBOX/rp_install $sdist/
 #       export PYTHONPATH=$SANDBOX/rp_install:$PYTHONPATH
 #
diff --git a/src/radical/pilot/configs/resource_epsrc.json b/src/radical/pilot/configs/resource_epsrc.json
index 42b0e1a14..7d622cf95 100644
--- a/src/radical/pilot/configs/resource_epsrc.json
+++ b/src/radical/pilot/configs/resource_epsrc.json
@@ -27,7 +27,7 @@
         "valid_roots"                 : ["/work"],
         "virtenv"                     : "/work/e290/shared/shared_pilot_ve_20150924/",
         "virtenv_mode"                : "use",
-        "rp_version"                  : "debug",
+        "rp_version"                  : "local",
         "python_dist"                 : "default"
     },
     "archer_orte": {
@@ -61,7 +61,7 @@
         "valid_roots"                 : ["/work"],
         "virtenv"                     : "/work/e290/shared/shared_pilot_ve_20150924/",
         "virtenv_mode"                : "use",
-        "rp_version"                  : "debug",
+        "rp_version"                  : "local",
         "python_dist"                 : "default"
     }
 }
diff --git a/src/radical/pilot/configs/resource_local.json b/src/radical/pilot/configs/resource_local.json
index 0e282ce83..b1b7f2bbe 100644
--- a/src/radical/pilot/configs/resource_local.json
+++ b/src/radical/pilot/configs/resource_local.json
@@ -22,7 +22,7 @@
         "agent_launch_method"         : "FORK",
         "task_launch_method"          : "FORK",
         "mpi_launch_method"           : "MPIEXEC",
-        "rp_version"                  : "debug",
+        "rp_version"                  : "local",
         "virtenv"                     : "%(global_sandbox)s/ve_localhost",
         "virtenv_mode"                : "create",
         "python_dist"                 : "default"
@@ -50,7 +50,7 @@
         "agent_launch_method"         : "FORK",
         "task_launch_method"          : "YARN",
         "mpi_launch_method"           : "MPIEXEC",
-        "rp_version"                  : "debug",
+        "rp_version"                  : "local",
         "virtenv"                     : "%(global_sandbox)s/ve_localhost",
         "virtenv_mode"                : "create",
         "python_dist"                 : "default"
@@ -78,7 +78,7 @@
         "agent_launch_method"         : "FORK",
         "task_launch_method"          : "FORK",
         "mpi_launch_method"           : "MPIEXEC",
-        "rp_version"                  : "debug",
+        "rp_version"                  : "local",
         "virtenv"                     : "%(global_sandbox)s/ve_localhost",
         "virtenv_mode"                : "create",
         "python_dist"                 : "anaconda"
@@ -106,7 +106,7 @@
         "agent_launch_method"         : "FORK",
         "task_launch_method"          : "SPARK",
         "mpi_launch_method"           : "MPIEXEC",
-        "rp_version"                  : "debug",
+        "rp_version"                  : "local",
         "virtenv"                     : "%(global_sandbox)s/ve_localhost",
         "virtenv_mode"                : "create",
         "python_dist"                 : "default"
@@ -135,7 +135,7 @@
         "agent_launch_method"         : "FORK",
         "task_launch_method"          : "SPARK",
         "mpi_launch_method"           : "MPIEXEC",
-        "rp_version"                  : "debug",
+        "rp_version"                  : "local",
         "virtenv"                     : "%(global_sandbox)s/ve_localhost",
         "virtenv_mode"                : "create",
         "python_dist"                 : "anaconda"
diff --git a/src/radical/pilot/configs/resource_lrz.json b/src/radical/pilot/configs/resource_lrz.json
index 89606861d..df3070329 100644
--- a/src/radical/pilot/configs/resource_lrz.json
+++ b/src/radical/pilot/configs/resource_lrz.json
@@ -29,7 +29,7 @@
                                          "module unload mpi.ibm", "module load mpi.intel"
                                         ],
         "valid_roots"                 : ["/home", "/gpfs/work", "/gpfs/scratch"],
-        "rp_version"                  : "debug",
+        "rp_version"                  : "local",
         "virtenv"                     : "/home/hpc/pr87be/di29sut/ve_supermuc_shared_20150505",
         "virtenv_mode"                : "use",
         "python_dist"                 : "anaconda"
diff --git a/src/radical/pilot/configs/resource_nersc.json b/src/radical/pilot/configs/resource_nersc.json
index 75de5d258..1cd175c6e 100644
--- a/src/radical/pilot/configs/resource_nersc.json
+++ b/src/radical/pilot/configs/resource_nersc.json
@@ -18,7 +18,7 @@
         "pre_bootstrap_1"             : ["module load python"],
         "default_remote_workdir"      : "$SCRATCH",
         "valid_roots"                 : ["/global", "/scratch",  "/scratch2"],
-        "rp_version"                  : "debug",
+        "rp_version"                  : "local",
         "virtenv"                     : "%(global_sandbox)s/ve_hopper",
         "virtenv_mode"                : "create",
         "stage_cacerts"               : "True",
@@ -199,7 +199,7 @@
         "valid_roots"                 : ["/global", "/scratch1", "/scratch2"],
         "forward_tunnel_endpoint"     : "localhost",
         "tunnel_bind_device"          : "ipogif0",
-        "rp_version"                  : "debug",
+        "rp_version"                  : "local",
         "virtenv"                     : "%(global_sandbox)s/ve_edison",
         "virtenv_mode"                : "create",
         "stage_cacerts"               : "True",
diff --git a/src/radical/pilot/configs/resource_ornl.json b/src/radical/pilot/configs/resource_ornl.json
index 25a163692..427b6f9e4 100644
--- a/src/radical/pilot/configs/resource_ornl.json
+++ b/src/radical/pilot/configs/resource_ornl.json
@@ -32,7 +32,7 @@
         ],
         "default_remote_workdir"      : "$MEMBERWORK/`groups | cut -d' ' -f2`",
         "valid_roots"                 : ["/lustre/atlas/scratch"],
-        "rp_version"                  : "debug",
+        "rp_version"                  : "local",
         "virtenv"                     : "%(global_sandbox)s/ve_titan",
         "virtenv_mode"                : "create",
         "stage_cacerts"               : "True",
@@ -73,7 +73,7 @@
         ],
         "default_remote_workdir"      : "$MEMBERWORK/`groups | cut -d' ' -f2`",
         "valid_roots"                 : ["/lustre/atlas/scratch"],
-        "rp_version"                  : "debug",
+        "rp_version"                  : "local",
         "virtenv"                     : "%(global_sandbox)s/ve_titan",
         "virtenv_mode"                : "create",
         "stage_cacerts"               : "True",
diff --git a/src/radical/pilot/configs/resource_osg.json b/src/radical/pilot/configs/resource_osg.json
index 45e80b0bb..b590806ca 100644
--- a/src/radical/pilot/configs/resource_osg.json
+++ b/src/radical/pilot/configs/resource_osg.json
@@ -1,32 +1,27 @@
 {
-  "xsede-virt-clust": {
-    "description": "XSEDE OSG Virtual Cluster is a Condor pool overlay on top of OSG resources. (https://portal.xsede.org/OSG-User-Guide).",
-    "notes": "Always set the ``project`` attribute in the ComputePilotDescription or the pilot will fail.",
-    "schemas": [
-      "ssh",
-      "gsissh"
-    ],
-    "mandatory_args": [
-      "project"
-    ],
-    "ssh": {
+  "xsede-virt-clust"     : {
+    "description"        : "XSEDE OSG Virtual Cluster is a Condor pool overlay on top of OSG resources. (https://portal.xsede.org/OSG-User-Guide).",
+    "notes"              : "Always set the ``project`` attribute in the ComputePilotDescription or the pilot will fail.",
+    "schemas"            : ["ssh", "gsissh"],
+    "mandatory_args"     : ["project"],
+    "ssh"                : {
       "job_manager_endpoint": "condor+ssh://xd-login.opensciencegrid.org",
-      "filesystem_endpoint": "sftp://xd-login.opensciencegrid.org/"
+      "filesystem_endpoint" : "sftp://xd-login.opensciencegrid.org/"
     },
-    "gsissh": {
+    "gsissh"             : {
       "job_manager_endpoint": "condor+gsissh://xd-login.opensciencegrid.org",
-      "filesystem_endpoint": "gsisftp://xd-login.opensciencegrid.org/"
+      "filesystem_endpoint" : "gsisftp://xd-login.opensciencegrid.org/"
     },
-    "lrms": "FORK",
-    "agent_type": "multicore",
-    "shared_filesystem": false,
-    "health_check": false,
-    "agent_scheduler": "CONTINUOUS",
-    "agent_spawner": "POPEN",
-    "agent_config": "osg",
+    "lrms"               : "FORK",
+    "agent_type"         : "multicore",
+    "shared_filesystem"  : false,
+    "health_check"       : false,
+    "agent_scheduler"    : "CONTINUOUS",
+    "agent_spawner"      : "POPEN",
+    "agent_config"       : "osg",
     "agent_launch_method": "FORK",
-    "task_launch_method": "FORK",
-    "pre_bootstrap_1": [
+    "task_launch_method" : "FORK",
+    "pre_bootstrap_1"    : [
       # Allow to load modules
       "source /cvmfs/oasis.opensciencegrid.org/osg/modules/lmod/current/init/bash",
       # Unset env var otherwise tempfile conflicts with other VO
@@ -41,50 +36,47 @@
       "export PB2PATH=$PATH",
       "module load python/2.7"
     ],
-    "pre_bootstrap_2": [
+    "pre_bootstrap_2"    : [
       "export HOME=$HOME",
       "export PATH=$PB2PATH",
       "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
     ],
-    "rp_version": "debug",
-    "virtenv": "./ve_xd-login",
-    "virtenv_mode": "create",
-    "python_dist": "default"
+    "rp_version"         : "local",
+    "virtenv"            : "./ve_xd-login",
+    "virtenv_mode"       : "create",
+    "python_dist"        : "default"
   },
+
   "connect": {
-    "description": "OSG Connect. (https://osgconnect.net).",
-    "notes": "Always set the ``project`` attribute in the ComputePilotDescription or the pilot will fail.",
-    "schemas": [
-      "ssh",
-      "gsissh"
-    ],
-    "mandatory_args": [
-      "project"
-    ],
-    "ssh": {
+    "description"        : "OSG Connect. (https://osgconnect.net).",
+    "notes"              : "Always set the ``project`` attribute in the ComputePilotDescription or the pilot will fail.",
+    "schemas"            : ["ssh", "gsissh"],
+    "mandatory_args"     : ["project"],
+    "ssh"                : {
       "job_manager_endpoint": "condor+ssh://login.osgconnect.net",
-      "filesystem_endpoint": "sftp://login.osgconnect.net/"
+      "filesystem_endpoint" : "sftp://login.osgconnect.net/"
     },
-    "gsissh": {
+    "gsissh"             : {
       "job_manager_endpoint": "condor+gsissh://login.osgconnect.net",
-      "filesystem_endpoint": "gsisftp://login.osgconnect.net/"
+      "filesystem_endpoint" : "gsisftp://login.osgconnect.net/"
     },
-    "lrms": "FORK",
-    "agent_type": "multicore",
-    "shared_filesystem": false,
-    "health_check": false,
-    "agent_scheduler": "CONTINUOUS",
-    "agent_spawner": "POPEN",
-    "agent_config": "osg",
+    "lrms"               : "FORK",
+    "agent_type"         : "multicore",
+    "shared_filesystem"  : false,
+    "health_check"       : false,
+    "agent_scheduler"    : "CONTINUOUS",
+    "agent_spawner"      : "POPEN",
+    "agent_config"       : "osg",
     "agent_launch_method": "FORK",
-    "task_launch_method": "FORK",
-    "pre_bootstrap_1": [
+    "task_launch_method" : "FORK",
+    "pre_bootstrap_1"    : [
       "source /cvmfs/oasis.opensciencegrid.org/osg/modules/lmod/current/init/bash",
       "module load python/2.7"
     ],
-    "rp_version": "debug",
-    "virtenv": "./ve_osgconnect",
-    "virtenv_mode": "create",
-    "python_dist": "default"
+    "rp_version"         : "debug",
+    "virtenv"            : "./ve_osgconnect",
+    "virtenv_mode"       : "create",
+    "python_dist"        : "default"
   }
 }
+
diff --git a/src/radical/pilot/configs/resource_xsede.json b/src/radical/pilot/configs/resource_xsede.json
index 067f76cbe..9d2980120 100644
--- a/src/radical/pilot/configs/resource_xsede.json
+++ b/src/radical/pilot/configs/resource_xsede.json
@@ -367,7 +367,7 @@
         "mpi_launch_method"           : "MPIRUN_RSH",
         "pre_bootstrap_1"             : ["module purge", "module load python intel mvapich2_ib gnubase"],
         "valid_roots"                 : ["/home"],
-        "rp_version"                  : "debug",
+        "rp_version"                  : "local",
         "virtenv"                     : "%(global_sandbox)s/ve_gordon",
         "virtenv_mode"                : "create",
         "python_dist"                 : "default"
@@ -402,7 +402,7 @@
                                         ],
         "valid_roots"                 : ["/usr/users", "/brashear"],
         "stage_cacerts"               : "True",
-        "rp_version"                  : "debug",
+        "rp_version"                  : "local",
         "virtenv"                     : "%(global_sandbox)s/ve_blacklight",
         "virtenv_mode"                : "create",
         "python_dist"                 : "default"
@@ -437,7 +437,7 @@
                                         ],
         "valid_roots"                 : ["/home", "/crucible", "/arc"],
         "stage_cacerts"               : "True",
-        "rp_version"                  : "debug",
+        "rp_version"                  : "local",
         "virtenv"                     : "%(global_sandbox)s/ve_greenfield",
         "virtenv_mode"                : "create",
         "python_dist"                 : "default"
diff --git a/src/radical/pilot/controller/pilot_launcher_worker.py b/src/radical/pilot/controller/pilot_launcher_worker.py
index c1926b976..f68eee0be 100644
--- a/src/radical/pilot/controller/pilot_launcher_worker.py
+++ b/src/radical/pilot/controller/pilot_launcher_worker.py
@@ -520,21 +520,16 @@ class PilotLauncherWorker(threading.Thread):
                         #   @tag/@branch/@commit: # no sdist staging
                         #       git clone $github_base radical.pilot.src
                         #       (cd radical.pilot.src && git checkout token)
-                        #       pip install -t $VIRTENV/rp_install/ radical.pilot.src
+                        #       pip install -t $SANDBOX/rp_install/ radical.pilot.src
                         #       rm -rf radical.pilot.src
-                        #       export PYTHONPATH=$VIRTENV/rp_install:$PYTHONPATH
+                        #       export PYTHONPATH=$SANDBOX/rp_install:$PYTHONPATH
                         #
                         #   release: # no sdist staging
-                        #       pip install -t $VIRTENV/rp_install radical.pilot
-                        #       export PYTHONPATH=$VIRTENV/rp_install:$PYTHONPATH
+                        #       pip install -t $SANDBOX/rp_install radical.pilot
+                        #       export PYTHONPATH=$SANDBOX/rp_install:$PYTHONPATH
                         #
                         #   local: # needs sdist staging
                         #       tar zxf $sdist.tgz
-                        #       pip install -t $VIRTENV/rp_install $sdist/
-                        #       export PYTHONPATH=$VIRTENV/rp_install:$PYTHONPATH
-                        #
-                        #   debug: # needs sdist staging
-                        #       tar zxf $sdist.tgz
                         #       pip install -t $SANDBOX/rp_install $sdist/
                         #       export PYTHONPATH=$SANDBOX/rp_install:$PYTHONPATH
                         #
@@ -572,17 +567,20 @@ class PilotLauncherWorker(threading.Thread):
                         # above syntax is ignored, and the fallback stage@local
                         # is used.
 
-                        if  not rp_version.startswith('@') and \
-                            not rp_version in ['installed', 'local', 'debug']:
-                            raise ValueError("invalid rp_version '%s'" % rp_version)
-
-                        stage_sdist=True
-                        if rp_version in ['installed', 'release']:
-                            stage_sdist = False
+                        # 'debug' is deprecated now
+                        if rp_version == 'debug':
+                            logger.warn ("rp_version flag 'debug' is deprecated, use 'local'")
+                            rp_version = 'local'
 
                         if rp_version.startswith('@'):
-                            stage_sdist = False
-                            rp_version  = rp_version[1:]  # strip '@'
+                            rp_version = rp_version[1:]  # strip '@'
+
+                        elif rp_version not in ['installed', 'local']:
+                            raise ValueError("invalid rp_version '%s'" % rp_version)
+
+                        stage_sdist=False
+                        if rp_version in ['local']:
+                            stage_sdist = True
 
 
                         # ------------------------------------------------------
['src/radical/pilot/controller/pilot_launcher_worker.py', 'src/radical/pilot/bootstrapper/bootstrap_1.sh', 'src/radical/pilot/configs/resource_local.json', 'src/radical/pilot/configs/resource_epsrc.json', 'src/radical/pilot/configs/resource_xsede.json', 'src/radical/pilot/configs/resource_lrz.json', 'src/radical/pilot/configs/resource_ornl.json', 'src/radical/pilot/configs/resource_osg.json', 'src/radical/pilot/configs/resource_nersc.json']