goerz / gc3pie

Automatically exported from code.google.com/p/gc3pie
0 stars 0 forks source link

the application environment parameter doesn't work with the lsf backend #456

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1) Set the environment parameter in your Application class
        Application.__init__(self,
                             arguments = ["{3} -i {0} -u {1} -p {2}".format(ifile,  user,  password,  "/IPA-Data2/sierracloud/bin/" + type)],
                             inputs = [],
                             outputs = gc3libs.ANY_OUTPUT,
                             stdout = "stdout.txt",
                             stderr = "stderr.txt",
                             environment = {'IBM_DB_HOME':'/IPA-Data2/sierracloud/opt/dsdriver'}, 
                             **extra_args)
2) The environment variables are never called or used during the bsub command.

gc3.gc3libs: DEBUG: genericepilogue_content script not defined for resource 
pureapp
gc3.gc3libs: DEBUG: SshTransport.put(): local source: '/tmp/tmpu0TLjI'; remote 
destination: 
'/home/markmon/.gc3pie_jobs/lrms_job.6gANBrxTLS/./script.4f439347f5c89f37.sh'; 
remote host: 'pa64.dri.edu'.
gc3.gc3libs: DEBUG: SshTransport running `/bin/sh -c 'cd 
/home/markmon/.gc3pie_jobs/lrms_job.6gANBrxTLS && bsub -cwd . -L /bin/sh -n 1 
-oo stdout.txt -eo stderr.txt -J transTrmm.2A23.20000106.12141.7.HDF 
./script.4f439347f5c89f37.sh'`... 
gc3.gc3libs: DEBUG: Executed command '/bin/sh -c 'cd 
/home/markmon/.gc3pie_jobs/lrms_job.6gANBrxTLS && bsub -cwd . -L /bin/sh -n 1 
-oo stdout.txt -eo stderr.txt -J transTrmm.2A23.20000106.12141.7.HDF 
./script.4f439347f5c89f37.sh'' on host 'pa64.dri.edu'; exit code: 0

3) The work around is to put your environmental variables in a prologue script. 
You do that by specifying a path to the script in gc3pie.conf 

What is the expected output? What do you see instead?

I would expect to see the environmental variables to be used during the bsub 
command in some way. When I use the prologue script the environmental variables 
are set, but when I use the environment parameter of the Application class, my 
code does not execute because the environment is not set correctly. 

Original issue reported on code.google.com by markjmon...@gmail.com on 5 Aug 2014 at 9:53

GoogleCodeExporter commented 9 years ago
This should now be fixed in SVN r3987.  Can you please upgrade to the latest
"trunk" code and retry?

If the new code solves the issue, can you please close it by setting the
"Status" field to "Fixed"?

Original comment by riccardo.murri@gmail.com on 5 Aug 2014 at 11:54

GoogleCodeExporter commented 9 years ago
Fixed in release 2.2.3

Original comment by riccardo.murri@gmail.com on 19 Aug 2014 at 8:47