// Berkeley Open Infrastructure for Network Computing // http://boinc.berkeley.edu // Copyright (C) 2008 University of California // // This is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; // either version 2.1 of the License, or (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. // See the GNU Lesser General Public License for more details. // // To view the GNU Lesser General Public License visit // http://www.gnu.org/copyleft/lesser.html // or write to the Free Software Foundation, Inc., // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include #include #include #include "error_numbers.h" #include "sched_msgs.h" #include "hr_info.h" int HR_INFO::write_file() { int i, j; FILE* f = fopen(HR_INFO_FILENAME, "w"); if (!f) return ERR_FOPEN; for (i=1; i1"); if (retval) break; if (host.p_fpops > 1e7 && host.p_fpops < 1e13) { n++; sum += host.p_fpops; sum_sqr += host.p_fpops*host.p_fpops; } //printf("host %d: %s | %s | %s\n", host.id, host.os_name, host.p_vendor, host.p_model); for (i=1; i 1) { log_messages.printf(MSG_DEBUG, "type %d class %d: allocating %d slots\n", i, j, n ); } } for (j=0; j= max_slots[hrt][hrc]) { log_messages.printf(MSG_DEBUG, "skipping job because HR class (%d, %d) full\n", hrt, hrc ); return false; } cur_slots[hrt][hrc]++; } void HR_INFO::show(FILE* f) { for (int ht=1; ht