#include <sys/types.h>#include <unistd.h>#include <stdio.h>#include "filesys.h"#include <lal/LALError.h>#include <lal/LALRCSID.h>#include "HoughFStatToplist.h"Include dependency graph for hs_boinc_extras.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Defines | |
| #define | HSBOINCEXTRASHRCSID "$Id: hs_boinc_extras.h,v 1.58 2008/05/29 14:22:55 bema Exp $" |
| #define | EAH_LOGLEVEL 1 |
| #define | EAH_LALDEBUGLEVEL 33 |
| #define | COMPUTEFSTATFREQBAND ComputeFStatFreqBand |
| #define | COMPUTEFSTATHOUGHMAP ComputeFstatHoughMap |
| #define | SHOW_PROGRESS show_progress |
| #define | fopen boinc_fopen |
| #define | HS_CHECKPOINTING 1 |
| #define | INSERT_INTO_HOUGHFSTAT_TOPLIST insert_into_houghFStat_toplist |
| #define | GET_CHECKPOINT(toplist, total, count, outputname, cptname) |
| #define | SET_CHECKPOINT set_checkpoint() |
Functions | |
| void | show_progress (double rac, double dec, UINT4 count, UINT4 total, REAL8 freq, REAL8 fband) |
| show progress of the App. | |
| int | init_and_read_checkpoint (toplist_t *toplist, UINT4 *count, UINT4 total, char *outputname, char *cptname) |
| inits checkpointing for the toplist and reads the last checkpoint if present This expects all passed variables (toplist, total, count) to be already initialized. | |
| void | set_checkpoint (void) |
| actually writes a checkpoint only if it's boinc_time_to_checkpoint() | |
| void | write_and_close_checkpointed_file (void) |
| writes the toplist to the final (ASCII) output file | |
| int | BOINC_LAL_ErrHand (LALStatus *, const char *, const char *, const int, volatile const char *) |
| LALApps error handler for BOINC. | |
| void | attach_gdb (void) |
| attach gdb to the running process; for debugging. | |
| void | enable_floating_point_exceptions (void) |
| play with floating-point exceptions | |
| int | segfault (void) |
| generate a segfault (for testing purposes) | |
| int | MAIN (int, char **) |
| the main() function of HierarchicalSerach.c becomes the extern MAIN(), the actual main() function of the BOINC App is defined in boinc_extras.c | |
Variables | |
| int | global_cpu_type |
| the cpu type, see cpu_type_features.h | |
| LALStatus * | global_status |
| #define HSBOINCEXTRASHRCSID "$Id: hs_boinc_extras.h,v 1.58 2008/05/29 14:22:55 bema Exp $" |
Definition at line 34 of file hs_boinc_extras.h.
| #define EAH_LOGLEVEL 1 |
Definition at line 36 of file hs_boinc_extras.h.
| #define EAH_LALDEBUGLEVEL 33 |
Definition at line 37 of file hs_boinc_extras.h.
| #define COMPUTEFSTATFREQBAND ComputeFStatFreqBand |
Definition at line 43 of file hs_boinc_extras.h.
| #define COMPUTEFSTATHOUGHMAP ComputeFstatHoughMap |
Definition at line 44 of file hs_boinc_extras.h.
| #define SHOW_PROGRESS show_progress |
Definition at line 66 of file hs_boinc_extras.h.
| #define fopen boinc_fopen |
Definition at line 67 of file hs_boinc_extras.h.
| #define HS_CHECKPOINTING 1 |
Definition at line 70 of file hs_boinc_extras.h.
| #define INSERT_INTO_HOUGHFSTAT_TOPLIST insert_into_houghFStat_toplist |
Definition at line 73 of file hs_boinc_extras.h.
Value:
{ int ret = init_and_read_checkpoint(toplist,total,count,outputname,cptname); if(ret < 0) { LogPrintf(LOG_CRITICAL, HIERARCHICALSEARCH_MSGECHECKPT " (%d)\n",ret); return(HIERARCHICALSEARCH_ECHECKPT); } else if (ret == 2) { return(HIERARCHICALSEARCH_ENORM); } }
Definition at line 76 of file hs_boinc_extras.h.
| #define SET_CHECKPOINT set_checkpoint() |
Definition at line 85 of file hs_boinc_extras.h.
show progress of the App.
NOTE: This also sets the count & total (skypos) for checkpointing
| rac | right ascension |
| dec | declination |
| count | current skypoint counter |
| total | total number of skypoints |
| freq | base frequency |
| fband | frequency bandwidth |
Definition at line 352 of file hs_boinc_extras.c.
| int init_and_read_checkpoint | ( | toplist_t * | toplist, | |
| UINT4 * | count, | |||
| UINT4 | total, | |||
| char * | outputname, | |||
| char * | cptname | |||
| ) |
inits checkpointing for the toplist and reads the last checkpoint if present This expects all passed variables (toplist, total, count) to be already initialized.
In case of an error, the toplist is cleared and the count is set to 0, total is effectivly ignored. If *cptname (name of the checkpoint file) is NULL, the name is constructed by appending ".cpt" to the output filename.
The function returns 0 if no checkpoint could be found, -1 if a checkpoint was found but it couldn't be read, -2 if an error occured (out of memory), 1 if a checkpoint was found and previous output could be read 2 if nothing to do (previously written output file was found)
| toplist | the toplist to checkpoint |
| count | returns the skypoint counter if a checkpoint was found |
| total | total number of skypoints |
| outputname | name of checkpointed output file |
| cptname | name of checkpoint file |
Definition at line 1189 of file hs_boinc_extras.c.
| void set_checkpoint | ( | void | ) |
actually writes a checkpoint only if it's boinc_time_to_checkpoint()
Definition at line 1274 of file hs_boinc_extras.c.
| void write_and_close_checkpointed_file | ( | void | ) |
writes the toplist to the final (ASCII) output file
After that, the toplist is invalid.
Definition at line 1293 of file hs_boinc_extras.c.
| int BOINC_LAL_ErrHand | ( | LALStatus * | , | |
| const char * | , | |||
| const char * | , | |||
| const | int, | |||
| volatile const char * | ||||
| ) |
| void attach_gdb | ( | void | ) |
attach gdb to the running process; for debugging.
Definition at line 1300 of file hs_boinc_extras.c.
| void enable_floating_point_exceptions | ( | void | ) |
| int segfault | ( | void | ) |
| int MAIN | ( | int | , | |
| char ** | ||||
| ) |
the main() function of HierarchicalSerach.c becomes the extern MAIN(), the actual main() function of the BOINC App is defined in boinc_extras.c
| int global_cpu_type |
| global_status | LALStatus Used to initialize LALStatus lalStatus. |
Definition at line 374 of file ComputeFStatistic.c.
1.5.2