Search code examples
sshscpbeanshellabaqustaverna

Executing Abaqus Model in Taverna


I'm pretty new to both Taverna and Abaqus but I am trying to run an Abaqus model using a "Tool" in Taverna remotely on a HPC. This works fine if I already have my model file and inputs on the HPC but I need a way of uploading the files dynamically in Taverna (trying to generically wrap Abaqus models).

I've tried adding a input port that takes a file list but I don't know how I can copy it to the "location" that I've set for the tool. Could a beanshell service be the answer or can I iterate through the file list and copy them up before executing the abaqus model?

Thanks


Solution

  • When you say that you created an input port that takes a file list, I guess you mean an input to the tool service.

    Assuming the input port is called my_file_list, when the tool service is run, it will take a list of data values on port my_file_list. As an example, say it has "hello", "hi" and "hola" is the three values in the list.

    On the location where the tool service is run, it executes in a temporary directory - a different directory for each execution of the service. It is normally something like /tmp/usecase-2029778474741087696

    Three files will be created in the temporary directory; those files contain the (in this example) three values the tool service received on port my_file_list. The files could be called

    • /tmp/usecase-2029778474741087696/tempfile.0.tmp containing hello
    • /tmp/usecase-2029778474741087696/tempfile.1.tmp containing hi
    • /tmp/usecase-2029778474741087696/tempfile.2.tmp containing hola

    There will also be a file called my_input_list. That file will contain

    /tmp/usecase-2029778474741087696/tempfile.0.tmp
    /tmp/usecase-2029778474741087696/tempfile.1.tmp
    /tmp/usecase-2029778474741087696/tempfile.2.tmp
    

    The script of your tool service would normally read the contents of my_input_list line by line and do something with the contents of the listed file(s).

    I have also seen some scripts that 'cheat' and iterate directly over tempfile*.tmp but that would be "a bad thing". The problem with that trick, is that if you want to add a second list of files to the tool service then the file my_input_list could contain

    /tmp/usecase7932018053449784034/tempfile.4.tmp
    /tmp/usecase7932018053449784034/tempfile.5.tmp
    /tmp/usecase7932018053449784034/tempfile.6.tmp
    

    as other temporary files were used for the other file list port.

    I hope that helps