{ "cells": [ { "cell_type": "markdown", "id": "44d3c0ab-baf2-4dc8-851f-3997fa2ce32c", "metadata": {}, "source": [ "# Remote compilation of BigDFT\n", "In this notebook we provide examples about how to compile the code on a remote machine with \n", "the RemoteManager Interoperability module of PyBigDFT.\n", "\n", "We know that the bigdft suite requires, for the compilation, a `buildrc` file which exposes the\n", "configure lines of the suite packages.\n", "In addition, it is possible to pre-compile the list of the upstream dependencies packages which are related to the optional functionalities of the BigDFT suite.\n", "This is a practical advantage as it would enable a easier update of the bigdft suite when new version are released.\n", "\n", "Let us now illustrate the remote compilation with the `aquarius` and `odyssey` machines of Tokyo university.\n", "\n", "To start doing that, we need a dictionary-based specification of the installation of the code.\n", "We use a `yaml` configuration string for practical reasons." ] }, { "cell_type": "code", "execution_count": 10, "id": "094e9883-830d-4eb5-973a-0f8ce3cb3d82", "metadata": {}, "outputs": [], "source": [ "wisteria_spec=\"\"\"\n", " submitter: pjsub\n", " # this is for both odyssey and \n", " template: |\n", " #!/bin/sh\n", " # #cores_per_node:default=48# #feature of the machine\n", " #------ pjsub option --------#\n", " #PJM -L rscgrp=#queue:default=regular-a#\n", " #PJM -L node=#nodes:default={(mpi*omp)/cores_per_node}#\n", " #PJM -L gpu=#gpu#\n", " #PJM --mpi proc=#mpi:optional=False#\n", " #PJM --omp thread=#omp:optional=False#\n", " #PJM -L elapse=#time:format=time:optional=False#\n", " #PJM -g #group:default=jh210022a#\n", " #PJM -j\n", "\n", " module #module_preload#\n", " module load #modules#\n", " export PREFIX=#prefix:default=/work/jh210022a/q25020/build-odyssey/suite#\n", " export BIGDFT_MPIRUN=\"mpiexec #mpiexec_extra:default=-machinefile $PJM_O_NODEINF -n $PJM_MPI_PROC -npernode {min(cores_per_node/omp,mpi)}#\"\n", " export FUTILE_PROFILING_DEPTH=0\n", " export FUTILE_DEBUG_MODE=#futile_debug:default=0#\n", " source $PREFIX/bin/bigdftvars.sh\n", " export GENESIS_ROOT=#upstream_prefixes#/bin\n", " export GENESIS_MPIRUN=$BIGDFT_MPIRUN\n", " \n", " #------- Program execution -------# \n", "\n", " frontend_template: |\n", " #!/bin/bash\n", " module #module_preload#\n", " module load #modules#\n", " export PREFIX=#prefix:default=/work/jh210022a/q25020/build-odyssey/suite#\n", " export FUTILE_PROFILING_DEPTH=0\n", " export FUTILE_DEBUG_MODE=#futile_debug:default=0#\n", " source $PREFIX/bin/bigdftvars.sh\n", " export GENESIS_ROOT=#upstream_prefixes#/bin\n", " export GENESIS_MPIRUN=$BIGDFT_MPIRUN\n", " #command:optional=False#\n", "\n", " odyssey_gnu_nompi:\n", " fc: gfortran\n", " fcflags: -fPIC\n", " cc: gcc\n", " cflags: -fPIC\n", " cxx: g++\n", " modules: fj\n", " python_interpreter: python\n", " sourcedir: /home/q25020/bigdft-suite\n", " tarballdir: /home/q25020/bigdft-upstream-tarballs\n", " checkoutroot: /work/jh210022a/q25020/build-odyssey/checkout\n", " builddir: /work/jh210022a/q25020/build-odyssey/builddir\n", " upstream_prefixes: /work/jh210022a/q25020/build-odyssey/upstream\n", " prefix: /work/jh210022a/q25020/build-odyssey/suite\n", "\n", " odyssey:\n", " fc: mpifrtpx\n", " fcflags: -SSL2BLAMP -Kfast,openmp,noautoobjstack -fPIC\n", " cc: mpifccpx\n", " cflags: -g -std=gnu99 -O2 -fPIC\n", " cxx: mpiFCCpx\n", " linalg: -fjlapackex -SCALAPACK\n", " configure_line: F77=frtpx FFLAGS=\"-Kfast -fPIC\" --build=x86_64-redhat-linux --host=sparc-fujitsu-linux LIBS=\"-SSL2BLAMP -Kfast,openmp -Nlibomp\" --without-archives\n", " module_preload: purge\n", " modules: fj\n", " python_interpreter: python\n", " sourcedir: /home/q25020/bigdft-suite\n", " mpiexec_extra: \"\"\n", " group: jh210022o\n", " queue: regular-o\n", " cmakeargs_update: > \n", " {'ntpoly': ' -DFORTRAN_ONLY=Yes -DCMAKE_Fortran_FLAGS_RELEASE=\"-SSL2BLAMP -Kfast,openmp\" -DCMAKE_Fortran_COMPILER=\"mpifrtpx\" -DCMAKE_C_COMPILER=\"mpifccpx\" -DCMAKE_CXX_COMPILER=\"mpiFCCpx\" -DCMAKE_Fortran_MODDIR_FLAG=\"-M\"'}\n", " tarballdir: /home/q25020/bigdft-upstream-tarballs\n", " checkoutroot: /work/jh210022a/q25020/build-odyssey/checkout \n", " builddir: /work/jh210022a/q25020/build-odyssey/builddir\n", " upstream_prefixes: /work/jh210022a/q25020/build-odyssey/upstream\n", " prefix: /work/jh210022a/q25020/build-odyssey/suite\n", "\n", " aquarius:\n", " fc: mpif90\n", " fcflags: -O2 -g -fPIC -fopenmp\n", " cc: mpicc\n", " cflags: -O2 -g -fPIC\n", " ompflags: -fopenmp\n", " cxx: mpicxx\n", " linalg: -L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl\n", " configure_line: --enable-cuda-gpu --enable-opencl \"NVCC_FLAGS=--compiler-options -fPIC\" --enable-single --enable-gpu --with-cuda=$CUDA_PATH LAPACK_LIBS=\"-L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl\" --enable-dynamic-libraries LIBS=-lstdc++ \n", " #gpu_line: \n", " build_conditions: --conditions=-vdw\n", " module_preload: purge\n", " modules: aquarius python/3.9.18 ompi mkl cuda\n", " python_interpreter: python\n", " sourcedir: /home/q25020/bigdft-suite\n", " tarballdir: /home/q25020/bigdft-upstream-tarballs\n", " checkoutroot: /work/jh210022a/q25020/build-aquarius/checkout\n", " builddir: /work/jh210022a/q25020/build-aquarius/builddir\n", " upstream_prefixes: /work/jh210022a/q25020/build-aquarius/upstream\n", " prefix: /work/jh210022a/q25020/build-aquarius/suite\n", "\"\"\"" ] }, { "cell_type": "markdown", "id": "bcbe0258-6eab-4fd7-af14-ee75320db2f0", "metadata": {}, "source": [ "Let us first verify if the connection with the remote computer can be instantiated." ] }, { "cell_type": "code", "execution_count": 11, "id": "db62c9f0-cafd-4226-9ea8-24a1530508e6", "metadata": {}, "outputs": [], "source": [ "from yaml import load, Loader\n", "from remotemanager import BaseComputer\n", "wisteria_dict = load(wisteria_spec,Loader=Loader)" ] }, { "cell_type": "code", "execution_count": 12, "id": "0ce8c130-72bc-48cb-8c11-2da4023e7af7", "metadata": {}, "outputs": [], "source": [ "wisteria = BaseComputer(host='wisteria.cc.u-tokyo.ac.jp', user='q25020', **wisteria_dict)\n", "#wisteria.test_connection()" ] }, { "cell_type": "markdown", "id": "27e51e80-0347-49ef-a130-01054dcbd71f", "metadata": {}, "source": [ "With these configuration options, the buildrc can be created for the desired platform" ] }, { "cell_type": "code", "execution_count": 13, "id": "c86f7ea1-6317-44a4-803d-887eb77c60a5", "metadata": {}, "outputs": [], "source": [ "key='odyssey'\n", "rec=wisteria_dict[key]" ] }, { "cell_type": "code", "execution_count": 14, "id": "7a617587-0e3f-4ea7-8080-a3f55cb3f840", "metadata": {}, "outputs": [], "source": [ "from BigDFT.Interop import RemoteManagerInterop as RM\n", "buildrc=BaseComputer(template=RM.buildrc_template)\n", "rcfile='wisteria-'+key+'.rc'\n", "with open(rcfile,'w') as ofile:\n", " ofile.write(buildrc.script(targets=['upstream-suite'],conditions=['ase'],**rec))\n", "rcfile_gnu='wisteria-gnu.rc'\n", "with open(rcfile_gnu,'w') as ofile:\n", " ofile.write(buildrc.script(targets=['client-bio-baseplugins'], conditions=['vdw', 'spg'],**wisteria_dict['odyssey_gnu_nompi'])) " ] }, { "cell_type": "markdown", "id": "219ec94b-40fc-4332-919c-744c08c3aa92", "metadata": {}, "source": [ "Then we can start to compile the code. We will split the compilation in two steps, first the compilation of the upstream packages, then the bigdft-suite." ] }, { "cell_type": "code", "execution_count": 15, "id": "7cd58df2-fddd-40e0-b362-818a3a1c71eb", "metadata": {}, "outputs": [], "source": [ "from os import environ, path\n", "#rcfile=path.join(environ['BIGDFT_SUITE_SOURCES'], 'rcfiles', 'fugaku_cross.rc') #alternative choice\n", "cp=RM.code_compiler(extra_files_send=[rcfile],\n", " host='wisteria.cc.u-tokyo.ac.jp', user='q25020',\n", " local_dir='compile',\n", " rcfile=path.basename(rcfile),\n", " asynchronous=False,**rec)" ] }, { "cell_type": "code", "execution_count": 16, "id": "506d1c82-673b-430e-8621-d83abab0ecc4", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "appended run runner-0\n", "appended run runner-1\n", "appended run runner-2\n" ] } ], "source": [ "cp.append_run(checkoutroot=rec['builddir'],action='build', upstream_prefixes='',\n", " prefix=rec['upstream_prefixes'])\n", "cp.append_run(checkoutroot=rec['builddir'],action='build dftd3', upstream_prefixes='',\n", " prefix=rec['upstream_prefixes'],rcfile=rcfile_gnu,extra_file_send=rcfile_gnu)\n", "cp.append_run(action='build spred',build_conditions=\"--conditions=+no_upstream\")" ] }, { "cell_type": "code", "execution_count": 17, "id": "8d4b0a20-57e3-4715-9bb8-865081151da7", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Running Dataset\n", "assessing run for runner compile-c48c306e-runner-0... running\n", "assessing run for runner compile-c48c306e-runner-1... running\n", "assessing run for runner compile-c48c306e-runner-2... running\n", "Transferring 6 Files in 2 Transfers... Done\n" ] } ], "source": [ "cp.run()" ] }, { "cell_type": "markdown", "id": "17c1c28a-9adb-4ea6-86f6-3f2cbfb66fb0", "metadata": {}, "source": [ "The same procedure can be performed for the aquarius platform" ] }, { "cell_type": "code", "execution_count": 18, "id": "0eb9fae7-2b40-4c21-93b7-fde67e142841", "metadata": {}, "outputs": [], "source": [ "key='aquarius'\n", "rec=wisteria_dict[key]" ] }, { "cell_type": "code", "execution_count": 19, "id": "4763cecf-82be-4312-b249-daa50e3762ba", "metadata": {}, "outputs": [], "source": [ "rcfile='wisteria-'+key+'.rc'\n", "with open(rcfile,'w') as ofile:\n", " ofile.write(buildrc.script(targets=['upstream-suite'],conditions=['ase'],**rec))" ] }, { "cell_type": "code", "execution_count": 20, "id": "9231662a-cb0b-4770-90b3-e0b01d114339", "metadata": {}, "outputs": [], "source": [ "!rm dataset-compile-c48c306e.yaml" ] }, { "cell_type": "code", "execution_count": 21, "id": "ca937728-1286-4eaa-b332-943f83f514c0", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "appended run runner-0\n", "appended run runner-1\n", "appended run runner-2\n" ] } ], "source": [ "cp=RM.code_compiler(extra_files_send=[rcfile],\n", " host='wisteria.cc.u-tokyo.ac.jp', user='q25020',\n", " local_dir='compile',\n", " rcfile=path.basename(rcfile),\n", " asynchronous=False,**rec)\n", "cp.append_run(checkoutroot=rec['builddir'],action='buildone genesis', upstream_prefixes='',\n", " prefix=rec['upstream_prefixes'])\n", "cp.append_run(checkoutroot=rec['builddir'],action='build', upstream_prefixes='',\n", " prefix=rec['upstream_prefixes'])\n", "cp.append_run(action='build spred',build_conditions=\"--conditions=+no_upstream\")" ] }, { "cell_type": "code", "execution_count": 22, "id": "7875476c-1331-453f-9869-201914689d5f", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Running Dataset\n", "assessing run for runner compile-c48c306e-runner-0... running\n", "assessing run for runner compile-c48c306e-runner-1... running\n", "assessing run for runner compile-c48c306e-runner-2... running\n", "Transferring 6 Files in 2 Transfers... Done\n" ] } ], "source": [ "cp.run()" ] }, { "cell_type": "markdown", "id": "e02bf5cd-e52a-4e78-84a1-daa87eab9911", "metadata": {}, "source": [ "# Update the suite remotely before compiling\n", "Sometimes, (especially when the frontend has no internet access) it may be useful to update remotely the code before starting the compilation procedure.\n", "We illustrate this approach with the `irene` platform. Of course, a `git` repository should be present in the remote directory." ] }, { "cell_type": "code", "execution_count": 5, "id": "a3ffc5f7-8961-4caa-82f0-1849e84c73c6", "metadata": {}, "outputs": [], "source": [ "from remotemanager import BaseComputer\n", "irene=BaseComputer( host='irene', passfile='/tmp/irene')" ] }, { "cell_type": "code", "execution_count": 6, "id": "abc3f5fb-20ba-49ad-a662-08b13af9d078", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Checking for entry point... Success (Error: failed to set /sys/fs/cgroup/cpuset/regular_users/genovesl/cpuset.cpus: Permission denied\n", "Error: failed to set /sys/fs/cgroup/cpuset/regular_users/genovesl/cpuset.mems: Permission denied\n", "/ccc/cont003/dsku/blanchet/home/user/drf/genovesl)\n", "Checking file creation in home... True\n", "Checking file creation in /tmp... True\n", "Checking file creation in /scratch... False\n", "Testing remotemanager.transport.rsync:\n", "\tsend... Transferring 3 Files... Done\n", "True\n", "\tpull... Transferring 1 File... Done\n", "True\n", "Testing remotemanager.transport.scp:\n", "\tsend... Transferring 3 Files... (1/3) communication attempt failed after 5s... waiting 5s and trying again\n", "Done\n", "(1/3) communication attempt failed after 5s... waiting 5s and trying again\n", "False\n", "\tpull... Transferring 1 File... Done\n", "True\n", "Cleaning up... Done\n", "Done! Made 17 calls, taking 59.62s\n", "Approximate latency, 3.51s\n", "Tests passed successfully\n" ] } ], "source": [ "irene.test_connection()" ] }, { "cell_type": "code", "execution_count": 7, "id": "7b60d377-4068-429e-bd15-3c7ba31e7986", "metadata": {}, "outputs": [], "source": [ "from BigDFT.Interop import RemoteManagerInterop as RM" ] }, { "cell_type": "code", "execution_count": 9, "id": "088ea53b-b77d-43d4-9a7f-8e768e7d6b6f", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "appended run runner-0\n", "Running Dataset\n", "assessing run for runner push_to_remote-e61e2906-runner-0... force running\n", "Transferring 3 Files... Done\n", "Warning! Found 1 error(s), also check the `errors` property!\n", "Including git+ssh://irene/ccc/work/cont003/drf/genovesl/1.9.5 as irene\n", "Delete remote target if non empty\n", "Pushing external repo\n", "Remote \"irene\" does not support the LFS locking API. Consider disabling it with:\n", " $ git config lfs.https://irene/ccc/work/cont003/drf/genovesl/1.9.5.git/info/lfs.locksverify false\n", "Pushing ended\n", "appended run runner-0\n", "Running Dataset\n", "assessing run for runner update_remote-c610c176-runner-0... force running\n", "Transferring 3 Files... Done\n", "Warning! Found 1 error(s), also check the `errors` property!\n", "Pulling external repo into build\n", "Your branch is ahead of 'irene/tmp_update' by 209 commits.\n", " (use \"git push\" to publish your local commits)\n", "Your branch is ahead of 'irene/tmp_update' by 209 commits.\n", " (use \"git push\" to publish your local commits)\n", "Updating 2a206f222..79e15ef74\n", "Fast-forward\n", " .gitlab-ci.yml | 10 +-\n", " PyBigDFT/BigDFT/BioQM.py | 8 +-\n", " PyBigDFT/BigDFT/Interop/ASEInterop.py | 16 +-\n", " PyBigDFT/BigDFT/Interop/DNAviewerInterop.py | 13 +-\n", " PyBigDFT/BigDFT/Interop/RemoteManagerInterop.py | 328 +-\n", " PyBigDFT/BigDFT/Interop/XTBInterop.py | 15 +-\n", " PyBigDFT/pyproject.toml | 2 +-\n", " PyBigDFT/setup.py | 2 +-\n", " bigdft/src/cluster.f90 | 1 +\n", " bigdft/src/helpers/Makefile.am | 3 +\n", " bigdft/src/helpers/bigdft_environ.f90 | 27 +\n", " bigdft/src/init.f90 | 3 +-\n", " bigdft/src/linear/copyTypes.f90 | 6 +-\n", " bigdft/src/linear/initAndUtils.f90 | 2 +\n", " bigdft/src/linear/linearScaling.f90 | 3 +\n", " bigdft/src/linear/transferintegrals.f90 | 2 +-\n", " bigdft/src/modules/Makefile.am | 5 +-\n", " bigdft/src/modules/bigdft_matrices.f90 | 11 +-\n", " bigdft/src/modules/bigdft_run.f90 | 2 +\n", " bigdft/src/modules/chess_utils.f90 | 253 +\n", " bigdft/src/modules/dpbox.f90 | 7 -\n", " bigdft/src/modules/forces_linear.f90 | 1 +\n", " bigdft/src/modules/get_basis.f90 | 1 +\n", " bigdft/src/modules/get_kernel.f90 | 158 +-\n", " bigdft/src/modules/io.f90 | 3 +\n", " bigdft/src/modules/multipole.f90 | 12 +-\n", " bigdft/src/modules/orthonormalization.f90 | 11 +-\n", " bigdft/src/modules/postprocessing_linear.f90 | 1 +\n", " bigdft/src/modules/rhopotential.f90 | 5 +-\n", " bigdft/src/modules/transposed_operations.f90 | 4 +-\n", " bigdft/src/modules/types.f90 | 170 +-\n", " bigdft/src/modules/unitary_tests.f90 | 15 +-\n", " bigdft/src/restart.f90 | 1 +\n", " bigdft/tests/DFT/linear/Makefile.am | 10 +\n", " .../TCDFT_acetone_t300_000001_PBE_SF_S0.out.ref | 1 +\n", " ...CDFT_acetone_t300_000001_PBE_SF_S0.out.ref.yaml | 1893 ++++++\n", " ...ne_t300_000001_PBE_SF_S1_pure_HOMO_LUMO.out.ref | 2 +\n", " ...00_000001_PBE_SF_S1_pure_HOMO_LUMO.out.ref.yaml | 2684 ++++++++\n", " ...etone_t300_000001_PBE_SF_sp_spd_12.0_S0.out.ref | 2 +\n", " ..._t300_000001_PBE_SF_sp_spd_12.0_S0.out.ref.yaml | 2017 ++++++\n", " ...e_t300_000001_PBE_SF_sp_spd_12.0_linear.out.ref | 2 +\n", " ...0_000001_PBE_SF_sp_spd_12.0_linear.out.ref.yaml | 3502 ++++++++++\n", " ..._t300_000001_PBE_SF_sp_spd_12.0_virtual.out.ref | 2 +\n", " ..._000001_PBE_SF_sp_spd_12.0_virtual.out.ref.yaml | 7089 ++++++++++++++++++++\n", " .../tests/DFT/linear/TCDFT/acetone_t300_000001.xyz | 12 +\n", " .../TCDFT/acetone_t300_000001_PBE_SF_S0.yaml | 688 ++\n", " ...etone_t300_000001_PBE_SF_S1_pure_HOMO_LUMO.yaml | 700 ++\n", " .../acetone_t300_000001_PBE_SF_sp_spd_12.0_S0.yaml | 688 ++\n", " ...tone_t300_000001_PBE_SF_sp_spd_12.0_linear.yaml | 677 ++\n", " ...one_t300_000001_PBE_SF_sp_spd_12.0_virtual.yaml | 690 ++\n", " bigdft/tests/tols-BigDFT.yaml | 109 +-\n", " chess/sparsematrix/sparsematrix.f90 | 31 -\n", " chess/sparsematrix/sparsematrix_types.f90 | 5 -\n", " futile/flib/f_environment.f90 | 41 +-\n", " futile/tests/fldiff_yaml.py.in | 10 +-\n", " modulesets/bio.modules | 2 +-\n", " modulesets/suite.modules | 2 +-\n", " 57 files changed, 21649 insertions(+), 311 deletions(-)\n", " create mode 100644 bigdft/src/helpers/bigdft_environ.f90\n", " create mode 100644 bigdft/src/modules/chess_utils.f90\n", " create mode 100644 bigdft/tests/DFT/linear/TCDFT/TCDFT_acetone_t300_000001_PBE_SF_S0.out.ref\n", " create mode 100644 bigdft/tests/DFT/linear/TCDFT/TCDFT_acetone_t300_000001_PBE_SF_S0.out.ref.yaml\n", " create mode 100644 bigdft/tests/DFT/linear/TCDFT/TCDFT_acetone_t300_000001_PBE_SF_S1_pure_HOMO_LUMO.out.ref\n", " create mode 100644 bigdft/tests/DFT/linear/TCDFT/TCDFT_acetone_t300_000001_PBE_SF_S1_pure_HOMO_LUMO.out.ref.yaml\n", " create mode 100644 bigdft/tests/DFT/linear/TCDFT/TCDFT_acetone_t300_000001_PBE_SF_sp_spd_12.0_S0.out.ref\n", " create mode 100644 bigdft/tests/DFT/linear/TCDFT/TCDFT_acetone_t300_000001_PBE_SF_sp_spd_12.0_S0.out.ref.yaml\n", " create mode 100644 bigdft/tests/DFT/linear/TCDFT/TCDFT_acetone_t300_000001_PBE_SF_sp_spd_12.0_linear.out.ref\n", " create mode 100644 bigdft/tests/DFT/linear/TCDFT/TCDFT_acetone_t300_000001_PBE_SF_sp_spd_12.0_linear.out.ref.yaml\n", " create mode 100644 bigdft/tests/DFT/linear/TCDFT/TCDFT_acetone_t300_000001_PBE_SF_sp_spd_12.0_virtual.out.ref\n", " create mode 100644 bigdft/tests/DFT/linear/TCDFT/TCDFT_acetone_t300_000001_PBE_SF_sp_spd_12.0_virtual.out.ref.yaml\n", " create mode 100644 bigdft/tests/DFT/linear/TCDFT/acetone_t300_000001.xyz\n", " create mode 100644 bigdft/tests/DFT/linear/TCDFT/acetone_t300_000001_PBE_SF_S0.yaml\n", " create mode 100644 bigdft/tests/DFT/linear/TCDFT/acetone_t300_000001_PBE_SF_S1_pure_HOMO_LUMO.yaml\n", " create mode 100644 bigdft/tests/DFT/linear/TCDFT/acetone_t300_000001_PBE_SF_sp_spd_12.0_S0.yaml\n", " create mode 100644 bigdft/tests/DFT/linear/TCDFT/acetone_t300_000001_PBE_SF_sp_spd_12.0_linear.yaml\n", " create mode 100644 bigdft/tests/DFT/linear/TCDFT/acetone_t300_000001_PBE_SF_sp_spd_12.0_virtual.yaml\n", "Merging finished\n" ] } ], "source": [ "RM.code_updater(remote_sourcedir='/ccc/work/cont003/drf/genovesl/1.9.5',\n", " host='irene', local_dir='compile', passfile='/tmp/irene')" ] }, { "cell_type": "markdown", "id": "1f8b80ef-e082-495b-b923-a93260e03ab0", "metadata": {}, "source": [ "Now we can recompile the code in by only updating the suite, with the different compilation flavours" ] }, { "cell_type": "code", "execution_count": 10, "id": "5b3bd18a-ec91-42d2-9d53-7464c3a6afcf", "metadata": {}, "outputs": [], "source": [ "import yaml\n", "templates=yaml.load(RM.computers_database,Loader=yaml.Loader)" ] }, { "cell_type": "code", "execution_count": 18, "id": "a27c5c57-62b6-45b3-9df6-fedbf58bdb55", "metadata": {}, "outputs": [], "source": [ "recip={k:templates['irene'][k] for k in ['gnu_mpi', 'intel_mpi', 'intel_intelmpi', 'intel_oneapi_mpi']}" ] }, { "cell_type": "code", "execution_count": 27, "id": "49ad880a-fd83-4c26-aa8e-b1e70d7f9227", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "appended run runner-0\n", "Running Dataset\n", "assessing run for runner compile-c48c306e-runner-0... running\n", "Transferring 4 Files in 2 Transfers... Done\n", "appended run runner-0\n", "Running Dataset\n", "assessing run for runner compile-c48c306e-runner-0... running\n", "Transferring 4 Files in 2 Transfers... Done\n", "appended run runner-0\n", "Running Dataset\n", "assessing run for runner compile-c48c306e-runner-0... running\n", "Transferring 4 Files in 2 Transfers... Done\n" ] } ], "source": [ "from os import remove\n", "buildrc=BaseComputer(template=RM.buildrc_template)\n", "for irec,(key,rec) in enumerate(recip.items()):\n", " rcfile='irene-'+key+'.rc' \n", " with open(rcfile,'w') as ofile:\n", " ofile.write(buildrc.script(targets=['upstream-suite', 'client-bio-baseplugins'],\n", " conditions=['ase', 'vdw', 'spg'],**rec))\n", " cp=RM.code_compiler(extra_files_send=[rcfile],\n", " host='irene', local_dir='compile', passfile='/tmp/irene',\n", " rcfile=rcfile,\n", " asynchronous=False,force=True,**rec)\n", " # cp.append_run(checkoutroot=rec['builddir'],action='build', upstream_prefixes='',\n", " # prefix=rec['upstream_prefixes'])\n", " cp.append_run(action='build -f bigdft',build_conditions=\"--conditions=+no_upstream\")\n", " cp.run()\n", " remove(cp.database.path)" ] }, { "cell_type": "code", "execution_count": null, "id": "1f60222e-d7c1-4c30-bfde-99530d48df94", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.5" } }, "nbformat": 4, "nbformat_minor": 5 }