*** empty log message ***

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2215 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
ricroc 2008-04-11 16:30:28 +00:00
parent 516a349aad
commit ddcd80d2a9
6 changed files with 29 additions and 23 deletions

View File

@ -10,8 +10,11 @@
* File: c_interface.c * * File: c_interface.c *
* comments: c_interface primitives definition * * comments: c_interface primitives definition *
* * * *
* Last rev: $Date: 2008-04-04 13:35:41 $,$Author: vsc $ * * Last rev: $Date: 2008-04-11 16:30:27 $,$Author: ricroc $ *
* $Log: not supported by cvs2svn $ * $Log: not supported by cvs2svn $
* Revision 1.114 2008/04/04 13:35:41 vsc
* fix duplicate dependency frame at entry
*
* Revision 1.113 2008/04/04 09:10:02 vsc * Revision 1.113 2008/04/04 09:10:02 vsc
* restore was restoring twice * restore was restoring twice
* *
@ -1763,11 +1766,7 @@ YAP_Init(YAP_init_args *yap_init)
} }
yap_flags[FAST_BOOT_FLAG] = yap_init->FastBoot; yap_flags[FAST_BOOT_FLAG] = yap_init->FastBoot;
#if defined(YAPOR) || defined(TABLING) #if defined(YAPOR) || defined(TABLING)
#ifdef YAP_MEMORY_ALLOC_SCHEME make_root_frames();
if (restore_result != DO_ONLY_CODE &&
restore_result != DO_EVERYTHING)
#endif
make_root_frames();
#ifdef YAPOR #ifdef YAPOR
init_workers(); init_workers();
#endif /* YAPOR */ #endif /* YAPOR */

View File

@ -11,8 +11,11 @@
* File: cdmgr.c * * File: cdmgr.c *
* comments: Code manager * * comments: Code manager *
* * * *
* Last rev: $Date: 2008-04-01 22:28:41 $,$Author: vsc $ * * Last rev: $Date: 2008-04-11 16:30:27 $,$Author: ricroc $ *
* $Log: not supported by cvs2svn $ * $Log: not supported by cvs2svn $
* Revision 1.226 2008/04/01 22:28:41 vsc
* put YAPOR back to life.
*
* Revision 1.225 2008/04/01 08:42:45 vsc * Revision 1.225 2008/04/01 08:42:45 vsc
* fix restore and small VISTA thingies * fix restore and small VISTA thingies
* *
@ -1585,9 +1588,6 @@ add_first_static(PredEntry *p, yamop *cp, int spy_flag)
p->PredFlags |= ProfiledPredFlag; p->PredFlags |= ProfiledPredFlag;
} else } else
p->PredFlags &= ~ProfiledPredFlag; p->PredFlags &= ~ProfiledPredFlag;
#ifdef YAPOR
p->PredFlags |= SequentialPredFlag;
#endif /* YAPOR */
if (spy_flag) { if (spy_flag) {
p->OpcodeOfPred = Yap_opcode(_spy_pred); p->OpcodeOfPred = Yap_opcode(_spy_pred);
p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred)); p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred));

View File

@ -471,7 +471,7 @@ save_heap(void)
{ {
int j; int j;
/* Then save the whole heap */ /* Then save the whole heap */
#if (defined(YAPOR) || defined(TABLING)) && !defined(YAP_MEMORY_ALLOC_SCHEME) #if defined(YAPOR) || (defined(TABLING) && !defined(YAP_MEMORY_ALLOC_SCHEME))
/* skip the local and global data structures */ /* skip the local and global data structures */
j = Unsigned(&GLOBAL) - Unsigned(Yap_HeapBase); j = Unsigned(&GLOBAL) - Unsigned(Yap_HeapBase);
putout(j); putout(j);
@ -483,7 +483,7 @@ save_heap(void)
j = Unsigned(HeapTop) - Unsigned(Yap_HeapBase); j = Unsigned(HeapTop) - Unsigned(Yap_HeapBase);
/* store 10 more cells because of the memory manager */ /* store 10 more cells because of the memory manager */
mywrite(splfild, (char *) Yap_HeapBase, j); mywrite(splfild, (char *) Yap_HeapBase, j);
#endif /* YAPOR || TABLING */ #endif /* YAPOR || (TABLING && !YAP_MEMORY_ALLOC_SCHEME) */
} }
static void static void
@ -908,7 +908,7 @@ get_hash(void)
static int static int
CopyCode(void) CopyCode(void)
{ {
#if (defined(YAPOR) || defined(TABLING)) && !defined(YAP_MEMORY_ALLOC_SCHEME) #if defined(YAPOR) || (defined(TABLING) && !defined(YAP_MEMORY_ALLOC_SCHEME))
/* skip the local and global data structures */ /* skip the local and global data structures */
CELL j = get_cell(); CELL j = get_cell();
if (Yap_ErrorMessage) if (Yap_ErrorMessage)
@ -928,7 +928,7 @@ CopyCode(void)
if (myread(splfild, (char *) Yap_HeapBase, if (myread(splfild, (char *) Yap_HeapBase,
(Unsigned(OldHeapTop) - Unsigned(OldHeapBase))) < 0) (Unsigned(OldHeapTop) - Unsigned(OldHeapBase))) < 0)
return -1; return -1;
#endif /* YAPOR || TABLING */ #endif /* YAPOR || (TABLING && !YAP_MEMORY_ALLOC_SCHEME) */
return 1; return 1;
} }

