Commit Graph

3321 Commits

Author SHA1 Message Date
Biswapriyo Nath f56e7d8824 remove memset as VERSION_INFO and HOST_INFO are cleared by constructors
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
2020-06-27 12:53:58 +05:30
Biswapriyo Nath 68599941ac fix some gcc warnings
list of changes:
* api/reduce_lib.cpp:188:10: warning: declaration of 'h' shadows a previous local
* lib/gui_rpc_client_ops.cpp:1479:42: warning: clearing an object of non-trivial type 'struct VERSION_INFO'
* client/boinc_cmd.cpp:434:32: warning: clearing an object of non-trivial type 'class HOST_INFO'

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
2020-06-27 00:53:44 +05:30
Vitalii Koshura d292787cc2
Merge pull request #3836 from talregev/TalR_support_android_4.1_api_16
[Android][Scripts] Add android 4.1 api 16 support in cpp compilation.
2020-06-18 06:20:52 +02:00
talregev 22ae496929 Change to better condition. 2020-06-13 14:18:01 +03:00
talregev 01c5a5cca4 Add android 4.1 api 16 support in cpp compilation. 2020-06-12 22:32:00 +03:00
davidpanderson e021bdf867 Windows: fix many VS2019 compile warnings. No functional changes. 2020-06-12 09:33:34 -07:00
Vitalii Koshura 4b74ca7ad3
Merge pull request #3803 from BOINC/dpa_stdwx_cleanup
client/manager, Win: remove references to _STDWX_H_; not used anymore
2020-06-08 01:20:40 +02:00
Vitalii Koshura ce367322eb
Merge pull request #3798 from BOINC/dpa_vs2019_fixes
Client and manager, Win: fix crashes and runtime warnings with VS2019
2020-06-07 23:45:57 +02:00
Vitalii Koshura d22be046bc
Merge pull request #3753 from BOINC/dpa_https_trans
Client: let a project master URL change from http: to https: without involving the user.
2020-06-07 02:24:10 +02:00
Hassan Abouelela c5c55b6607
Add Elapsed Time
Add elapsed time to task info for boinccmd.
2020-06-04 11:55:26 +03:00
David Anderson fad4210f7b Various files: simplify #includes.
On Windows, include boinc_win.h
No references to STDWX_H, STDAFX_H etc.

Note: .cpp files should not have a bunch of gnarly #if logic in their includes.
If such logic is needed, put it in a central place.
2020-06-04 01:24:49 -07:00
David Anderson ac4b390ee8 client/manager, Win: remove references to _STDWX_H_; not used anymore 2020-06-04 00:48:21 -07:00
davidpanderson 07dda83f2e Client and manager, Win: fix crashes and runtime warnings with VS2019
In VS2019, making CRT calls like printf after main.cpp() has returned
raises and exception.  Don't do this.

Also, there were some runtime warnings from WxWidgets about bad flags
for vertical spacers.  Fix these.
2020-06-03 22:39:57 -07:00
Kevin Reed 6a814e5300
Merge pull request #3709 from BOINC/dpa_rpc_pwd
Client: don't allow empty GUI RPC password
2020-05-28 13:19:34 -05:00
davidpanderson b93ec216cb Client: eliminate errors/warning if a project changes its master URL from http: to https:
This PR lets a project change its URL from http: to https: without user involvement.
But the old URL can be present in various places, leading to errors.
This commit fixes these problem, mostly by using a URL comparison function
(urls_match()) that ignores the protocol prefix,
and by changing lookup_project() to ignore the prefix.

The places are:

- task state files
- account manager replies
- active tasks in state file
- master URLs in command-line args
- master URLs in config file (e.g. GPU exclusion)
- GUI RPCs that specify a project
2020-05-22 23:32:46 -07:00
David Anderson b695ca2c05 Client: let a project master URL change from http: to https:
without involving the user.
2020-05-21 23:39:43 -07:00
David Anderson c19ab610c4 GUI RPC client interface, linux: look for config file in /etc
When looking for gui_rpc_auth.cfg, first look in current dir,
then see if there's a file /etc/boinc-client/config.properties
with a line "data_dir=X".  If so, look in X.
Return prescriptive message in case of failure.

