EasyBuild config for OpenKIM

Hi,

We are updating our computing cluster and are in that connection switching to using the EasyBuild system (https://github.com/hpcugent/easybuild) for managing software on the cluster. In that connection, I am considering making an EasyBuild module for installing OpenKIM on the cluster as a library for other packages (mainly Asap).

In that connection I have two questions:

1) Is there a way to download all models and model drivers as a .tar file or similar? Currently, I have a script that downloads a list of all models from your web API, and then call the makefile once for each model to download them, but that takes forever.

2) The Makefile.KIM_Config defines the variable KIM_DIR to where the source code is build. But EasyBuild will copy the source code to a working directory while compiling and installing it, that is not known beforehand. Is there some way to handle that other than making a custom EasyBlock that somehow edits this at compile time?

Best regards

Jakob

Hi Jakob,

Thanks for the question. easybuild looks like an interesting project.

Hi,

We are updating our computing cluster and are in that connection switching to using the EasyBuild system (https://github.com/hpcugent/easybuild) for managing software on the cluster. In that connection, I am considering making an EasyBuild module for installing OpenKIM on the cluster as a library for other packages (mainly Asap).

Good! This is really how the kim-api has been designed to be used.

In that connection I have two questions:

1) Is there a way to download all models and model drivers as a .tar file or similar? Currently, I have a script that downloads a list of all models from your web API, and then call the makefile once for each model to download them, but that takes forever.

I'm not clear on which part is the bottle-neck. The downloading? or the build?

I would guess that it is the build. If that is the case, the only thing I can think of that would help is if you can use one of our pre-build binary repos for Ubuntu/CentOS/Fedora/openSUSE.

For the download, we don't currently have anything much better than your script. The kim-api build system has a functioning "make add-OpenKIM" command, but this just does effectively what you are doing (getting a list and downloading each item individually).

One reason we have avoided a single tarball download is due to licensing issues. The models/drivers have different licenses and some are incompatible and we wanted to avoid any possibility of a problem due to distributing together such packages.

I would be happy to explore other possibilities for distributing the model/driver packages if you have ideas that would represent a significant advantage (in certain situations) to the individual package download.

2) The Makefile.KIM_Config defines the variable KIM_DIR to where the source code is build. But EasyBuild will copy the source code to a working directory while compiling and installing it, that is not known beforehand. Is there some way to handle that other than making a custom EasyBlock that somehow edits this at compile time?

I suggest that you switch to using the new(er) "configure" script to generate the Makefile.KIM_Config file for you. This script determines the KIM_DIR directory when it is executed and it allows you to specify all possible settings within the Makefile.KIM_Config file through command line arguments.

Let me know if you have further questions!

Thanks,

Ryan

Dear Ryan,

Thanks for your suggestions, I will look at them.

It is the download that is the main bottle-neck, it takes almost two hours. I think that using make add-OpenKIM might be faster, as it is only a single call to the make file, and make uses a lot of time on starting up, checking the version of the intel compiler etc etc for each and every model. I did not realize that you had made a new makefile target for getting them all, I will give it a try tomorrow and report back :slight_smile:

Best regards

Jakob

Hi Ryan,

It is certainly much faster than my own script! But there are apparently two bugs. First, the KIM API reports a nonexisting model, EAM_QuinticClampedSpline_Cai_Ye_AlCu__MO_246347493730_001, which cannot be downloaded. I had the same problem with my own script, and just blacklisted it.

Second, while my own script downloads both models and model drivers, make add-OpenKIM fails to get the model drivers. My script does nothing to download the drivers, when it does make add-MODELNAME then the model is first downloaded, then the driver. But with make add-OpenKIM, the model is downloaded and an error is printed: “target pattern contains no %”. See the output below.

