diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2002-04-04 09:19:10 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2002-04-04 09:19:10 +0000 |
commit | ea5e7c7a2166e6193926b120a4a1b7a6102946de (patch) | |
tree | 73f3c4dfa1c0a40ad61b404a15753846366253ad /src/main/ScheduleInterface.c | |
parent | 4573c9f1baf5dc4f6118283cca4560a4ce6945a4 (diff) |
Changed to use the new GroupStorageIncrease/Decrease functions.
Currently passes -1 as the timelevel for each group as we don't specify and
read that data from the schedule.ccl files yet.
This should make no visible change to anyone.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2694 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/main/ScheduleInterface.c')
-rw-r--r-- | src/main/ScheduleInterface.c | 45 |
1 files changed, 36 insertions, 9 deletions
diff --git a/src/main/ScheduleInterface.c b/src/main/ScheduleInterface.c index e57d426a..0a4c8ce2 100644 --- a/src/main/ScheduleInterface.c +++ b/src/main/ScheduleInterface.c @@ -58,6 +58,7 @@ typedef struct int n_mem_groups; int *mem_groups; + int *timelevels; int n_comm_groups; int *comm_groups; @@ -69,7 +70,7 @@ typedef struct /* Dynamic data */ int *CommOnEntry; int *StorageOnEntry; - + int done_entry; } t_attribute; @@ -1165,6 +1166,7 @@ static t_attribute *CreateAttribute(const char *where, { char *timername; t_attribute *this; + int i; this = (t_attribute *)malloc(sizeof(t_attribute)); @@ -1178,6 +1180,7 @@ static t_attribute *CreateAttribute(const char *where, this->implementation = (char *)malloc((strlen(implementation)+1)*sizeof(char)); this->mem_groups = (int *)malloc(n_mem_groups*sizeof(int)); + this->timelevels = (int *)malloc(n_mem_groups*sizeof(int)); this->comm_groups = (int *)malloc(n_comm_groups*sizeof(int)); this->FunctionData.TriggerGroups = (int *)malloc(n_trigger_groups*sizeof(int)); @@ -1191,6 +1194,7 @@ static t_attribute *CreateAttribute(const char *where, this->FunctionData.thorn && this->implementation && (this->mem_groups || n_mem_groups==0) && + (this->timelevels || n_mem_groups==0) && (this->comm_groups || n_comm_groups==0) && (this->FunctionData.TriggerGroups || n_trigger_groups==0) && (this->FunctionData.SyncGroups || n_sync_groups==0)) @@ -1218,6 +1222,12 @@ static t_attribute *CreateAttribute(const char *where, CreateGroupIndexList(n_trigger_groups, this->FunctionData.TriggerGroups, ap); CreateGroupIndexList(n_sync_groups, this->FunctionData.SyncGroups, ap); + /* FIXME: this is a temporary hack until we read the timelevel data in */ + for(i=0; i< n_mem_groups; i++) + { + this->timelevels[i] = -1; + } + /* Check the miscellaneous options */ InitialiseOptionList(this); @@ -2019,9 +2029,18 @@ static int CCTKi_ScheduleCallEntry(t_attribute *attribute, if(go) { /* Switch on storage for groups */ - for(i = 0; i < attribute->n_mem_groups; i++) +/* for(i = 0; i < attribute->n_mem_groups; i++) */ +/* { */ +/* attribute->StorageOnEntry[i] = CCTK_EnableGroupStorageI(data->GH,attribute->mem_groups[i]); */ +/* } */ + + if(attribute->n_mem_groups > 0) { - attribute->StorageOnEntry[i] = CCTK_EnableGroupStorageI(data->GH,attribute->mem_groups[i]); + CCTK_GroupStorageIncrease(data->GH, + attribute->n_mem_groups, + attribute->mem_groups, + attribute->timelevels, + attribute->StorageOnEntry); } /* Switch on communication for groups. */ @@ -2114,14 +2133,22 @@ static int CCTKi_ScheduleCallExit(t_attribute *attribute, } /* Switch off storage if it was switched on in entry. */ - for(i = 0; i < attribute->n_mem_groups; i++) +/* for(i = 0; i < attribute->n_mem_groups; i++) */ +/* { */ +/* if(!attribute->StorageOnEntry[i]) */ +/* { */ +/* CCTK_DisableGroupStorageI(data->GH,attribute->mem_groups[i]); */ +/* } */ +/* } */ + + if(attribute->n_mem_groups > 0) { - if(!attribute->StorageOnEntry[i]) - { - CCTK_DisableGroupStorageI(data->GH,attribute->mem_groups[i]); - } + CCTK_GroupStorageDecrease(data->GH, + attribute->n_mem_groups, + attribute->mem_groups, + attribute->StorageOnEntry, + NULL); } - } return 1; |