Commit Graph

3304 Commits

Author SHA1 Message Date
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
David Anderson 7b6cda76bb
Merge branch 'master' into dpa_ignore_tty 2019-12-27 18:38:41 -08:00
David Anderson 4411ef576b
Merge pull request #3380 from BOINC/dpa_gui_rpc_js
client: fix bug that broke HTTP GUI RPC for authenticated ops
2019-12-27 18:33:42 -08:00
Vitalii Koshura 712f6f29b9
[Manager] Fix Manager crash in APP_VERSION::clear()
In 219a540 a circular dependency was introduced.
This commit fixes it in a similar way from the commit mentioned above for another structures.

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2019-12-13 10:56:42 +01:00
David Anderson 10fdef0cdd client: fix GUI RPC password generation bug on Win
Apparently when Win runs in a VM, the random number generation functions
(e.g. CryptGenRandom()) don't work.
We weren't checking for this, resulting in a garbage (and guessable) password.

Also change function names to indicate that string is not just random,
but also hard to guess.
2019-11-28 00:50:31 -08:00
David Anderson 4ebff8b370
change variable name 2019-11-20 13:17:56 -08:00
David Anderson 16712e73d0 Win compile fix 2019-11-20 10:53:15 -08:00
David Anderson 97f62d2e01 remote job submission: add set_timeout() to Python API 2019-11-19 16:00:21 +01:00
Vitalii Koshura 04f71bd5f8
Merge branch 'dpa_memset' into upstream_master
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2019-11-16 12:35:17 +01:00
David Anderson 7d99c87976
Merge pull request #3369 from BOINC/mac_fixes_for_OS10_5_Catalina
mac: Fixes for screensaver under OS 10.15 Catalina
2019-11-11 17:26:35 -08:00
Charlie Fenton 40ecc0ce9c mac: Fixes for screensaver under OS 10.15 Catalina
* Screensavers can't launch setuid / sergid executables like gfx_switcher
 * Screensavers can't launch executables downloaded from Internet unless vetted by user vis GateKeeper
 * Apple's ScreenSaverEngine doesn't always call stopAnimation before exiting
 * Apple's ScreenSaverEngine always passes true for isPreview argument
 * OpenGL apps built under Xcode 11 & Catalina use window doubled window dimensions on Retina displays (2 pixels per point)
 * The CGWindowList method we have used to display project graphics apps which have not been updated no longer works
* Screensaver output files are put in an obscure sandboxed directory
2019-11-08 03:40:22 -08:00
Charlie Fenton 8db8500d6a Mac: Fix computation of non_BOINC CPU usage 2019-11-08 01:10:30 -08:00
davidpanderson e14cef28ac Fix more compiler warnings (snprintf, sigaction). No functional changes. 2019-11-05 23:25:06 -08:00
davidpanderson 22de12f732 Fix compiler warnings. No functional change 2019-11-05 19:03:02 -08:00
David Anderson 219a540550 client: get rid of the use of memset() to initialize structs to zero.
Instead: declare a static const instance (whose data members are zero)
and copy that.
This avoid the error-prone need to assign each member,
and it works even if there are virtual function tables.
2019-11-05 00:16:02 -08:00
David Anderson 6d1d44b574 client: idle time detection code reorg; no functional change
Change the idle time detection functions so that they
return the actual idle time.
Remove dysfunctional interrupt time code (Linux)
2019-10-30 16:50:15 -07:00
David Anderson 6e6fd116a8 client (Win): find and show # of processor groups at startup;
if > 1 group, show group for each created process.

The goal is to get information on hosts with >64 processors,
in preparation for possible intelligent allocation to processor groups.
2019-10-29 13:33:31 -07:00
lfield 8fc461271b
Merge pull request #3284 from smoe/more_clang_warnings
Check return value of write function - avoiding leak of file descriptors
2019-10-29 13:42:46 +01:00