1
1

finish implementing group_allocate.

This commit was SVN r774.
Этот коммит содержится в:
Rich Graham 2004-02-13 14:16:30 +00:00
родитель 015d1a1121
Коммит a8e967bcf1

Просмотреть файл

@ -30,6 +30,7 @@ lam_group_t *group_allocate(int group_size)
{ {
/* local variables */ /* local variables */
lam_group_t *new_group; lam_group_t *new_group;
int ret_val;
/* create new group group element */ /* create new group group element */
new_group=OBJ_NEW(lam_group_t); new_group=OBJ_NEW(lam_group_t);
@ -41,8 +42,13 @@ lam_group_t *group_allocate(int group_size)
malloc(sizeof(lam_proc_t *)*group_size); malloc(sizeof(lam_proc_t *)*group_size);
if( new_group->grp_proc_pointers ) { if( new_group->grp_proc_pointers ) {
/* grp_proc_pointers allocated */ /* grp_proc_pointers allocated */
new_group->grp_proc_count=group_size;
/* assign entry in fortran <-> c translation array */ /* assign entry in fortran <-> c translation array */
/*lam_pointer_array_add(,new_group); */ ret_val=lam_pointer_array_add(lam_group_f_to_c_table,new_group);
if( -1 == ret_val ){
free(new_group);
new_group=NULL;
}
} else { } else {
/* grp_proc_pointers allocation failed */ /* grp_proc_pointers allocation failed */
free(new_group); free(new_group);