make[1]: Entering directory `/home/niflheim/schiotz/tmp/kim-api-v1.7.3'
* adding....... EAM_Dynamo_Fortini_Mendelev_Ru__MO_114077951467_002 to /home/niflheim/schiotz/tmp/kim-api-v1.7.3/src/models
                EAM_Dynamo_Fortini_Mendelev_Ru__MO_114077951467_002/
                EAM_Dynamo_Fortini_Mendelev_Ru__MO_114077951467_002/kimspec.edn
                EAM_Dynamo_Fortini_Mendelev_Ru__MO_114077951467_002/Ru.eam.fs
                EAM_Dynamo_Fortini_Mendelev_Ru__MO_114077951467_002/LICENSE.CDDL
                EAM_Dynamo_Fortini_Mendelev_Ru__MO_114077951467_002/Makefile
                EAM_Dynamo_Fortini_Mendelev_Ru__MO_114077951467_002/kimprovenance.edn
/home/niflheim/schiotz/tmp/kim-api-v1.7.3/build_system/Makefile.ParameterizedModel:128: *** target pattern contains no `'\. Stop\. make\[1\]: Leaving directory \`/home/niflheim/schiotz/tmp/kim\-api\-v1\.7\.3' make\[1\]: Entering directory \`/home/niflheim/schiotz/tmp/kim\-api\-v1\.7\.3' \* adding\.\.\.\.\.\.\. EAM\_Dynamo\_Mendelev\_Han\_Fe\_5\_\_MO\_942420706858\_002 to /home/niflheim/schiotz/tmp/kim\-api\-v1\.7\.3/src/models                 EAM\_Dynamo\_Mendelev\_Han\_Fe\_5\_\_MO\_942420706858\_002/                 EAM\_Dynamo\_Mendelev\_Han\_Fe\_5\_\_MO\_942420706858\_002/kimspec\.edn                 EAM\_Dynamo\_Mendelev\_Han\_Fe\_5\_\_MO\_942420706858\_002/Fe\_5\.eam\.fs                 EAM\_Dynamo\_Mendelev\_Han\_Fe\_5\_\_MO\_942420706858\_002/LICENSE\.CDDL                 EAM\_Dynamo\_Mendelev\_Han\_Fe\_5\_\_MO\_942420706858\_002/Makefile                 EAM\_Dynamo\_Mendelev\_Han\_Fe\_5\_\_MO\_942420706858\_002/kimprovenance\.edn /home/niflheim/schiotz/tmp/kim\-api\-v1\.7\.3/build\_system/Makefile\.ParameterizedModel:128: \*\*\* target pattern contains no \`'. Stop.
make[1]: Leaving directory `/home/niflheim/schiotz/tmp/kim-api-v1.7.3'
make[1]: Entering directory `/home/niflheim/schiotz/tmp/kim-api-v1.7.3'
* adding....... EAM_QuinticClampedSpline_Cai_Ye_AlCu__MO_246347493730_001 to /home/niflheim/schiotz/tmp/kim-api-v1.7.3/src/models
                Unable to download EAM_QuinticClampedSpline_Cai_Ye_AlCu__MO_246347493730_001 from https://openkim.org. Check the KIM Item ID for errors.
make[1]: *** [add-EAM_QuinticClampedSpline_Cai_Ye_AlCu__MO_246347493730_001] Error 1
make[1]: Leaving directory `/home/niflheim/schiotz/tmp/kim-api-v1.7.3'
make: *** [add-OpenKIM] Error 2

Jakob,

Thanks for the messages!

The missing model is an inconsistency in our openkim.org system and I'm trying to get it resolved. That model name should disapear from the query results, eventually.

I'm unable to reproduce (yet) the problem causing the model drivers to be skipped. Can you run a short test that produces the

"target pattern contains no `%'."

message and send me the output, but use 'make QUELL= add-<modelname>' so that we can see exactly where the problem occurs?

Thanks,

Ryan

(I'll respond to the sanity check efficiency issue in that thread)

Hi Ryan.

I am away from the computer for the rest of the day. But just a comment:

make add-modelname
works perfectly by itself. But
make add-OpenKIM
cause all the add-modelname steps to fail. Something about recursive make invokations, perhaps?

Best regards

Jakob

Hi Jakob,

Interesting....

OK, I see a naked "make" instead of "$(MAKE)" in the add-OpenKIM rule. I guess that might be the cause of the difference in behavior.

This is worth tracking down. When you get a chance, it will be helpful to see output with "QUELL= " from the broken case.

Thanks,

Ryan

Hi Ryan,

I have tried replacing make with $(MAKE) in the add-OpenKIM rule. That did not change anything. Here is the output of running
make QUELL= add-OpenKIM

http://pastebin.com/gg4CeCFj

The error first appears in line 155 of the paste.

Best regards

Jakob

PS: I will try your suggestion to download and install in parallel.

Hi Jakob,

Thanks for the details.

OK. I can now reproduce this issue and confirm that it occurs for 'make add-OpenKIM' only.

The problem is a missing argument to the make command in the add-OpenKIM target.

The line:

   make add-$${modname};

should become

   \(MAKE\) (MAKE_FLAGS) add-$${modname};

I've fixed this in the devel branch of the github repo. The fix will be included in the next release.

Thanks for your help! and let me know if you have any other problems of questions.

Ryan