boinccmd: use the above, and show the message.
Note: a lot of GUI RPCs don't require the GUI RPC password.
2020-05-15 12:36:33 -07:00
David Anderson 48200160e9 Client: fix MinGW build: seems to lack stat.st_blocks 2020-05-12 23:09:56 -07:00
davidpanderson 03eadedfc9 Merge branch 'dpa_disk_alloc' of https://github.com/BOINC/boinc into dpa_disk_alloc 2020-05-12 00:41:07 -07:00
davidpanderson 1cb7ee4b24 Fix bugs in Win version of file_size_alloc() 2020-05-12 00:40:47 -07:00
David Anderson 9cfd45dae9 Client: minor tweak so project disk usage is displayed by boinc_cmd 2020-05-11 22:19:58 -07:00
David Anderson a985959da5 Client: measure disk usage in terms of allocated disk space, not file size.
On filesystems that use compression, the disk space allocated to a file
is generally less than the (logical) size of the file.

In this case, the client can fail to get work
because it thinks there's insufficient disk space.

Fix: change things so that the client measures disk usage
(per-project and total) in terms of allocated space rather than file size.

But still use logical file sizes in two places:
- in checking that downloaded files are the right size
- in calculating a job's disk usage to see if it exceeds
the project-specified limit.

New functions: file_size_alloc() and dir_size_alloc().
These are like file_size() and dir_size() except they return
allocated rather than logical size.
2020-05-11 20:02:47 -07:00
Dmitry Tsarevich fc3395ee46
lib: Make macro safe to use (operations priority) 2020-05-07 14:17:22 +03:00
Dmitry Tsarevich 07729834ba
lib: Use MSVC warning override scope
pragma warning(default: X) sets the 'X' warning to the DEFAULT state.
Correct way is disable warning for scope and restore it to state
BEFORE the scope when it ends.

See https://www.viva64.com/en/w/v665/print/
2020-05-07 01:30:52 +03:00
Dmitry Tsarevich 4baa04e340
lib: Use FIFO service handle processing order
Done to avoid potential internal deps between service control manager and owned by it service to fire.
2020-05-06 23:28:31 +03:00
Dmitry Tsarevich edac89740f
lib: Remove already true condition 2020-05-06 23:25:50 +03:00
Dmitry Tsarevich dd877c78e8
lib: Remove unneccessary realloc if size > UINT_MAX on x86-64
No need to realloc twice as much memory in case we already allocate enough memory (> UINT_MAX).
2020-05-06 23:20:35 +03:00
Dmitry Tsarevich 170f652dba
lib: It is more efficient to seek 'X' character rather than a string 2020-05-06 23:15:28 +03:00
Dmitry Tsarevich 0f92c373ee
lib: Fix printf format specifier, unsigned int is expected 2020-05-06 23:03:30 +03:00
Dmitry Tsarevich 8cfbf370be
lib: Leave critical section in case of error 2020-05-06 23:01:05 +03:00
Dmitry Tsarevich fe3ed80362
lib: Remove condition which is always true 2020-05-06 22:52:18 +03:00
Dmitry Tsarevich 95941d3431
lib: Remove setting of already set process props 2020-05-06 22:48:02 +03:00
davidpanderson ddf3a7e4bb Merge remote-tracking branch 'remotes/origin/master' into dpa_log_init 2020-04-24 23:52:14 -07:00
davidpanderson 62222e20c6 client: initialize log flags to task, sched_ops, file_xfer 2020-04-24 23:51:18 -07:00
Charlie Fenton fcbdcc75b7 Mac: cleaner and more efficient screensaver implementation for OS 10.15 Catalina 2020-04-23 07:18:54 -07:00
David Anderson 1fceef042e client: allow specifying device name in cc_config.xml
If cc_config.xml contains <device_name>x</device_name>,
report that to projects rather than the name returned by gethostname()
2020-04-19 20:35:37 -07:00
Steffen Möller 48dd9302c6
network.cpp: getaddrinfo error msg: "\n" added
Today, it looks like
```
04-Apr-2020 00:33:45 [TN-Grid Platform] Project requested delay of 121 seconds
04-Apr-2020 03:13:20 getaddrinfo(OpenWrt): Name does not resolve04-Apr-2020 03:13:22 [TN-Grid Platform] Project requested delay of 121 seconds
04-Apr-2020 04:36:43 getaddrinfo(OpenWrt): Name does not resolve04-Apr-2020 04:36:45 [TN-Grid Platform] Project requested delay of 121 seconds
04-Apr-2020 06:14:09 getaddrinfo(OpenWrt): Name does not resolve04-Apr-2020 06:14:11 [TN-Grid Platform] Project requested delay of 121 seconds
04-Apr-2020 07:36:18 getaddrinfo(OpenWrt): Name does not resolve04-Apr-2020 07:36:20 [TN-Grid Platform] Project requested delay of 121 seconds
```
which connects two messages that are unrelated - the first being caused by the host or its name server and the second by the project server.
2020-04-04 20:18:21 +02:00
Vitalii Koshura 4594160ffb
[Windows] Add MSVS 2019 with vcpkg support
Added new projects to build with Microsoft Visual Studio 2019.
Added vcpkg support for 3rd party libraries.
For simplification all executables use static linked libraries
(impact +0.5 MB or < 3%).
Enable build for all projects (including examples for opencl, cuda etc).
Configuration is not tested yet, so no CI added.
Also because of the reason above projects for VS 2013 are not removed yet too.

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2020-03-16 02:32:35 +01:00
brevilo 4e1617fbca
Merge pull request #3218 from BOINC/pr_3179_mac2
Mac: Add missing .cpp + .h file to lib/Makefile.am
2020-03-03 16:49:22 +01:00
David Anderson 06cb0cc3d7
Merge pull request #3453 from BOINC/dpa_processor_group
client (Win): find and show # of processor groups at startup;
2020-02-17 14:30:09 -08:00
David Anderson c0f279ebfa
Merge pull request #3452 from BOINC/dpa_idle_time
client: idle time detection code reorg; no functional change
2020-02-17 12:07:53 -08:00
David Anderson 9528ddf911 client: fix stall when --skip_cpu_benchmarks used
There were two problems:
1) We weren't fetching work unless benchmarks had been run
(since a scheduler request must include a p_fpops value).
Fix: if --skip_cpu_benchmarks set, pretend that we ran benchmarks
and p_fpops is 1 GFLOPS

