kimitems install

Hi Ryan,

I have the following question regarding automating tests in my VM. Dan helped me with the templates to generate various tests for my test driver. I wanted to run my tests agains all, say Cu models. I am using kimitems search to probe the models. And then I use the kimitems install. Does this command just download the model, or is it supposed to build it. Right now, I am manually going in and issuing a make command. Is there any other command to build that I am missing. I tried kimitems build but it gives me the following error:

openkim@openkim-vm:~/openkim-repository/mo/EAM_Dynamo_Zope_Mishin_Al__MO_664470114311_001$ kimitems build
Building all packages…
Traceback (most recent call last):
File “/home/openkim/openkim-pipeline/tools/kimitems”, line 240, in
action_build()
File “/home/openkim/openkim-pipeline/tools/kimitems”, line 123, in action_build
kimapi.make_all()
File “/home/openkim/openkim-pipeline/kimapi.py”, line 47, in make_all
o.make()
File “/home/openkim/openkim-pipeline/kimobjects.py”, line 256, in make
if not version.Version(self.kim_api_version) in version.Specifier(kim_api_version_spec):
File “/usr/local/lib/python2.7/dist-packages/packaging/version.py”, line 120, in init
match = self._regex.search(version)
TypeError: expected string or buffer

I plan to write a script to automatically download all models of a particular species, and install them. After installing the models (manually until now) I am using the pipeline_runmatches to automate the pairings. I really appreciate if you can tell me about some provision that I am not aware of, and that which could be useful to me. Thanks!

Nikhil

Hi Nikhil,

For my reference, can you send me the line in your Vagrantfile that contains config.vm.provision and what is the output of the command on the VM

cd ~/openkim-pipeline && git rev-parse --short HEAD

Thanks,
-Matt

Hi Matt,

Thanks for the quick message. Line from the vagrantfile says:

increase the memory size

config.vm.provider :virtualbox do |vb|

run with gui mode enabled

#v.gui = true

increase the memory size

vb.customize [“modifyvm”, :id, “–memory”, 1024, “–cpus”, 1]

add a second disk that is 10 GB ( use /pipeline/rundiskadd to mount as home)

#disk_file = ‘./home-rw.vdi’
#vb.customize [‘createhd’, ‘–filename’, disk_file, ‘–size’, 10 * 1024]
#vb.customize [‘storageattach’, :id, ‘–storagectl’, ‘SATA Controller’,

‘–port’, 1, ‘–device’, 0, ‘–type’, ‘hdd’, ‘–medium’, disk_file]

end

The command cd ~/openkim-pipeline && git rev-parse --short HEAD gives me 163f7e4.

Nikhil

It seems like there are some KIM objects (tests or models, etc) that do not specify a compatible version of the KIM API (and probably likewise a pipeline version). This is triggering on odd error in the pipeline code. For the time being you can apply a patch by running the following on the box:

cd ~/openkim-pipeline
wget https://www.dropbox.com/s/kvlnm7qmaxwy8ue/kimitems-default-api-version.patch
git apply kimitems-default-api-version.patch

Things should then work further. However, if it is your newly created objects that are causing the problem, you should check out https://openkim.org/about-kimspec-edn/ to verify that you are compliant with the kimspec.edn format.

Let me know how that goes
-Matt

Hi Matt,

After patching and issuing kimitems build I get the following error

openkim@openkim-vm:~/openkim-repository$ kimitems build
Building all packages…
Traceback (most recent call last):
File “/home/openkim/openkim-pipeline/tools/kimitems”, line 240, in
action_build()
File “/home/openkim/openkim-pipeline/tools/kimitems”, line 123, in action_build
kimapi.make_all()
File “/home/openkim/openkim-pipeline/kimapi.py”, line 49, in make_all
o.make()
File “/home/openkim/openkim-pipeline/kimobjects.py”, line 251, in make
if self.drivers:
File “/home/openkim/openkim-pipeline/kimobjects.py”, line 530, in drivers
return [] if not self.test_drivers else [self.test_drivers]
File “/home/openkim/openkim-pipeline/kimobjects.py”, line 511, in test_drivers
if not self.kimspec or not self.kimspec.get(‘test-driver’):
File “/home/openkim/openkim-pipeline/kimobjects.py”, line 300, in kimspec
spec = loadedn(f)
File “/home/openkim/openkim-pipeline/config.py”, line 219, in loadedn
return clj.load(f)
File “/usr/local/lib/python2.7/dist-packages/clj.py”, line 403, in load
return decoder.decode()
File “/usr/local/lib/python2.7/dist-packages/clj.py”, line 82, in decode
v = self.__read_token()
File “/usr/local/lib/python2.7/dist-packages/clj.py”, line 148, in __read_token
raise ValueError(“Unexpected EOF”)
ValueError: Unexpected EOF

I will look into the kimspec.edn format. Thanks.

Nikhil

Hi Nikhil,

Still seems like problems with a kimspec.edn somewhere in the repository. I made a short script that checks all kimspecs and tells you where there are missing kim-api-version or bad formatting. To run, on the VM do

wget https://www.dropbox.com/s/x3oly1ux2upvdgi/kimitems-valid-checker.py
python kimitems-valid-checker.py

If nothing is printed then we should look at other possibilities.

-Matt

Hi Matt,

Thanks! The patch helped me spot where the issue was. I essentially had an empty kimspec.edn file in my driver. I just deleted it, and it all works fine now.

Nikhil