@@ -129,8 +129,13 @@ static int orcm_logical_group_init(char *config_file)
129129 int erri = ORCM_SUCCESS ;
130130
131131 if (NULL == config_file ) {
132- if (-1 == (erri = asprintf (& (LOGICAL_GROUP .storage_filename ),
133- "%s" , orcm_cfgi_base .config_file ))) {
132+ if ( 3 < orcm_cfgi_base .version ) {
133+ if (-1 == (erri = asprintf (& (LOGICAL_GROUP .storage_filename ),
134+ "%s" , orcm_cfgi_base .config_file ))) {
135+ return ORCM_ERR_OUT_OF_RESOURCE ;
136+ }
137+ } else if (-1 == (erri = asprintf (& (LOGICAL_GROUP .storage_filename ),
138+ "%s/etc/orcm-default-config.xml" , opal_install_dirs .prefix ))) {
134139 return ORCM_ERR_OUT_OF_RESOURCE ;
135140 }
136141 } else if (NULL == (LOGICAL_GROUP .storage_filename = strdup (config_file ))) {
@@ -695,6 +700,7 @@ static int orcm_logical_group_open_file(char *storage_filename)
695700static int orcm_logical_group_crate_xml_file (char * storage_filename )
696701{
697702 FILE * storage_fp = NULL ;
703+ int res = 0 ;
698704
699705 if (NULL == storage_filename || '\0' == storage_filename [0 ]) {
700706 ORCM_UTIL_ERROR_MSG ("Bad setup for parsing logical groupings." );
@@ -707,7 +713,13 @@ static int orcm_logical_group_crate_xml_file(char *storage_filename)
707713 return ORCM_ERR_FILE_OPEN_FAILURE ;
708714 }
709715 else {
710- if (0 > fprintf (storage_fp , "<configuration />" )) {
716+ if ( 3 < orcm_cfgi_base .version ) {
717+ res = fprintf (storage_fp , "<configuration />" );
718+ } else {
719+ res = fprintf (storage_fp , "<logicalgroup />" );
720+ }
721+
722+ if (0 > res ) {
711723 fclose (storage_fp );
712724 return ORCM_ERR_FILE_WRITE_FAILURE ;
713725 }
0 commit comments