fixed a bug in making assignment of a builtin attr.
authorGengbin Zheng <gzheng@illinois.edu>
Thu, 25 Oct 2007 07:26:02 +0000 (07:26 +0000)
committerGengbin Zheng <gzheng@illinois.edu>
Thu, 25 Oct 2007 07:26:02 +0000 (07:26 +0000)
src/libs/ck-libs/ampi/ampi.C

index 44f74e6956743c312e9d6438d47fb6ae0ddb7149..52264b0645ca74c8c0da1e5f8394c0b3403c245d 100644 (file)
@@ -465,6 +465,7 @@ static void ampiProcInit(void){
   CtvInitialize(int, mpi_opc);
 
   CkpvInitialize(Builtin_kvs, bikvs); // built-in key-values
   CtvInitialize(int, mpi_opc);
 
   CkpvInitialize(Builtin_kvs, bikvs); // built-in key-values
+  CkpvAccess(bikvs) = Builtin_kvs();
 
   CkpvInitialize(int, argvExtracted);
   CkpvAccess(argvExtracted) = 0;
 
   CkpvInitialize(int, argvExtracted);
   CkpvAccess(argvExtracted) = 0;
@@ -940,7 +941,7 @@ int ampiParent::getAttr(MPI_Comm comm, int keyval, void *attribute_val, int *fla
        *flag = false;
        if (kv_is_builtin(keyval)) { /* Allow access to special builtin flags */
          *flag=true;
        *flag = false;
        if (kv_is_builtin(keyval)) { /* Allow access to special builtin flags */
          *flag=true;
-         *(void **)attribute_val = kv_builtin_storage;
+         *(int *)attribute_val = *kv_builtin_storage;  // looks like all kv_builtin_storage are of integer type
          return 0;
        }
        if(keyval<0 || keyval >= kvlist.size() || (kvlist[keyval]==NULL))
          return 0;
        }
        if(keyval<0 || keyval >= kvlist.size() || (kvlist[keyval]==NULL))