Usage question: kim-api-v1-collections-management

Dear all,

I have a question (and a bug report) regarding kim-api-v1-collections-management.

When I run
    kim-api-v1-collections-management list
I can see that models can be installed three different places: in the system, in $HOME/.kim-api and in a place specified by environment variables. I think I need to use the latter, since we have a heterogeneous cluster where I need to separate the architectures.

I can install into the user folder with
    kim-api-v1-collections-management install user <model>
but how do I install into the environment-variable folders?

Also, there is a minor bug: I can remove a model with
   kim-api-v1-collections-management remove
but I cannot remove the corresponding model driver, it complains that it is not installed.

Best regards

Jakob

Dear Jakob,

Thanks for your messages (although not the most important, this message is most practically answered first. I'll respond soon to your other message).

Your feedback is always very much appreciated.

See below for responses.

Dear all,

I have a question (and a bug report) regarding kim-api-v1-collections-management.

When I run
   kim-api-v1-collections-management list

I can see that models can be installed three different places: in the system, in $HOME/.kim-api and in a place specified by environment variables. I think I need to use the latter, since we have a heterogeneous cluster where I need to separate the architectures.

The "environment variable collections" would work. However, in your case (separate architectures) you will need to compile separate complete versions of the kim-api, and control which is used through the binary PATH settings. Each such version has its own "system collection" and the collections-management utility will know the correct place to look.

So, in this situation, I would suggest that you simply use the system collection for installing your models and drivers.

I can install into the user folder with
   kim-api-v1-collections-management install user <model>
but how do I install into the environment-variable folders?

The original, first pass, design here viewed the environment variable collections as "development spaces". So, there is not currently support for installing to those directories thorough the utility. To use them you can simply copy the source directory to the directory and build in-place (make). The section E.3 in the INSTALL file describes how to do this.

Also, there is a minor bug: I can remove a model with
  kim-api-v1-collections-management remove

but I cannot remove the corresponding model driver, it complains that it is not installed.

You are right. We just discovered this but yesterday! The fix was just pushed to the devel branch on github. This will be included in the next bugfix release.

If you want to fix it in-place on your local copy, the bug was a simple typo which has the diff:

diff --git a/src/utils/collections-management.sh b/src/utils/collections-management.sh
index a800e709..0b1cf1aa 100755
--- a/src/utils/collections-management.sh
+++ b/src/utils/collections-management.sh
@@ -300,7 +300,7 @@ remove_item () {

    # check for existing item
    found_item="`\{collections\_info\} model\_drivers find &quot;{item_name}"`"
- if test x"" = x"\{found\_itme\}&quot;; then \+ if test x&quot;&quot; = x&quot;{found_item}"; then
      found_item="`\{collections\_info\} models find &quot;{item_name}"`"
      if test x"" = x"${found_item}"; then
        printf "Item not installed.\n"

Cheers

Ryan