2) adding a project via the cmdline (--attach_project)
wasn't setting a flag to fetch the project's scheduler list.

Also: the new way of clearing structures (copying a static instance to *this)
causes a startup hang if the default constructor calls clear().
To fix this, have the static instance use a constructor
that doesn't call clear()

Also: fix message about libc version.
"[foobar] ...." means that the message is conditional on <debug_foobar>
2020-02-11 09:42:38 +01:00
Vitalii Koshura c4ecef4c1c
[client] Fix build errors
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2020-02-06 17:39:45 +01:00
Vitalii Koshura 4f0cd7c444
Merge remote-tracking branch 'master' into dpa_processor_group
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2020-02-06 17:06:00 +01:00
Vitalii Koshura ef6d8b636e
Merge branch 'master' into dpa_idle_time
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2020-02-06 17:02:07 +01:00
Vitalii Koshura 2efc0964ea
Merge pull request #3443 from BOINC/dpa_hostinfo_fix
client: fix bug in GPU detection
2020-02-05 10:50:12 +01:00
tristanolive 6f2e600a58
Merge pull request #3437 from AenBleidd/vko_dpa_cpu_features
[client] [Win]: don't truncate p_features at 255 characters
2020-02-04 16:05:55 -05:00
David Anderson a79d60b889
client: make max_std(err/out)_file_size double
File sizes should always be double, not int

This fixes #3435

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2020-01-29 07:42:43 +01:00
David Anderson 758ff3e13a client: fix bug in GPU detection
PR #3364 changed the way we clear structures.
This introduced a bug: HOST_INFO::clear_host_info()
intentionally didn't clear HOST_INFO::coprocs.
But it was replaced with HOST_INFO::clear(), which did.
This caused the client to lose GPU info.

Fix: restore HOST_INFO::clear_host_info(), and add a comment
to avoid future errors like this.

Also add some comments in GPU detection,
which is woefully lacking in them.
2020-01-28 14:22:28 -08:00
David Anderson 3a081aded8
[client] [Win]: don't truncate p_features at 255 characters
This fixes #3431

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2020-01-28 07:55:18 +01:00