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.
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/
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.
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>
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>
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.
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>
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.
* 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
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.
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.