Sign inSign up

bigdft/sdk

By bigdft

Updated 6 months ago

BigDFT Software Development Kit

Image
3

10K+

bigdft/sdk repository overview

This repository provides containers for environments in which the development version of the code can be compiled and executed.

Instruction to use the container for developing the code:

Suppose you have a bzr branch of BigDFT in the directory mysources.

The BigDFT-SDK container create a build version of the binaries inside a given directory, that we call containerdir. This directory will be visible as such in the host system, but will be mounted as /bigdft-sdk in the SDK container environment. (create such containerdir directory if it does not exist) Here you will find the procedure to use efficiently the SDK:

  • Install docker-ce and and nvidia-docker2 or, if this is not available the nvidia-container-runtime

  • sudo docker pull bigdft/sdk

  • Give read permission to mysources, by typing :

    chmod 777 mysources

  • Give the same permission also to the directory containerdir

the same permissions

  • Run the docker command

sudo docker run -ti -v <abs_path_to_mysources>:/bigdft-suite-sources -v <abs_path_to_containerdir>:/bigdft-sdk/ bigdft/sdk bash

  • In the case of a GPU usage, if you have a machine that employs GPU, you might run the command

sudo docker run --runtime=nvidia -ti -v <abs_path_to_mysources>:/bigdft-suite-sources -v <abs_path_to_containerdir>:/bigdft-sdk/ bigdft/sdk bash

To verify that the GPU is active and recognized, type nvidia-smi in a console

  • Then you should branch the sources inside the container:

    • The first time run the following commands in the docker
      • cd /bigdft-sdk/
      • bzr branch ../bigdft-suite-sources
    • The other times you use the container clrearly the branch command is not needed anymore. It will be enough to do:
      • cd /bigdft-sdk/bigdft-suite-sources
      • bzr pull
  • Then you create the build directory (if it does not exists already): mkdir /bigdft-sdk/build

  • And in this directory you can build the bigdft-suite with the compilation command:

cd /bigdft-sdk/build ../bigdft-suite-sources/Installer.py autogen -y -f container.rc ../bigdft-suite-sources/Installer.py build -y -f container.rc -a babel

  • This terminates the compilation procedure. Have fun!

Use the SDK binaries to perform calculations

Once the compilation terminated, the same container might be used to perform calculations on the platform. To do that it is advised to mount the SDK directories in another way. This would make this container similar to the runtime version.

We also provide some tool to test the runtime version of the kernel level within the jupyter console Imagine you have downloaded the BigDFT-nb github project in the directory bigdftnb, with the correct reading permissions. > git clone [email protected]:luigigenovese/BigDFT-nb.git bigdftnb > chmod -R 777 bigdftnb (you may avoid this passage by cloning the git branch from the SDK container)

Then we would like to run the Notebook H2O_Polarizability.ipynb which is in the directory bigdftnb/Pol-Tensor_Raman-spectrum/ To do that we might open a jupyter notebook and expose the port (e.g. 1234) after opening the container:

sudo docker run -ti -p <port>:8888 -v <abs_path_to_containerdir>/build/install:/bigdft -v <abs_path_to_bigdftnb>/Pol-Tensor_Raman-spectrum/:/notebook -W /notebook bigdft/sdk

  • Go to a browser to which you have access to, then type

http://<machine_with_docker_url>:

You will go in the login page. You may then type the password 'bigdft' to access to the jupyter environment. The notebook should Ran entirely, and you should obtain the Polarizability tensor:

[[ 1.08158270e+01 -4.95000000e-03 1.00000000e-02] [ 7.14200000e-03 1.02506800e+01 1.00000000e-02] [ 7.37700000e-03 -2.76000000e-03 1.05200000e+01]]

By pressing Ctrl+p and Ctrl+q you will make the docker container instance running as a demon such as it can be made accessible remotely.

Tag summary

Content type

Image

Digest

Size

4.6 GB

Last updated

almost 5 years ago

docker pull bigdft/sdk