Thread 'How to make the WrapperApp to work?'

Message boards : API : How to make the WrapperApp to work?
Message board moderation

To post messages, you must log in.

1 · 2 · Next

AuthorMessage
HTH

Send message
Joined: 8 Aug 06
Posts: 30
Finland
Message 48654 - Posted: 17 Apr 2013, 11:29:44 UTC

Hi!

I have some problems with the WrapperApp I made. I think the problem was that the zip file didn't unzip. Why not?

How can I make the unzip to work or how can I include subdirectories with
my BOINC WrapperApp? The file utopia1.zip has some files and subdirectories in it, but I never saw the subdirectories in the slot folder...

This is the pre-compiled version I used:
http://boinc.berkeley.edu/dl/wrapper_26002_windows_x86_64.zip

This is the file phoenix_job_1.5.xml:
<job_desc>
<task>
<unzip_input>
<zipfilename>utopia1.zip</zipfilename>
</unzip_input>
</task>
<task>
<application>phoenix.exe</application>
</task>
</job_desc>


This is what I got:
---
16.4.2013 21:30:33 | | Fetching configuration file from
http://192.168.1.119/test/get_project_config.php
16.4.2013 21:30:45 | test | Master file download succeeded
16.4.2013 21:30:50 | test | Sending scheduler request: Project
initialization.
16.4.2013 21:30:50 | test | Requesting new tasks for CPU and NVIDIA
16.4.2013 21:30:51 | test | Scheduler request completed: got 1 new tasks
16.4.2013 21:30:53 | test | Started download of
utopia1_26006_windows_x86_64.exe
16.4.2013 21:30:53 | test | Started download of phoenix.exe
16.4.2013 21:30:54 | test | Finished download of
utopia1_26006_windows_x86_64.exe
16.4.2013 21:30:54 | test | Finished download of phoenix.exe
16.4.2013 21:30:54 | test | Started download of phoenix_job_1.5.xml
16.4.2013 21:30:54 | test | Started download of utopia1.zip
16.4.2013 21:30:55 | test | Finished download of phoenix_job_1.5.xml
16.4.2013 21:30:55 | test | Finished download of utopia1.zip
16.4.2013 21:30:55 | test | Starting task utopia_henritestitestitesti_0
using utopia1 version 26006 in slot 14
16.4.2013 21:30:56 | test | Computation for task
utopia_henritestitestitesti_0 finished
16.4.2013 21:30:56 | test | Output file utopia_henritestitestitesti_0_0 for
task utopia_henritestitestitesti_0 absent
---

This is the result (result.php?resultid=228):
---
Stderr output

<core_client_version>7.0.45</core_client_version>
<![CDATA[
<message>
Funktio ei kelpaa.
(0x1) - exit code 1 (0x1)
</message>
<stderr_txt>
wrapper: starting
21:30:55 (7828): TASK::parse(): unexpected text utopia1.zip
application missing

</stderr_txt>
]]>

---

Any ideas?
ID: 48654 · Report as offensive
rebirther
Avatar

Send message
Joined: 21 Jun 06
Posts: 156
Germany
Message 48657 - Posted: 17 Apr 2013, 14:43:55 UTC
Last modified: 17 Apr 2013, 14:44:44 UTC

Whats your input/output template (content)? Do you have the unzip program included?
ID: 48657 · Report as offensive
HTH

Send message
Joined: 8 Aug 06
Posts: 30
Finland
Message 48658 - Posted: 17 Apr 2013, 15:12:30 UTC - in response to Message 48657.  
Last modified: 17 Apr 2013, 15:48:02 UTC

Whats your input/output template (content)? Do you have the unzip program included?


/home/boincadm/projects/test/templates/utopia1_in:
<workunit>
    <rsc_fpops_bound>1e12</rsc_fpops_bound>
    <rsc_fpops_est>1e14</rsc_fpops_est>
</workunit>


/home/boincadm/projects/test/templates/utopia1_out:
<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>phoenix.log</open_name>
        <copy_file/>
    </file_ref>