View File

@ -5,7 +5,7 @@
Copyright: R. Rocha and NCC - University of Porto, Portugal Copyright: R. Rocha and NCC - University of Porto, Portugal
File: opt.init.c File: opt.init.c
version: $Id: opt.init.c,v 1.15 2007-04-26 14:11:08 ricroc Exp $ version: $Id: opt.init.c,v 1.16 2008-04-11 16:26:18 ricroc Exp $
**********************************************************************/ **********************************************************************/
@ -146,6 +146,7 @@ void Yap_init_global(int max_table_size, int n_workers, int sch_loop, int delay_
GLOBAL_last_sg_fr = NULL; GLOBAL_last_sg_fr = NULL;
GLOBAL_check_sg_fr = NULL; GLOBAL_check_sg_fr = NULL;
#endif /* LIMIT_TABLING */ #endif /* LIMIT_TABLING */
GLOBAL_root_dep_fr = NULL;
for (i = 0; i < MAX_TABLE_VARS; i++) { for (i = 0; i < MAX_TABLE_VARS; i++) {
CELL *pt = GLOBAL_table_var_enumerator_addr(i); CELL *pt = GLOBAL_table_var_enumerator_addr(i);
RESET_VARIABLE(pt); RESET_VARIABLE(pt);
@ -219,7 +220,8 @@ void make_root_frames(void) {
#ifdef TABLING #ifdef TABLING
/* root dependency frame */ /* root dependency frame */
new_dependency_frame(GLOBAL_root_dep_fr, FALSE, NULL, NULL, NULL, NULL, NULL); if (!GLOBAL_root_dep_fr)
new_dependency_frame(GLOBAL_root_dep_fr, FALSE, NULL, NULL, NULL, NULL, NULL);
#endif /* TABLING */ #endif /* TABLING */
} }

View File

@ -5,7 +5,7 @@
Copyright: R. Rocha and NCC - University of Porto, Portugal Copyright: R. Rocha and NCC - University of Porto, Portugal
File: opt.preds.c File: opt.preds.c
version: $Id: opt.preds.c,v 1.28 2008-03-25 16:45:53 vsc Exp $ version: $Id: opt.preds.c,v 1.29 2008-04-11 16:26:19 ricroc Exp $
**********************************************************************/ **********************************************************************/
@ -191,6 +191,7 @@ Int p_start_yapor(void) {
BITMAP_clear(GLOBAL_bm_pruning_workers); BITMAP_clear(GLOBAL_bm_pruning_workers);
#endif /* TABLING_INNER_CUTS */ #endif /* TABLING_INNER_CUTS */
make_root_choice_point(); make_root_choice_point();
GLOBAL_performance_mode &= ~PERFORMANCE_IN_EXECUTION;
GLOBAL_execution_time = current_time(); GLOBAL_execution_time = current_time();
BITMAP_clear(GLOBAL_bm_finished_workers); BITMAP_clear(GLOBAL_bm_finished_workers);
PUT_IN_EXECUTING(worker_id); PUT_IN_EXECUTING(worker_id);
@ -423,9 +424,7 @@ void show_answers(void) {
} }
fprintf(Yap_stderr, " (in %f seconds) ]\n\n", GLOBAL_execution_time); fprintf(Yap_stderr, " (in %f seconds) ]\n\n", GLOBAL_execution_time);
if (GLOBAL_performance_mode & PERFORMANCE_IN_EXECUTION) { if (GLOBAL_performance_mode == PERFORMANCE_ON) {
GLOBAL_performance_mode &= ~PERFORMANCE_IN_EXECUTION;
} else if (GLOBAL_performance_mode == PERFORMANCE_ON) {
for (i = GLOBAL_number_goals; i > 0; i--) { for (i = GLOBAL_number_goals; i > 0; i--) {
if (GLOBAL_best_times(i) > GLOBAL_execution_time) { if (GLOBAL_best_times(i) > GLOBAL_execution_time) {
if (i + 1 < MAX_BEST_TIMES) if (i + 1 < MAX_BEST_TIMES)

View File

@ -237,16 +237,16 @@ print_usage(void)
#ifdef TABLING #ifdef TABLING
fprintf(stderr," -ts Maximum table space area in Mbytes (default: unlimited)\n"); fprintf(stderr," -ts Maximum table space area in Mbytes (default: unlimited)\n");
#endif /* TABLING */ #endif /* TABLING */
#ifdef YAPOR #if defined(ENV_COPY) || defined(ACOW) || defined(SBA)
fprintf(stderr," -w Number of workers (default: %d)\n", fprintf(stderr," -w Number of workers (default: %d)\n",
DEFAULT_NUMBERWORKERS); DEFAULT_NUMBERWORKERS);
fprintf(stderr," -sl Loop scheduler executions before look for hiden shared work (default: %d)\n", fprintf(stderr," -sl Loop scheduler executions before look for hiden shared work (default: %d)\n",
DEFAULT_SCHEDULERLOOP); DEFAULT_SCHEDULERLOOP);
fprintf(stderr," -d Value of delayed release of load (default: %d)\n", fprintf(stderr," -d Value of delayed release of load (default: %d)\n",
DEFAULT_DELAYEDRELEASELOAD); DEFAULT_DELAYEDRELEASELOAD);
#endif /* ENV_COPY || ACOW || SBA */
/* nf: Preprocessor */ /* nf: Preprocessor */
fprintf(stderr," -DVar=Name : persistent definition\n"); /* fprintf(stderr," -DVar=Name Persistent definition\n"); */
#endif /* YAPOR */
fprintf(stderr,"\n"); fprintf(stderr,"\n");
} }
@ -288,12 +288,14 @@ parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap)
case 'q': case 'q':
iap->QuietMode = TRUE; iap->QuietMode = TRUE;
break; break;
#if defined(ENV_COPY) || defined(ACOW) || defined(SBA)
case 'w': case 'w':
ssize = &(iap->NumberWorkers); ssize = &(iap->NumberWorkers);
goto GetSize; goto GetSize;
case 'd': case 'd':
ssize = &(iap->DelayedReleaseLoad); ssize = &(iap->DelayedReleaseLoad);
goto GetSize; goto GetSize;
#endif /* ENV_COPY || ACOW || SBA */
#ifdef USE_SOCKET #ifdef USE_SOCKET
case 'c': /* running as client */ case 'c': /* running as client */
{ {
@ -378,10 +380,12 @@ parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap)
case 's': case 's':
case 'S': case 'S':
ssize = &(iap->StackSize); ssize = &(iap->StackSize);
#if defined(ENV_COPY) || defined(ACOW) || defined(SBA)
if (p[1] == 'l') { if (p[1] == 'l') {
p++; p++;
ssize = &(iap->SchedulerLoop); ssize = &(iap->SchedulerLoop);
} }
#endif /* ENV_COPY || ACOW || SBA */
goto GetSize; goto GetSize;
case 'h': case 'h':
case 'H': case 'H':
@ -390,10 +394,12 @@ parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap)
case 't': case 't':
case 'T': case 'T':
ssize = &(iap->TrailSize); ssize = &(iap->TrailSize);
#ifdef TABLING
if (p[1] == 's') { if (p[1] == 's') {
p++; p++;
ssize = &(iap->MaxTableSpaceSize); ssize = &(iap->MaxTableSpaceSize);
} }
#endif /* TABLING */
GetSize: GetSize:
if (*++p == '\0') if (*++p == '\0')
{ {