Skip to content

Commit

Permalink
👌 IMPROVE: add siesta_build_cpus (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsewell authored Dec 6, 2020
1 parent 1c2e130 commit de431b1
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ siesta_enable_ncdf: "1"
siesta_enable_flook: "1"

#
siesta_build_cpus: 2
run_tests: true
#--------------------------
#
Expand Down
2 changes: 2 additions & 0 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ provisioner:
vars:
ansible_python_interpreter: /usr/bin/python3
run_tests: true
libxc_build_cpus: 2
siesta_build_cpus: 2
4 changes: 2 additions & 2 deletions tasks/gridxc-multi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
creates: "{{ siesta_libgridxc_topdir }}/build_dp/Makefile"

- name: Make libgridxc dp
shell: "make"
shell: "make -j{{ siesta_build_cpus }}"
args:
chdir: "{{ siesta_libgridxc_topdir }}/build_dp"
creates: "{{ siesta_libgridxc_topdir }}/build_dp/src/libgridxc_dp.la"
Expand All @@ -70,7 +70,7 @@
creates: "{{ siesta_libgridxc_topdir }}/build_mpi_dp/Makefile"

- name: Make libgridxc mpi_dp
shell: "make"
shell: "make -j{{ siesta_build_cpus }}"
args:
chdir: "{{ siesta_libgridxc_topdir }}/build_mpi_dp"
creates: "{{ siesta_libgridxc_topdir }}/build_mpi_dp/src/libgridxc_dp_mpi.la"
Expand Down
2 changes: 1 addition & 1 deletion tasks/libpsml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@


- name: Make libpsml
command: make
command: make -j{{ siesta_build_cpus }}
args:
chdir: "{{ siesta_libpsml_topdir }}"
creates: "{{ siesta_libpsml_topdir }}/src/libpsml.la"
Expand Down
1 change: 0 additions & 1 deletion tasks/libxc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
name: marvel-nccr.libxc
vars:
libxc_version: "{{ siesta_libxc_version }}"
libxc_build_cpus: 1
when: not libxc_installation.stat.exists

# Here we disable shared libraries because the current libxc role does not build them,
Expand Down
2 changes: 1 addition & 1 deletion tasks/siesta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
dest: "{{ siesta_topdir }}/Obj/arch.make"

- name: Make siesta executable
command: make
command: make -j{{ siesta_build_cpus }}
args:
chdir: "{{ siesta_topdir }}/Obj"
creates: "{{ siesta_topdir }}/Obj/siesta"
Expand Down
2 changes: 1 addition & 1 deletion tasks/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
when: siesta_enable_flook | bool

- name: run siesta tests
shell: make clean; make MPI='mpirun --oversubscribe -np 2' check
shell: make clean; make MPI='mpirun --oversubscribe -np {{ siesta_build_cpus }}' check
args:
chdir: "{{ siesta_topdir }}/Obj/Tests/{{ item }}"
with_items: "{{ siesta_all_tests }}"
Expand Down

0 comments on commit de431b1

Please sign in to comment.