Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client and server: increase p_features size from 1024 to 8192. #5123

Merged
merged 2 commits into from
Mar 4, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions client/hostinfo_unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ static void parse_meminfo_linux(HOST_INFO& host) {
// See http://people.nl.linux.org/~hch/cpuinfo/ for some examples.
//
static void parse_cpuinfo_linux(HOST_INFO& host) {
char buf[1024], features[P_FEATURES_SIZE], model_buf[1024];
char buf[P_FEATURES_SIZE], features[P_FEATURES_SIZE], model_buf[1024];
AenBleidd marked this conversation as resolved.
Show resolved Hide resolved
bool vendor_found=false, model_found=false;
bool cache_found=false, features_found=false;
bool model_hack=false, vendor_hack=false;
Expand Down Expand Up @@ -762,7 +762,7 @@ void use_cpuid(HOST_INFO& host) {
u_int cpu_id;
char vendor[13];
int hasMMX, hasSSE, hasSSE2, hasSSE3, has3DNow, has3DNowExt, hasAVX;
char capabilities[256];
char capabilities[P_FEATURES_SIZE];

hasMMX = hasSSE = hasSSE2 = hasSSE3 = has3DNow = has3DNowExt = hasAVX = 0;
do_cpuid(0x0, p);
Expand Down Expand Up @@ -1075,7 +1075,7 @@ static void get_cpu_info_haiku(HOST_INFO& host) {

int32 found = 0;
int32 i;
char buf[12];
char buf[256];

for (i = 0; i < 32; i++) {
if ((cpuInfo.eax_1.features & (1UL << i)) && kFeatures[i] != NULL) {
Expand Down
1 change: 1 addition & 0 deletions db/boinc_db_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "opencl_boinc.h"
#include "parse.h"
#include "wslinfo.h"
#include "hostinfo.h"

// Sizes of text buffers in memory, corresponding to database BLOBs.
// The following is for regular blobs, 64KB
Expand Down
2 changes: 1 addition & 1 deletion lib/hostinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const char file_redhatrelease[] = "/etc/redhat-release";

// if you add fields, update clear_host_info()

#define P_FEATURES_SIZE 1024
#define P_FEATURES_SIZE 8192

class HOST_INFO {
public:
Expand Down
10 changes: 6 additions & 4 deletions sched/plan_class_spec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1286,12 +1286,14 @@ int main() {
}

for (unsigned int i=0; i<pcs.classes.size(); i++) {
bool b = pcs.check(sreq, pcs.classes[i].name, hu);
WORKUNIT wu;
AenBleidd marked this conversation as resolved.
Show resolved Hide resolved
wu.id = 100;
wu.batch = 100;
bool b = pcs.check(sreq, pcs.classes[i].name, hu, &wu);
if (b) {
printf("%s: check succeeded\n", pcs.classes[i].name);
printf("\tncudas: %f\n\tnatis: %f\n\tgpu_ram: %fMB\n\tavg_ncpus: %f\n\tprojected_flops: %fG\n\tpeak_flops: %fG\n",
hu.ncudas,
hu.natis,
printf("\tgpu_usage: %f\n\tgpu_ram: %fMB\n\tavg_ncpus: %f\n\tprojected_flops: %fG\n\tpeak_flops: %fG\n",
hu.gpu_usage,
hu.gpu_ram/1e6,
hu.avg_ncpus,
hu.projected_flops/1e9,
Expand Down