Menu

input files and executable

2013-12-12
2013-12-19
  • Manuel Rodríguez-Pascual

    Hi all,

    I am facing a problem when creating a portlet.

    In want to submit an executable to be run remotely, employing a GEJobDescription.

    My doubt is, how should I specify the executable?

    I have the method

    taskToExecute.setExecutable( myExecutable).

    I assume that it requires a relative path if the executable has to be copied from the user, or an absolute path if the executable already exists on the remote site. Is that true?

    The problem is that there is no method to specify the local workspace, so I don't know how to indicate the path to my local executable.

    Also, should I copy the executable as an input file too with

    taskToExecute.setInputFiles( myExecutable , rest of input files)

    or is it automatically managed?

    Thanks for your help,

    Manuel

     
  • Diego Scardaci

    Diego Scardaci - 2013-12-13

    Hi Manuel,
    in the method:
    taskToExecute.setExecutable( myExecutable)

    you have to only specify the executable name (without path).

    In addition, only if the executable has to be copied from the portlet, you have to specify the executable name (including its absolute path) in the method:
    taskToExecute.setInputFiles( myExecutable , rest of input files)

    Please, pay attention. For security reason the user cannot upload executable file on the infrastructure. Then, if you need to upload an executable, this executable must be embedded inside the portlet.

    Cheers,
    Diego

     
  • Diego Scardaci

    Diego Scardaci - 2013-12-18

    A documentation bug!

    The method exists but we forgot to add it in the documentation:
    public void setOutputFiles(String value)

    where "value" is a comma separated string representing the output files list

    Sorry,
    Diego

     
  • Manuel Rodríguez-Pascual

    I get this error:

    [javac] miJobSubmission.setOutputFiles(outputFiles); // Setup output files (OutputSandbox)
    [javac] ^^^^^^^^^^^^^^
    [javac] The method setOutputFiles(String) is undefined for the type GEJobDescription

    Are you sure it is included in the class? Maybe there is some kind of error...

    I think this is the same problem that I commented here:
    https://sourceforge.net/p/ctsciencegtwys/discussion/general/thread/7fd290ac/?limit=25&page=1#5ebe

    after examining the class as much as possible without having the source code.

     

    Last edit: Manuel Rodríguez-Pascual 2013-12-19
  • Manuel Rodríguez-Pascual

    Hi Diego,

    you were right :)

    The problem was that i had multiple versions of the library in my /lib folder, with a symbolic link pointing to the newest one.

    I thought that was enough tom employ the last version, but "ant" was accesing to the earliest version of the library, as it is the first on alphabetic order, so it kept failing.

    Thanks again for your help.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.