File names when using Wrapper App

Message boards : Questions and problems : File names when using Wrapper App
Message board moderation

To post messages, you must log in.

AuthorMessage
Andrey

Send message
Joined: 14 Mar 18
Posts: 5
Russia
Message 85265 - Posted: 16 Mar 2018, 11:42:17 UTC

Hello everyone,

I got stuck with files names trying to set up a BOINC application with wrapper app. So, I have an application version with the following structure:
x86_64-apple-darwin/
├── bnb_osx
├── version.xml
├── wrapper_26014_x86_64-apple-darwin
└── x86_64_apple_bnb_app_job_1.22.xml


Here, bnb_osx is the computational program itself. It should read the file named 'in.txt' in the same directory and produce 'out.txt' file as output. The contents of xml files are as follows:

version.xml:
<version>
   <file>
      <physical_name>wrapper_26014_x86_64-apple-darwin</physical_name>
      <main_program/>
   </file>
   <file>
      <physical_name>bnb_osx</physical_name>
      <logical_name>bnb_app</logical_name>
   </file>
   <file>
      <physical_name>x86_64_apple_bnb_app_job_1.22.xml</physical_name>
      <logical_name>job.xml</logical_name>
   </file>
</version>


x86_64_apple_bnb_app_job_1.22.xml:
<job_desc>
    <task>
        <application>bnb_osx</application>
    </task>
</job_desc>


Here are also the input and output templates:
<file_info>
                <number>0</number>
        </file_info>
        <workunit>
                <file_ref>
                        <file_number>0</file_number>
                        <open_name>in.txt</open_name>
                        <copy_file/>
                </file_ref>
        </workunit>


<file_info>
                <name><OUTFILE_0/></name>
                <generated_locally/>
                <upload_when_present/>
                <max_nbytes>5000000</max_nbytes>
                <url><UPLOAD_URL/></url>
        </file_info>
        <result>
                <file_ref>
                        <file_name><OUTFILE_0/></file_name>
                        <open_name>out.txt</open_name>
                        <copy_file/>
                </file_ref>
        </result>



The problem is that when these files are downloaded, 'can't open job file job.xml' error occurs. I tried to manually rename x86_64_apple_bnb_app_job_1.22.xml into job.xml, it worked but the input file's name was still 'task0.txt', as it was on the server, but not 'in.txt'.

Am I doing something wrong? What should be the right settings to set files names at client side the way I want them to be?

Thank you!
ID: 85265 · Report as offensive
Juha
Volunteer developer
Volunteer tester
Help desk expert

Send message
Joined: 20 Nov 12
Posts: 801
Finland
Message 85277 - Posted: 16 Mar 2018, 20:32:39 UTC - in response to Message 85265.  

version.xml:
      <physical_name>bnb_osx</physical_name>
      <logical_name>bnb_app</logical_name>


x86_64_apple_bnb_app_job_1.22.xml:
        <application>bnb_osx</application>


You should use app's logical name in job.xml.

it worked but the input file's name was still 'task0.txt', as it was on the server, but not 'in.txt'.


When BOINC downloads the file it keeps it's original name. When BOINC starts the science app it links or, as in your case, copies the file with it's logical name to slot directory.

The problem is that when these files are downloaded, 'can't open job file job.xml' error occurs.


I can't see any typos there and I tried setting up a wrapper app using the example from WrapperApp but couldn't reproduce the problem. Is it possible you have some tasks left from a previous attempt at setting up the app?
ID: 85277 · Report as offensive
Andrey

Send message
Joined: 14 Mar 18
Posts: 5
Russia
Message 85294 - Posted: 17 Mar 2018, 15:20:13 UTC - in response to Message 85277.  

I changed the app's name in 'job.xml' to the logical one. It may seem strange but after recompilation of bnb_osx everything went well, and now the project is working as expected.

Thank you again!
ID: 85294 · Report as offensive

Message boards : Questions and problems : File names when using Wrapper App

Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.