Message boards :
Code and Servers :
Lua Interpreter
Message board moderation
Author | Message |
---|---|
Tomáš Brada Project administrator Volunteer developer Send message Joined: 3 Feb 19 Deprecated: Creation of dynamic property BoincUser::$nposts is deprecated in /var/boincadm/prj/html/inc/forum.inc on line 613 Posts: 667 Credit: 432,784 RAC: 0 |
I am working on boinc app that interprets Lua. It is not aimed to run the computation in lua, that would be quite wasteful. But the lua script could for example set up the enviroment, compile the main algorithm (in C) and then exec() it or drive the computation form high level. Without CI/CD infrastructure, deploying or changing boinc application is hard and time consuming process. Having scriping environment available that could change the app from one workunit to another will i think be great help. There have been effort, with sztaki GenWrapper, but it only allowed posix-shell scripts, that are arcane to code anything but simple. Lua is also smaller and faster. With access to compiler, it should open great possibilities. There will be an app in this very project to test that. |
Sergey Kovalchuk Send message Joined: 18 Feb 19 Deprecated: Creation of dynamic property BoincUser::$nposts is deprecated in /var/boincadm/prj/html/inc/forum.inc on line 613 Posts: 9 Credit: 69,323 RAC: 0 |
Do I need any additional packages installed for the new application? For example, boinc-dev Or will you provide everything you need along with the task (like boinc2docker projects)? |
Tomáš Brada Project administrator Volunteer developer Send message Joined: 3 Feb 19 Posts: 667 Credit: 432,784 RAC: 0 |
Do I need any additional packages installed for the new application? For example, boinc-dev There are two options. If a library is found installed, it will be used, otherwise: 1) The script will detect the missing libraries and ask user to install required packages via a boinc notice and a message in boinc log. 2) The script will detect the missing libraries and download them locally. The package will be installed for use by this project only. The eventual solution will likely be a mix of the two, but we will try to always give user the explanation of why the task failed and how to fix it. To answer your question, No, you do not have to install anything yet. The last lua8_t2 and lua8_t3 workunits are just poking around the system and generally checking what works and what does not. |
Michael Goetz Send message Joined: 18 Feb 19 Deprecated: Creation of dynamic property BoincUser::$nposts is deprecated in /var/boincadm/prj/html/inc/forum.inc on line 613 Posts: 25 Credit: 147,831 RAC: 0 |
A lot of the people I know who run BOINC for fun -- but treat it as a serious hobby -- besides doing the traditional "run BOINC in your spare computer cycles" thing, actively buy, build, and or rent computers just for running BOINC projects. Many times Linux machines are set up just for running BOINC. This includes VMs running on Windows machines as well as cloud servers from AWS, or less expensive options like Digital Ocean. In most cases, these are minimal Linux installations, sometimes with a boinc-client package installed and nothing else. Of the three linux VMs running in my house, only one has compiler tools. The one that ran your Lua tasks does not. And, of course, every cloud server I've spun up for running BOINC did not. I would be curious to know how many of your _t3 test results found a compiler installed vs. not installed. Please share your results! Want to find one of the largest known primes? Try PrimeGrid. Or help cure disease at WCG. |
Tomáš Brada Project administrator Volunteer developer Send message Joined: 3 Feb 19 Posts: 667 Credit: 432,784 RAC: 0 |
I would be curious to know how many of your _t3 test results found a compiler installed vs. not installed. Please share your results! I was not smart about the output and did not make the result of compiler detection easily parse-able out of the stderr. I can try my luck at regex or submit new batch. |
Michael Goetz Send message Joined: 18 Feb 19 Posts: 25 Credit: 147,831 RAC: 0 |
I would be curious to know how many of your _t3 test results found a compiler installed vs. not installed. Please share your results! No need to run new tasks. The information is sitting there in your database. SELECT COUNT(*) "Total Tasks", SUM(stderr_out LIKE '%gcc: not found%") "No gcc", SUM(stderr_out LIKE '%g++: not found%") "No g++" SUM(stderr_out LIKE '%gcc: not found%" AND stderr_out LIKE '%g++: not found%") "Neither", FROM result WHERE server_state=5 AND outcome=1 AND stderr_out LIKE "%lua8_t3.lua% AND appid=2 ; Change appid to whatever is used for your lua app. It's easier to detect the error message from the compiler being missing than it is to detect all possible valid responses from multiple compiler versions, but that's possible if you really want to do it. For example, you can parse the output to determine which compiler version is present. Want to find one of the largest known primes? Try PrimeGrid. Or help cure disease at WCG. |
Tomáš Brada Project administrator Volunteer developer Send message Joined: 3 Feb 19 Posts: 667 Credit: 432,784 RAC: 0 |
Thank you very much Mr. Goetz for your SQL. Let me show you the results as of now: +-------------+--------+--------+---------+ | Total Tasks | No gcc | No g++ | Neither | +-------------+--------+--------+---------+ | 36 | 13 | 17 | 13 | +-------------+--------+--------+---------+ More results may come in later. However, the script does not set locale to C, so the file not found messages might be localized and therefore not caught by the regex. |
Tomáš Brada Project administrator Volunteer developer Send message Joined: 3 Feb 19 Posts: 667 Credit: 432,784 RAC: 0 |
Another version (updated 06.10.): +-------------+---------+---------+------+ | Total Tasks | Has gcc | Has g++ | Both | +-------------+---------+---------+------+ | 56 | 42 | 25 | 25 | +-------------+---------+---------+------+ SELECT COUNT(*) "Total Tasks", SUM(stderr_out LIKE "%gcc (%") "Has gcc", SUM(stderr_out LIKE "%g++ (%") "Has g++", SUM(stderr_out LIKE "%gcc (%" AND stderr_out LIKE "%g++ (%") "Both" FROM result WHERE server_state=5 AND outcome=1 AND name LIKE "lua8_t3_%" AND appid=8 |
Tomáš Brada Project administrator Volunteer developer Send message Joined: 3 Feb 19 Posts: 667 Credit: 432,784 RAC: 0 |
About dependency management. There will be a script file, that the application loads, where user will be able to override automatic dependency management. If a workunit depends on something (eg compiler), it will first consult the user override script, and if no such option was set by user it will proceed with automatic dependency management. First the dependency will be searched in some standard location. Eg: compiler on linux in PATH. If it is not found, and we have means of installing it, it will be downloaded and installed locally. Because downloading executables is what trojans do, we will ONLY download dependencies in source form and with checksums. This rules out downloading a compiler and any big frameworks. If the dependency can not be found nor installed, the user will be notified via boinc notice and log message. Inside that message, a link to project page with instructions will be provided. After that, the workunit will either fail, or deffer itself for some time. I am not fan of automatically downloading a dependency if there exists easily-installable package. Even windows users will be expected to use something like MinGW/MSYS2, which features a package manager. |
VADemon Send message Joined: 30 Oct 19 Deprecated: Creation of dynamic property BoincUser::$nposts is deprecated in /var/boincadm/prj/html/inc/forum.inc on line 613 Posts: 3 Credit: 25,796 RAC: 0 |
It is not aimed to run the computation in lua, that would be quite wasteful. But the lua script could for example set up the enviroment, compile the main algorithm (in C) and then exec() it or drive the computation form high level. 1) One could use LuaJIT and even work with C structures in Lua for extra performance - which would be quite fast in total, but I agree that it's (a little) wasteful in the long run. 2) So it would need to compile the algorithm every time, read: for every new task? If so, it'd be wasteful again, no? 3) I hate to write in shell too :) Also installing anything close to a working compiler toolchain on Windows under Cygwin is an atrocious process. I can imagine under Linux those specialised stations that boot from USB would have problems too installing/keeping compiler software (think those "miner rigs" with nothing else but mobo+cpu+few gpus) |
Tomáš Brada Project administrator Volunteer developer Send message Joined: 3 Feb 19 Posts: 667 Credit: 432,784 RAC: 0 |
VADemon LuaJIT can improve the speed, but it is pulling the shorter end. For LuaJIT to use native processor extensions (vectorization etc), it would need to be compiled with those instructions enabled and thus not compatible with other processors. Still, it is not native code, and it can't optimize for specific processor model. Using C structures and calling C functions is nice, but those would have to be compiled into the app, making it specific for the task and version. Loading dynamic library with those optimized functions could be a solution, but boinc effectively mandates statically linked binaries, which do not support loading dynamic libraries. The script will first check if the real app has been already compiled with latest version version and recompile only if it is missing or outdated. This is pretty basic to figure out. Installing compiler on windows is only little more inconvenient than on system with package manager, because you have to download the installer and click next. Have a look at MinGW or MSYS2. Installing compiler toolchain on linux system with package manager takes one command. It is no harder than installing the boinc client itself. Before you ask, yes, there will be a file where you can set the compiler path or override something. |
Tomáš Brada Project administrator Volunteer developer Send message Joined: 3 Feb 19 Posts: 667 Credit: 432,784 RAC: 0 |
Batch 74: find canonical form of few DLK of order 12 And first alpha test of boinclua actually compiling something. It wont be this way forever, the app, or should I say framework, is still in development. Currently it expects everything already installed on the system and the user overrides aren't working yet at all. Also, for prod version, the real app will be compiled only once per update, not for every WU. Just let them spin, I guess. I highly appreciate all results, especially the failed ones. Sources are on my repo. |
Michael Goetz Send message Joined: 18 Feb 19 Posts: 25 Credit: 147,831 RAC: 0 |
<core_client_version>7.14.2</core_client_version> Is this expected? This is a 64 bit Debian Buster system. Want to find one of the largest known primes? Try PrimeGrid. Or help cure disease at WCG. |
Tomáš Brada Project administrator Volunteer developer Send message Joined: 3 Feb 19 Posts: 667 Credit: 432,784 RAC: 0 |
3174/Bok has: shmget in attach_shmem: Invalid argument |
Tomáš Brada Project administrator Volunteer developer Send message Joined: 3 Feb 19 Posts: 667 Credit: 432,784 RAC: 0 |
Dear Michael, Currently the code expects boinc headers to reside at "standard" location. As the app matures, it will look harder for the dependencies and even recompile boinc api if not found. Now you can: a) tell me where boinc_api.h is installed on your distribution b) install boinc-dev or boincapp-dev similarly named package c) let it be |
Sergey Kovalchuk Send message Joined: 18 Feb 19 Posts: 9 Credit: 69,323 RAC: 0 |
ubuntu 18.04, 20.04 kanon_app.cpp:16:10: fatal error: boinc/boinc_api.h: No such file or directory #include "boinc/boinc_api.h" ^~~~~~~~~~~~~~~~~~~ compilation terminated /usr/share/boinc-dev/api/boinc_api.h -> ../../../include/boinc/boinc_api.h /usr/include/boinc/boinc_api.h update 21:32:29 (3763): Driver script: ../../projects/boinc.tbrada.eu/d31722c5e8aa227346be7c80111c0574 21:32:29 (3763):l g++ -std=c++11 -o compile_test.o -Wall -c compile_test.cpp 21:32:29 (3763):l DEP: cxx 21:32:29 (3763):l DEP: boincapi 21:32:29 (3763):l DEP: pthread 21:32:29 (3763):l g++ -std=c++11 -o main.exe -Wall -O3 -lboinc_api -lboinc -lpthread -I. kanon_app.cpp /tmp/cciiOHVb.o: In function `EBoincApi::EBoincApi(int, char const*)': kanon_app.cpp:(.text._ZN9EBoincApiC2EiPKc[_ZN9EBoincApiC5EiPKc]+0x236): undefined reference to `boincerror(int)' /tmp/cciiOHVb.o: In function `main': kanon_app.cpp:(.text.startup+0x25): undefined reference to `boinc_init' kanon_app.cpp:(.text.startup+0x74): undefined reference to `boinc_resolve_filename_s(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)' kanon_app.cpp:(.text.startup+0x8d): undefined reference to `boinc_resolve_filename_s(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)' kanon_app.cpp:(.text.startup+0x263): undefined reference to `boinc_finish' collect2: error: ld returned 1 exit status 21:32:32 (3763):l Compiler failed. exit 1 21:32:32 (3763):L Error compile, (CXX -o main.exe) 21:32:32 (3763): called boinc_finish(2) |
Jeff17 Send message Joined: 16 Feb 19 Deprecated: Creation of dynamic property BoincUser::$nposts is deprecated in /var/boincadm/prj/html/inc/forum.inc on line 613 Posts: 1 Credit: 864,729 RAC: 0 |
Not much for me to go on with this error. Any suggestions? CentOS Linux release 7.8.2003 (Core) ------------- <core_client_version>7.16.6</core_client_version> <![CDATA[ <message> process got signal 14</message> <stderr_txt> 15:12:31 (23885): Driver script: ../../projects/boinc.tbrada.eu/d31722c5e8aa227346be7c80111c0574 15:12:31 (23885):l g++ -std=c++11 -o compile_test.o -Wall -c compile_test.cpp 15:12:32 (23885):l DEP: cxx 15:12:32 (23885):l DEP: boincapi 15:12:32 (23885):l DEP: pthread 15:12:32 (23885):l g++ -std=c++11 -o main.exe -Wall -O3 -lboinc_api -lboinc -lpthread -I. kanon_app.cpp 15:12:39 (23885): execv </stderr_txt> ]]> |
Tomáš Brada Project administrator Volunteer developer Send message Joined: 3 Feb 19 Posts: 667 Credit: 432,784 RAC: 0 |
That (3294690) does not even show any error! To all: Errors are expected at this point. Half of the framework is not implemented yet. I am using this project like a big Continuous Integration. What is good, is that it works on few computers. Gradually we will expand the support to more and more systems. The error logs very much help and I will go over them eventually. It is not necessary to post them here thought! |
Michael Goetz Send message Joined: 18 Feb 19 Posts: 25 Credit: 147,831 RAC: 0 |
Dear Michael, I'll go with option B, but there's no tasks available at the moment. Want to find one of the largest known primes? Try PrimeGrid. Or help cure disease at WCG. |
Sergey Kovalchuk Send message Joined: 18 Feb 19 Posts: 9 Credit: 69,323 RAC: 0 |
Looking at the latest batch of tasks, they are designed for hosts configured to build BOINC applications. It would be nice to get instructions from experts on such a host preparation with the features / differences of various Linux distros. And also limit the distribution of such tasks to non-configured hosts. “run test” is too banal and not quite appropriate - only for new experimental versions. Since in order to be suitable, additional host configuration is required, then the sign of host readiness must be set individually and consciously. For example, this can be the definition of the virtual coprocessor BOINC_API in the config and the corresponding plan_class for the application. <cc_config> <options> <coproc> <type>boinc_api</type> <count>1</count> <non_gpu/> </coproc> </options> </cc_config> <app_version> <app_name>lua8</app_name> <avg_ncpus>1.00000</avg_ncpus> <plan_class>boinc_api</plan_class> <coproc> <type>boinc_api</type> <count>1.000000</count> </coproc> </app_version> And another question: will such an application be developed for Windows hosts? After all, there are PCs on which applications are developed. And I saw LUA for windows PS. I would like more of these tasks. While people were searching and finding a working solution, the tasks managed to end :( |
©2024 Tomáš Brada