</result>


I only have the worker (phoenix.exe), wrapper (utopia1_26006_windows_x86_64.exe, taken from here http://boinc.berkeley.edu/dl/wrapper_26002_windows_x86_64.zip and renamed), phoenix_job_1.5.xml and utopia1.zip

Should there be a separate unzip program? I thought the wrapper includes the (un)zip mechanism...
ID: 48658 · Report as offensive
rebirther
Avatar

Send message
Joined: 21 Jun 06
Posts: 156
Germany
Message 48660 - Posted: 17 Apr 2013, 16:07:54 UTC

Hmm, the input template doesnt content any command line and the wrapper dont know what he should to do with your command utopia.zip.

<file_info>
    <number>0</number>
</file_info>
<workunit>
    <file_ref>
        <file_number>0</file_number>
        <open_name>xyz.txt</open_name>
        <copy_file/>
    <command_line> ???  </command_line>
</workunit>


The job.xml file should be content:

<job_desc>
    <task>
        <application>xyz/application>
	<append_cmdline_args/>
    </task>
</job_desc>
ID: 48660 · Report as offensive
HTH

Send message
Joined: 8 Aug 06
Posts: 30
Finland
Message 48662 - Posted: 17 Apr 2013, 16:45:01 UTC
Last modified: 17 Apr 2013, 16:56:03 UTC

I'm sorry but it is really difficult for me to understand BOINC servers...

/home/boincadm/projects/test/apps/utopia1/26006/windows_x86_64/phoenix.exe
/home/boincadm/projects/test/apps/utopia1/26006/windows_x86_64/phoenix_job_1.5.xml
/home/boincadm/projects/test/apps/utopia1/26006/windows_x86_64/utopia1.zip
/home/boincadm/projects/test/apps/utopia1/26006/windows_x86_64/utopia1_26006_windows_x86_64.exe
/home/boincadm/projects/test/apps/utopia1/26006/windows_x86_64/version.xml

The content of these files:
phoenix_job_1.5.xml
-------------------
<job_desc>
  <task>
    <unzip_input>
      <zipfilename>utopia1.zip</zipfilename>
    </unzip_input>
  </task>
  <task>
    <application>phoenix.exe</application>
  </task>
</job_desc>

----

utopia1.zip
-----------
doc/cpu.py
doc/example.cfg
doc/dpc.txt
plugins/opencl/__init__.py
plugins/opencl/kernel.c
plugins/phatk2/__init__.py
plugins/phatk2/kernel.c
phoenix.cfg
phoenix.exe
----

utopia1_26006_windows_x86_64.exe (taken from here http://boinc.berkeley.edu/dl/wrapper_26002_windows_x86_64.zip and renamed)

version.xml
-----------
<version>
  <file>
    <physical_name>utopia1_26006_windows_x86_64.exe</physical_name>
    <main_program/>
  </file>
  <file>
    <physical_name>phoenix.exe</physical_name>
    <logical_name>phoenix.exe</logical_name>
  </file>
  <file>
    <physical_name>phoenix_job_1.5.xml</physical_name>
    <logical_name>job.xml</logical_name>
  </file>
</version>

----

I also have /home/boincadm/projects/test/project.xml
----
<boinc>
    <platform>
        <name>windows_intelx86</name>
        <user_friendly_name>Microsoft Windows (98 or later) running on an Intel x86-compatible CPU</user_friendly_name>
    </platform>
    <platform>
        <name>windows_x86_64</name>
        <user_friendly_name>Microsoft Windows running on an AMD x86_64 or Intel EM64T CPU</user_friendly_name>
    </platform>
    <app>
        <name>utopia1</name>
        <user_friendly_name>Utopia Project 1</user_friendly_name>
    </app>
</boinc>

----

I also have /home/boincadm/projects/test/templates/utopia1_out
---
<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>phoenix.log</open_name>
        <copy_file/>
    </file_ref>
</result>

---

I also have /home/boincadm/projects/test/templates/utopia1_in
----
<file_info>
  <number>0</number>
</file_info>
<workunit>
  <file_ref>
    <file_number>0</file_number>
    <open_name>utopia1.zip</open_name>
    <copy_file/>
  </file_ref>
  <rsc_fpops_bound>1e12</rsc_fpops_bound>
  <rsc_fpops_est>1e14</rsc_fpops_est>
</workunit>

----

1. What should I change/add? I want the zip file to unzip (in the slot directory?) and after that BOINC should try to start phoenix.exe. That's it. I want BOINC to run phoenix.exe (no command line parameters needed for phoenix.exe; it should automatically open phoenix.cfg).

2. How can I produce some work? I don't understand this: bin/create_work --appname worker --wu_name worker_nodelete input

Why there are two parameters for --wu_name (worker_nodelete and input)? What is worker_nodelete? What is input? I only need to unzip utopia1.zip and start phoenix.exe and after some time send phoenix.log back to BOINC server.
ID: 48662 · Report as offensive
ChristianB
Volunteer developer
Volunteer tester

Send message
Joined: 4 Jul 12
Posts: 321
Germany
Message 48666 - Posted: 18 Apr 2013, 8:54:33 UTC - in response to Message 48662.  

2. How can I produce some work? I don't understand this: bin/create_work --appname worker --wu_name worker_nodelete input

Why there are two parameters for --wu_name (worker_nodelete and input)? What is worker_nodelete? What is input? I only need to unzip utopia1.zip and start phoenix.exe and after some time send phoenix.log back to BOINC server.

I'm not that familiar with the wrapper feature but the create_work command is as follows:

--app_name worker should be --app_name utopia1
--wu_name worker_nodelete should be --wu_name utopia1_test1 (the nodelete tells the server to keep the input files in case you want to generate more work from them. You should also keep the name unique.
You may have to specify your template files too or rename them to end with .xml (depends on what server version you are using)
input should be a space separated list of input files (Which you somehow don't have) utopia1.zip is not an input file as you put it into the apps directory and it is bundled with the application version.

This will generate 1 Job with 1 Task (I hope) that is distributed to 1 host. If you want another just increment the wu_name to utopia1_test1 or change your input template parameters.

Is this some kind of bitcoin miner? It is a bit strange to run a program without commandline arguments or input files on more than one computer as the result should be the same on all of them.
ID: 48666 · Report as offensive
HTH

Send message
Joined: 8 Aug 06
Posts: 30
Finland
Message 48671 - Posted: 18 Apr 2013, 13:43:24 UTC - in response to Message 48666.  
Last modified: 18 Apr 2013, 13:48:27 UTC


--app_name worker should be --app_name utopia1
--wu_name worker_nodelete should be --wu_name utopia1_test1 (the nodelete tells the server to keep the input files in case you want to generate more work from them. You should also keep the name unique.
You may have to specify your template files too or rename them to end with .xml (depends on what server version you are using)
input should be a space separated list of input files (Which you somehow don't have) utopia1.zip is not an input file as you put it into the apps directory and it is bundled with the application version.

This will generate 1 Job with 1 Task (I hope) that is distributed to 1 host. If you want another just increment the wu_name to utopia1_test1 or change your input template parameters.


Thank you!

Is this some kind of bitcoin miner? It is a bit strange to run a program without commandline arguments or input files on more than one computer as the result should be the same on all of them.


Yes, it is a bitcoin miner. Okay. Now I have an input file for it. I decided to use phoenix.cfg as an input file. This is the command I use to make work:
boincadm@debian6:~/projects/test$ ./bin/create_work --appname utopia1 --wu_name wu_utopia1_01 --wu_template templates/utopia1_in --result_template templates/utopia1_out --min_quorum 1 --target_nresults 1 phoenix.cfg


I still have some problems, though.

XML doc in
<file_info>
    <name>wu_utopia1_03_0_0</name>
    <generated_locally/>
    <upload_when_present/>
    <max_nbytes>5000000</max_nbytes>
    <url>http://192.168.1.119/test_cgi/file_upload_handler</url>
</file_info>
<result>
    <file_ref>
        <file_name>wu_utopia1_03_0_0</file_name>
        <open_name>phoenix.log</open_name>
        <copy_file/>
    </file_ref>
</result>


XML doc out
<file_info><name>wu_utopia1_03_0_0</name>
    <nbytes>49.000000</nbytes>
    <max_nbytes>5000000.000000</max_nbytes>
    <md5_cksum>de180a83d17c8e6c8e750c6b3ae3b6be</md5_cksum>
    <upload_url>http://192.168.1.119/test_cgi/file_upload_handler</upload_url></file_info>


stderr out
<core_client_version>7.0.46</core_client_version>
<![CDATA[
<message>
à]& - exit code 195 (0xc3)
</message>
<stderr_txt>
wrapper: starting
16:33:28 (3724): unexpected tag in job.xml: zipfilename
16:33:28 (3724): wrapper: running ../../projects/192.168.1.119_test/phoenix.exe ()

[0 Khash/s] [0 Accepted] [0 Rejected] [DISCONNECTED]
[04/18/2013 16:33:28] Welcome to Phoenix v2.0.0     
[0 Khash/s] [0 Accepted] [0 Rejected] [DISCONNECTED]Traceback (most recent call last):
  File "phoenix.py", line 6, in <module>
  File "phoenix2\__init__.pyo", line 51, in main
  File "phoenix2\core\PhoenixCore.pyo", line 90, in start
  File "phoenix2\core\PhoenixCore.pyo", line 144, in discoverPlugins
WindowsError: [Error 3] M&#228;&#228;ritetty&#228; polkua ei l&#246;ydy: 'C:\\ProgramData\\BOINC\\projects\\192.168.1.119_test\\plugins/*.*'

                                                      app exit status: 0xff
16:33:29 (3724): called boinc_finish

</stderr_txt>
]]>


I think BOINC doesn't know how to unzip my zip file correctly. My zip files has some subdirectories and I didn't find them in the slot directory...
ID: 48671 · Report as offensive
HTH

Send message
Joined: 8 Aug 06
Posts: 30
Finland
Message 48674 - Posted: 18 Apr 2013, 21:27:38 UTC

Can I include subdirectories in the app folder without putting them inside a zip file?

Should I include them (the subdirectories and all the non-binary files) in the version.xml file?
ID: 48674 · Report as offensive
ChristianB
Volunteer developer
Volunteer tester

Send message
Joined: 4 Jul 12
Posts: 321
Germany
Message 48679 - Posted: 19 Apr 2013, 7:11:46 UTC

I don't think that is possible (subdirectories). Maybe you just need a newer version of the wrapper because it seems that your version lacks the zip/unzip functionality. Please post to the boinc_dev Mailing list that you need a newer version and reference this thread.
ID: 48679 · Report as offensive
HTH

Send message
Joined: 8 Aug 06
Posts: 30
Finland
Message 48680 - Posted: 19 Apr 2013, 7:12:53 UTC
Last modified: 19 Apr 2013, 7:37:49 UTC

/home/boincadm/projects/test/templates/utopia1_out
---
<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>phoenix.log</open_name>
        <copy_file/>
    </file_ref>
</result>

---

/home/boincadm/projects/test/templates/utopia1_in
----
<file_info>
  <number>0</number>
</file_info>
<workunit>
  <file_ref>
    <file_number>0</file_number>
    <open_name>phoenix.cfg</open_name>
    <copy_file/>
  </file_ref>
  <rsc_fpops_bound>1e12</rsc_fpops_bound>
  <rsc_fpops_est>1e14</rsc_fpops_est>
</workunit>

---

/home/boincadm/projects/test/apps/utopia1/26011/windows_x86_64/phoenix_job_1.11.xml
----
<job_desc>
  <task>
    <application>phoenix.exe</application>
  </task>
  <unzip_input>
    <zipfilename>utopia1_26011_windows_x86_64.zip</zipfilename>
  </unzip_input>
</job_desc>

---
ID: 48680 · Report as offensive
HTH

Send message
Joined: 8 Aug 06
Posts: 30
Finland
Message 48681 - Posted: 19 Apr 2013, 7:22:37 UTC
Last modified: 19 Apr 2013, 7:24:05 UTC

Now I got this!

19.4.2013 10:19:09 | test | Sending scheduler request: To fetch work.
19.4.2013 10:19:09 | test | Requesting new tasks for CPU
19.4.2013 10:19:10 | test | Scheduler request completed: got 0 new tasks
19.4.2013 10:19:10 | test | Viesti palvelimelta: An GPU is required to run tasks for this project
19.4.2013 10:19:10 | test | No tasks sent
19.4.2013 10:19:10 | test | No tasks are available for Utopia Project 1
19.4.2013 10:19:10 | test | Project has no tasks available
19.4.2013 10:19:44 | test | update requested by user
19.4.2013 10:19:46 | test | Sending scheduler request: Requested by user.
19.4.2013 10:19:46 | test | Not requesting tasks: don't need
19.4.2013 10:19:47 | test | Scheduler request completed

How does BOINC Manager know that my application needs a GPU? Why doesn't it download the workunit then? I have a GPU with CUDA and OpenGL supports...
ID: 48681 · Report as offensive
ChristianB
Volunteer developer
Volunteer tester

Send message
Joined: 4 Jul 12
Posts: 321
Germany
Message 48682 - Posted: 19 Apr 2013, 7:49:52 UTC

If you want to use the GPU you should create a GPU application or else your application will fail because another app is already scheduled to run on the GPU.
ID: 48682 · Report as offensive
HTH

Send message
Joined: 8 Aug 06
Posts: 30
Finland
Message 48683 - Posted: 19 Apr 2013, 8:50:22 UTC - in response to Message 48682.  

If you want to use the GPU you should create a GPU application or else your application will fail because another app is already scheduled to run on the GPU.


Any ideas how to use GPU apps with Wrapper?
ID: 48683 · Report as offensive
ChristianB
Volunteer developer
Volunteer tester

Send message
Joined: 4 Jul 12
Posts: 321
Germany
Message 48685 - Posted: 19 Apr 2013, 10:55:24 UTC

No, but the wiki knows. This also may involve some heavy testing as the wrapper in it's current state may not know which GPU to use or can't tell the worker programm and this will fail. Maybe it's even impossible to run GPU apps through the wrapper as the wrapper can't make sure that the non-BOINC GPU application uses the correct ressource (if there is more than one GPU present).

On a sidenote: Do have a specific concept (project) in mind or do you just want to optimize your own bitcoin mining operation? I wouldn't connect my computer to a bitcoin project if someone else is getting the bitcoins. And I also think it's a waste of resources because the exchange rate is not stable enough to know if the computer cycles used to generate a bitcoin are worth something in the future. I could investigate my unused cycles in research projects that I find more promising in producing actual results. But this is clearly a philosophical discussion.
ID: 48685 · Report as offensive
ProfileJord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15560
Netherlands
Message 48686 - Posted: 19 Apr 2013, 11:30:31 UTC

Mind, it's also required that BOINC actually detects the GPU so it can ask for work for it. Just having a GPU application won't do, as then BOINC won't be using it.
ID: 48686 · Report as offensive
HTH

Send message
Joined: 8 Aug 06
Posts: 30
Finland
Message 48687 - Posted: 19 Apr 2013, 12:42:28 UTC - in response to Message 48685.  
Last modified: 19 Apr 2013, 12:45:37 UTC

No, but the wiki knows. This also may involve some heavy testing as the wrapper in it's current state may not know which GPU to use or can't tell the worker programm and this will fail. Maybe it's even impossible to run GPU apps through the wrapper as the wrapper can't make sure that the non-BOINC GPU application uses the correct ressource (if there is more than one GPU present).


Thanks for the tips. I'm working on it.


On a sidenote: Do have a specific concept (project) in mind or do you just want to optimize your own bitcoin mining operation? I wouldn't connect my computer to a bitcoin project if someone else is getting the bitcoins. And I also think it's a waste of resources because the exchange rate is not stable enough to know if the computer cycles used to generate a bitcoin are worth something in the future. I could investigate my unused cycles in research projects that I find more promising in producing actual results. But this is clearly a philosophical discussion.


Yes, I have a specific concept in my mind. The bitcoins will go 100% to science organizations. Also, the volatility of bitcoins is more a bless than a sin, in my opinion. If you have 1000 US dollars worth of bitcoins, it can skyrocket to 3000 US dollars or maybe to 10,000 US dollars in no time (even if the amount of bitcoins collected stays the same). Has funding ever been so exciting?

Actually, I think donating CPU/GPU power to mine bitcoins for science can be more useful than donating it to simulations. Also, it's not more expensive to mine bitcoins with GPU than use GPU to find extra-terrestrial intelligence. In either case, I won't get any money (BOINC projects don't give money to users), but I have to pay exact the same power bill.

Also, without funding, projects will die away. What do we simulate after that?
ID: 48687 · Report as offensive
HTH

Send message
Joined: 8 Aug 06
Posts: 30
Finland
Message 48688 - Posted: 19 Apr 2013, 12:52:46 UTC
Last modified: 19 Apr 2013, 12:59:01 UTC

Do you have any tips for my zip problem? Can I use external unzip program to unzip the zip file into the slot directory (automatically after the download is complete)? Where can I get the precompiled and free unzip for that?

This is the latest error message:
<core_client_version>7.0.46</core_client_version>
<![CDATA[
<message>
Funktio ei kelpaa.
 (0x1) - exit code 1 (0x1)
</message>
<stderr_txt>
wrapper: starting
13:55:07 (4768): unexpected tag in job.xml: zipfilename
[utopia1_26012_windows_x86_64__opencl_nvidia_100.zip]
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in utopia1_26012_windows_x86_64__opencl_nvidia_100.zip,
        and cannot find utopia1_26012_windows_x86_64__opencl_nvidia_100.zip.zip, period.
boinc_unzip() error: 9

</stderr_txt>
]]>
ID: 48688 · Report as offensive
ChristianB
Volunteer developer
Volunteer tester

Send message
Joined: 4 Jul 12
Posts: 321
Germany
Message 48689 - Posted: 19 Apr 2013, 12:55:41 UTC

I would rather like to fix the issue with the wrapper.
ID: 48689 · Report as offensive
Richard Haselgrove
Volunteer tester
Help desk expert

Send message
Joined: 5 Oct 06
Posts: 5128
United Kingdom
Message 48690 - Posted: 19 Apr 2013, 13:46:04 UTC - in response to Message 48688.  

This is the latest error message:

That error message is typical if the file has been compressed with a newer version or zip utility, using features - typically a better compression ratio - that an older unzip utility doesn't recognise.

Try making the utopia1_26012_windows_x86_64__opencl_nvidia_100.zip file again from the original sources, using less aggressive/more compatible compression settings, or an older utility.
ID: 48690 · Report as offensive
HTH

Send message
Joined: 8 Aug 06
Posts: 30
Finland
Message 48692 - Posted: 19 Apr 2013, 16:07:47 UTC - in response to Message 48690.  
Last modified: 19 Apr 2013, 16:09:53 UTC

This is the latest error message:

That error message is typical if the file has been compressed with a newer version or zip utility, using features - typically a better compression ratio - that an older unzip utility doesn't recognise.

Try making the utopia1_26012_windows_x86_64__opencl_nvidia_100.zip file again from the original sources, using less aggressive/more compatible compression settings, or an older utility.


I unzipped the files from utopia1_26012_windows_x86_64__opencl_nvidia_100.zip and zipped them again using a very old version of WinZip and 8+3-settings. It still doesn't seem to work. :/

Is this really the end for my project? I wouldn't want to give up because of a zip file.
ID: 48692 · Report as offensive
1 · 2 · Next

Message boards : API : How to make the WrapperApp to work?

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.