Changeset 4233
- Timestamp:
- 06/25/10 12:15:02 (15 years ago)
- Location:
- issm/trunk/src/c
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/Makefile.am
r4218 r4233 1043 1043 ./modules/Qmux/DakotaResponses.cpp\ 1044 1044 ./modules/Qmux/DakotaMPI_Bcast.cpp\ 1045 ./modules/Qmux/DakotaFree.cpp\ 1045 1046 ./modules/Qmux/SpawnCore.cpp\ 1046 1047 ./modules/Qmux/SpawnCoreParallel.cpp\ -
issm/trunk/src/c/modules/Qmux/Qmux.h
r4193 r4233 20 20 void DakotaResponses(double* responses,char** responses_descriptors,int numresponses,FemModel* femmodel); 21 21 void DakotaMPI_Bcast(double** pvariables, char*** pvariables_descriptors,int* pnumvariables, int* pnumresponses); 22 void DakotaFree(double** pvariables,char*** pvariables_descriptors,char*** presponses_descriptors,int numvariables,int numresponses); 22 23 #endif 23 24 -
issm/trunk/src/c/modules/Qmux/SpawnCoreParallel.cpp
r4200 r4233 43 43 char *string = NULL; 44 44 int string_length; 45 double *qmu_part = NULL;46 int qmu_npart;47 45 int verbose = 0; 48 46 int dummy; … … 57 55 femmodel->parameters->FindParam(&responses_descriptors,&dummy,ResponseDescriptorsEnum); 58 56 59 /* only cpu 0, running dakota is providing us with variables, variables_descriptors and responses. 60 * broadcast onto other cpus: */ 57 /* only cpu 0, running dakota is providing us with variables and variables_descriptors and numresponses: broadcast onto other cpus: */ 61 58 DakotaMPI_Bcast(&variables,&variables_descriptors,&numvariables,&numresponses); 62 59 … … 91 88 DakotaResponses(responses,responses_descriptors,numresponses,femmodel); 92 89 93 /*Free ressources:{{{1*/ 94 //variables only on cpu != 0 95 if(my_rank!=0){ 96 xfree((void**)&variables); 97 for(i=0;i<numvariables;i++){ 98 string=variables_descriptors[i]; 99 xfree((void**)&string); 100 } 101 xfree((void**)&variables_descriptors); 102 } 103 //responses descriptors 104 for(i=0;i<numresponses;i++){ 105 string=responses_descriptors[i]; 106 xfree((void**)&string); 107 } 108 //rest of dynamic allocations. 109 xfree((void**)&responses_descriptors); 110 xfree((void**)&qmu_part); 111 /*}}}*/ 90 /*Free ressources:*/ 91 DakotaFree(&variables,&variables_descriptors,&responses_descriptors, numvariables, numresponses); 112 92 } 113 93
Note:
See TracChangeset
for help on using the changeset viewer.