Merge pull request #314 from OrderN/release-1.3

Release 1.3
This commit is contained in:
David Bowler 2024-02-29 12:39:45 +00:00 committed by GitHub
commit f424a27d32
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
83 changed files with 548650 additions and 1088 deletions

View File

@ -5,14 +5,26 @@ on:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]
# Manual dispatch for including all multiply kernels in matrix.
# We don't want this to run on every commit, but it's useful
# to be able to launch it manually
workflow_dispatch:
inputs:
multiply_kernel_test:
description: 'test all multiply kernels, instead of default only'
required: false
default: false
jobs:
build:
name: ${{matrix.fc}} -- ${{matrix.os}} -- np = ${{matrix.np}}
name: ${{matrix.fc}} -- ${{matrix.os}} -- ${{matrix.multiply_kernel}} multiply kernel -- ${{matrix.np}} processes -- ${{matrix.threads}} threads
runs-on: ${{matrix.os}}
env:
FC: ${{matrix.fc}}
F77: mpif77
OMP_NUM_THREADS: ${{matrix.threads}}
OPENBLAS_NUM_THREADS: 1
OMP_STACKSIZE: 100M
strategy:
fail-fast: false
matrix:
@ -20,18 +32,46 @@ jobs:
# We could add ubuntu-latest but until 2024 it will be the same as 22.04
- ubuntu-22.04
fc:
# the mpifort wrapper is recommended instead of mpif90 by openmpi. Including
# both here in case they do something differently.
#
# TODO: We could also build with `intel-oneapi-compiler-fortran`, it is available
# for installation from Intel through their apt repository.
- mpifort
- mpif90
np:
- 1
- 2
threads:
- 1
- 2
# TODO: Could be worth testing on `mpich` in addition to `openmpi-bin`. Both are
# available in apt
multiply_kernel:
- default
- gemm
- ompDoii
- ompDoik
- ompDoji
- ompDojk
- ompGemm
- ompGemm_m
# As a work-around, copy the multiply_kernel_test variable to the matrix and
# exclude non-default multiply kernels when it's false
# https://github.com/orgs/community/discussions/26253#discussioncomment-3250989
test_all_multiply_kernels:
- ${{github.event.inputs.multiply_kernel_test}}
exclude:
- test_all_multiply_kernels: false
multiply_kernel: gemm
- test_all_multiply_kernels: false
multiply_kernel: ompDoii
- test_all_multiply_kernels: false
multiply_kernel: ompDoik
- test_all_multiply_kernels: false
multiply_kernel: ompDoji
- test_all_multiply_kernels: false
multiply_kernel: ompDojk
- test_all_multiply_kernels: false
multiply_kernel: ompGemm
- test_all_multiply_kernels: false
multiply_kernel: ompGemm_m
steps:
- uses: actions/checkout@v3
@ -60,21 +100,26 @@ jobs:
- name: Build
working-directory: ${{github.workspace}}/src
run: |
cp gha.make system.make
make -j ${{matrix.np}}
make -j ${{matrix.np}} SYSTEM=gha MULT_KERN=${{matrix.multiply_kernel}}
- name: Run test 001
working-directory: ${{github.workspace}}/testsuite/test_001_bulk_Si_1proc_Diag
run: mpirun -np ${{matrix.np}} ../../bin/Conquest
run: |
mpirun -np ${{matrix.np}} ../../bin/Conquest
cat Conquest_out
- name: Run test 002
working-directory: ${{github.workspace}}/testsuite/test_002_bulk_Si_1proc_OrderN
run: mpirun -np ${{matrix.np}} ../../bin/Conquest
run: |
mpirun -np ${{matrix.np}} ../../bin/Conquest
cat Conquest_out
- name: Run test 003
working-directory: ${{github.workspace}}/testsuite/test_003_bulk_BTO_polarisation
run: mpirun -np ${{matrix.np}} ../../bin/Conquest
run: |
mpirun -np ${{matrix.np}} ../../bin/Conquest
cat Conquest_out
- name: Check test results
working-directory: ${{github.workspace}}/testsuite
run: pytest test_check_output.py

3
.gitignore vendored
View File

@ -1,3 +1,4 @@
bin/*
deps.obj.inc
*~
*~
src/system/system.make

View File

@ -5,6 +5,11 @@
# Required
version: 2
build:
os: ubuntu-22.04
tools:
python: "3.12"
# Build documentation in the docs/ directory with Sphinx
#sphinx:
# configuration: docs/CONQUEST-manual/conf.py
@ -14,6 +19,5 @@ formats: all
# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
install:
- requirements: docs/requirements.txt

View File

@ -50,4 +50,4 @@ DOI for the specific version you have used in any given study.
## Version number
CONQUEST is now at version 1.2 (tag:v1.2)
CONQUEST is now at version 1.3 (tag:v1.3)

View File

@ -0,0 +1,14 @@
AtomMove.TypeOfRun static
IO.Coordinates coords.dat
IO.Iprint 0
IO.WriteOutToFile F
General.CheckDFT T
Grid.GridCutoff 200
Diag.MPMesh T
Diag.MPMeshX 2
Diag.MPMeshY 2
Diag.MPMeshZ 2
General.NumberOfSpecies 1
%block ChemicalSpeciesLabel
1 28.086 Si
%endblock

6001
benchmarks/K222_G200/Si.ion Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,69 @@
20.525067 0.000000 0.000000
0.000000 20.525067 0.000000
0.000000 0.000000 20.525067
64
0.00000 0.00000 0.00000 1 T T T
0.00000 0.25000 0.25000 1 T T T
0.25000 0.25000 0.00000 1 T T T
0.25000 0.00000 0.25000 1 T T T
0.37500 0.12500 0.37500 1 T T T
0.12500 0.12500 0.12500 1 T T T
0.12500 0.37500 0.37500 1 T T T
0.37500 0.37500 0.12500 1 T T T
0.00000 0.00000 0.50000 1 T T T
0.00000 0.25000 0.75000 1 T T T
0.25000 0.25000 0.50000 1 T T T
0.25000 0.00000 0.75000 1 T T T
0.37500 0.12500 0.87500 1 T T T
0.12500 0.12500 0.62500 1 T T T
0.12500 0.37500 0.87500 1 T T T
0.37500 0.37500 0.62500 1 T T T
0.00000 0.50000 0.00000 1 T T T
0.00000 0.75000 0.25000 1 T T T
0.25000 0.75000 0.00000 1 T T T
0.25000 0.50000 0.25000 1 T T T
0.37500 0.62500 0.37500 1 T T T
0.12500 0.62500 0.12500 1 T T T
0.12500 0.87500 0.37500 1 T T T
0.37500 0.87500 0.12500 1 T T T
0.00000 0.50000 0.50000 1 T T T
0.00000 0.75000 0.75000 1 T T T
0.25000 0.75000 0.50000 1 T T T
0.25000 0.50000 0.75000 1 T T T
0.37500 0.62500 0.87500 1 T T T
0.12500 0.62500 0.62500 1 T T T
0.12500 0.87500 0.87500 1 T T T
0.37500 0.87500 0.62500 1 T T T
0.50000 0.00000 0.00000 1 T T T
0.50000 0.25000 0.25000 1 T T T
0.75000 0.25000 0.00000 1 T T T
0.75000 0.00000 0.25000 1 T T T
0.87500 0.12500 0.37500 1 T T T
0.62500 0.12500 0.12500 1 T T T
0.62500 0.37500 0.37500 1 T T T
0.87500 0.37500 0.12500 1 T T T
0.50000 0.00000 0.50000 1 T T T
0.50000 0.25000 0.75000 1 T T T
0.75000 0.25000 0.50000 1 T T T
0.75000 0.00000 0.75000 1 T T T
0.87500 0.12500 0.87500 1 T T T
0.62500 0.12500 0.62500 1 T T T
0.62500 0.37500 0.87500 1 T T T
0.87500 0.37500 0.62500 1 T T T
0.50000 0.50000 0.00000 1 T T T
0.50000 0.75000 0.25000 1 T T T
0.75000 0.75000 0.00000 1 T T T
0.75000 0.50000 0.25000 1 T T T
0.87500 0.62500 0.37500 1 T T T
0.62500 0.62500 0.12500 1 T T T
0.62500 0.87500 0.37500 1 T T T
0.87500 0.87500 0.12500 1 T T T
0.50000 0.50000 0.50000 1 T T T
0.50000 0.75000 0.75000 1 T T T
0.75000 0.75000 0.50000 1 T T T
0.75000 0.50000 0.75000 1 T T T
0.87500 0.62500 0.87500 1 T T T
0.62500 0.62500 0.62500 1 T T T
0.62500 0.87500 0.87500 1 T T T
0.87500 0.87500 0.62500 1 T T T

View File

@ -0,0 +1,205 @@
________________________________________________________________________
CONQUEST
Concurrent Order N QUantum Electronic STructure
________________________________________________________________________
Conquest lead developers:
D.R.Bowler (UCL, NIMS), T.Miyazaki (NIMS), A.Nakata (NIMS),
L. Truflandier (U. Bordeaux)
Developers:
M.Arita (NIMS), J.S.Baker (UCL), V.Brazdova (UCL), R.Choudhury (UCL),
S.Y.Mujahed (UCL), J.T.Poulton (UCL), Z.Raza (NIMS), A.Sena (UCL),
U.Terranova (UCL), L.Tong (UCL), A.Torralba (NIMS)
Early development:
I.J.Bush (STFC), C.M.Goringe (Keele), E.H.Hernandez (Keele)
Original inspiration and project oversight:
M.J.Gillan (Keele, UCL)
________________________________________________________________________
Simulation cell dimensions: 20.5251 a0 x 20.5251 a0 x 20.5251 a0
Atomic coordinates (a0)
Atom X Y Z Species
1 0.0000 0.0000 0.0000 1
2 0.0000 5.1313 5.1313 1
3 5.1313 5.1313 0.0000 1
4 5.1313 0.0000 5.1313 1
5 7.6969 2.5656 7.6969 1
6 2.5656 2.5656 2.5656 1
7 2.5656 7.6969 7.6969 1
8 7.6969 7.6969 2.5656 1
9 0.0000 0.0000 10.2625 1
10 0.0000 5.1313 15.3938 1
11 5.1313 5.1313 10.2625 1
12 5.1313 0.0000 15.3938 1
13 7.6969 2.5656 17.9594 1
14 2.5656 2.5656 12.8282 1
15 2.5656 7.6969 17.9594 1
16 7.6969 7.6969 12.8282 1
17 0.0000 10.2625 0.0000 1
18 0.0000 15.3938 5.1313 1
19 5.1313 15.3938 0.0000 1
20 5.1313 10.2625 5.1313 1
21 7.6969 12.8282 7.6969 1
22 2.5656 12.8282 2.5656 1
23 2.5656 17.9594 7.6969 1
24 7.6969 17.9594 2.5656 1
25 0.0000 10.2625 10.2625 1
26 0.0000 15.3938 15.3938 1
27 5.1313 15.3938 10.2625 1
28 5.1313 10.2625 15.3938 1
29 7.6969 12.8282 17.9594 1
30 2.5656 12.8282 12.8282 1
31 2.5656 17.9594 17.9594 1
32 7.6969 17.9594 12.8282 1
33 10.2625 0.0000 0.0000 1
34 10.2625 5.1313 5.1313 1
35 15.3938 5.1313 0.0000 1
36 15.3938 0.0000 5.1313 1
37 17.9594 2.5656 7.6969 1
38 12.8282 2.5656 2.5656 1
39 12.8282 7.6969 7.6969 1
40 17.9594 7.6969 2.5656 1
41 10.2625 0.0000 10.2625 1
42 10.2625 5.1313 15.3938 1
43 15.3938 5.1313 10.2625 1
44 15.3938 0.0000 15.3938 1
45 17.9594 2.5656 17.9594 1
46 12.8282 2.5656 12.8282 1
47 12.8282 7.6969 17.9594 1
48 17.9594 7.6969 12.8282 1
49 10.2625 10.2625 0.0000 1
50 10.2625 15.3938 5.1313 1
51 15.3938 15.3938 0.0000 1
52 15.3938 10.2625 5.1313 1
53 17.9594 12.8282 7.6969 1
54 12.8282 12.8282 2.5656 1
55 12.8282 17.9594 7.6969 1
56 17.9594 17.9594 2.5656 1
57 10.2625 10.2625 10.2625 1
58 10.2625 15.3938 15.3938 1
59 15.3938 15.3938 10.2625 1
60 15.3938 10.2625 15.3938 1
61 17.9594 12.8282 17.9594 1
62 12.8282 12.8282 12.8282 1
63 12.8282 17.9594 17.9594 1
64 17.9594 17.9594 12.8282 1
Using a MP mesh for k-points: 2 x 2 x 2
This job was run on 2023/04/20 at 11:38 +0100
Code was compiled on 2023/01/20 at 11:25 +0000
Version comment: Git Branch: master; tag, hash: v1.1
Job title:
Job to be run: static calculation
Ground state search:
Support functions represented with PAO basis
1:1 PAO to SF mapping
Non-spin-polarised electrons
Solving for the K matrix using diagonalisation
Integration grid spacing: 0.143 a0 x 0.143 a0 x 0.143 a0
Number of species: 1
--------------------------------------------------------
| # mass (au) Charge (e) SF Rad (a0) NSF Label |
--------------------------------------------------------
| 1 28.086 4.000 7.269 13 Si |
--------------------------------------------------------
The calculation will be performed on 8 processes
The functional used will be GGA PBE96
PulayMixSC: Reached SCF tolerance of 0.42456E-06 after 5 iterations
| Number of electrons = 256.000756
|* Harris-Foulkes energy = -270.518271210513319 Ha
force: Forces on atoms (Ha/a0)
force: Atom X Y Z
force: 1 0.0000000000 0.0000000000 -0.0000000000
force: 2 -0.0000000000 -0.0000000000 -0.0000000000
force: 3 -0.0000000000 -0.0000000000 0.0000000000
force: 4 -0.0000000000 0.0000000000 -0.0000000000
force: 5 -0.0000000000 -0.0000000000 -0.0000000000
force: 6 -0.0000000000 -0.0000000000 0.0000000000
force: 7 -0.0000000000 -0.0000000000 -0.0000000000
force: 8 -0.0000000000 -0.0000000000 -0.0000000000
force: 9 0.0000000000 0.0000000000 -0.0000000000
force: 10 -0.0000000000 -0.0000000000 0.0000000000
force: 11 -0.0000000000 -0.0000000000 0.0000000000
force: 12 -0.0000000000 0.0000000000 0.0000000000
force: 13 -0.0000000000 -0.0000000000 0.0000000000
force: 14 -0.0000000000 -0.0000000000 0.0000000000
force: 15 -0.0000000000 -0.0000000000 0.0000000000
force: 16 -0.0000000000 -0.0000000000 0.0000000000
force: 17 0.0000000000 0.0000000000 -0.0000000000
force: 18 -0.0000000000 0.0000000000 -0.0000000000
force: 19 -0.0000000000 0.0000000000 0.0000000000
force: 20 -0.0000000000 0.0000000000 -0.0000000000
force: 21 -0.0000000000 0.0000000000 -0.0000000000
force: 22 -0.0000000000 0.0000000000 0.0000000000
force: 23 -0.0000000000 0.0000000000 -0.0000000000
force: 24 -0.0000000000 0.0000000000 -0.0000000000
force: 25 0.0000000000 0.0000000000 -0.0000000000
force: 26 -0.0000000000 0.0000000000 0.0000000000
force: 27 -0.0000000000 0.0000000000 0.0000000000
force: 28 -0.0000000000 0.0000000000 0.0000000000
force: 29 -0.0000000000 0.0000000000 0.0000000000
force: 30 -0.0000000000 0.0000000000 0.0000000000
force: 31 -0.0000000000 0.0000000000 0.0000000000
force: 32 -0.0000000000 0.0000000000 0.0000000000
force: 33 0.0000000000 0.0000000000 -0.0000000000
force: 34 -0.0000000000 -0.0000000000 -0.0000000000
force: 35 0.0000000000 -0.0000000000 0.0000000000
force: 36 0.0000000000 0.0000000000 -0.0000000000
force: 37 0.0000000000 -0.0000000000 -0.0000000000
force: 38 0.0000000000 -0.0000000000 0.0000000000
force: 39 0.0000000000 -0.0000000000 -0.0000000000
force: 40 0.0000000000 -0.0000000000 -0.0000000000
force: 41 0.0000000000 -0.0000000000 -0.0000000000
force: 42 0.0000000000 -0.0000000000 0.0000000000
force: 43 0.0000000000 -0.0000000000 0.0000000000
force: 44 0.0000000000 0.0000000000 0.0000000000
force: 45 0.0000000000 -0.0000000000 0.0000000000
force: 46 0.0000000000 -0.0000000000 0.0000000000
force: 47 0.0000000000 -0.0000000000 0.0000000000
force: 48 0.0000000000 -0.0000000000 0.0000000000
force: 49 0.0000000000 0.0000000000 -0.0000000000
force: 50 -0.0000000000 0.0000000000 -0.0000000000
force: 51 0.0000000000 0.0000000000 0.0000000000
force: 52 0.0000000000 0.0000000000 -0.0000000000
force: 53 0.0000000000 0.0000000000 -0.0000000000
force: 54 0.0000000000 0.0000000000 0.0000000000
force: 55 0.0000000000 0.0000000000 -0.0000000000
force: 56 0.0000000000 0.0000000000 -0.0000000000
force: 57 0.0000000000 0.0000000000 -0.0000000000
force: 58 -0.0000000000 0.0000000000 0.0000000000
force: 59 0.0000000000 0.0000000000 0.0000000000
force: 60 0.0000000000 0.0000000000 0.0000000000
force: 61 0.0000000000 0.0000000000 0.0000000000
force: 62 0.0000000000 0.0000000000 0.0000000000
force: 63 0.0000000000 -0.0000000000 0.0000000000
force: 64 0.0000000000 0.0000000000 0.0000000000
force: Maximum force : 0.00000000(Ha/a0) on atom 59 in z direction
force: Force Residual: 0.00000000 Ha/a0
force: Total stress: -2.88441726 -2.88441726 -2.88441726 GPa
BIBLIOGRAPHY: Please consider citing the following references in the conquest.bib file
CONQUEST: Bowler2002pt, Miyazaki2004, Nakata2020
Basis: Bowler2019
DM: Bowler:2006xr
Pseudopotentials: Hamann2013, Bowler2019
XC functional: Perdew1996
Max total mem use is 1616.222 MB
Total run time was: 325.778 seconds

View File

@ -0,0 +1,12 @@
AtomMove.TypeOfRun static
IO.Coordinates coords.dat
IO.Iprint 0
IO.WriteOutToFile F
Grid.GridCutoff 200
DM.SolutionMethod ordern
DM.L_range 16.0
minE.MixedLSelfConsistent T
General.NumberOfSpecies 1
%block ChemicalSpeciesLabel
1 28.086 Si
%endblock

View File

@ -0,0 +1,14 @@
# Testing different matrix multiplication kernels
This system can be used for profiling different matrix multiplication kernels.
Those can be chosen with the `MULT_KERN` variable in `system.make`.
The additional coordinate files `si_XYZ.xtl` can be used to test weak scaling and
would work well for increasing the number of nodes: `si_222.xtl` is the same as `coords.dat`
and has 64 atoms. This means it would run well on anywhere from 2MPI/4OpenMP to 8MPI/1OpenMP.
With the rest of the `xtl` files, we double the number of atoms each time, and would need
to double the number of processes.
We now have systems from 64 atoms (222) to 262144 atoms (323232) which will scale from 8 MPI
to 32,768 MPI processes (1 OpenMP thread) with 8 atoms per process or 1 MPI process to 4096 MPI
processes with 64 atoms per process.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,69 @@
20.525067 0.000000 0.000000
0.000000 20.525067 0.000000
0.000000 0.000000 20.525067
64
0.00000 0.00000 0.00000 1 T T T
0.00000 0.25000 0.25000 1 T T T
0.25000 0.25000 0.00000 1 T T T
0.25000 0.00000 0.25000 1 T T T
0.37500 0.12500 0.37500 1 T T T
0.12500 0.12500 0.12500 1 T T T
0.12500 0.37500 0.37500 1 T T T
0.37500 0.37500 0.12500 1 T T T
0.00000 0.00000 0.50000 1 T T T
0.00000 0.25000 0.75000 1 T T T
0.25000 0.25000 0.50000 1 T T T
0.25000 0.00000 0.75000 1 T T T
0.37500 0.12500 0.87500 1 T T T
0.12500 0.12500 0.62500 1 T T T
0.12500 0.37500 0.87500 1 T T T
0.37500 0.37500 0.62500 1 T T T
0.00000 0.50000 0.00000 1 T T T
0.00000 0.75000 0.25000 1 T T T
0.25000 0.75000 0.00000 1 T T T
0.25000 0.50000 0.25000 1 T T T
0.37500 0.62500 0.37500 1 T T T
0.12500 0.62500 0.12500 1 T T T
0.12500 0.87500 0.37500 1 T T T
0.37500 0.87500 0.12500 1 T T T
0.00000 0.50000 0.50000 1 T T T
0.00000 0.75000 0.75000 1 T T T
0.25000 0.75000 0.50000 1 T T T
0.25000 0.50000 0.75000 1 T T T
0.37500 0.62500 0.87500 1 T T T
0.12500 0.62500 0.62500 1 T T T
0.12500 0.87500 0.87500 1 T T T
0.37500 0.87500 0.62500 1 T T T
0.50000 0.00000 0.00000 1 T T T
0.50000 0.25000 0.25000 1 T T T
0.75000 0.25000 0.00000 1 T T T
0.75000 0.00000 0.25000 1 T T T
0.87500 0.12500 0.37500 1 T T T
0.62500 0.12500 0.12500 1 T T T
0.62500 0.37500 0.37500 1 T T T
0.87500 0.37500 0.12500 1 T T T
0.50000 0.00000 0.50000 1 T T T
0.50000 0.25000 0.75000 1 T T T
0.75000 0.25000 0.50000 1 T T T
0.75000 0.00000 0.75000 1 T T T
0.87500 0.12500 0.87500 1 T T T
0.62500 0.12500 0.62500 1 T T T
0.62500 0.37500 0.87500 1 T T T
0.87500 0.37500 0.62500 1 T T T
0.50000 0.50000 0.00000 1 T T T
0.50000 0.75000 0.25000 1 T T T
0.75000 0.75000 0.00000 1 T T T
0.75000 0.50000 0.25000 1 T T T
0.87500 0.62500 0.37500 1 T T T
0.62500 0.62500 0.12500 1 T T T
0.62500 0.87500 0.37500 1 T T T
0.87500 0.87500 0.12500 1 T T T
0.50000 0.50000 0.50000 1 T T T
0.50000 0.75000 0.75000 1 T T T
0.75000 0.75000 0.50000 1 T T T
0.75000 0.50000 0.75000 1 T T T
0.87500 0.62500 0.87500 1 T T T
0.62500 0.62500 0.62500 1 T T T
0.62500 0.87500 0.87500 1 T T T
0.87500 0.87500 0.62500 1 T T T

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,69 @@
20.525067 0.000000 0.000000
0.000000 20.525067 0.000000
0.000000 0.000000 20.525067
64
0.00000 0.00000 0.00000 1 T T T
0.00000 0.25000 0.25000 1 T T T
0.25000 0.25000 0.00000 1 T T T
0.25000 0.00000 0.25000 1 T T T
0.37500 0.12500 0.37500 1 T T T
0.12500 0.12500 0.12500 1 T T T
0.12500 0.37500 0.37500 1 T T T
0.37500 0.37500 0.12500 1 T T T
0.00000 0.00000 0.50000 1 T T T
0.00000 0.25000 0.75000 1 T T T
0.25000 0.25000 0.50000 1 T T T
0.25000 0.00000 0.75000 1 T T T
0.37500 0.12500 0.87500 1 T T T
0.12500 0.12500 0.62500 1 T T T
0.12500 0.37500 0.87500 1 T T T
0.37500 0.37500 0.62500 1 T T T
0.00000 0.50000 0.00000 1 T T T
0.00000 0.75000 0.25000 1 T T T
0.25000 0.75000 0.00000 1 T T T
0.25000 0.50000 0.25000 1 T T T
0.37500 0.62500 0.37500 1 T T T
0.12500 0.62500 0.12500 1 T T T
0.12500 0.87500 0.37500 1 T T T
0.37500 0.87500 0.12500 1 T T T
0.00000 0.50000 0.50000 1 T T T
0.00000 0.75000 0.75000 1 T T T
0.25000 0.75000 0.50000 1 T T T
0.25000 0.50000 0.75000 1 T T T
0.37500 0.62500 0.87500 1 T T T
0.12500 0.62500 0.62500 1 T T T
0.12500 0.87500 0.87500 1 T T T
0.37500 0.87500 0.62500 1 T T T
0.50000 0.00000 0.00000 1 T T T
0.50000 0.25000 0.25000 1 T T T
0.75000 0.25000 0.00000 1 T T T
0.75000 0.00000 0.25000 1 T T T
0.87500 0.12500 0.37500 1 T T T
0.62500 0.12500 0.12500 1 T T T
0.62500 0.37500 0.37500 1 T T T
0.87500 0.37500 0.12500 1 T T T
0.50000 0.00000 0.50000 1 T T T
0.50000 0.25000 0.75000 1 T T T
0.75000 0.25000 0.50000 1 T T T
0.75000 0.00000 0.75000 1 T T T
0.87500 0.12500 0.87500 1 T T T
0.62500 0.12500 0.62500 1 T T T
0.62500 0.37500 0.87500 1 T T T
0.87500 0.37500 0.62500 1 T T T
0.50000 0.50000 0.00000 1 T T T
0.50000 0.75000 0.25000 1 T T T
0.75000 0.75000 0.00000 1 T T T
0.75000 0.50000 0.25000 1 T T T
0.87500 0.62500 0.37500 1 T T T
0.62500 0.62500 0.12500 1 T T T
0.62500 0.87500 0.37500 1 T T T
0.87500 0.87500 0.12500 1 T T T
0.50000 0.50000 0.50000 1 T T T
0.50000 0.75000 0.75000 1 T T T
0.75000 0.75000 0.50000 1 T T T
0.75000 0.50000 0.75000 1 T T T
0.87500 0.62500 0.87500 1 T T T
0.62500 0.62500 0.62500 1 T T T
0.62500 0.87500 0.87500 1 T T T
0.87500 0.87500 0.62500 1 T T T

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,132 @@
41.050140 0.000000 0.000000
0.000000 20.525067 0.000000
0.000000 0.000000 20.525067
128
0.00000 0.00000 0.00000 1 T T T
0.00000 0.25000 0.25000 1 T T T
0.12500 0.25000 0.00000 1 T T T
0.12500 0.00000 0.25000 1 T T T
0.18750 0.12500 0.37500 1 T T T
0.06250 0.12500 0.12500 1 T T T
0.06250 0.37500 0.37500 1 T T T
0.18750 0.37500 0.12500 1 T T T
0.00000 0.00000 0.50000 1 T T T
0.00000 0.25000 0.75000 1 T T T
0.12500 0.25000 0.50000 1 T T T
0.12500 0.00000 0.75000 1 T T T
0.18750 0.12500 0.87500 1 T T T
0.06250 0.12500 0.62500 1 T T T
0.06250 0.37500 0.87500 1 T T T
0.18750 0.37500 0.62500 1 T T T
0.00000 0.50000 0.00000 1 T T T
0.00000 0.75000 0.25000 1 T T T
0.12500 0.75000 0.00000 1 T T T
0.12500 0.50000 0.25000 1 T T T
0.18750 0.62500 0.37500 1 T T T
0.06250 0.62500 0.12500 1 T T T
0.06250 0.87500 0.37500 1 T T T
0.18750 0.87500 0.12500 1 T T T
0.00000 0.50000 0.50000 1 T T T
0.00000 0.75000 0.75000 1 T T T
0.12500 0.75000 0.50000 1 T T T
0.12500 0.50000 0.75000 1 T T T
0.18750 0.62500 0.87500 1 T T T
0.06250 0.62500 0.62500 1 T T T
0.06250 0.87500 0.87500 1 T T T
0.18750 0.87500 0.62500 1 T T T
0.25000 0.00000 0.00000 1 T T T
0.25000 0.25000 0.25000 1 T T T
0.37500 0.25000 0.00000 1 T T T
0.37500 0.00000 0.25000 1 T T T
0.43750 0.12500 0.37500 1 T T T
0.31250 0.12500 0.12500 1 T T T
0.31250 0.37500 0.37500 1 T T T
0.43750 0.37500 0.12500 1 T T T
0.25000 0.00000 0.50000 1 T T T
0.25000 0.25000 0.75000 1 T T T
0.37500 0.25000 0.50000 1 T T T
0.37500 0.00000 0.75000 1 T T T
0.43750 0.12500 0.87500 1 T T T
0.31250 0.12500 0.62500 1 T T T
0.31250 0.37500 0.87500 1 T T T
0.43750 0.37500 0.62500 1 T T T
0.25000 0.50000 0.00000 1 T T T
0.25000 0.75000 0.25000 1 T T T
0.37500 0.75000 0.00000 1 T T T
0.37500 0.50000 0.25000 1 T T T
0.43750 0.62500 0.37500 1 T T T
0.31250 0.62500 0.12500 1 T T T
0.31250 0.87500 0.37500 1 T T T
0.43750 0.87500 0.12500 1 T T T
0.25000 0.50000 0.50000 1 T T T
0.25000 0.75000 0.75000 1 T T T
0.37500 0.75000 0.50000 1 T T T
0.37500 0.50000 0.75000 1 T T T
0.43750 0.62500 0.87500 1 T T T
0.31250 0.62500 0.62500 1 T T T
0.31250 0.87500 0.87500 1 T T T
0.43750 0.87500 0.62500 1 T T T
0.50000 0.00000 0.00000 1 T T T
0.50000 0.25000 0.25000 1 T T T
0.62500 0.25000 0.00000 1 T T T
0.62500 0.00000 0.25000 1 T T T
0.68750 0.12500 0.37500 1 T T T
0.56250 0.12500 0.12500 1 T T T
0.56250 0.37500 0.37500 1 T T T
0.68750 0.37500 0.12500 1 T T T
0.50000 0.00000 0.50000 1 T T T
0.50000 0.25000 0.75000 1 T T T
0.62500 0.25000 0.50000 1 T T T
0.62500 0.00000 0.75000 1 T T T
0.68750 0.12500 0.87500 1 T T T
0.56250 0.12500 0.62500 1 T T T
0.56250 0.37500 0.87500 1 T T T
0.68750 0.37500 0.62500 1 T T T
0.50000 0.50000 0.00000 1 T T T
0.50000 0.75000 0.25000 1 T T T
0.62500 0.75000 0.00000 1 T T T
0.62500 0.50000 0.25000 1 T T T
0.68750 0.62500 0.37500 1 T T T
0.56250 0.62500 0.12500 1 T T T
0.56250 0.87500 0.37500 1 T T T
0.68750 0.87500 0.12500 1 T T T
0.50000 0.50000 0.50000 1 T T T
0.50000 0.75000 0.75000 1 T T T
0.62500 0.75000 0.50000 1 T T T
0.62500 0.50000 0.75000 1 T T T
0.68750 0.62500 0.87500 1 T T T
0.56250 0.62500 0.62500 1 T T T
0.56250 0.87500 0.87500 1 T T T
0.68750 0.87500 0.62500 1 T T T
0.75000 0.00000 0.00000 1 T T T
0.75000 0.25000 0.25000 1 T T T
0.87500 0.25000 0.00000 1 T T T
0.87500 0.00000 0.25000 1 T T T
0.93750 0.12500 0.37500 1 T T T
0.81250 0.12500 0.12500 1 T T T
0.81250 0.37500 0.37500 1 T T T
0.93750 0.37500 0.12500 1 T T T
0.75000 0.00000 0.50000 1 T T T
0.75000 0.25000 0.75000 1 T T T
0.87500 0.25000 0.50000 1 T T T
0.87500 0.00000 0.75000 1 T T T
0.93750 0.12500 0.87500 1 T T T
0.81250 0.12500 0.62500 1 T T T
0.81250 0.37500 0.87500 1 T T T
0.93750 0.37500 0.62500 1 T T T
0.75000 0.50000 0.00000 1 T T T
0.75000 0.75000 0.25000 1 T T T
0.87500 0.75000 0.00000 1 T T T
0.87500 0.50000 0.25000 1 T T T
0.93750 0.62500 0.37500 1 T T T
0.81250 0.62500 0.12500 1 T T T
0.81250 0.87500 0.37500 1 T T T
0.93750 0.87500 0.12500 1 T T T
0.75000 0.50000 0.50000 1 T T T
0.75000 0.75000 0.75000 1 T T T
0.87500 0.75000 0.50000 1 T T T
0.87500 0.50000 0.75000 1 T T T
0.93750 0.62500 0.87500 1 T T T
0.81250 0.62500 0.62500 1 T T T
0.81250 0.87500 0.87500 1 T T T
0.93750 0.87500 0.62500 1 T T T

View File

@ -0,0 +1,260 @@
41.050140 0.000000 0.000000
0.000000 41.050140 0.000000
0.000000 0.000000 20.525067
256
0.00000 0.00000 0.00000 1 T T T
0.00000 0.12500 0.25000 1 T T T
0.12500 0.12500 0.00000 1 T T T
0.12500 0.00000 0.25000 1 T T T
0.18750 0.06250 0.37500 1 T T T
0.06250 0.06250 0.12500 1 T T T
0.06250 0.18750 0.37500 1 T T T
0.18750 0.18750 0.12500 1 T T T
0.00000 0.00000 0.50000 1 T T T
0.00000 0.12500 0.75000 1 T T T
0.12500 0.12500 0.50000 1 T T T
0.12500 0.00000 0.75000 1 T T T
0.18750 0.06250 0.87500 1 T T T
0.06250 0.06250 0.62500 1 T T T
0.06250 0.18750 0.87500 1 T T T
0.18750 0.18750 0.62500 1 T T T
0.00000 0.25000 0.00000 1 T T T
0.00000 0.37500 0.25000 1 T T T
0.12500 0.37500 0.00000 1 T T T
0.12500 0.25000 0.25000 1 T T T
0.18750 0.31250 0.37500 1 T T T
0.06250 0.31250 0.12500 1 T T T
0.06250 0.43750 0.37500 1 T T T
0.18750 0.43750 0.12500 1 T T T
0.00000 0.25000 0.50000 1 T T T
0.00000 0.37500 0.75000 1 T T T
0.12500 0.37500 0.50000 1 T T T
0.12500 0.25000 0.75000 1 T T T
0.18750 0.31250 0.87500 1 T T T
0.06250 0.31250 0.62500 1 T T T
0.06250 0.43750 0.87500 1 T T T
0.18750 0.43750 0.62500 1 T T T
0.00000 0.50000 0.00000 1 T T T
0.00000 0.62500 0.25000 1 T T T
0.12500 0.62500 0.00000 1 T T T
0.12500 0.50000 0.25000 1 T T T
0.18750 0.56250 0.37500 1 T T T
0.06250 0.56250 0.12500 1 T T T
0.06250 0.68750 0.37500 1 T T T
0.18750 0.68750 0.12500 1 T T T
0.00000 0.50000 0.50000 1 T T T
0.00000 0.62500 0.75000 1 T T T
0.12500 0.62500 0.50000 1 T T T
0.12500 0.50000 0.75000 1 T T T
0.18750 0.56250 0.87500 1 T T T
0.06250 0.56250 0.62500 1 T T T
0.06250 0.68750 0.87500 1 T T T
0.18750 0.68750 0.62500 1 T T T
0.00000 0.75000 0.00000 1 T T T
0.00000 0.87500 0.25000 1 T T T
0.12500 0.87500 0.00000 1 T T T
0.12500 0.75000 0.25000 1 T T T
0.18750 0.81250 0.37500 1 T T T
0.06250 0.81250 0.12500 1 T T T
0.06250 0.93750 0.37500 1 T T T
0.18750 0.93750 0.12500 1 T T T
0.00000 0.75000 0.50000 1 T T T
0.00000 0.87500 0.75000 1 T T T
0.12500 0.87500 0.50000 1 T T T
0.12500 0.75000 0.75000 1 T T T
0.18750 0.81250 0.87500 1 T T T
0.06250 0.81250 0.62500 1 T T T
0.06250 0.93750 0.87500 1 T T T
0.18750 0.93750 0.62500 1 T T T
0.25000 0.00000 0.00000 1 T T T
0.25000 0.12500 0.25000 1 T T T
0.37500 0.12500 0.00000 1 T T T
0.37500 0.00000 0.25000 1 T T T
0.43750 0.06250 0.37500 1 T T T
0.31250 0.06250 0.12500 1 T T T
0.31250 0.18750 0.37500 1 T T T
0.43750 0.18750 0.12500 1 T T T
0.25000 0.00000 0.50000 1 T T T
0.25000 0.12500 0.75000 1 T T T
0.37500 0.12500 0.50000 1 T T T
0.37500 0.00000 0.75000 1 T T T
0.43750 0.06250 0.87500 1 T T T
0.31250 0.06250 0.62500 1 T T T
0.31250 0.18750 0.87500 1 T T T
0.43750 0.18750 0.62500 1 T T T
0.25000 0.25000 0.00000 1 T T T
0.25000 0.37500 0.25000 1 T T T
0.37500 0.37500 0.00000 1 T T T
0.37500 0.25000 0.25000 1 T T T
0.43750 0.31250 0.37500 1 T T T
0.31250 0.31250 0.12500 1 T T T
0.31250 0.43750 0.37500 1 T T T
0.43750 0.43750 0.12500 1 T T T
0.25000 0.25000 0.50000 1 T T T
0.25000 0.37500 0.75000 1 T T T
0.37500 0.37500 0.50000 1 T T T
0.37500 0.25000 0.75000 1 T T T
0.43750 0.31250 0.87500 1 T T T
0.31250 0.31250 0.62500 1 T T T
0.31250 0.43750 0.87500 1 T T T
0.43750 0.43750 0.62500 1 T T T
0.25000 0.50000 0.00000 1 T T T
0.25000 0.62500 0.25000 1 T T T
0.37500 0.62500 0.00000 1 T T T
0.37500 0.50000 0.25000 1 T T T
0.43750 0.56250 0.37500 1 T T T
0.31250 0.56250 0.12500 1 T T T
0.31250 0.68750 0.37500 1 T T T
0.43750 0.68750 0.12500 1 T T T
0.25000 0.50000 0.50000 1 T T T
0.25000 0.62500 0.75000 1 T T T
0.37500 0.62500 0.50000 1 T T T
0.37500 0.50000 0.75000 1 T T T
0.43750 0.56250 0.87500 1 T T T
0.31250 0.56250 0.62500 1 T T T
0.31250 0.68750 0.87500 1 T T T
0.43750 0.68750 0.62500 1 T T T
0.25000 0.75000 0.00000 1 T T T
0.25000 0.87500 0.25000 1 T T T
0.37500 0.87500 0.00000 1 T T T
0.37500 0.75000 0.25000 1 T T T
0.43750 0.81250 0.37500 1 T T T
0.31250 0.81250 0.12500 1 T T T
0.31250 0.93750 0.37500 1 T T T
0.43750 0.93750 0.12500 1 T T T
0.25000 0.75000 0.50000 1 T T T
0.25000 0.87500 0.75000 1 T T T
0.37500 0.87500 0.50000 1 T T T
0.37500 0.75000 0.75000 1 T T T
0.43750 0.81250 0.87500 1 T T T
0.31250 0.81250 0.62500 1 T T T
0.31250 0.93750 0.87500 1 T T T
0.43750 0.93750 0.62500 1 T T T
0.50000 0.00000 0.00000 1 T T T
0.50000 0.12500 0.25000 1 T T T
0.62500 0.12500 0.00000 1 T T T
0.62500 0.00000 0.25000 1 T T T
0.68750 0.06250 0.37500 1 T T T
0.56250 0.06250 0.12500 1 T T T
0.56250 0.18750 0.37500 1 T T T
0.68750 0.18750 0.12500 1 T T T
0.50000 0.00000 0.50000 1 T T T
0.50000 0.12500 0.75000 1 T T T
0.62500 0.12500 0.50000 1 T T T
0.62500 0.00000 0.75000 1 T T T
0.68750 0.06250 0.87500 1 T T T
0.56250 0.06250 0.62500 1 T T T
0.56250 0.18750 0.87500 1 T T T
0.68750 0.18750 0.62500 1 T T T
0.50000 0.25000 0.00000 1 T T T
0.50000 0.37500 0.25000 1 T T T
0.62500 0.37500 0.00000 1 T T T
0.62500 0.25000 0.25000 1 T T T
0.68750 0.31250 0.37500 1 T T T
0.56250 0.31250 0.12500 1 T T T
0.56250 0.43750 0.37500 1 T T T
0.68750 0.43750 0.12500 1 T T T
0.50000 0.25000 0.50000 1 T T T
0.50000 0.37500 0.75000 1 T T T
0.62500 0.37500 0.50000 1 T T T
0.62500 0.25000 0.75000 1 T T T
0.68750 0.31250 0.87500 1 T T T
0.56250 0.31250 0.62500 1 T T T
0.56250 0.43750 0.87500 1 T T T
0.68750 0.43750 0.62500 1 T T T
0.50000 0.50000 0.00000 1 T T T
0.50000 0.62500 0.25000 1 T T T
0.62500 0.62500 0.00000 1 T T T
0.62500 0.50000 0.25000 1 T T T
0.68750 0.56250 0.37500 1 T T T
0.56250 0.56250 0.12500 1 T T T
0.56250 0.68750 0.37500 1 T T T
0.68750 0.68750 0.12500 1 T T T
0.50000 0.50000 0.50000 1 T T T
0.50000 0.62500 0.75000 1 T T T
0.62500 0.62500 0.50000 1 T T T
0.62500 0.50000 0.75000 1 T T T
0.68750 0.56250 0.87500 1 T T T
0.56250 0.56250 0.62500 1 T T T
0.56250 0.68750 0.87500 1 T T T
0.68750 0.68750 0.62500 1 T T T
0.50000 0.75000 0.00000 1 T T T
0.50000 0.87500 0.25000 1 T T T
0.62500 0.87500 0.00000 1 T T T
0.62500 0.75000 0.25000 1 T T T
0.68750 0.81250 0.37500 1 T T T
0.56250 0.81250 0.12500 1 T T T
0.56250 0.93750 0.37500 1 T T T
0.68750 0.93750 0.12500 1 T T T
0.50000 0.75000 0.50000 1 T T T
0.50000 0.87500 0.75000 1 T T T
0.62500 0.87500 0.50000 1 T T T
0.62500 0.75000 0.75000 1 T T T
0.68750 0.81250 0.87500 1 T T T
0.56250 0.81250 0.62500 1 T T T
0.56250 0.93750 0.87500 1 T T T
0.68750 0.93750 0.62500 1 T T T
0.75000 0.00000 0.00000 1 T T T
0.75000 0.12500 0.25000 1 T T T
0.87500 0.12500 0.00000 1 T T T
0.87500 0.00000 0.25000 1 T T T
0.93750 0.06250 0.37500 1 T T T
0.81250 0.06250 0.12500 1 T T T
0.81250 0.18750 0.37500 1 T T T
0.93750 0.18750 0.12500 1 T T T
0.75000 0.00000 0.50000 1 T T T
0.75000 0.12500 0.75000 1 T T T
0.87500 0.12500 0.50000 1 T T T
0.87500 0.00000 0.75000 1 T T T
0.93750 0.06250 0.87500 1 T T T
0.81250 0.06250 0.62500 1 T T T
0.81250 0.18750 0.87500 1 T T T
0.93750 0.18750 0.62500 1 T T T
0.75000 0.25000 0.00000 1 T T T
0.75000 0.37500 0.25000 1 T T T
0.87500 0.37500 0.00000 1 T T T
0.87500 0.25000 0.25000 1 T T T
0.93750 0.31250 0.37500 1 T T T
0.81250 0.31250 0.12500 1 T T T
0.81250 0.43750 0.37500 1 T T T
0.93750 0.43750 0.12500 1 T T T
0.75000 0.25000 0.50000 1 T T T
0.75000 0.37500 0.75000 1 T T T
0.87500 0.37500 0.50000 1 T T T
0.87500 0.25000 0.75000 1 T T T
0.93750 0.31250 0.87500 1 T T T
0.81250 0.31250 0.62500 1 T T T
0.81250 0.43750 0.87500 1 T T T
0.93750 0.43750 0.62500 1 T T T
0.75000 0.50000 0.00000 1 T T T
0.75000 0.62500 0.25000 1 T T T
0.87500 0.62500 0.00000 1 T T T
0.87500 0.50000 0.25000 1 T T T
0.93750 0.56250 0.37500 1 T T T
0.81250 0.56250 0.12500 1 T T T
0.81250 0.68750 0.37500 1 T T T
0.93750 0.68750 0.12500 1 T T T
0.75000 0.50000 0.50000 1 T T T
0.75000 0.62500 0.75000 1 T T T
0.87500 0.62500 0.50000 1 T T T
0.87500 0.50000 0.75000 1 T T T
0.93750 0.56250 0.87500 1 T T T
0.81250 0.56250 0.62500 1 T T T
0.81250 0.68750 0.87500 1 T T T
0.93750 0.68750 0.62500 1 T T T
0.75000 0.75000 0.00000 1 T T T
0.75000 0.87500 0.25000 1 T T T
0.87500 0.87500 0.00000 1 T T T
0.87500 0.75000 0.25000 1 T T T
0.93750 0.81250 0.37500 1 T T T
0.81250 0.81250 0.12500 1 T T T
0.81250 0.93750 0.37500 1 T T T
0.93750 0.93750 0.12500 1 T T T
0.75000 0.75000 0.50000 1 T T T
0.75000 0.87500 0.75000 1 T T T
0.87500 0.87500 0.50000 1 T T T
0.87500 0.75000 0.75000 1 T T T
0.93750 0.81250 0.87500 1 T T T
0.81250 0.81250 0.62500 1 T T T
0.81250 0.93750 0.87500 1 T T T
0.93750 0.93750 0.62500 1 T T T

View File

@ -0,0 +1,516 @@
41.050140 0.000000 0.000000
0.000000 41.050140 0.000000
0.000000 0.000000 41.050140
512
0.00000 0.00000 0.00000 1 T T T
0.00000 0.12500 0.12500 1 T T T
0.12500 0.12500 0.00000 1 T T T
0.12500 0.00000 0.12500 1 T T T
0.18750 0.06250 0.18750 1 T T T
0.06250 0.06250 0.06250 1 T T T
0.06250 0.18750 0.18750 1 T T T
0.18750 0.18750 0.06250 1 T T T
0.00000 0.00000 0.25000 1 T T T
0.00000 0.12500 0.37500 1 T T T
0.12500 0.12500 0.25000 1 T T T
0.12500 0.00000 0.37500 1 T T T
0.18750 0.06250 0.43750 1 T T T
0.06250 0.06250 0.31250 1 T T T
0.06250 0.18750 0.43750 1 T T T
0.18750 0.18750 0.31250 1 T T T
0.00000 0.00000 0.50000 1 T T T
0.00000 0.12500 0.62500 1 T T T
0.12500 0.12500 0.50000 1 T T T
0.12500 0.00000 0.62500 1 T T T
0.18750 0.06250 0.68750 1 T T T
0.06250 0.06250 0.56250 1 T T T
0.06250 0.18750 0.68750 1 T T T
0.18750 0.18750 0.56250 1 T T T
0.00000 0.00000 0.75000 1 T T T
0.00000 0.12500 0.87500 1 T T T
0.12500 0.12500 0.75000 1 T T T
0.12500 0.00000 0.87500 1 T T T
0.18750 0.06250 0.93750 1 T T T
0.06250 0.06250 0.81250 1 T T T
0.06250 0.18750 0.93750 1 T T T
0.18750 0.18750 0.81250 1 T T T
0.00000 0.25000 0.00000 1 T T T
0.00000 0.37500 0.12500 1 T T T
0.12500 0.37500 0.00000 1 T T T
0.12500 0.25000 0.12500 1 T T T
0.18750 0.31250 0.18750 1 T T T
0.06250 0.31250 0.06250 1 T T T
0.06250 0.43750 0.18750 1 T T T
0.18750 0.43750 0.06250 1 T T T
0.00000 0.25000 0.25000 1 T T T
0.00000 0.37500 0.37500 1 T T T
0.12500 0.37500 0.25000 1 T T T
0.12500 0.25000 0.37500 1 T T T
0.18750 0.31250 0.43750 1 T T T
0.06250 0.31250 0.31250 1 T T T
0.06250 0.43750 0.43750 1 T T T
0.18750 0.43750 0.31250 1 T T T
0.00000 0.25000 0.50000 1 T T T
0.00000 0.37500 0.62500 1 T T T
0.12500 0.37500 0.50000 1 T T T
0.12500 0.25000 0.62500 1 T T T
0.18750 0.31250 0.68750 1 T T T
0.06250 0.31250 0.56250 1 T T T
0.06250 0.43750 0.68750 1 T T T
0.18750 0.43750 0.56250 1 T T T
0.00000 0.25000 0.75000 1 T T T
0.00000 0.37500 0.87500 1 T T T
0.12500 0.37500 0.75000 1 T T T
0.12500 0.25000 0.87500 1 T T T
0.18750 0.31250 0.93750 1 T T T
0.06250 0.31250 0.81250 1 T T T
0.06250 0.43750 0.93750 1 T T T
0.18750 0.43750 0.81250 1 T T T
0.00000 0.50000 0.00000 1 T T T
0.00000 0.62500 0.12500 1 T T T
0.12500 0.62500 0.00000 1 T T T
0.12500 0.50000 0.12500 1 T T T
0.18750 0.56250 0.18750 1 T T T
0.06250 0.56250 0.06250 1 T T T
0.06250 0.68750 0.18750 1 T T T
0.18750 0.68750 0.06250 1 T T T
0.00000 0.50000 0.25000 1 T T T
0.00000 0.62500 0.37500 1 T T T
0.12500 0.62500 0.25000 1 T T T
0.12500 0.50000 0.37500 1 T T T
0.18750 0.56250 0.43750 1 T T T
0.06250 0.56250 0.31250 1 T T T
0.06250 0.68750 0.43750 1 T T T
0.18750 0.68750 0.31250 1 T T T
0.00000 0.50000 0.50000 1 T T T
0.00000 0.62500 0.62500 1 T T T
0.12500 0.62500 0.50000 1 T T T
0.12500 0.50000 0.62500 1 T T T
0.18750 0.56250 0.68750 1 T T T
0.06250 0.56250 0.56250 1 T T T
0.06250 0.68750 0.68750 1 T T T
0.18750 0.68750 0.56250 1 T T T
0.00000 0.50000 0.75000 1 T T T
0.00000 0.62500 0.87500 1 T T T
0.12500 0.62500 0.75000 1 T T T
0.12500 0.50000 0.87500 1 T T T
0.18750 0.56250 0.93750 1 T T T
0.06250 0.56250 0.81250 1 T T T
0.06250 0.68750 0.93750 1 T T T
0.18750 0.68750 0.81250 1 T T T
0.00000 0.75000 0.00000 1 T T T
0.00000 0.87500 0.12500 1 T T T
0.12500 0.87500 0.00000 1 T T T
0.12500 0.75000 0.12500 1 T T T
0.18750 0.81250 0.18750 1 T T T
0.06250 0.81250 0.06250 1 T T T
0.06250 0.93750 0.18750 1 T T T
0.18750 0.93750 0.06250 1 T T T
0.00000 0.75000 0.25000 1 T T T
0.00000 0.87500 0.37500 1 T T T
0.12500 0.87500 0.25000 1 T T T
0.12500 0.75000 0.37500 1 T T T
0.18750 0.81250 0.43750 1 T T T
0.06250 0.81250 0.31250 1 T T T
0.06250 0.93750 0.43750 1 T T T
0.18750 0.93750 0.31250 1 T T T
0.00000 0.75000 0.50000 1 T T T
0.00000 0.87500 0.62500 1 T T T
0.12500 0.87500 0.50000 1 T T T
0.12500 0.75000 0.62500 1 T T T
0.18750 0.81250 0.68750 1 T T T
0.06250 0.81250 0.56250 1 T T T
0.06250 0.93750 0.68750 1 T T T
0.18750 0.93750 0.56250 1 T T T
0.00000 0.75000 0.75000 1 T T T
0.00000 0.87500 0.87500 1 T T T
0.12500 0.87500 0.75000 1 T T T
0.12500 0.75000 0.87500 1 T T T
0.18750 0.81250 0.93750 1 T T T
0.06250 0.81250 0.81250 1 T T T
0.06250 0.93750 0.93750 1 T T T
0.18750 0.93750 0.81250 1 T T T
0.25000 0.00000 0.00000 1 T T T
0.25000 0.12500 0.12500 1 T T T
0.37500 0.12500 0.00000 1 T T T
0.37500 0.00000 0.12500 1 T T T
0.43750 0.06250 0.18750 1 T T T
0.31250 0.06250 0.06250 1 T T T
0.31250 0.18750 0.18750 1 T T T
0.43750 0.18750 0.06250 1 T T T
0.25000 0.00000 0.25000 1 T T T
0.25000 0.12500 0.37500 1 T T T
0.37500 0.12500 0.25000 1 T T T
0.37500 0.00000 0.37500 1 T T T
0.43750 0.06250 0.43750 1 T T T
0.31250 0.06250 0.31250 1 T T T
0.31250 0.18750 0.43750 1 T T T
0.43750 0.18750 0.31250 1 T T T
0.25000 0.00000 0.50000 1 T T T
0.25000 0.12500 0.62500 1 T T T
0.37500 0.12500 0.50000 1 T T T
0.37500 0.00000 0.62500 1 T T T
0.43750 0.06250 0.68750 1 T T T
0.31250 0.06250 0.56250 1 T T T
0.31250 0.18750 0.68750 1 T T T
0.43750 0.18750 0.56250 1 T T T
0.25000 0.00000 0.75000 1 T T T
0.25000 0.12500 0.87500 1 T T T
0.37500 0.12500 0.75000 1 T T T
0.37500 0.00000 0.87500 1 T T T
0.43750 0.06250 0.93750 1 T T T
0.31250 0.06250 0.81250 1 T T T
0.31250 0.18750 0.93750 1 T T T
0.43750 0.18750 0.81250 1 T T T
0.25000 0.25000 0.00000 1 T T T
0.25000 0.37500 0.12500 1 T T T
0.37500 0.37500 0.00000 1 T T T
0.37500 0.25000 0.12500 1 T T T
0.43750 0.31250 0.18750 1 T T T
0.31250 0.31250 0.06250 1 T T T
0.31250 0.43750 0.18750 1 T T T
0.43750 0.43750 0.06250 1 T T T
0.25000 0.25000 0.25000 1 T T T
0.25000 0.37500 0.37500 1 T T T
0.37500 0.37500 0.25000 1 T T T
0.37500 0.25000 0.37500 1 T T T
0.43750 0.31250 0.43750 1 T T T
0.31250 0.31250 0.31250 1 T T T
0.31250 0.43750 0.43750 1 T T T
0.43750 0.43750 0.31250 1 T T T
0.25000 0.25000 0.50000 1 T T T
0.25000 0.37500 0.62500 1 T T T
0.37500 0.37500 0.50000 1 T T T
0.37500 0.25000 0.62500 1 T T T
0.43750 0.31250 0.68750 1 T T T
0.31250 0.31250 0.56250 1 T T T
0.31250 0.43750 0.68750 1 T T T
0.43750 0.43750 0.56250 1 T T T
0.25000 0.25000 0.75000 1 T T T
0.25000 0.37500 0.87500 1 T T T
0.37500 0.37500 0.75000 1 T T T
0.37500 0.25000 0.87500 1 T T T
0.43750 0.31250 0.93750 1 T T T
0.31250 0.31250 0.81250 1 T T T
0.31250 0.43750 0.93750 1 T T T
0.43750 0.43750 0.81250 1 T T T
0.25000 0.50000 0.00000 1 T T T
0.25000 0.62500 0.12500 1 T T T
0.37500 0.62500 0.00000 1 T T T
0.37500 0.50000 0.12500 1 T T T
0.43750 0.56250 0.18750 1 T T T
0.31250 0.56250 0.06250 1 T T T
0.31250 0.68750 0.18750 1 T T T
0.43750 0.68750 0.06250 1 T T T
0.25000 0.50000 0.25000 1 T T T
0.25000 0.62500 0.37500 1 T T T
0.37500 0.62500 0.25000 1 T T T
0.37500 0.50000 0.37500 1 T T T
0.43750 0.56250 0.43750 1 T T T
0.31250 0.56250 0.31250 1 T T T
0.31250 0.68750 0.43750 1 T T T
0.43750 0.68750 0.31250 1 T T T
0.25000 0.50000 0.50000 1 T T T
0.25000 0.62500 0.62500 1 T T T
0.37500 0.62500 0.50000 1 T T T
0.37500 0.50000 0.62500 1 T T T
0.43750 0.56250 0.68750 1 T T T
0.31250 0.56250 0.56250 1 T T T
0.31250 0.68750 0.68750 1 T T T
0.43750 0.68750 0.56250 1 T T T
0.25000 0.50000 0.75000 1 T T T
0.25000 0.62500 0.87500 1 T T T
0.37500 0.62500 0.75000 1 T T T
0.37500 0.50000 0.87500 1 T T T
0.43750 0.56250 0.93750 1 T T T
0.31250 0.56250 0.81250 1 T T T
0.31250 0.68750 0.93750 1 T T T
0.43750 0.68750 0.81250 1 T T T
0.25000 0.75000 0.00000 1 T T T
0.25000 0.87500 0.12500 1 T T T
0.37500 0.87500 0.00000 1 T T T
0.37500 0.75000 0.12500 1 T T T
0.43750 0.81250 0.18750 1 T T T
0.31250 0.81250 0.06250 1 T T T
0.31250 0.93750 0.18750 1 T T T
0.43750 0.93750 0.06250 1 T T T
0.25000 0.75000 0.25000 1 T T T
0.25000 0.87500 0.37500 1 T T T
0.37500 0.87500 0.25000 1 T T T
0.37500 0.75000 0.37500 1 T T T
0.43750 0.81250 0.43750 1 T T T
0.31250 0.81250 0.31250 1 T T T
0.31250 0.93750 0.43750 1 T T T
0.43750 0.93750 0.31250 1 T T T
0.25000 0.75000 0.50000 1 T T T
0.25000 0.87500 0.62500 1 T T T
0.37500 0.87500 0.50000 1 T T T
0.37500 0.75000 0.62500 1 T T T
0.43750 0.81250 0.68750 1 T T T
0.31250 0.81250 0.56250 1 T T T
0.31250 0.93750 0.68750 1 T T T
0.43750 0.93750 0.56250 1 T T T
0.25000 0.75000 0.75000 1 T T T
0.25000 0.87500 0.87500 1 T T T
0.37500 0.87500 0.75000 1 T T T
0.37500 0.75000 0.87500 1 T T T
0.43750 0.81250 0.93750 1 T T T
0.31250 0.81250 0.81250 1 T T T
0.31250 0.93750 0.93750 1 T T T
0.43750 0.93750 0.81250 1 T T T
0.50000 0.00000 0.00000 1 T T T
0.50000 0.12500 0.12500 1 T T T
0.62500 0.12500 0.00000 1 T T T
0.62500 0.00000 0.12500 1 T T T
0.68750 0.06250 0.18750 1 T T T
0.56250 0.06250 0.06250 1 T T T
0.56250 0.18750 0.18750 1 T T T
0.68750 0.18750 0.06250 1 T T T
0.50000 0.00000 0.25000 1 T T T
0.50000 0.12500 0.37500 1 T T T
0.62500 0.12500 0.25000 1 T T T
0.62500 0.00000 0.37500 1 T T T
0.68750 0.06250 0.43750 1 T T T
0.56250 0.06250 0.31250 1 T T T
0.56250 0.18750 0.43750 1 T T T
0.68750 0.18750 0.31250 1 T T T
0.50000 0.00000 0.50000 1 T T T
0.50000 0.12500 0.62500 1 T T T
0.62500 0.12500 0.50000 1 T T T
0.62500 0.00000 0.62500 1 T T T
0.68750 0.06250 0.68750 1 T T T
0.56250 0.06250 0.56250 1 T T T
0.56250 0.18750 0.68750 1 T T T
0.68750 0.18750 0.56250 1 T T T
0.50000 0.00000 0.75000 1 T T T
0.50000 0.12500 0.87500 1 T T T
0.62500 0.12500 0.75000 1 T T T
0.62500 0.00000 0.87500 1 T T T
0.68750 0.06250 0.93750 1 T T T
0.56250 0.06250 0.81250 1 T T T
0.56250 0.18750 0.93750 1 T T T
0.68750 0.18750 0.81250 1 T T T
0.50000 0.25000 0.00000 1 T T T
0.50000 0.37500 0.12500 1 T T T
0.62500 0.37500 0.00000 1 T T T
0.62500 0.25000 0.12500 1 T T T
0.68750 0.31250 0.18750 1 T T T
0.56250 0.31250 0.06250 1 T T T
0.56250 0.43750 0.18750 1 T T T
0.68750 0.43750 0.06250 1 T T T
0.50000 0.25000 0.25000 1 T T T
0.50000 0.37500 0.37500 1 T T T
0.62500 0.37500 0.25000 1 T T T
0.62500 0.25000 0.37500 1 T T T
0.68750 0.31250 0.43750 1 T T T
0.56250 0.31250 0.31250 1 T T T
0.56250 0.43750 0.43750 1 T T T
0.68750 0.43750 0.31250 1 T T T
0.50000 0.25000 0.50000 1 T T T
0.50000 0.37500 0.62500 1 T T T
0.62500 0.37500 0.50000 1 T T T
0.62500 0.25000 0.62500 1 T T T
0.68750 0.31250 0.68750 1 T T T
0.56250 0.31250 0.56250 1 T T T
0.56250 0.43750 0.68750 1 T T T
0.68750 0.43750 0.56250 1 T T T
0.50000 0.25000 0.75000 1 T T T
0.50000 0.37500 0.87500 1 T T T
0.62500 0.37500 0.75000 1 T T T
0.62500 0.25000 0.87500 1 T T T
0.68750 0.31250 0.93750 1 T T T
0.56250 0.31250 0.81250 1 T T T
0.56250 0.43750 0.93750 1 T T T
0.68750 0.43750 0.81250 1 T T T
0.50000 0.50000 0.00000 1 T T T
0.50000 0.62500 0.12500 1 T T T
0.62500 0.62500 0.00000 1 T T T
0.62500 0.50000 0.12500 1 T T T
0.68750 0.56250 0.18750 1 T T T
0.56250 0.56250 0.06250 1 T T T
0.56250 0.68750 0.18750 1 T T T
0.68750 0.68750 0.06250 1 T T T
0.50000 0.50000 0.25000 1 T T T
0.50000 0.62500 0.37500 1 T T T
0.62500 0.62500 0.25000 1 T T T
0.62500 0.50000 0.37500 1 T T T
0.68750 0.56250 0.43750 1 T T T
0.56250 0.56250 0.31250 1 T T T
0.56250 0.68750 0.43750 1 T T T
0.68750 0.68750 0.31250 1 T T T
0.50000 0.50000 0.50000 1 T T T
0.50000 0.62500 0.62500 1 T T T
0.62500 0.62500 0.50000 1 T T T
0.62500 0.50000 0.62500 1 T T T
0.68750 0.56250 0.68750 1 T T T
0.56250 0.56250 0.56250 1 T T T
0.56250 0.68750 0.68750 1 T T T
0.68750 0.68750 0.56250 1 T T T
0.50000 0.50000 0.75000 1 T T T
0.50000 0.62500 0.87500 1 T T T
0.62500 0.62500 0.75000 1 T T T
0.62500 0.50000 0.87500 1 T T T
0.68750 0.56250 0.93750 1 T T T
0.56250 0.56250 0.81250 1 T T T
0.56250 0.68750 0.93750 1 T T T
0.68750 0.68750 0.81250 1 T T T
0.50000 0.75000 0.00000 1 T T T
0.50000 0.87500 0.12500 1 T T T
0.62500 0.87500 0.00000 1 T T T
0.62500 0.75000 0.12500 1 T T T
0.68750 0.81250 0.18750 1 T T T
0.56250 0.81250 0.06250 1 T T T
0.56250 0.93750 0.18750 1 T T T
0.68750 0.93750 0.06250 1 T T T
0.50000 0.75000 0.25000 1 T T T
0.50000 0.87500 0.37500 1 T T T
0.62500 0.87500 0.25000 1 T T T
0.62500 0.75000 0.37500 1 T T T
0.68750 0.81250 0.43750 1 T T T
0.56250 0.81250 0.31250 1 T T T
0.56250 0.93750 0.43750 1 T T T
0.68750 0.93750 0.31250 1 T T T
0.50000 0.75000 0.50000 1 T T T
0.50000 0.87500 0.62500 1 T T T
0.62500 0.87500 0.50000 1 T T T
0.62500 0.75000 0.62500 1 T T T
0.68750 0.81250 0.68750 1 T T T
0.56250 0.81250 0.56250 1 T T T
0.56250 0.93750 0.68750 1 T T T
0.68750 0.93750 0.56250 1 T T T
0.50000 0.75000 0.75000 1 T T T
0.50000 0.87500 0.87500 1 T T T
0.62500 0.87500 0.75000 1 T T T
0.62500 0.75000 0.87500 1 T T T
0.68750 0.81250 0.93750 1 T T T
0.56250 0.81250 0.81250 1 T T T
0.56250 0.93750 0.93750 1 T T T
0.68750 0.93750 0.81250 1 T T T
0.75000 0.00000 0.00000 1 T T T
0.75000 0.12500 0.12500 1 T T T
0.87500 0.12500 0.00000 1 T T T
0.87500 0.00000 0.12500 1 T T T
0.93750 0.06250 0.18750 1 T T T
0.81250 0.06250 0.06250 1 T T T
0.81250 0.18750 0.18750 1 T T T
0.93750 0.18750 0.06250 1 T T T
0.75000 0.00000 0.25000 1 T T T
0.75000 0.12500 0.37500 1 T T T
0.87500 0.12500 0.25000 1 T T T
0.87500 0.00000 0.37500 1 T T T
0.93750 0.06250 0.43750 1 T T T
0.81250 0.06250 0.31250 1 T T T
0.81250 0.18750 0.43750 1 T T T
0.93750 0.18750 0.31250 1 T T T
0.75000 0.00000 0.50000 1 T T T
0.75000 0.12500 0.62500 1 T T T
0.87500 0.12500 0.50000 1 T T T
0.87500 0.00000 0.62500 1 T T T
0.93750 0.06250 0.68750 1 T T T
0.81250 0.06250 0.56250 1 T T T
0.81250 0.18750 0.68750 1 T T T
0.93750 0.18750 0.56250 1 T T T
0.75000 0.00000 0.75000 1 T T T
0.75000 0.12500 0.87500 1 T T T
0.87500 0.12500 0.75000 1 T T T
0.87500 0.00000 0.87500 1 T T T
0.93750 0.06250 0.93750 1 T T T
0.81250 0.06250 0.81250 1 T T T
0.81250 0.18750 0.93750 1 T T T
0.93750 0.18750 0.81250 1 T T T
0.75000 0.25000 0.00000 1 T T T
0.75000 0.37500 0.12500 1 T T T
0.87500 0.37500 0.00000 1 T T T
0.87500 0.25000 0.12500 1 T T T
0.93750 0.31250 0.18750 1 T T T
0.81250 0.31250 0.06250 1 T T T
0.81250 0.43750 0.18750 1 T T T
0.93750 0.43750 0.06250 1 T T T
0.75000 0.25000 0.25000 1 T T T
0.75000 0.37500 0.37500 1 T T T
0.87500 0.37500 0.25000 1 T T T
0.87500 0.25000 0.37500 1 T T T
0.93750 0.31250 0.43750 1 T T T
0.81250 0.31250 0.31250 1 T T T
0.81250 0.43750 0.43750 1 T T T
0.93750 0.43750 0.31250 1 T T T
0.75000 0.25000 0.50000 1 T T T
0.75000 0.37500 0.62500 1 T T T
0.87500 0.37500 0.50000 1 T T T
0.87500 0.25000 0.62500 1 T T T
0.93750 0.31250 0.68750 1 T T T
0.81250 0.31250 0.56250 1 T T T
0.81250 0.43750 0.68750 1 T T T
0.93750 0.43750 0.56250 1 T T T
0.75000 0.25000 0.75000 1 T T T
0.75000 0.37500 0.87500 1 T T T
0.87500 0.37500 0.75000 1 T T T
0.87500 0.25000 0.87500 1 T T T
0.93750 0.31250 0.93750 1 T T T
0.81250 0.31250 0.81250 1 T T T
0.81250 0.43750 0.93750 1 T T T
0.93750 0.43750 0.81250 1 T T T
0.75000 0.50000 0.00000 1 T T T
0.75000 0.62500 0.12500 1 T T T
0.87500 0.62500 0.00000 1 T T T
0.87500 0.50000 0.12500 1 T T T
0.93750 0.56250 0.18750 1 T T T
0.81250 0.56250 0.06250 1 T T T
0.81250 0.68750 0.18750 1 T T T
0.93750 0.68750 0.06250 1 T T T
0.75000 0.50000 0.25000 1 T T T
0.75000 0.62500 0.37500 1 T T T
0.87500 0.62500 0.25000 1 T T T
0.87500 0.50000 0.37500 1 T T T
0.93750 0.56250 0.43750 1 T T T
0.81250 0.56250 0.31250 1 T T T
0.81250 0.68750 0.43750 1 T T T
0.93750 0.68750 0.31250 1 T T T
0.75000 0.50000 0.50000 1 T T T
0.75000 0.62500 0.62500 1 T T T
0.87500 0.62500 0.50000 1 T T T
0.87500 0.50000 0.62500 1 T T T
0.93750 0.56250 0.68750 1 T T T
0.81250 0.56250 0.56250 1 T T T
0.81250 0.68750 0.68750 1 T T T
0.93750 0.68750 0.56250 1 T T T
0.75000 0.50000 0.75000 1 T T T
0.75000 0.62500 0.87500 1 T T T
0.87500 0.62500 0.75000 1 T T T
0.87500 0.50000 0.87500 1 T T T
0.93750 0.56250 0.93750 1 T T T
0.81250 0.56250 0.81250 1 T T T
0.81250 0.68750 0.93750 1 T T T
0.93750 0.68750 0.81250 1 T T T
0.75000 0.75000 0.00000 1 T T T
0.75000 0.87500 0.12500 1 T T T
0.87500 0.87500 0.00000 1 T T T
0.87500 0.75000 0.12500 1 T T T
0.93750 0.81250 0.18750 1 T T T
0.81250 0.81250 0.06250 1 T T T
0.81250 0.93750 0.18750 1 T T T
0.93750 0.93750 0.06250 1 T T T
0.75000 0.75000 0.25000 1 T T T
0.75000 0.87500 0.37500 1 T T T
0.87500 0.87500 0.25000 1 T T T
0.87500 0.75000 0.37500 1 T T T
0.93750 0.81250 0.43750 1 T T T
0.81250 0.81250 0.31250 1 T T T
0.81250 0.93750 0.43750 1 T T T
0.93750 0.93750 0.31250 1 T T T
0.75000 0.75000 0.50000 1 T T T
0.75000 0.87500 0.62500 1 T T T
0.87500 0.87500 0.50000 1 T T T
0.87500 0.75000 0.62500 1 T T T
0.93750 0.81250 0.68750 1 T T T
0.81250 0.81250 0.56250 1 T T T
0.81250 0.93750 0.68750 1 T T T
0.93750 0.93750 0.56250 1 T T T
0.75000 0.75000 0.75000 1 T T T
0.75000 0.87500 0.87500 1 T T T
0.87500 0.87500 0.75000 1 T T T
0.87500 0.75000 0.87500 1 T T T
0.93750 0.81250 0.93750 1 T T T
0.81250 0.81250 0.81250 1 T T T
0.81250 0.93750 0.93750 1 T T T
0.93750 0.93750 0.81250 1 T T T

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,51 @@
IO.Title Water static test, DZ, GridCutoff=50Ha
IO.Coordinates H2O_coord.in
IO.FractionalAtomicCoords F
IO.Iprint 1
IO.WriteOutToFile F
General.DistanceUnits Angstrom
IO.WriteOutToFile F
Process.Job coo
Process.CoordFormat cell
## General Parameters
General.NumberOfSpecies 2
General.PartitionMethod Hilbert
## Moving Atoms
AtomMove.TypeOfRun static
## Basis Sets
Basis.BasisSet PAOs
## Energy Minimisation
minE.SCTolerance 1.0e-8
minE.LTolerance 1.0e-6
minE.MixedLSelfConsistent T
##Integration Grid
Grid.GridCutoff 100
## Finding Density Matrix
#DM.SolutionMethod diagon
#Diag.MPMesh T
#Diag.MPMeshX 2
#Diag.MPMeshY 2
#Diag.MPMeshZ 2
DM.SolutionMethod ordern
DM.L_range 12.0
DM.InvSTolerance 0.1
## Atomic Information
# This first block should make the matrix multiplication
# heavier numerically (each atom has more functions)
#%block ChemicalSpeciesLabel
#1 15.99 O_SZP
#2 1.00 H_SZP
#%endblock ChemicalSpeciesLabel
# This second block is 8x faster and less heavy
%block ChemicalSpeciesLabel
1 15.99 O_SZ
2 1.00 H_SZ
%endblock ChemicalSpeciesLabel

View File

@ -0,0 +1,196 @@
13.9340 0.0000000000 0.0000000000
0.0000000000 13.9340 0.0000000000
0.0000000000 0.0000000000 13.9340
192
12.235322 1.376642 10.869880 1 T T T
6.445390 3.706940 8.650794 1 T T T
0.085977 2.181322 8.276663 1 T T T
12.052554 2.671366 2.147199 1 T T T
12.250036 4.190930 12.092014 1 T T T
7.187422 0.959062 4.733469 1 T T T
8.346457 7.210040 4.667644 1 T T T
12.361546 11.527875 8.106887 1 T T T
3.299984 4.440816 9.193275 1 T T T
2.855829 3.759909 6.552815 1 T T T
1.392494 6.362753 0.586172 1 T T T
1.858645 8.694013 2.068738 1 T T T
3.770231 12.094519 8.652183 1 T T T
6.432508 3.669828 2.772418 1 T T T
1.998724 1.820217 4.876440 1 T T T
8.248581 2.404730 6.931303 1 T T T
5.753814 3.360029 12.461534 1 T T T
11.322212 5.649239 2.236798 1 T T T
4.277318 2.113956 10.590808 1 T T T
5.405015 3.349247 5.484702 1 T T T
6.493278 11.869958 0.684912 1 T T T
3.275250 2.346576 2.425241 1 T T T
7.981003 6.352512 7.507970 1 T T T
5.985990 6.512854 12.194648 1 T T T
10.636714 11.856872 12.209540 1 T T T
9.312283 3.670384 3.508594 1 T T T
1.106885 5.830301 6.638695 1 T T T
8.008007 3.326363 10.869818 1 T T T
12.403000 9.687405 11.761901 1 T T T
4.219782 7.085315 8.153470 1 T T T
3.781557 8.203821 11.563272 1 T T T
11.088898 4.532081 7.809475 1 T T T
10.387548 8.408890 1.017882 1 T T T
1.979016 6.418091 10.374159 1 T T T
4.660547 0.549666 5.617403 1 T T T
8.745880 12.256257 8.089383 1 T T T
2.662041 10.489890 0.092980 1 T T T
7.241661 10.471815 4.226946 1 T T T
2.276827 0.276647 10.810417 1 T T T
8.887733 0.946877 1.333885 1 T T T
1.943554 8.088552 7.567650 1 T T T
9.667942 8.056759 9.868847 1 T T T
10.905491 8.339638 6.484782 1 T T T
3.507733 4.862402 1.557439 1 T T T
8.010457 8.642846 12.055969 1 T T T
8.374446 10.035932 6.690309 1 T T T
5.635247 6.076875 5.563993 1 T T T
11.728434 1.601906 5.079475 1 T T T
9.771134 9.814114 3.548703 1 T T T
3.944355 10.563450 4.687536 1 T T T
0.890357 6.382287 4.065806 1 T T T
6.862447 6.425182 2.488202 1 T T T
3.813963 6.595122 3.762649 1 T T T
6.562448 8.295463 8.807182 1 T T T
9.809455 0.143325 3.886553 1 T T T
4.117074 11.661225 2.221679 1 T T T
5.295317 8.735561 2.763183 1 T T T
9.971999 5.379339 5.340378 1 T T T
12.254708 8.643874 3.957116 1 T T T
2.344274 10.761274 6.829162 1 T T T
7.013416 0.643488 10.518797 1 T T T
5.152349 10.233624 10.359388 1 T T T
11.184278 5.884064 10.298279 1 T T T
12.252335 8.974142 9.070831 1 T T T
12.415139 2.233125 11.257611 2 T T T
11.922476 1.573799 9.986994 2 T T T
5.608192 3.371543 8.971482 2 T T T
6.731226 3.060851 8.004962 2 T T T
-0.169205 1.565594 7.589645 2 T T T
-0.455440 2.954771 8.118939 2 T T T
12.125168 2.826463 1.205443 2 T T T
12.888828 2.969761 2.504745 2 T T T
11.553255 4.386613 11.465566 2 T T T
12.818281 4.960808 12.067151 2 T T T
7.049495 1.772344 4.247898 2 T T T
6.353019 0.798145 5.174047 2 T T T
7.781850 7.384852 5.420566 2 T T T
9.103203 6.754017 5.035898 2 T T T
12.771232 11.788645 8.931744 2 T T T
12.018035 10.650652 8.276334 2 T T T
3.557245 3.792529 9.848846 2 T T T
2.543844 4.884102 9.577958 2 T T T
2.320235 4.521250 6.329813 2 T T T
2.872128 3.749963 7.509824 2 T T T
1.209685 7.121391 1.140501 2 T T T
2.238885 6.038801 0.894245 2 T T T
2.763109 8.856353 2.336735 2 T T T
1.329379 9.047369 2.783755 2 T T T
4.315639 11.533388 9.203449 2 T T T
3.098742 12.433043 9.244412 2 T T T
5.987369 3.448974 3.590530 2 T T T
5.813096 3.419344 2.086985 2 T T T
1.057126 1.675344 4.969379 2 T T T
2.248496 2.292119 5.670892 2 T T T
8.508264 1.653337 7.464411 2 T T T
8.066015 2.034597 6.067646 2 T T T
5.197835 2.915542 11.821572 2 T T T
6.630900 3.329981 12.079371 2 T T T
10.788986 6.436672 2.127933 2 T T T
11.657923 5.463602 1.359832 2 T T T
3.544476 1.634958 10.977765 2 T T T
4.755770 1.455054 10.087655 2 T T T
4.465371 3.375459 5.665294 2 T T T
5.682663 4.264430 5.524498 2 T T T
6.174815 11.778676 1.582954 2 T T T
5.713640 12.089924 0.174999 2 T T T
3.476076 1.498708 2.028983 2 T T T
2.730229 2.134295 3.182949 2 T T T
7.119624 5.936450 7.474030 2 T T T
8.536492 5.799405 6.958665 2 T T T
5.909499 5.717477 11.667621 2 T T T
6.125402 6.196758 13.087330 2 T T T
11.203499 12.513536 11.804844 2 T T T
10.260930 12.300153 12.970145 2 T T T
9.985036 3.927685 2.878172 2 T T T
8.545584 3.468329 2.972331 2 T T T
1.399882 6.620092 7.093246 2 T T T
0.963561 6.112523 5.735345 2 T T T
8.067363 3.674002 9.979955 2 T T T
8.000737 2.375959 10.756190 2 T T T
11.821629 10.402510 12.020482 2 T T T
12.206854 8.983242 12.379892 2 T T T
3.461473 7.606485 7.889688 2 T T T
3.844478 6.304711 8.560946 2 T T T
3.179884 7.585614 11.148494 2 T T T
4.401957 7.652030 12.039573 2 T T T
11.573777 5.053211 7.169515 2 T T T
10.342076 4.186083 7.320831 2 T T T
10.065640 8.919194 1.760981 2 T T T
9.629585 8.322499 0.439729 2 T T T
1.396302 6.546079 9.625630 2 T T T
1.405516 6.479759 11.138049 2 T T T
4.024008 1.232518 5.405828 2 T T T
4.736858 0.579881 6.571077 2 T T T
9.452293 12.313381 8.732772 2 T T T
8.976559 11.502788 7.545965 2 T T T
1.834701 10.012311 0.153462 2 T T T
3.295197 9.836403 -0.204175 2 T T T
7.056724 11.401702 4.095264 2 T T T
6.499038 10.020287 3.825865 2 T T T
1.365541 0.487338 11.013887 2 T T T
2.501591 -0.428131 11.417871 2 T T T
8.644279 1.812362 1.005409 2 T T T
8.142674 0.388030 1.112955 2 T T T
1.272659 8.365063 8.191888 2 T T T
2.142485 8.877768 7.063867 2 T T T
8.961493 7.826192 9.265523 2 T T T
9.227102 8.487654 10.601118 2 T T T
10.150144 7.758934 6.392768 2 T T T
10.596082 9.187988 6.167290 2 T T T
3.463106 4.096188 2.129414 2 T T T
3.919461 4.539801 0.755791 2 T T T
7.418998 9.394959 12.028876 2 T T T
7.430413 7.883095 12.106546 2 T T T
7.972905 10.220334 5.841196 2 T T T
7.675111 9.631498 7.203725 2 T T T
5.332446 6.381336 6.419473 2 T T T
5.000025 6.434186 4.943466 2 T T T
11.575078 2.271167 4.412540 2 T T T
11.219802 0.847030 4.783357 2 T T T
8.865342 9.721516 3.843998 2 T T T
10.000732 10.719285 3.758898 2 T T T
3.186196 10.476397 5.265333 2 T T T
4.407331 11.335128 5.013723 2 T T T
0.558187 7.255936 3.859331 2 T T T
0.341672 5.789383 3.552346 2 T T T
7.459933 6.526049 3.229193 2 T T T
6.696228 5.483739 2.440372 2 T T T
3.864872 6.313007 2.849385 2 T T T
2.876419 6.621201 3.953862 2 T T T
5.631529 8.079145 8.753997 2 T T T
7.003296 7.568245 8.367822 2 T T T
9.615413 0.527902 3.031755 2 T T T
8.962985 0.109366 4.332162 2 T T T
3.825854 11.139182 1.474087 2 T T T
4.063988 11.063232 2.967211 2 T T T
5.784391 7.914558 2.708486 2 T T T
4.780461 8.655167 3.566110 2 T T T
10.880659 5.444664 5.046607 2 T T T
9.593331 4.687991 4.797350 2 T T T
11.562317 8.960134 3.376765 2 T T T
11.926084 8.816948 4.839320 2 T T T
2.856874 11.297981 7.433660 2 T T T
1.492332 11.195517 6.786033 2 T T T
7.145820 0.090200 9.749009 2 T T T
7.227275 0.077690 11.260665 2 T T T
4.662021 9.538430 10.798155 2 T T T
5.994537 9.833472 10.142985 2 T T T
10.544299 6.595857 10.301445 2 T T T
11.281750 5.653082 9.374494 2 T T T
12.103020 8.841164 10.006916 2 T T T
11.491592 8.576221 8.647557 2 T T T

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -55,7 +55,7 @@ master_doc = 'index'
# General information about the project.
project = u'CONQUEST'
copyright = u'2018-2022, CONQUEST Developers'
copyright = u'2018-2024, CONQUEST Developers'
author = u'CONQUEST Developers'
# The version info for the project you're documenting, acts as replacement for
@ -63,9 +63,9 @@ author = u'CONQUEST Developers'
# built documents.
#
# The short X.Y version.
version = u'1.0.7-pre'
version = u'1.3'
# The full version, including alpha/beta/rc tags.
release = u'1.0.7-pre'
release = u'1.3'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View File

@ -157,6 +157,40 @@ where ``Diag.MPOrder`` specifies the order of the Methfessel-Paxton
expansion. It is recommended to start with the lowest order and
increase gradually, testing the effects.
Go to :ref:`top <groundstate>`.
.. _gs_pad:
Padding Hamiltonian matrix by setting block size
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
With the default setting, the size of Hamiltonian and overlap matrices
is determined by the total number of support functions.
It can be a prime number and timing of diagonalisation can be very slow
in such cases, since the division of the matrix into small pieces is difficult.
By padding, we can change the size of Hamiltonian matrix to improve
the efficiency of the diagonalisation. To set an appropriate value
for the block size of the matrix, specify the following two variables.
::
Diag.BlockSizeR 20
Diag.BlockSizeC 20
Note that these two numbers should be the same when padding
(and when using ELPA which will be introduced to CONQUEST soon).
We suggest that an appropriate value is between 20 and 200, but
this should be tested.
The option for padding was introduced after v1.2, and if you would
like to remove it, set the following variable.
::
Diag.PaddingHmatrix F
Go to :ref:`top <groundstate>`.
.. _gs_on:
@ -261,7 +295,31 @@ find the energy.
Go to :ref:`top <groundstate>`.
.. _ gs_scf_adv:
.. _gs_scf_restart:
Restarting SCF
~~~~~~~~~~~~~~
The SCF cycle can be restarted from a previous density matrix or
charge density, which may significantly speed up convergence.
The density matrix is automatically written out in the files ``Kmatrix2.*`` or
``Lmatrix2.*`` (depending on whether diagonalisation or linear scaling
is being used). These files are read in, and the initial
charge density made from them by setting the flags:
::
General.LoadDM T
SC.MakeInitialChargeFromK T
The charge density is not written out by default; this can be changed by
setting ``IO.DumpChargeDensity T`` which results in the files ``chden.nnn``
being created. To read these in as the initial charge density, the flag
``General.LoadRho T`` should be set.
Go to :ref:`top <groundstate>`.
.. _gs_scf_adv:
Advanced options
~~~~~~~~~~~~~~~~

View File

@ -119,8 +119,9 @@ General.NewRun (*boolean*)
*default*: T
General.LoadL (*boolean*)
Specifies whether to load a previous L matrix from files
General.LoadDM (*boolean*)
Specifies whether to load a previous density matrix (K or L depending on
whether diagonalisation or linear scaling are selected) from files
*default*: F
@ -532,6 +533,11 @@ SC.MetricFactor (*real*)
*default*: 0.1
SC.MakeInitialChargeFromK (*boolean*)
Flag determining whether initial charge is made from the density matrix
*default*: T
Go to :ref:`top <input_tags>`.
.. _input_dm:
@ -657,29 +663,33 @@ Diag.GammaCentred (*boolean*)
*default*: F
Diag.ProcRows (*integer*)
Diag.PaddingHmatrix (*boolean*)
Setting this flag allows the Hamiltonian and overlap matrices to be
made larger than their physical size, so that ScaLAPACK block sizes can
be set to any value (which can significantly improve efficiency). At present, the
automatic setting of block sizes does not use this functionality; if
desired, block sizes must be set manually (note that the optimum block
size is likely to be different on different machines). (Available from v1.2)
*default*:
Diag.ProcCols (*integer*)
*default*:
*default*: T
Diag.BlockSizeR (*integer*)
Block size for rows (See next).
*default*:
*default*: Determined automatically
Diag.BlockSizeC (*integer*)
R ... rows, C ... columns
These are ScaLAPACK parameters, and can be set heuristically by the code. Blocks
are sub-divisions of matrices, used to divide up the matrices between processors.
These are ScaLAPACK parameters, and can be set heuristically by the code.
Blocks are sub-divisions of matrices, used to divide up the matrices between processors.
The block sizes need to be factors of the square matrix size
(i.e. :math:`\sum_{\mathrm{atoms}}\mathrm{NSF(atom)}`). A value of 64 is considered
optimal by the ScaLAPACK users guide. The rows and columns need to multiply
together to be less than or equal to the number of processors. If ProcRows
:math:`\times` ProcCols :math:`<` number of processors, some processors will be left idle.
optimal by the ScaLAPACK users guide.
*default*:
If Diag.PaddingHmatrix is set to true then the block sizes can take any value,
but BlockSizeR and BlockSizeC must be the same.
*default*: Determined automatically
Diag.MPShift[X/Y/Z] (*real*)
Specifies the shift *s* of k-points along the x(y,z) axis, in fractional
@ -742,7 +752,10 @@ Diag.ProcRows (*integer*)
Diag.ProcCols (*integer*)
Number of columns in the processor grid for SCALAPACK within each k-point
processor group
processor group. The rows and columns need to multiply
together to be less than or equal to the number of processors. If ProcRows
:math:`\times` ProcCols :math:`<` number of processors, some processors will be left idle.
*default*: Determined automatically
@ -827,12 +840,28 @@ AtomMove.OutputFreq (*integer*)
*default*: 50
AtomMove.WriteXSF *(boolean*)
AtomMove.WriteXSF (*boolean*)
Write atomic coordinates to ``trajectory.xsf`` for ``AtomMove.TypeOfRun = md`` or ``cg``,
every ``AtomMove.OutputFreq`` steps
every ``AtomMove.XsfFreq`` steps
*default*: T
AtomMove.XsfFreq (*integer*)
Frequency of output of atomic coordinates to ``trajectory.xsf``
*default*: same as ``AtomMove.OutputFreq``
AtomMove.WriteXYZ (*boolean*)
Write atomic coordinates to ``trajectory.xyz`` for ``AtomMove.TypeOfRun = md``,
every ``AtomMove.XyzFreq`` steps
*default*: T
AtomMove.XyzFreq (*integer*)
Frequency of output of atomic coordinates to ``trajectory.xyz``
*default*: same as ``AtomMove.OutputFreq``
AtomMove.TestForces (*boolean*)
Flag for testing forces with comparison of analytic and numerical calculations.
Can produce *large* amounts of output
@ -1144,6 +1173,32 @@ MD.BaroDebug (*boolean*)
*default*: F
MD.VariableTemperature (*boolean*)
Simulation with a variable temperature if .True.
*default*: F
MD.VariableTemperatureMethod (*string*)
Type of temperature profile. Only ``linear`` temperature profile is implemented.
*default*: linear
MD.VariableTemperatureRate (*real*)
Change rate for the temperature. In units of K/fs.
If positive, heating. If negative, cooling.
*default*: 0.0
MD.InitialTemperature(*real*)
Initial temperature.
*default*: same as AtomMove.IonTemperature
MD.FinalTemperature(*real*)
Final temperature.
*default*: same as AtomMove.IonTemperature
Go to :ref:`top <input_tags>`.
.. _input_spin:

View File

@ -20,10 +20,12 @@ it can be cloned:
where ``destination-directory`` should be set by the user.
Alternatively, it can be downloaded from GitHub as a zip file and
unpacked:
unpacked:
`<https://github.com/OrderN/CONQUEST-release/archive/master.zip>`_
Go to :ref:`top <install>`
.. _install_compile:
Compiling
@ -41,11 +43,17 @@ a working MPI installation including a Fortran90 compiler (often
can be obtained from `the netlib repository <http://www.netlib.org/scalapack/>`_ if
you need to compile it)
Additionally, Conquest can use LibXC if it is available (v2.x or
Additionally, Conquest can use LibXC if it is available (v4.x or
later).
The library locations are set in the ``system.make`` file in the ``src/``
directory, along with other parameters needed for compilation.
The library locations are set in the ``system.make`` file in the ``src/system``
directory, along with other parameters needed for compilation. The default file
name is ``system.make`` but you can select another file with ``make SYSTEM=label``
which would then use the file ``system.label.make`` in the ``src/system`` directory.
``system.<systemname>.make``
files are provided for some HPC systems used by the community, but if you want to run
locally or on a different system, you will need to create an appropriate ``system.make``
file. Use ``src/system/system.example.make`` as a starting point.
* ``FC`` (typically ``FC=mpif90`` will be all that is required)
* ``COMPFLAGS`` (set these to specify compiler options such as
@ -54,8 +62,8 @@ directory, along with other parameters needed for compilation.
* ``SCALAPACK`` (specify the ScaLAPACK library)
* ``FFT_LIB`` (must be left as FFTW)
* ``XC_LIBRARY`` (choose ``XC_LIBRARY=CQ`` for the internal Conquest
library, otherwise ``XC_LIBRARY=LibXC_v2or3`` for LibXC v2.x or v3.x, or ``XC_LIBRARY=LibXC_v4``
for LibXC v4.x)
library, otherwise ``XC_LIBRARY=LibXC_v4`` for LibXC v4.x, or ``XC_LIBRARY=LibXC_v5``
for LibXC v5.x and v6.x)
* Two further options need to be set for LibXC:
+ ``XC_LIB`` (specify the XC libraries)
@ -66,3 +74,43 @@ Once these are set, you should make the executable using ``make``.
The ion file generation code is compiled using the same options
required for the main code.
Go to :ref:`top <install>`
Multi-threading
~~~~~~~~~~~~~~~
CONQUEST can use OpenMP for multi-threading; some multi-threading is available throughout the code, while there are specific matrix multiplication routines which can use multi-threading for the linear scaling solver. The number of threads is set via the environment variable ``OMP_NUM_THREADS``.
Compiler flags to enable OpenMP are dependent on the vendor, but should be specified via ``OMPFLAGS`` in the ``system.make`` file. If compiling with OpenMP then you should also change the variable ``OMP_DUMMY`` in the same file to be blank to enable the number of threads to be included in the output.
On some systems, the default stack size for OpenMP is set to be rather small, and this can cause a segmentation fault when running with multiple threads. We recommend testing the effect of the environment variable ``OMP_STACKSIZE`` (and suggest setting it to 50M or larger as a first test).
Go to :ref:`top <install>`
.. _install_spack:
Installing with Spack
-----------
CONQUEST and all of its dependencies can be installed with `Spack <https://spack.io/>`_.
The CONQUEST package requires Spack v0.21 or later. If Spack isn't available or up to date on your
system, it is relatively straightforward to install it with user permissions following the
`install instructions <https://spack.readthedocs.io/en/latest/getting_started.html#installation>`_.
When setting up Spack on a new system, it is recommended to configure it to use available
`system compilers <https://spack.readthedocs.io/en/latest/getting_started.html#compiler-configuration>`_
and `system packages <https://spack.readthedocs.io/en/latest/getting_started.html#system-packages>`_.
Once spack is installed and set up, install CONQUEST with:
``spack install conquest``
and load the ``Conquest`` executable to ``PATH`` with
``spack load conquest``
The build can be customized by adding options to the
`Spack spec <https://spack.readthedocs.io/en/latest/basic_usage.html#specs-dependencies>`_ ``conquest``.
The CONQUEST package includes variants for OpenMP support and different matrix multiplication kernels; more details can be found in the `Spack CONQUEST package <https://spack.readthedocs.io/en/latest/package_list.html#conquest>`_.
Go to :ref:`top <install>`

3
src/.gitignore vendored
View File

@ -2,4 +2,5 @@ Conquest
makedeps.txt
*.mod
*.o
datestamp.f90
datestamp.f90
TAGS

View File

@ -245,8 +245,10 @@ contains
problem = .false.
inflex = .false.
done = .false.
early = .false.
if (.NOT. flag_SkipEarlyDM) early = .true. ! Starts from earlyDM
early = .true. ! Do early DM iterations by default
if (flag_SkipEarlyDM) then
early = .false.
end if
! Start with the transpose of S^-1
call matrix_transpose(matT(1), matTtran(1))
@ -992,6 +994,7 @@ contains
real(ni_in_cell, double)
end do
end if
if(n_L_iterations==0) done = .true. ! Otherwise the calling routine will cycle
do n_iter = 1, n_L_iterations
call start_timer(tmr_l_iter, WITH_LEVEL)
if (inode == ionode .and. iprint_DM + min_layer >= 1) &

View File

@ -142,6 +142,9 @@
!! 2023/03/15 08:32 dave
!! Removed redundant pDOS variables and added export of wavefunction coefficients
!! scaled by overlap matrix for pDOS calculation in post-processing
!! 2023/08/02 tsuyoshi
!! At the implmentation of Padding H, the arrays "w" and "local_w" were renamed as
!! "evals" and "local_evals", respectively.
!!***
module DiagModule
@ -278,8 +281,8 @@ module DiagModule
!logical :: diagon ! Do we diagonalise or use O(N) ?
! Local scratch data
real(double), dimension(:,:,:), allocatable :: w ! matrix_size, nkp, nspin
real(double), dimension(:,:), allocatable :: local_w ! matrix_size, nspin
real(double), dimension(:,:,:), allocatable :: evals ! matrix_size, nkp, nspin
real(double), dimension(:,:), allocatable :: local_evals ! matrix_size_padH, nspin
complex(double_cplx), dimension(:,:,:), pointer :: polSloc
integer :: pol_S_size
!complex(double_cplx), dimension(:),allocatable :: work, rwork, gap
@ -493,7 +496,7 @@ contains
flag_SpinDependentSF, flag_do_pol_calc, polS, &
io_ase, write_ase, ase_file, i_pol_dir_end, ne_spin_in_cell
use GenComms, only: my_barrier, cq_abort, mtime, gsum, myid
use ScalapackFormat, only: matrix_size, proc_rows, proc_cols, &
use ScalapackFormat, only: matrix_size, matrix_size_padH, proc_rows, proc_cols, &
block_size_r, &
block_size_c, pg_kpoints, proc_groups, &
nkpoints_max, pgid, N_procs_in_pg, &
@ -562,8 +565,8 @@ contains
abstol
! zero the global and local eigenvalues
w = zero
local_w = zero
evals = zero
local_evals = zero
do spin = 1, nspin
do i = 1, nkpoints_max ! Loop over the kpoints within each process group
@ -574,7 +577,7 @@ contains
! node, note that the repeating of the same eigenvalues in each
! proc_group is taken care of by the additional factor
! 1 / N_procs_in_pg
call gsum(w(:,:,spin), matrix_size, nkp)
call gsum(evals(:,:,spin), matrix_size, nkp)
end do ! spin
! Allocate matrices to store band K matrices
time1 = mtime()
@ -587,7 +590,7 @@ contains
end if
! Find Fermi level, given the eigenvalues at all k-points (in w)
! if (me < proc_rows*proc_cols) then
call findFermi(electrons, w, matrix_size, nkp, Efermi, occ)
call findFermi(electrons, evals, matrix_size, nkp, Efermi, occ)
! Allocate space to expand eigenvectors into (i.e. when reversing
! ScaLAPACK distribution)
allocate(expH(matrix_size,prim_size,nspin), STAT=stat)
@ -715,8 +718,8 @@ contains
exit
end if
end do
! Find Fermi level, given the eigenvalues at all k-points (in w)
call findFermi(electrons, w, matrix_size, nkp, Efermi, occ)
! Find Fermi level, given the eigenvalues at all k-points (in evals)
call findFermi(electrons, evals, matrix_size, nkp, Efermi, occ)
end if ! DeltaSCF localised excitation
! Now write out eigenvalues and occupancies
if (iprint_DM + min_layer == 2 .AND. myid == 0) then
@ -728,20 +731,20 @@ contains
write (io_lun, '(10x,"For spin = ",i1)') spin
do j = 1, matrix_size, 3
if (j == matrix_size) then
write (io_lun, 8) w(j,i,spin), occ(j,i,spin)
bandE(spin) = bandE(spin) + w(j,i,spin) * occ(j,i,spin)
write (io_lun, 8) evals(j,i,spin), occ(j,i,spin)
bandE(spin) = bandE(spin) + evals(j,i,spin) * occ(j,i,spin)
else if (j == matrix_size - 1) then
write (io_lun, 9) w(j,i,spin), occ(j,i,spin), &
w(j+1,i,spin), occ(j+1,i,spin)
bandE(spin) = bandE(spin) + w(j,i,spin) * occ(j,i,spin) + &
w(j+1,i,spin) * occ(j+1,i,spin)
write (io_lun, 9) evals(j,i,spin), occ(j,i,spin), &
evals(j+1,i,spin), occ(j+1,i,spin)
bandE(spin) = bandE(spin) + evals(j,i,spin) * occ(j,i,spin) + &
evals(j+1,i,spin) * occ(j+1,i,spin)
else
write (io_lun, 10) w(j,i,spin), occ(j,i,spin), &
w(j+1,i,spin), occ(j+1,i,spin), &
w(j+2,i,spin), occ(j+2,i,spin)
bandE(spin) = bandE(spin) + w(j,i,spin) * occ(j,i,spin) + &
w(j+1,i,spin) * occ(j+1,i,spin) + &
w(j+2,i,spin) * occ(j+2,i,spin)
write (io_lun, 10) evals(j,i,spin), occ(j,i,spin), &
evals(j+1,i,spin), occ(j+1,i,spin), &
evals(j+2,i,spin), occ(j+2,i,spin)
bandE(spin) = bandE(spin) + evals(j,i,spin) * occ(j,i,spin) + &
evals(j+1,i,spin) * occ(j+1,i,spin) + &
evals(j+2,i,spin) * occ(j+2,i,spin)
endif
end do ! j=matrix_size
write (io_lun, &
@ -765,8 +768,8 @@ contains
if (nspin == 2) &
write (io_lun, '(10x,"For spin = ",i1)') spin
do j = 1, matrix_size
write (io_lun, fmt='(10x,i5,f12.5,f6.3)') j, w(j,i,spin), occ(j,i,spin)
bandE(spin) = bandE(spin) + w(j,i,spin) * occ(j,i,spin)
write (io_lun, fmt='(10x,i5,f12.5,f6.3)') j, evals(j,i,spin), occ(j,i,spin)
bandE(spin) = bandE(spin) + evals(j,i,spin) * occ(j,i,spin)
end do ! j=matrix_size
write (io_lun, &
fmt='(10x,"Sum of eigenvalues for spin = ", &
@ -783,7 +786,7 @@ contains
end do ! do i = 1, nkp
end if ! if(iprint_DM + min_layer>=1.AND.myid==0)
if(inode==ionode .and. write_ase) call write_eigenvalues_format_ase(w,occ,matrix_size,nkp,nspin,&
if(inode==ionode .and. write_ase) call write_eigenvalues_format_ase(evals,occ,matrix_size,nkp,nspin,&
kk,Efermi,io_ase,ase_file,7+n_species+2+nkp)
time0 = mtime()
@ -821,9 +824,9 @@ contains
! Output wavefunction coefficients
if(wf_self_con .and. (flag_out_wf .or. flag_write_projected_DOS)) then
if(i==1) then
call write_wavefn_coeffs(w(:,kp,spin),expH(:,:,spin),spin,firstcall=1)
call write_wavefn_coeffs(evals(:,kp,spin),expH(:,:,spin),spin,firstcall=1)
else
call write_wavefn_coeffs(w(:,kp,spin),expH(:,:,spin),spin)
call write_wavefn_coeffs(evals(:,kp,spin),expH(:,:,spin),spin)
end if
if(flag_write_projected_DOS) then
scaledEig = zero
@ -832,9 +835,9 @@ contains
kk(:,kp), wtk(kp), expH(:,:,spin),scaledEig,matS(spin_SF))
flag_pDOS_buildK = .false.
if(i==1) then
call write_wavefn_coeffs(w(:,kp,spin),scaledEig,spin,tag="Sij",firstcall=1)
call write_wavefn_coeffs(evals(:,kp,spin),scaledEig,spin,tag="Sij",firstcall=1)
else
call write_wavefn_coeffs(w(:,kp,spin),scaledEig,spin,tag="Sij")
call write_wavefn_coeffs(evals(:,kp,spin),scaledEig,spin,tag="Sij")
end if
else
call buildK(Hrange, matK(spin), occ(:,kp,spin), &
@ -879,7 +882,7 @@ contains
end if
case (1) ! Methfessel-Paxton smearing
entropy = entropy + spin_factor * wtk(kp) * &
MP_entropy((w(j,kp,spin) - Efermi(spin)) / kT, &
MP_entropy((evals(j,kp,spin) - Efermi(spin)) / kT, &
iMethfessel_Paxton)
case default
call cq_abort ("FindEvals: Smearing flag not recognised",&
@ -888,7 +891,7 @@ contains
end select
! occ is now used to construct matM12, factor by eps^n
! to allow reuse of buildK
occ(j,kp,spin) = - occ(j,kp,spin) * w(j,kp,spin)
occ(j,kp,spin) = - occ(j,kp,spin) * evals(j,kp,spin)
end do ! j = 1, matrix_size
! Now build data_M12_ij (=-\sum_n eps^n c^n_i c^n_j -
! hence scaling occs by eps allows reuse of buildK)
@ -899,7 +902,7 @@ contains
end do ! End do i = 1, nkpoints_max
end do ! spin
!------ output eigenvalues --------
if(inode==ionode) call write_eigenvalues(w,matrix_size,nkp,nspin,kk,wtk,Efermi)
if(inode==ionode) call write_eigenvalues(evals,matrix_size,nkp,nspin,kk,wtk,Efermi)
if (iprint_DM + min_layer > 3 .and. inode == ionode) &
write (io_lun, fmt='(10x,a,2f16.6)') "Entropy, TS: ", entropy, kT * entropy
! store entropy as TS instead of S
@ -1035,12 +1038,14 @@ contains
!! 2017/06/22 dave
!! Made descriptors module variables
!! Moved many operations out to new routines so this contains only work needed each time
!! 2023/07/24 tsuyoshi
!! - Change for padding H and S matrices
!! SOURCE
!!
subroutine initDiag
use numbers
use ScalapackFormat, only: proc_rows, proc_cols, matrix_size
use ScalapackFormat, only: proc_rows, proc_cols, matrix_size, matrix_size_padH
use global_module, only: numprocs, nspin
use GenComms, only: my_barrier, cq_abort, myid
use memory_module, only: type_dbl, type_int, type_cplx, &
@ -1069,26 +1074,26 @@ contains
SCSmat = zero
z = zero
allocate(w(matrix_size,nkp,nspin), occ(matrix_size,nkp,nspin), STAT=stat)
allocate(evals(matrix_size,nkp,nspin), occ(matrix_size,nkp,nspin), STAT=stat)
if (stat /= 0) call cq_abort('initDiag: failed to allocate w and occ', stat)
call reg_alloc_mem(area_DM, 2 * matrix_size * nkp * nspin, type_dbl)
call reg_alloc_mem(area_DM, 2*matrix_size * nkp * nspin, type_dbl)
allocate(local_w(matrix_size, nspin), STAT=stat)
if (stat /= 0) call cq_abort('initDiag: failed to allocate local_w', stat)
call reg_alloc_mem(area_DM, matrix_size * nspin, type_dbl)
allocate(local_evals(matrix_size_padH, nspin), STAT=stat)
if (stat /= 0) call cq_abort('initDiag: failed to allocate local_evals', stat)
call reg_alloc_mem(area_DM, matrix_size_padH * nspin, type_dbl)
allocate(ifail(matrix_size), iclustr(2 * proc_rows * proc_cols), STAT=stat)
allocate(ifail(matrix_size_padH), iclustr(2 * proc_rows * proc_cols), STAT=stat)
if (stat /= 0) call cq_abort("initDiag: failed to allocate ifail and iclustr", stat)
call reg_alloc_mem(area_DM, matrix_size + 2 * proc_rows * proc_cols, type_int)
call reg_alloc_mem(area_DM, matrix_size_padH + 2 * proc_rows * proc_cols, type_int)
allocate(gap(proc_rows * proc_cols), STAT=stat)
if (stat /= 0) call cq_abort("initDiag: failed to allocate gap", stat)
call reg_alloc_mem(area_DM, proc_rows * proc_cols, type_dbl)
! the pzhegvx is only called here to get the optimal work array
call pzhegvx(1, 'V', 'A', 'U', matrix_size, SCHmat(:,:,1), 1, 1, &
call pzhegvx(1, 'V', 'A', 'U', matrix_size_padH, SCHmat(:,:,1), 1, 1, &
desca, SCSmat(:,:,1), 1, 1, descb, zero, zero, 0, 0, &
1.0e-307_double, m, mz, w(1,1,1), -one, z(:,:,1), 1, &
1.0e-307_double, m, mz, local_evals(1,1), -one, z(:,:,1), 1, &
1, descz, wo, -1, rwo, -1, iwo, -1, ifail, iclustr, &
gap, info)
@ -1120,6 +1125,8 @@ contains
!! CREATION DATE
!! 2012/03/08
!! MODIFICATION HISTORY
!! 2023/07/24 tsuyoshi
!! - Change for padding H and S matrices
!! SOURCE
!!
subroutine endDiag
@ -1128,7 +1135,7 @@ contains
reg_dealloc_mem
use global_module, only: numprocs, nspin
use ScalapackFormat, only: deallocate_arrays, proc_rows, &
proc_cols, matrix_size
proc_cols, matrix_size, matrix_size_padH
implicit none
@ -1141,13 +1148,13 @@ contains
call cq_abort("endDiag: failed to deallocate SCHmat, SCSmat and z", stat)
call reg_dealloc_mem(area_DM, 3 * row_size * col_size * nspin, type_cplx)
deallocate(w, occ, STAT=stat)
deallocate(evals, occ, STAT=stat)
if (stat /= 0) call cq_abort('endDiag: failed to deallocate w and occ', stat)
call reg_dealloc_mem(area_DM, 2 * matrix_size * nkp * nspin, type_dbl)
call reg_dealloc_mem(area_DM, 2*matrix_size * nkp * nspin, type_dbl)
deallocate(local_w, STAT=stat)
if (stat /= 0) call cq_abort('endDiag: failed to allocate local_w', stat)
call reg_dealloc_mem(area_DM, matrix_size * nspin, type_dbl)
deallocate(local_evals, STAT=stat)
if (stat /= 0) call cq_abort('endDiag: failed to allocate local_evals', stat)
call reg_dealloc_mem(area_DM, matrix_size_padH * nspin, type_dbl)
! Shut down BLACS
@ -1157,7 +1164,7 @@ contains
deallocate(ifail, iclustr, STAT=stat)
if (stat /= 0) &
call cq_abort("endDiag: failed to deallocate ifail and iclustr", stat)
call reg_dealloc_mem(area_DM, matrix_size + 2 * proc_rows * &
call reg_dealloc_mem(area_DM, matrix_size_padH + 2 * proc_rows * &
proc_cols, type_int)
deallocate(gap, STAT=stat)
@ -1222,6 +1229,8 @@ contains
!! Changed nsf to come from maxima, not common
!! 2006/08/30 16:49 dave
!! Added allocate for arrays in Distrib
!! 2023/07/24 tsuyoshi
!! - Change for padding H and S matrices
!! SOURCE
!!
subroutine PrepareRecv(Distrib)
@ -1255,6 +1264,7 @@ contains
do rowblock=1,blocks_r
if(my_row(rowblock)>0) then ! If this row block is part of my chunk
do row = 1,block_size_r
if(SC_row_block_atom(row,rowblock)%part==0) cycle ! for padding H and S matrices (padded part)
if(iprint_DM>=5.AND.myid==0) write(io_lun,4) myid,i,rowblock,row
! Find processor and increment processors and rows from proc
proc = parts%i_cc2node(SC_row_block_atom(row,rowblock)%part) ! find proc on which the partition containing the row is stored
@ -2044,7 +2054,7 @@ contains
use mpi
use numbers, only: zero, minus_i
use ScalapackFormat, only: proc_start, block_size_r, block_size_c,&
mapy, pgroup, pgid
mapy, pgroup, pgid, matrix_size
use GenComms, only: my_barrier, myid
implicit none
@ -2061,7 +2071,7 @@ contains
coff, req1, req2, ierr
integer :: srow_size, scol_size, rrow_size, rcol_size
integer, dimension(MPI_STATUS_SIZE) :: mpi_stat
integer :: i, j, k
integer :: i, j, k, l
send_proc = myid
recv_proc = myid
@ -2127,7 +2137,13 @@ contains
if(iprint_DM>=5.AND.myid==0) &
write(io_lun,3) myid,j,k,rblock,cblock,refblock,coff,Distrib%firstrow(recv_proc+1),RecvBuffer(j,k)
! localEig(Distrib%firstrow(recv_proc+1)+j-1,coff:coff+block_size_c-1) = RecvBuffer(j,k:k+block_size_c-1)
localEig(coff:coff+block_size_c-1,Distrib%firstrow(recv_proc+1)+j-1) = RecvBuffer(j,k:k+block_size_c-1)
if(coff+block_size_c-1 > matrix_size) then
!coff+l-1 = matrix_size => l = matrix_size+1-coff
localEig(coff:matrix_size,Distrib%firstrow(recv_proc+1)+j-1) = RecvBuffer(j,k:k+matrix_size-coff)
else
localEig(coff:coff+block_size_c-1,Distrib%firstrow(recv_proc+1)+j-1) = RecvBuffer(j,k:k+block_size_c-1)
endif
end do
end do
if(iprint_DM>=4.AND.myid==0) write(io_lun,fmt='(10x,a)') ' Done on-proc'
@ -2179,8 +2195,13 @@ contains
if(iprint_DM>=5.AND.myid==0) write(io_lun,3) myid,j,k,rblock,cblock,refblock,coff,&
Distrib%firstrow(recv_proc+1),RecvBuffer(j,k)
!localEig(Distrib%firstrow(recv_proc+1)+j-1,coff:coff+block_size_c-1) = RecvBuffer(j,k:k+block_size_c-1)
localEig(coff:coff+block_size_c-1,Distrib%firstrow(recv_proc+1)+j-1) = &
RecvBuffer(j,k:k+block_size_c-1)
if(coff+block_size_c -1 > matrix_size) then
!coff+l-1 = matrix_size => l = matrix_size+1-coff
localEig(coff:matrix_size,Distrib%firstrow(recv_proc+1)+j-1) = RecvBuffer(j,k:k+matrix_size-coff)
else
localEig(coff:coff+block_size_c-1,Distrib%firstrow(recv_proc+1)+j-1) = &
RecvBuffer(j,k:k+block_size_c-1)
endif
end do
end do
end if ! (rrow_size > 0)
@ -4197,6 +4218,8 @@ contains
!! Changed matS to be spin_SF dependent
!! 2022/10/10 16:53 dave
!! Introduced flag to output info>0 warning only once
!! 2023/07/20 tsuyoshi
!! Changed for padding H and S matrices
!! SOURCE
!!
subroutine distrib_and_diag(spin,index_kpoint,mode,flag_store_w,kpassed)
@ -4205,7 +4228,8 @@ contains
use numbers
use global_module, only: iprint_DM, flag_SpinDependentSF, min_layer, iprint
use mult_module, only: matH, matS
use ScalapackFormat, only: matrix_size, proc_rows, proc_cols, &
use ScalapackFormat, only: matrix_size, matrix_size_padH, proc_rows, proc_cols, &
block_size_r, block_size_c, blocks_r, blocks_c, procid, pgroup,&
nkpoints_max, pgid, N_kpoints_in_pg, pg_kpoints, N_procs_in_pg, proc_groups
use GenComms, only: cq_warn
@ -4221,6 +4245,10 @@ contains
! Local
real(double) :: vl, vu, orfac, scale
integer :: il, iu, m, mz, info, spin_SF, iprint_store
! for padH
integer :: num_elem_pad, ind_proc_row_pad, ind_proc_col_pad, i, j
real(double), parameter :: H_large_value = 1.0e3_double ! this should not change the results if it is larger than E_f
integer :: id_kgroup
spin_SF = 1
if (flag_SpinDependentSF) spin_SF = spin
@ -4247,11 +4275,33 @@ contains
write (io_lun, fmt='(10x,i6,a,5i6)') myid, 'Proc row, cols, me: ', &
proc_rows, proc_cols, me, index_kpoint, nkpoints_max
if (index_kpoint <= N_kpoints_in_pg(pgid)) then
! Padding of H and S matrices to have matrix_size_padH
num_elem_pad = matrix_size_padH - matrix_size
ind_proc_row_pad = mod( blocks_r-1, proc_rows )
ind_proc_col_pad = mod( blocks_c-1, proc_cols )
id_kgroup = pgroup(myid+1)
if( procid(id_kgroup, ind_proc_row_pad+1, ind_proc_col_pad+1) == myid+1 ) then
do i=row_size-num_elem_pad+1, row_size
do j=col_size-num_elem_pad+1, col_size
if( mod(i,block_size_r)==mod(j,block_size_c) ) then
SCHmat(i,j,spin) = H_large_value
SCSmat(i,j,spin) = one
else
SCHmat(i,j,spin) = zero
SCSmat(i,j,spin) = zero
end if
end do
end do
end if
! Call the diagonalisation routine for generalised problem
! H.psi = E.S.psi
call pzhegvx(1, mode, 'A', 'U', matrix_size, SCHmat(:,:,spin), &
call pzhegvx(1, mode, 'A', 'U', matrix_size_padH, SCHmat(:,:,spin), &
1, 1, desca, SCSmat(:,:,spin), 1, 1, descb, &
vl, vu, il, iu, abstol, m, mz, local_w(:,spin), &
vl, vu, il, iu, abstol, m, mz, local_evals(:,spin), &
orfac, z(:,:,spin), 1, 1, descz, work, lwork, &
rwork, lrwork, iwork, liwork, ifail, iclustr, &
gap, info)
@ -4271,9 +4321,9 @@ contains
call cq_abort ("FindEvals: pzhegvx failed for mode "//mode//" with INFO=", info)
end if
end if
! Copy local_w into appropriate place in w
if(flag_store_w) w(1:matrix_size, pg_kpoints(pgid, index_kpoint), spin) = &
scale * local_w(1:matrix_size, spin)
! Copy local_evals into appropriate place in w
if(flag_store_w) evals(1:matrix_size, pg_kpoints(pgid, index_kpoint), spin) = &
scale * local_evals(1:matrix_size, spin)
end if ! End if (i<=N_kpoints_in_pg(pgid))
end subroutine distrib_and_diag
!!***
@ -4307,7 +4357,7 @@ contains
reg_alloc_mem, reg_dealloc_mem
use ScalapackFormat, only: allocate_arrays, pg_initialise, ref_to_SC_blocks, make_maps, &
block_size_r, block_size_c, proc_rows, &
proc_cols, matrix_size, pgid, procid, proc_start
proc_cols, matrix_size_padH, pgid, procid, proc_start
implicit none
@ -4360,13 +4410,13 @@ contains
if (iprint_DM + min_layer > 3 .AND. myid == 0) write (io_lun, 12) myid, row_size, col_size
! Register the description of the distribution of H
call descinit(desca, matrix_size, matrix_size, block_size_r, block_size_c, 0, 0, context, row_size, info)
call descinit(desca, matrix_size_padH, matrix_size_padH, block_size_r, block_size_c, 0, 0, context, row_size, info)
if (info /= 0) call cq_abort("initDiag: descinit(a) failed !", info)
! Register the description of the distribution of S
call descinit(descb, matrix_size, matrix_size, block_size_r, block_size_c, 0, 0, context, row_size, info)
call descinit(descb, matrix_size_padH, matrix_size_padH, block_size_r, block_size_c, 0, 0, context, row_size, info)
if (info /= 0) call cq_abort("initDiag: descinit(a) failed !", info)
! And register eigenvector distribution
call descinit(descz, matrix_size, matrix_size, block_size_r, block_size_c, 0, 0, context, row_size, info)
call descinit(descz, matrix_size_padH, matrix_size_padH, block_size_r, block_size_c, 0, 0, context, row_size, info)
! Find scratch space requirements for ScaLAPACk
if (info /= 0) call cq_abort("initDiag: descinit(z) failed !", info)
1 format(10x, 'Proc: ', i5, ' BLACS proc, row, col: ', 3i5)

View File

@ -24,7 +24,22 @@ MULT_KERN = default
DIAG_DUMMY =
#Include system-dependent variables
include system.make
ifneq ($(SYSTEM),)
$(info System is $(SYSTEM))
SYSTEM_PATH = system/system.$(SYSTEM).make
else
SYSTEM_PATH=system/system.make
endif
ifneq ("$(wildcard $(SYSTEM_PATH))","")
$(info Building using system file $(SYSTEM_PATH))
include $(SYSTEM_PATH)
else
$(info Cannot find system file $(SYSTEM_PATH). Please make one,)
$(info using system/system.example.make as an example, or choose)
$(info an existing file from the system directory using make SYSTEM=label)
$(info to select system/system.label.make)
$(error Compilation aborted.)
endif
#Include lists of object files
include matrix.obj
@ -53,7 +68,7 @@ NODE_OBJECTS_NODS = main.o datatypes_module.o numbers_module.o
SRCS_NODS = $(NODE_OBJECTS_NODS:.o=.f90) basic_types.f90 datatypes_module.f90 matrix_data_module.f90 numbers_module.f90
#Dependency rule
deps.obj.inc: $(SRCS_NODS) system.make
deps.obj.inc: $(SRCS_NODS) $(SYSTEM_PATH)
touch $(COMMENT)
$(ECHOSTR) "module datestamp" > datestamp.f90
$(ECHOSTR) " implicit none" >> datestamp.f90
@ -65,7 +80,7 @@ deps.obj.inc: $(SRCS_NODS) system.make
#Target
$(TARGET) : $(NODE_OBJECTS)
$(FC) $(LINKFLAGS) -o $(TARGET) $(NODE_OBJECTS) $(LIBS)
$(FC) -o $(TARGET) $(NODE_OBJECTS) $(LINKFLAGS) $(LIBS)
cp $(TARGET) ../bin
#.f90.o:
@ -83,6 +98,12 @@ $(NODE_OBJECTS):
initial_read_module.o:initial_read_module.f90 datestamp.o
$(FC) $(COMPFLAGS) -c $<
# Note: this module seems to need compiling without optimisation
# for GCC13, possibly only on Mac. It doesn't need any other
# compiler flags (libraries or communications) so should be OK like this
pseudo_tm_info.o:pseudo_tm_info.f90
$(FC) -c $<
#datestamp.f90: $(COMMENT)
# $(ECHOSTR) "module datestamp\n" > datestamp.f90
# $(ECHOSTR) " implicit none\n" >> datestamp.f90
@ -92,7 +113,7 @@ initial_read_module.o:initial_read_module.f90 datestamp.o
# $(FC) $(COMPFLAGS) -c datestamp.f90
tar:
tar cvf ../$(TARNAME) *.f *.f90 *.obj Makefile* makemake system.make system/*.make FFT/*.f FFT/Makefile template* utilities/*f90 utilities/Makefile
tar cvf ../$(TARNAME) *.f *.f90 *.obj Makefile* makemake $(SYSTEM_PATH) system/*.make FFT/*.f FFT/Makefile template* utilities/*f90 utilities/Makefile
gzip ../$(TARNAME)
clean:
@ -141,7 +162,7 @@ notimers:
grep -vi 'timer_' $${objectfile} > $(NOTIMERS_DIR)/$${objectfile}; \
done
@rm -f $(NOTIMERS_DIR)/timer_*.f90
@cp -pfr FFT Makefile Makefile.Doc utilities *.f makemake system.make $(NOTIMERS_DIR)/
@cp -pfr FFT Makefile Makefile.Doc utilities *.f makemake $(SYSTEM_PATH) $(NOTIMERS_DIR)/
@echo "New sources without timers are in $(NOTIMERS_DIR)"
nostdtimers:
@ -159,7 +180,7 @@ nostdtimers:
grep -vi 'timer_std' $${objectfile} > $(NOSTDTIMERS_DIR)/$${objectfile}; \
done
@rm -f ${NOSTDTIMERS_DIR}/timer_std*.f90
@cp -pfr FFT Makefile Makefile.Doc utilities *.f makemake system.make $(NOSTDTIMERS_DIR)/
@cp -pfr FFT Makefile Makefile.Doc utilities *.f makemake $(SYSTEM_PATH) $(NOSTDTIMERS_DIR)/
@echo "New sources without standard timers are in $(NOSTDTIMERS_DIR)"
noloctimers:
@ -171,7 +192,7 @@ noloctimers:
do \
grep -vi 'tmr_l' $${sourcefile} > $(NOLOCTIMERS_DIR)/$${sourcefile}; \
done
@cp -pfr FFT Makefile Makefile.Doc utilities *.f *.obj makemake system.make $(NOLOCTIMERS_DIR)/
@cp -pfr FFT Makefile Makefile.Doc utilities *.f *.obj makemake $(SYSTEM_PATH) $(NOLOCTIMERS_DIR)/
@echo "New sources without local timers are in $(NOLOCTIMERS_DIR)"

View File

@ -7,7 +7,7 @@
! Code area 11: basis operations
! ------------------------------------------------------------------------------
!!****h* Conquest/PAO_grid_transform_module *
!!****h* Conquest/PAO_grid_transform_module *
!! NAME
!! PAO_grid_transform_module
!! PURPOSE
@ -19,11 +19,11 @@
!! AUTHOR
!! D.R.Bowler
!! CREATION DATE
!! 16:37, 2003/09/22
!! 16:37, 2003/09/22
!! MODIFICATION HISTORY
!! 2005/07/11 10:18 dave
!! Tidied up use statements (only one occurence) for ifort
!! 10:31, 13/02/2006 drb
!! 10:31, 13/02/2006 drb
!! Changed lines to conform to F90 standard
!! 2006/06/20 08:15 dave
!! Various changes for variable NSF
@ -54,20 +54,20 @@ module PAO_grid_transform_module
contains
!!****f* PAO_grid_transform_module/single_PAO_to_grid *
!!****f* PAO_grid_transform_module/PAO_or_gradPAO_to_grid *
!!
!! NAME
!! single_PAO_to_grid
!! NAME
!! PAO_or_gradPAO_to_grid
!! USAGE
!!
!!
!! PURPOSE
!! Projects the PAO functions onto the grid (rather than support functions)
!! Used for gradients of energy wrt PAO coefficients
!! INPUTS
!!
!!
!!
!!
!! USES
!!
!!
!! AUTHOR
!! D. R. Bowler
!! CREATION DATE
@ -93,11 +93,14 @@ contains
!! Removed support_spec_format (blips_on_atom and flag_one_to_one) and this_atom,
!! which are no longer needed
!! Removed unused npao1 and atom_species
!! 2023/08/23 11:20 tkoskela
!! Added OMP threading, merged single_PAO_to_grad and single_PAO_to_grid into
!! single subroutine PAO_or_gradPAO_to_grid
!! SOURCE
!!
subroutine single_PAO_to_grid(pao_fns)
subroutine PAO_or_gradPAO_to_grid(pao_fns, evaluate, direction)
use datatypes
use datatypes, only: double
use primary_module, ONLY: bundle
use GenComms, ONLY: my_barrier, cq_abort, mtime
use dimens, ONLY: r_h
@ -107,315 +110,156 @@ contains
use species_module, ONLY: species, npao_species
! At present, these arrays are dummy arguments.
use block_module, ONLY : nx_in_block,ny_in_block,nz_in_block, n_pts_in_block
use group_module, ONLY : blocks, parts
use group_module, ONLY : blocks
use primary_module, ONLY: domain
use cover_module, ONLY: DCS_parts
use set_blipgrid_module, ONLY : naba_atoms_of_blocks
use angular_coeff_routines, ONLY : evaluate_pao
use functions_on_grid, ONLY: gridfunctions, fn_on_grid
use pao_format
implicit none
integer,intent(in) :: pao_fns
implicit none
integer, intent(in) :: pao_fns
integer, intent(in) :: direction
!local
real(double):: dcellx_block,dcelly_block,dcellz_block
integer :: ipart,jpart,ind_part,ia,ii,icover,ig_atom
real(double):: xatom,yatom,zatom,alpha,step
real(double):: xblock,yblock,zblock
integer :: the_species
integer :: j,iblock,the_l,ipoint, igrid
real(double) :: r_from_i
real(double) :: rr,a,b,c,d,x,y,z,nl_potential
integer :: no_of_ib_ia, offset_position
integer :: position,iatom
integer :: stat, nl, npoint, ip, this_nsf
integer :: i,m, m1min, m1max,acz,m1,l1,count1
integer , allocatable :: ip_store(:)
real(double), allocatable :: x_store(:)
real(double), allocatable :: y_store(:)
real(double), allocatable :: z_store(:)
real(double), allocatable :: r_store(:)
real(double) :: coulomb_energy
real(double) :: rcut
real(double) :: r1, r2, r3, r4, core_charge, gauss_charge
real(double) :: val, theta, phi, r_tmp
integer :: iblock,ia,ipart,ip,l1,acz,m1 ! Loop index variables
integer :: nblock, npart, natom ! Array dimensions
integer :: naba_part_label,ind_part,icover,iatom ! indices for calculating species. TODO:Need better names
integer :: position,next_offset_position ! Temporary indices to gridfunctions%griddata
integer :: my_species ! Temporary variables to reduce indirect accesses
integer :: npoint ! outputs of check_block
integer :: count1 ! incremented counter, maps from (l1, acz, m1) to linear index of gridfunctions%griddata
real(double):: dcellx_block,dcelly_block,dcellz_block ! grid dimensions, should be moved
real(double) :: x,y,z ! Temporary variables to reduce indirect accesses
real(double) :: rcut ! Input to check_block
real(double) :: val ! output, written into gridfunctions%griddata
real(double) :: xblock,yblock,zblock ! inputs to check_block
real(double) :: xatom,yatom,zatom ! inputs to check_block
integer, allocatable, dimension(:) :: ip_store ! outputs of check_block
integer, allocatable, dimension(:,:,:) :: offset_position ! precomputed offsets
real(double), allocatable, dimension(:) :: x_store, y_store, z_store, r_store ! outputs of check_block
interface
! Interface to return a value val given arguments
! direction,species,l,acz,m,x,y,z. Implemented by
! evaluate_pao() and pao_elem_derivative_2().
subroutine evaluate(direction,species,l,acz,m,x,y,z,val)
use datatypes, only: double
integer, intent(in) :: species,l,acz,m
integer, intent(in) :: direction
real(kind=double), intent(in) :: x,y,z
real(kind=double), intent(out) :: val
end subroutine evaluate
end interface
nblock = domain%groups_on_node
npart = maxval(naba_atoms_of_blocks(atomf)%no_of_part)
natom = maxval(naba_atoms_of_blocks(atomf)%no_atom_on_part)
call start_timer(tmr_std_basis)
call start_timer(tmr_std_allocation)
allocate(ip_store(n_pts_in_block),x_store(n_pts_in_block),y_store(n_pts_in_block),z_store(n_pts_in_block), &
r_store(n_pts_in_block))
allocate(ip_store(n_pts_in_block ))
allocate(x_store( n_pts_in_block ))
allocate(y_store( n_pts_in_block ))
allocate(z_store( n_pts_in_block ))
allocate(r_store( n_pts_in_block ))
allocate(offset_position(natom, npart, nblock))
call stop_timer(tmr_std_allocation)
! -- Start of subroutine ---
! No need to compute these here, since they are derived from globals
! Store with rcellx, rcelly, rcellz?
! Reduces code duplication
dcellx_block=rcellx/blocks%ngcellx
dcelly_block=rcelly/blocks%ngcelly
dcellz_block=rcellz/blocks%ngcellz
call my_barrier()
no_of_ib_ia = 0
gridfunctions(pao_fns)%griddata = zero
next_offset_position = 0
offset_position = huge(0)
rcut = r_h + RD_ERR
! loop arround grid points in the domain, and for each
! point, get the PAO values
do iblock = 1, domain%groups_on_node ! primary set of blocks
xblock=(domain%idisp_primx(iblock)+domain%nx_origin-1)*dcellx_block
yblock=(domain%idisp_primy(iblock)+domain%ny_origin-1)*dcelly_block
zblock=(domain%idisp_primz(iblock)+domain%nz_origin-1)*dcellz_block
if(naba_atoms_of_blocks(atomf)%no_of_part(iblock) > 0) then ! if there are naba atoms
iatom=0
do ipart=1,naba_atoms_of_blocks(atomf)%no_of_part(iblock)
jpart=naba_atoms_of_blocks(atomf)%list_part(ipart,iblock)
if(jpart > DCS_parts%mx_gcover) then
call cq_abort('single_PAO_to_grid: JPART ERROR ',ipart,jpart)
endif
ind_part=DCS_parts%lab_cell(jpart)
do ia=1,naba_atoms_of_blocks(atomf)%no_atom_on_part(ipart,iblock)
iatom=iatom+1
ii = naba_atoms_of_blocks(atomf)%list_atom(iatom,iblock)
icover= DCS_parts%icover_ibeg(jpart)+ii-1
ig_atom= id_glob(parts%icell_beg(ind_part)+ii-1)
! Note: Using OpenMP in this loop requires some redesign because there is a loop
! carrier dependency in next_offset_position.
blocks_loop: do iblock = 1, domain%groups_on_node ! primary set of blocks
iatom = 0
parts_loop: do ipart=1,naba_atoms_of_blocks(atomf)%no_of_part(iblock)
naba_part_label = naba_atoms_of_blocks(atomf)%list_part(ipart,iblock)
ind_part = DCS_parts%lab_cell(naba_part_label)
atoms_loop: do ia=1,naba_atoms_of_blocks(atomf)%no_atom_on_part(ipart,iblock)
if(parts%icell_beg(ind_part) + ii-1 > ni_in_cell) then
call cq_abort('single_PAO_to_grid: globID ERROR ', &
ii,parts%icell_beg(ind_part))
endif
if(icover > DCS_parts%mx_mcover) then
call cq_abort('single_PAO_to_grid: icover ERROR ', &
icover,DCS_parts%mx_mcover)
endif
call get_species(iblock, naba_part_label, ind_part, iatom, icover, my_species)
xatom=DCS_parts%xcover(icover)
yatom=DCS_parts%ycover(icover)
zatom=DCS_parts%zcover(icover)
the_species=species_glob(ig_atom)
offset_position(ia, ipart, iblock) = next_offset_position
next_offset_position = offset_position(ia, ipart, iblock) + &
npao_species(my_species) * n_pts_in_block
end do atoms_loop
end do parts_loop
end do blocks_loop
!calculates distances between the atom and integration grid points
!in the block and stores which integration grids are neighbours.
rcut = r_h + RD_ERR
call check_block (xblock,yblock,zblock,xatom,yatom,zatom, rcut, & ! in
npoint,ip_store,r_store,x_store,y_store,z_store,n_pts_in_block) !out
r_from_i = sqrt((xatom-xblock)**2+(yatom-yblock)**2+ &
(zatom-zblock)**2 )
!$omp parallel do default(none) &
!$omp schedule(dynamic) &
!$omp shared(domain, naba_atoms_of_blocks, offset_position, pao_fns, atomf, &
!$omp dcellx_block, dcelly_block, dcellz_block, dcs_parts, &
!$omp rcut, n_pts_in_block, pao, gridfunctions, direction) &
!$omp private(ia, ipart, iblock, l1, acz, m1, count1, x, y, z, val, position, &
!$omp npoint, r_store, ip_store, x_store, y_store, z_store, my_species, &
!$omp xblock, yblock, zblock, iatom, xatom, yatom, zatom, naba_part_label, ind_part, icover)
blocks_loop_omp: do iblock = 1, domain%groups_on_node ! primary set of blocks
xblock = ( domain%idisp_primx(iblock) + domain%nx_origin - 1 ) * dcellx_block
yblock = ( domain%idisp_primy(iblock) + domain%ny_origin - 1 ) * dcelly_block
zblock = ( domain%idisp_primz(iblock) + domain%nz_origin - 1 ) * dcellz_block
iatom = 0
parts_loop_omp: do ipart=1,naba_atoms_of_blocks(atomf)%no_of_part(iblock)
naba_part_label = naba_atoms_of_blocks(atomf)%list_part(ipart,iblock)
ind_part = DCS_parts%lab_cell(naba_part_label)
atoms_loop_omp: do ia=1,naba_atoms_of_blocks(atomf)%no_atom_on_part(ipart,iblock)
if(npoint > 0) then
!offset_position = (no_of_ib_ia-1) * npao * n_pts_in_block
offset_position = no_of_ib_ia
do ip=1,npoint
ipoint=ip_store(ip)
position= offset_position + ipoint
if(position > gridfunctions(pao_fns)%size) call cq_abort &
('single_pao_to_grid: position error ', position, gridfunctions(pao_fns)%size)
call get_species(iblock, naba_part_label, ind_part, iatom, icover, my_species)
r_from_i = r_store(ip)
x = x_store(ip)
y = y_store(ip)
z = z_store(ip)
! For this point-atom offset, we accumulate the PAO on the grid
count1 = 1
do l1 = 0,pao(the_species)%greatest_angmom
do acz = 1,pao(the_species)%angmom(l1)%n_zeta_in_angmom
do m1=-l1,l1
call evaluate_pao(the_species,l1,acz,m1,x,y,z,val)
if(position+(count1-1)*n_pts_in_block > gridfunctions(pao_fns)%size) &
call cq_abort('single_pao_to_grid: position error ', &
position, gridfunctions(pao_fns)%size)
gridfunctions(pao_fns)%griddata(position+(count1-1)*n_pts_in_block) = val
count1 = count1+1
end do ! m1
end do ! acz
end do ! l1
enddo ! ip=1,npoint
endif! (npoint > 0) then
no_of_ib_ia = no_of_ib_ia + npao_species(the_species)*n_pts_in_block
enddo ! naba_atoms
enddo ! naba_part
endif !(naba_atoms_of_blocks(atomf)%no_of_part(iblock) > 0) !naba atoms?
enddo ! iblock : primary set of blocks
xatom = DCS_parts%xcover(icover)
yatom = DCS_parts%ycover(icover)
zatom = DCS_parts%zcover(icover)
!calculates distances between the atom and integration grid points
!in the block and stores which integration grids are neighbours.
call check_block (xblock, yblock, zblock, xatom, yatom, zatom, rcut, & ! in
npoint, ip_store, r_store, x_store, y_store, z_store, & !out
n_pts_in_block) ! in
points_loop_omp: do ip=1,npoint
position = offset_position(ia, ipart, iblock) + ip_store(ip)
x = x_store(ip)
y = y_store(ip)
z = z_store(ip)
! For this point-atom offset, we accumulate the PAO on the grid
l_loop: do l1 = 0,pao(my_species)%greatest_angmom
z_loop: do acz = 1,pao(my_species)%angmom(l1)%n_zeta_in_angmom
m_loop: do m1=-l1,l1
call evaluate(direction,my_species,l1,acz,m1,x,y,z,val)
gridfunctions(pao_fns)%griddata(position) = val
position = position + n_pts_in_block
end do m_loop
end do z_loop
end do l_loop
enddo points_loop_omp
enddo atoms_loop_omp
enddo parts_loop_omp
enddo blocks_loop_omp
!$omp end parallel do
call my_barrier()
call start_timer(tmr_std_allocation)
deallocate(ip_store,x_store,y_store,z_store,r_store)
deallocate(ip_store,x_store,y_store,z_store,r_store,offset_position)
call stop_timer(tmr_std_allocation)
call stop_timer(tmr_std_basis)
return
end subroutine Single_PAO_to_grid
!!***
!!****f* PAO_grid_transform_module/single_PAO_to_grad *
!!
!! NAME
!! single_PAO_to_grad
!! USAGE
!!
!! PURPOSE
!! Projects the gradient of PAO functions onto the grid (rather than support functions)
!! Used for gradients of energy wrt atomic coordinates
!!
!! This subroutine is based on sub:single_PAO_to_grid in PAO_grid_transform_module.f90.
!!
!! INPUTS
!!
!! USES
!!
!! AUTHOR
!! A. Nakata
!! CREATION DATE
!! 2016/11/10
!! MODIFICATION HISTORY
!!
!! SOURCE
!!
subroutine single_PAO_to_grad(direction, pao_fns)
use datatypes
use primary_module, ONLY: bundle
use GenComms, ONLY: my_barrier, cq_abort, mtime
use dimens, ONLY: r_h
use GenComms, ONLY: inode, ionode
use numbers
use global_module, ONLY: rcellx,rcelly,rcellz,id_glob,ni_in_cell, iprint_basis, species_glob, atomf
use species_module, ONLY: species, npao_species
! At present, these arrays are dummy arguments.
use block_module, ONLY : nx_in_block,ny_in_block,nz_in_block, n_pts_in_block
use group_module, ONLY : blocks, parts
use primary_module, ONLY: domain
use cover_module, ONLY: DCS_parts
use set_blipgrid_module, ONLY : naba_atoms_of_blocks
use angular_coeff_routines, ONLY : pao_elem_derivative_2
use functions_on_grid, ONLY: gridfunctions, fn_on_grid
use pao_format
implicit none
integer,intent(in) :: pao_fns
integer,intent(in) :: direction
!local
real(double):: dcellx_block,dcelly_block,dcellz_block
integer :: ipart,jpart,ind_part,ia,ii,icover,ig_atom
real(double):: xatom,yatom,zatom,alpha,step
real(double):: xblock,yblock,zblock
integer :: the_species
integer :: j,iblock,the_l,ipoint, igrid
real(double) :: r_from_i
real(double) :: rr,a,b,c,d,x,y,z,nl_potential
integer :: no_of_ib_ia, offset_position
integer :: position,iatom
integer :: stat, nl, npoint, ip
integer :: i,m, m1min, m1max,acz,m1,l1,count1
integer , allocatable :: ip_store(:)
real(double), allocatable :: x_store(:)
real(double), allocatable :: y_store(:)
real(double), allocatable :: z_store(:)
real(double), allocatable :: r_store(:)
real(double) :: coulomb_energy
real(double) :: rcut
real(double) :: r1, r2, r3, r4, core_charge, gauss_charge
real(double) :: val, theta, phi, r_tmp
call start_timer(tmr_std_basis)
call start_timer(tmr_std_allocation)
allocate(ip_store(n_pts_in_block),x_store(n_pts_in_block),y_store(n_pts_in_block),z_store(n_pts_in_block), &
r_store(n_pts_in_block))
call stop_timer(tmr_std_allocation)
! -- Start of subroutine ---
dcellx_block=rcellx/blocks%ngcellx
dcelly_block=rcelly/blocks%ngcelly
dcellz_block=rcellz/blocks%ngcellz
call my_barrier()
no_of_ib_ia = 0
gridfunctions(pao_fns)%griddata = zero
! loop arround grid points in the domain, and for each
! point, get the d_PAO/d_R values
do iblock = 1, domain%groups_on_node ! primary set of blocks
xblock=(domain%idisp_primx(iblock)+domain%nx_origin-1)*dcellx_block
yblock=(domain%idisp_primy(iblock)+domain%ny_origin-1)*dcelly_block
zblock=(domain%idisp_primz(iblock)+domain%nz_origin-1)*dcellz_block
if(naba_atoms_of_blocks(atomf)%no_of_part(iblock) > 0) then ! if there are naba atoms
iatom=0
do ipart=1,naba_atoms_of_blocks(atomf)%no_of_part(iblock)
jpart=naba_atoms_of_blocks(atomf)%list_part(ipart,iblock)
if(jpart > DCS_parts%mx_gcover) then
call cq_abort('single_PAO_to_grad: JPART ERROR ',ipart,jpart)
endif
ind_part=DCS_parts%lab_cell(jpart)
do ia=1,naba_atoms_of_blocks(atomf)%no_atom_on_part(ipart,iblock)
iatom=iatom+1
ii = naba_atoms_of_blocks(atomf)%list_atom(iatom,iblock)
icover= DCS_parts%icover_ibeg(jpart)+ii-1
ig_atom= id_glob(parts%icell_beg(ind_part)+ii-1)
if(parts%icell_beg(ind_part) + ii-1 > ni_in_cell) then
call cq_abort('single_PAO_to_grad: globID ERROR ', &
ii,parts%icell_beg(ind_part))
endif
if(icover > DCS_parts%mx_mcover) then
call cq_abort('single_PAO_to_grad: icover ERROR ', &
icover,DCS_parts%mx_mcover)
endif
xatom=DCS_parts%xcover(icover)
yatom=DCS_parts%ycover(icover)
zatom=DCS_parts%zcover(icover)
the_species=species_glob(ig_atom)
!calculates distances between the atom and integration grid points
!in the block and stores which integration grids are neighbours.
rcut = r_h + RD_ERR
call check_block (xblock,yblock,zblock,xatom,yatom,zatom, rcut, & ! in
npoint,ip_store,r_store,x_store,y_store,z_store,n_pts_in_block) !out
r_from_i = sqrt((xatom-xblock)**2+(yatom-yblock)**2+ &
(zatom-zblock)**2 )
if(npoint > 0) then
!offset_position = (no_of_ib_ia-1) * npao * n_pts_in_block
offset_position = no_of_ib_ia
do ip=1,npoint
ipoint=ip_store(ip)
position= offset_position + ipoint
if(position > gridfunctions(pao_fns)%size) call cq_abort &
('single_pao_to_grad: position error ', position, gridfunctions(pao_fns)%size)
r_from_i = r_store(ip)
x = x_store(ip)
y = y_store(ip)
z = z_store(ip)
! For this point-atom offset, we accumulate the PAO on the grid
count1 = 1
do l1 = 0,pao(the_species)%greatest_angmom
do acz = 1,pao(the_species)%angmom(l1)%n_zeta_in_angmom
do m1=-l1,l1
call pao_elem_derivative_2(direction,the_species,l1,acz,m1,x,y,z,val)
if(position+(count1-1)*n_pts_in_block > gridfunctions(pao_fns)%size) &
call cq_abort('single_pao_to_grad: position error ', &
position, gridfunctions(pao_fns)%size)
gridfunctions(pao_fns)%griddata(position+(count1-1)*n_pts_in_block) = val
count1 = count1+1
end do ! m1
end do ! acz
end do ! l1
enddo ! ip=1,npoint
endif! (npoint > 0) then
no_of_ib_ia = no_of_ib_ia + npao_species(the_species)*n_pts_in_block
enddo ! naba_atoms
enddo ! naba_part
endif !(naba_atoms_of_blocks(atomf)%no_of_part(iblock) > 0) !naba atoms?
enddo ! iblock : primary set of blocks
call my_barrier()
call start_timer(tmr_std_allocation)
deallocate(ip_store,x_store,y_store,z_store,r_store)
call stop_timer(tmr_std_allocation)
call stop_timer(tmr_std_basis)
return
end subroutine Single_PAO_to_grad
!!***
end subroutine PAO_or_gradPAO_to_grid
!!***
! -----------------------------------------------------------
! Subroutine check_block
@ -431,15 +275,15 @@ contains
!! finds integration grids in a given block
!! whose distances from the atom (xatom, yatom, zatom)
!! are within a cutoff 'rcut'.
!!
!!
!! INPUTS
!! (xblock, yblock, zblock): the position of the l.h.s.
!! of the block
!! (xatom, yatom, zatom) : the position of the atom
!! rcut : cutoff
!! rcut : cutoff
!!
!! OUTPUTS
!! npoint : # of integration grids whose distances
!! npoint : # of integration grids whose distances
!! from the atom are within the cutoff rcut.
!! for the following, 0 < ii < n_pts_in_block.
!! ipoint(ii) : index of found points ii,
@ -459,7 +303,7 @@ contains
!!
subroutine check_block &
(xblock,yblock,zblock,xatom,yatom,zatom,rcut, &
npoint, ip_store, r_store, x_store, y_store, z_store,blocksize)
npoint, ip_store, r_store, x_store, y_store, z_store,blocksize)
use numbers
use global_module, ONLY: rcellx,rcelly,rcellz
@ -469,7 +313,7 @@ contains
implicit none
!Passed
!Passed
integer :: blocksize
real(double), intent(in):: xblock, yblock, zblock
real(double), intent(in):: xatom, yatom, zatom, rcut
@ -487,9 +331,13 @@ contains
rcut2 = rcut* rcut
dcellx_block=rcellx/blocks%ngcellx; dcellx_grid=dcellx_block/nx_in_block
dcelly_block=rcelly/blocks%ngcelly; dcelly_grid=dcelly_block/ny_in_block
dcellz_block=rcellz/blocks%ngcellz; dcellz_grid=dcellz_block/nz_in_block
dcellx_block=rcellx/blocks%ngcellx
dcelly_block=rcelly/blocks%ngcelly
dcellz_block=rcellz/blocks%ngcellz
dcellx_grid=dcellx_block/nx_in_block
dcelly_grid=dcelly_block/ny_in_block
dcellz_grid=dcellz_block/nz_in_block
ipoint=0
npoint=0
@ -536,6 +384,30 @@ contains
enddo ! iz=1,nz_in_block
return
end subroutine check_block
!!***
!!***
!< Helper routine to get my_species and icover from block, particle and atom indices
!>
subroutine get_species(iblock, naba_part_label, ind_part, iatom, icover, my_species)
use global_module, ONLY: id_glob, species_glob, atomf
use set_blipgrid_module, ONLY : naba_atoms_of_blocks
use cover_module, ONLY: DCS_parts
use group_module, ONLY : blocks, parts
integer, intent(in) :: iblock, naba_part_label, ind_part
integer, intent(inout) :: iatom
integer, intent(out) :: icover, my_species
integer :: tmp_index
iatom = iatom + 1
tmp_index = naba_atoms_of_blocks(atomf)%list_atom(iatom,iblock) - 1
icover= DCS_parts%icover_ibeg(naba_part_label) + tmp_index
my_species = species_glob(id_glob(parts%icell_beg(ind_part) + tmp_index))
end subroutine get_species
end module PAO_grid_transform_module

View File

@ -253,8 +253,9 @@ contains
use mult_module, only: matSatomf
use build_PAO_matrices, only: assemble_2
use io_module, only: dump_matrix
use PAO_grid_transform_module, only: single_PAO_to_grid
use PAO_grid_transform_module, only: PAO_or_gradPAO_to_grid
use functions_on_grid, only: atomfns
use angular_coeff_routines, only: evaluate_pao
implicit none
@ -271,7 +272,7 @@ contains
! calculate PAO values on grids
if (inode == ionode .and. iprint_ops + min_layer > 3) &
write (io_lun, fmt='(10x,a,i5)') 'single PAO to grid ', atomfns
call single_PAO_to_grid(atomfns)
call PAO_or_gradPAO_to_grid(atomfns, evaluate_pao, 0)
return
end subroutine get_S_matrix_PAO

View File

@ -155,6 +155,9 @@ module ScalapackFormat
! Dimension of matrix (always square)
integer :: matrix_size
! Dimension of padded H (and S) matrix
logical :: flag_padH
integer :: matrix_size_padH
! Block sizes (not necessarily square)
integer :: block_size_r, block_size_c
! Processor group
@ -252,12 +255,16 @@ contains
!! Added timer
!! 2011/02/13 L.Tong
!! Added k-point parallelisation
!! 2023/08/02 tsuyoshi
!! Changes for padding of H and S matrices
!! SOURCE
!!
subroutine allocate_arrays (nkp)
use datatypes, ONLY: double
use global_module, ONLY: iprint_DM, numprocs
use GenComms, ONLY: cq_abort, myid
use numbers, ONLY: RD_ERR
implicit none
@ -266,12 +273,24 @@ contains
! Local variables
integer :: stat
logical :: flag_err
if(iprint_DM>3.AND.myid==0) write(io_lun,fmt='(10x,i5,a)') myid,' Starting Allocate Arrays'
! Calculate maximum numbers of blocks in different directions
blocks_r = (matrix_size/block_size_r)
blocks_c = (matrix_size/block_size_c)
if(flag_padH) then
blocks_r = ceiling((real(matrix_size,double)-RD_ERR)/block_size_r)
blocks_c = ceiling((real(matrix_size,double)-RD_ERR)/block_size_c)
if(blocks_r .ne. blocks_c) call cq_abort("ScalapackFormat: blocks_r /= blocks_c")
matrix_size_padH = blocks_r * block_size_r
call check_block_parameters(flag_err)
if(flag_err) call cq_abort("ScalapacFormat: check_block_parameter ",blocks_c, proc_cols)
else
blocks_r = (matrix_size/block_size_r)
blocks_c = (matrix_size/block_size_c)
matrix_size_padH = matrix_size
endif
if(myid==0.AND.iprint_DM>1) write(io_lun,*) "matrix_size & matrix_size_padH = ",matrix_size, matrix_size_padH
if(myid==0.AND.iprint_DM>3) write(io_lun,1) blocks_r,blocks_c
maxrow = floor(real(blocks_r/proc_rows))+1
maxcol = floor(real(blocks_c/proc_cols))+1
@ -290,7 +309,7 @@ contains
SC_row_block_atom(block_size_r,blocks_r),&
SC_col_block_atom(block_size_c,blocks_c),STAT=stat)
if(stat/=0) call cq_abort("ScalapackFormat: Could not alloc bxa var",stat)
allocate(CQ2SC_row_info(matrix_size), my_row(matrix_size),proc_start(numprocs), STAT=stat)
allocate(CQ2SC_row_info(matrix_size_padH), my_row(matrix_size),proc_start(numprocs), STAT=stat)
nprocs_max = floor(real(numprocs/proc_groups))+1
nkpoints_max = floor(real(nkp/proc_groups))+1
allocate(pg_procs(proc_groups,nprocs_max),pg_kpoints(proc_groups,nkpoints_max),STAT=stat)
@ -302,6 +321,17 @@ contains
call stop_timer(tmr_std_allocation)
return
1 format(10x,'AllocArr: block sizes are: ',2i5)
contains
subroutine check_block_parameters(flag_err)
implicit none
logical, intent(out):: flag_err
flag_err=.false.
if(blocks_c < blocks_r) flag_err = .true.
if(blocks_c < proc_cols) flag_err = .true.
!the next one should not be necessary
if(blocks_r < proc_rows) flag_err = .true.
return
end subroutine check_block_parameters
end subroutine allocate_arrays
!!***
@ -743,6 +773,8 @@ contains
!! Added salutation at start of subroutine
!! 2008/05/19 ast
!! Added timer
!! 2023/07/20 tsuyoshi
!! Change for padding H and S matrices (to improve the efficiency of diagonalization)
!! SOURCE
!!
subroutine find_SC_row_atoms
@ -756,11 +788,27 @@ contains
! Local variables
integer :: i, patom, part, proc, CC, brow, SCblock, supfn
integer :: num_elem_pad, nproc_pad, iblock_pad, end_elem_pad, start_elem_pad
! For padding H and S matrices
num_elem_pad = matrix_size_padH - matrix_size ! # of padded elements
nproc_pad = mod( blocks_r-1, proc_rows ) + 1 ! ID of the responsible process for the padded part
iblock_pad = sum( proc_start( 1 : nproc_pad )%rows ) ! # of blocks before reaching the block including the padded part
end_elem_pad = block_size_r * iblock_pad ! element ID for the end of the padded part
start_elem_pad = end_elem_pad - num_elem_pad + 1 ! element ID for the start of the padded part
if(iprint_DM>3.AND.myid==0) write(io_lun,fmt='(10x,i5,a)') myid,' Starting Find SC Row Atoms'
! -----------------------------------------------------------------
! Loop over matrix using processor/partition/sequence order
i = 1 ! Indexes matrix row
! For padding H and S matrices:
! CQ2SC_row_info(:)%CClabel is now initialised and some of the values can be kept 0 for the padded parts.
! Other members are basically not used for padded parts, but also initialised to be 0 for safety.
CQ2SC_row_info(:)%CClabel = 0
CQ2SC_row_info(:)%support_fn = 0
CQ2SC_row_info(:)%atom = 0
CQ2SC_row_info(:)%partition = 0
do proc=1,numprocs
proc_start(proc)%startrow = i ! This is where data for the processor starts
if(parts%ng_on_node(proc)>0) then
@ -774,7 +822,8 @@ contains
CQ2SC_row_info(i)%partition = part
CQ2SC_row_info(i)%CClabel = CC
i = i+1
if(i>matrix_size+1) call cq_abort('Too many support functions !',i)
if( i==start_elem_pad ) i=i+num_elem_pad
if(i>matrix_size_padH+1) call cq_abort('Too many support functions !',i)
end do
end do
end if
@ -801,7 +850,7 @@ contains
if(iprint_DM>3.AND.myid==0) &
write(io_lun,2) myid,CQ2SC_row_info(i)%CClabel,CQ2SC_row_info(i)%atom,CQ2SC_row_info(i)%support_fn
i=i+1
if(i>matrix_size+1) call cq_abort('Too many support functions !',i)
if(i>matrix_size_padH+1) call cq_abort('Too many support functions !',i)
end do
end do
! End loop over matrix using blocks
@ -853,6 +902,8 @@ contains
!! Added timer
!! 2013/07/05 dave
!! Moved check on cb overrunning so that erroneous error goes away
!! 2023/7/20 tsuyoshi
!! Changed for the version of padding H matrix
!! SOURCE
!!
subroutine find_ref_row_atoms
@ -869,6 +920,17 @@ contains
if(iprint_DM>3.AND.myid==0) write(io_lun,fmt='(10x,i5,a)') myid,' Starting Find Ref Row Atoms'
blockcol = 1
cb = 1
! For padding of H matrix, we need to initialize ref_row_block_atom and ref_col_block_atom,
! because they need to be kept 0 for the padding part.
! (it might be safer to initialize other members (atom and support_fn)
ref_row_block_atom(:,:)%part = 0
ref_col_block_atom(:,:)%part = 0
! for safety, other members are also initialised.
ref_row_block_atom(:,:)%atom = 0
ref_col_block_atom(:,:)%atom = 0
ref_row_block_atom(:,:)%support_fn = 0
ref_col_block_atom(:,:)%support_fn = 0
if(iprint_DM>3.AND.myid==0) write(io_lun,fmt='(10x,a,2i5)') ' blocks, size: ',blocks_r, block_size_r
! Loop over reference row blocks
do rb = 1,blocks_r
@ -876,6 +938,8 @@ contains
if(iprint_DM>3.AND.myid==0) write(io_lun,2) myid,rb,SCblockx
do blockrow = 1,block_size_r ! Loop over rows in block
part = SC_row_block_atom(blockrow,SCblockx)%part
!For the padded part, setting of ref_row_block_atom should not be done. (kept to be 0)
if(part == 0) cycle
seq = SC_row_block_atom(blockrow,SCblockx)%atom
supfn = SC_row_block_atom(blockrow,SCblockx)%support_fn
if(cb>blocks_c+1.OR.cb==blocks_c+1.AND.blockcol>1) then
@ -940,6 +1004,8 @@ contains
!! Added salutation at start of subroutine
!! 2008/05/19 ast
!! Added timer
!! 2023/07/20 tsuyoshi
!! Change for padding Hamiltonian and overlap matrices
!! SOURCE
!!
subroutine find_SC_col_atoms
@ -954,6 +1020,12 @@ contains
! Local variables
integer :: cb, blockcol, refc, part, seq, supfn, np_in_cell
! for padding H matrix, we need to initialise SC_col_block_atom
SC_col_block_atom(:,:)%part = 0
! for safety other members are also initialised.
SC_col_block_atom(:,:)%atom = 0
SC_col_block_atom(:,:)%support_fn = 0
if(iprint_DM>3.AND.myid==0) write(io_lun,fmt='(10x,i5, a)') myid,' Starting Find SC Col Atoms'
! Loop over SC blocks
do cb = 1,blocks_c
@ -961,6 +1033,8 @@ contains
if(iprint_DM>3.AND.myid==0) write(io_lun,2) myid, cb, refc
do blockcol = 1,block_size_c
part = ref_col_block_atom(blockcol,refc)%part
! for the padded part (padding Hmatrix version)
if(part == 0) cycle ! for padding H and S matrices (for padded part)
seq = ref_col_block_atom(blockcol,refc)%atom
supfn = ref_col_block_atom(blockcol,refc)%support_fn
SC_col_block_atom(blockcol,cb)%part = part

View File

@ -703,8 +703,10 @@ contains
end select
! d e_xc/d n
! Awkward indexing because LibXC does spin first then grid point
do spin=1,nspin
xc_potential(:,spin) = xc_potential(:,spin) + vrho(spin::nspin)
xc_potential(1:n_my_grid_points,spin) = xc_potential(1:n_my_grid_points,spin) + &
vrho(spin:nspin*n_my_grid_points+spin-2:nspin)
end do
if(flag_is_GGA) then
@ -716,7 +718,8 @@ contains
do i=1,3
! d eps / d sigma(up.up) grad rho(up) + d eps / d sigma(up.down) grad rho(down)
! Note the stride here which comes from LibXC putting the spin index first
temp(:) = two*vsigma(1::3)*grad_density(:,i,1) + vsigma(2::3)*grad_density(:,i,2)
temp(1:n_my_grid_points) = two*vsigma(1:3*n_my_grid_points-2:3)*grad_density(1:n_my_grid_points,i,1) + &
vsigma(2:3*n_my_grid_points-1:3)*grad_density(1:n_my_grid_points,i,2)
! For non-orthogonal stresses, introduce another loop and dot with grad_density(:,j)
if (flag_stress) then
if (flag_full_stress) then
@ -746,7 +749,8 @@ contains
do i=1,3
! d eps / d sigma(down.down) grad rho(down) + d eps / d sigma(up.down) grad rho(up)
! Again, note stride
temp(:) = vsigma(2::3)*grad_density(:,i,1) + two*vsigma(3::3)*grad_density(:,i,2)
temp(1:n_my_grid_points) = vsigma(2:3*n_my_grid_points-1:3)*grad_density(1:n_my_grid_points,i,1) + &
two*vsigma(3:3*n_my_grid_points:3)*grad_density(1:n_my_grid_points,i,2)
! For non-orthogonal stresses, introduce another loop and dot with grad_density(:,j)
if (flag_stress) then
if (flag_full_stress) then
@ -811,10 +815,15 @@ contains
ng(:,1) = two * minus_i * ( ng(:,1)*recip_vector(:,1) + &
ng(:,2)*recip_vector(:,2) + ng(:,3)*recip_vector(:,3))
! Use vsigma for the second term in real space
vsigma = zero
call fft3(vsigma(:), ng(:,1), size, +1)
!vsigma = zero
!call fft3(vsigma(:), ng(:,1), size, +1)
!xc_potential(1:n_my_grid_points,1) = xc_potential(1:n_my_grid_points,1) + &
! vsigma(1:n_my_grid_points)
! Actually I think temp is fine
temp = zero
call fft3(temp(:), ng(:,1), size, +1)
xc_potential(1:n_my_grid_points,1) = xc_potential(1:n_my_grid_points,1) + &
vsigma(1:n_my_grid_points)
temp(1:n_my_grid_points)
end if ! flag_is_GGA
end if ! nspin
@ -912,7 +921,11 @@ contains
integer :: stat, i, spin, n, j
! Initialise - allocate and zero
allocate(alt_dens(n_my_grid_points*nspin),vrho(n_my_grid_points*nspin))
if(nspin>1) then
allocate(alt_dens(n_my_grid_points*3),vrho(n_my_grid_points*3))
else
allocate(alt_dens(n_my_grid_points),vrho(n_my_grid_points))
end if
alt_dens = zero
if(flag_is_GGA) then
allocate(diff_rho(size))
@ -988,10 +1001,10 @@ contains
select case (i_xc_family(j))
case(XC_FAMILY_LDA)
call xc_f90_lda_fxc(xc_func(j),n_my_grid_points,alt_dens(1),vrho(1))
dxc_potential(:,1,1) = dxc_potential(:,1,1) +vrho(1::3)
dxc_potential(:,1,2) = dxc_potential(:,1,2) +vrho(2::3)
dxc_potential(:,2,1) = dxc_potential(:,2,1) +vrho(2::3)
dxc_potential(:,2,2) = dxc_potential(:,2,2) +vrho(3::3)
dxc_potential(1:n_my_grid_points,1,1) = dxc_potential(:n_my_grid_points,1,1) +vrho(1:3*n_my_grid_points-2:3)
dxc_potential(1:n_my_grid_points,1,2) = dxc_potential(:n_my_grid_points,1,2) +vrho(2:3*n_my_grid_points-1:3)
dxc_potential(1:n_my_grid_points,2,1) = dxc_potential(:n_my_grid_points,2,1) +vrho(2:3*n_my_grid_points-1:3)
dxc_potential(1:n_my_grid_points,2,2) = dxc_potential(:n_my_grid_points,2,2) +vrho(3:3*n_my_grid_points:3)
end select
else
select case (i_xc_family(j))

View File

@ -708,8 +708,10 @@ contains
end select
! d e_xc/d n
! Awkward indexing because LibXC does spin first then grid point
do spin=1,nspin
xc_potential(:,spin) = xc_potential(:,spin) + vrho(spin::nspin)
xc_potential(1:n_my_grid_points,spin) = xc_potential(1:n_my_grid_points,spin) + &
vrho(spin:nspin*n_my_grid_points+spin-2:nspin)
end do
if(flag_is_GGA) then
@ -721,7 +723,8 @@ contains
do i=1,3
! d eps / d sigma(up.up) grad rho(up) + d eps / d sigma(up.down) grad rho(down)
! Note the stride here which comes from LibXC putting the spin index first
temp(:) = two*vsigma(1::3)*grad_density(:,i,1) + vsigma(2::3)*grad_density(:,i,2)
temp(1:n_my_grid_points) = two*vsigma(1:3*n_my_grid_points-2:3)*grad_density(1:n_my_grid_points,i,1) + &
vsigma(2:3*n_my_grid_points-1:3)*grad_density(1:n_my_grid_points,i,2)
! For non-orthogonal stresses, introduce another loop and dot with grad_density(:,j)
if (flag_stress) then
if (flag_full_stress) then
@ -751,7 +754,8 @@ contains
do i=1,3
! d eps / d sigma(down.down) grad rho(down) + d eps / d sigma(up.down) grad rho(up)
! Again, note stride
temp(:) = vsigma(2::3)*grad_density(:,i,1) + two*vsigma(3::3)*grad_density(:,i,2)
temp(1:n_my_grid_points) = vsigma(2:3*n_my_grid_points-1:3)*grad_density(1:n_my_grid_points,i,1) + &
two*vsigma(3:3*n_my_grid_points:3)*grad_density(1:n_my_grid_points,i,2)
! For non-orthogonal stresses, introduce another loop and dot with grad_density(:,j)
if (flag_stress) then
if (flag_full_stress) then
@ -817,10 +821,15 @@ contains
ng(:,1) = two * minus_i * ( ng(:,1)*recip_vector(:,1) + &
ng(:,2)*recip_vector(:,2) + ng(:,3)*recip_vector(:,3))
! Use vsigma for the second term in real space
vsigma = zero
call fft3(vsigma(:), ng(:,1), size, +1)
!vsigma = zero
!call fft3(vsigma(:), ng(:,1), size, +1)
!xc_potential(1:n_my_grid_points,1) = xc_potential(1:n_my_grid_points,1) + &
! vsigma(1:n_my_grid_points)
! Actually I think temp is fine
temp = zero
call fft3(temp(:), ng(:,1), size, +1)
xc_potential(1:n_my_grid_points,1) = xc_potential(1:n_my_grid_points,1) + &
vsigma(1:n_my_grid_points)
temp(1:n_my_grid_points)
end if ! flag_is_GGA
end if ! nspin
@ -919,7 +928,11 @@ contains
integer :: stat, i, spin, n, j
! Initialise - allocate and zero
allocate(alt_dens(n_my_grid_points*nspin),vrho(n_my_grid_points*nspin))
if(nspin>1) then
allocate(alt_dens(n_my_grid_points*3),vrho(n_my_grid_points*3))
else
allocate(alt_dens(n_my_grid_points),vrho(n_my_grid_points))
end if
alt_dens = zero
if(flag_is_GGA) then
allocate(diff_rho(size))
@ -995,10 +1008,10 @@ contains
select case (i_xc_family(j))
case(XC_FAMILY_LDA)
call xc_f90_lda_fxc(xc_func(j),int(n_my_grid_points,kind=wide),alt_dens,vrho)
dxc_potential(:,1,1) = dxc_potential(:,1,1) +vrho(1::3)
dxc_potential(:,1,2) = dxc_potential(:,1,2) +vrho(2::3)
dxc_potential(:,2,1) = dxc_potential(:,2,1) +vrho(2::3)
dxc_potential(:,2,2) = dxc_potential(:,2,2) +vrho(3::3)
dxc_potential(1:n_my_grid_points,1,1) = dxc_potential(:n_my_grid_points,1,1) +vrho(1:3*n_my_grid_points-2:3)
dxc_potential(1:n_my_grid_points,1,2) = dxc_potential(:n_my_grid_points,1,2) +vrho(2:3*n_my_grid_points-1:3)
dxc_potential(1:n_my_grid_points,2,1) = dxc_potential(:n_my_grid_points,2,1) +vrho(2:3*n_my_grid_points-1:3)
dxc_potential(1:n_my_grid_points,2,2) = dxc_potential(:n_my_grid_points,2,2) +vrho(3:3*n_my_grid_points:3)
end select
else
select case (i_xc_family(j))

View File

@ -19,10 +19,10 @@
!! MODIFICATION HISTORY
!! 17/06/2002 dave
!! Added headers (ROBODoc for module)
!! 10:38, 06/03/2003 drb
!! 10:38, 06/03/2003 drb
!! Corrected array slice pass in act_on_vectors_new (speed problem
!! under ifc)
!! 10:09, 13/02/2006 drb
!! 10:09, 13/02/2006 drb
!! Removed all explicit references to data_ variables and rewrote
!! in terms of new matrix routines
!! 2006/03/04 06:14 dave
@ -56,17 +56,17 @@ contains
!!****f* calc_matrix_elements_module/norb *
!!
!! NAME
!! NAME
!! norb
!! USAGE
!! norb(naba_atm structure, atom, block)
!! PURPOSE
!! Returns number of orbitals on a given neighbour of a given block
!! INPUTS
!!
!!
!!
!!
!! USES
!!
!!
!! AUTHOR
!! T. Miyazaki/D. R. Bowler
!! CREATION DATE
@ -92,23 +92,23 @@ contains
norb = naba_atm%ibeg_orb_atom(naba+1,iprim_blk) - &
naba_atm%ibeg_orb_atom(naba,iprim_blk)
end if
end function norb
!!***
!!****f* calc_matrix_elements_module/get_matrix_elements_new *
!!
!! NAME
!! NAME
!! get_matrix_elements_new - does integration on grid to get matrix elements
!! USAGE
!!
!!
!! PURPOSE
!! Loops over blocks on the domain and calculates matrix element partials
!! INPUTS
!!
!!
!!
!!
!! USES
!!
!!
!! AUTHOR
!! T. Miyazaki
!! CREATION DATE
@ -170,7 +170,7 @@ contains
naba_atm2 => naba_atoms_of_blocks(loc_bucket%ind_right)
size_send_array = loc_bucket%no_pair_orb
if(allocated(send_array)) then
if(allocated(send_array)) then
size_send_array = size(send_array)
call cq_abort("Error: send_array allocated: ", size_send_array)
end if
@ -181,40 +181,43 @@ contains
call reg_alloc_mem(area_integn, size_send_array, type_dbl)
send_array(1:size_send_array) = zero
! loop over blocks in this node, calculating the contributions
! loop over blocks in this node, calculating the contributions
! from each block
! we need the following barrier ??
! call my_barrier()
!$omp parallel do default(none) &
!$omp schedule(dynamic) &
!$omp reduction(+: send_array) &
!$omp shared(naba_atm1, naba_atm2, gridfunctions, n_pts_in_block, loc_bucket, &
!$omp domain, gridone, gridtwo) &
!$omp private(iprim_blk, n_dim_one, n_dim_two, i_beg_one, i_beg_two, &
!$omp stat, ind_halo1, ind_halo2, na1, na2, bucket, nonef, ntwof, &
!$omp naba1, naba2, ii, nsf2, i_acc_b, acc_block)
do iprim_blk=1, domain%groups_on_node
n_dim_one = naba_atm1%no_of_orb(iprim_blk) !left
n_dim_two = naba_atm2%no_of_orb(iprim_blk) !right
i_beg_one = (naba_atm1%ibegin_blk_orb(iprim_blk)-1) * n_pts_in_block +1
i_beg_two = (naba_atm2%ibegin_blk_orb(iprim_blk)-1) * n_pts_in_block +1
if(i_beg_one+n_dim_one*n_pts_in_block-1 > gridfunctions(gridone)%size) then
call cq_abort("get_matrix_elements gridone overflow: ",gridfunctions(gridone)%size, &
i_beg_one+n_dim_one*n_pts_in_block-1)
endif
if(i_beg_two+n_dim_two*n_pts_in_block-1 > gridfunctions(gridtwo)%size) then
call cq_abort("get_matrix_elements gridtwo overflow: ",gridfunctions(gridtwo)%size, &
i_beg_two+n_dim_two*n_pts_in_block-1)
endif
! get the overlap contribution from this block
if(n_dim_two*n_dim_one /= 0) then ! If the primary block has naba atoms
! TK: Do we have to allocate memory on each iteration?
! Could we do this before the loop?
! Get a max of n_dim_two*n_dim_one over possible values of iprim_blk
! for example and pass a slice of it to gemm
allocate(acc_block(n_dim_two*n_dim_one),STAT=stat)
if(stat/=0) call cq_abort('Error allocating memory in get_matrix_elements: ',n_dim_one,n_dim_two)
acc_block = zero
! for both left and right functions...
! To get the contiguous access for acc_block, it should be
!arranged like acc_block(right,left).
! Thus, we use the lower equality (send_array=right*left) in
! Thus, we use the lower equality (send_array=right*left) in
!the following equation.
! acc_block(j beta, i alpha)
! =\sum_{r_l in block} [ phi_{i alpha} (r_l) * psi_{j beta} (r_l) ]
! =\sum_{r_l in block} [ psi_{j beta} (r_l) * phi_{i alpha} (r_l)]
! =\sum_{r_l in block} [ psi_{j beta} (r_l) * phi_{i alpha} (r_l)]
!
call gemm ( 'T', 'N', n_dim_one, n_dim_two, n_pts_in_block, &
ONE, gridfunctions(gridone)%griddata(i_beg_one:), n_pts_in_block, &
@ -225,10 +228,10 @@ contains
! NB order changed to one/two to give contiguous access to send_array and acc_block
! Note that we can expect loc_bucket%i_h2d(ind_halo2,ind_halo1) changes
! gradually in most cases, if ind_halo1 is fixed and both naba2
! gradually in most cases, if ind_halo1 is fixed and both naba2
! and ind_halo2 are orderd in NOPG order
!
do naba1=1, naba_atm1%no_of_atom(iprim_blk) ! left
do naba1=1, naba_atm1%no_of_atom(iprim_blk) ! left
ind_halo1 = naba_atm1%list_atom_by_halo(naba1,iprim_blk)
na1 = naba_atm1%ibeg_orb_atom(naba1, iprim_blk)-1
do naba2=1, naba_atm2%no_of_atom(iprim_blk) ! right
@ -237,7 +240,7 @@ contains
bucket = loc_bucket%i_h2d(ind_halo2,ind_halo1) !index of the pair
If(bucket /= 0) then ! naba1 and naba2 makes pair
ii=(bucket-1)
! Note that matrix elements A_{i alpha}{j beta} are arranged
! Note that matrix elements A_{i alpha}{j beta} are arranged
! like (alpha,beta,ji). As for ji, j is changing faster than i
nonef = norb(naba_atm1,naba1,iprim_blk)
ntwof = norb(naba_atm2,naba2,iprim_blk)
@ -246,12 +249,13 @@ contains
send_array(ii+1:ii+nonef)=send_array(ii+1:ii+nonef)+acc_block(i_acc_b+1:i_acc_b+nonef)
ii = ii + nonef
end do
Endif ! if the two atoms are within a range
Endif ! if the two atoms are within a range
enddo ! Loop over right naba atoms
enddo ! Loop over left naba atoms
deallocate(acc_block)
endif ! If the primary block has naba atoms for left & right functions
end do ! end loop over primary blocks
!$omp end parallel do
call put_matrix_elements &
(myid, loc_bucket, rem_bucket, matM )
@ -271,7 +275,7 @@ contains
! Need to be changed if number of functions of each atom varies
!
! 20/June/2003 T. MIYAZAKI
! We should consider the case where some of the domains have
! We should consider the case where some of the domains have
! no neighbour atoms. (surface with large vacuum area.)
subroutine put_matrix_elements(myid, loc_bucket, rem_bucket, matM)
@ -304,9 +308,9 @@ contains
integer :: jnode, ipair, loc1, loc2, ii, isf1, isf2, stat, msize
integer, dimension(MPI_STATUS_SIZE) :: nrecv_stat, nwait_stat
integer, parameter :: tag = 1
mynode = myid + 1
ierr = 0
ierr = 0
size_send_array = size(send_array)
call matrix_scale(zero, matM)
if (loc_bucket%no_recv_node > 0) then
@ -324,7 +328,7 @@ contains
nsize = loc_bucket%ibegin_pair_orb(inode + 1) - &
loc_bucket%ibegin_pair_orb(inode)
end if
!SENDING or KEEPING the First Address
!SENDING or KEEPING the First Address
if (nnd_rem == mynode) then
myid_ibegin = ibegin
else if (nsize > 0) then
@ -336,7 +340,7 @@ contains
ierr)
end if
end do
end if ! (loc_bucket%no_recv_node >0)
end if ! (loc_bucket%no_recv_node >0)
if (rem_bucket%no_send_node > 0) then
msize = 0
@ -378,7 +382,7 @@ contains
ii=ii+1
end do
end do
else
else
write(io_lun,*) 'ERROR? in remote_bucket',ipair,myid
write(io_lun,*) ' a pair of two atoms in a domain partial node &
& is not a neighbour pair in a bundle node. ??? '
@ -390,7 +394,7 @@ contains
deallocate(recv_array,STAT=stat)
if (stat/=0) call cq_abort("Error deallocating recv_array in put_matrix_elements: ",msize)
call reg_dealloc_mem(area_integn,msize,type_dbl)
end if !(rem_bucket%no_send_node >0)
end if !(rem_bucket%no_send_node >0)
if (loc_bucket%no_recv_node >0) then
do inode=1,loc_bucket%no_recv_node
@ -416,9 +420,9 @@ contains
!sbrt act_on_vectors_new&
! (myid,rem_bucket,data_M,gridone,gridtwo)
!------------ NEW VERSION -------------------------------------------------
! Now we assume, every atom has same NONEF(NTWOF) for
! Now we assume, every atom has same NONEF(NTWOF) for
! gridone(gridtwo).
! We have to change
! We have to change
! nonef -> nonef(ia) ia: naba atm
! calculation of ibegin_blk in set_blipgrid_module
!
@ -436,7 +440,7 @@ contains
use naba_blk_module, only:naba_atm_of_blk
use set_blipgrid_module, only: naba_atoms_of_blocks
use bucket_module, only:local_bucket,remote_bucket
use GenBlas, only:axpy
use GenBlas, only:gemm
use comm_array_module, only:send_array
use block_module, only:n_pts_in_block
use functions_on_grid, only: gridfunctions, fn_on_grid
@ -478,15 +482,20 @@ contains
! collects matrix elements and store them in send_array
call collect_matrix_elements(myid, loc_bucket, rem_bucket, matM)
! Initialization of output (gridone)
! gridone(:) = zero ! NOT INITIALISE
! FOR get_non_local_gradient !
! 19/Sep/00 Tsuyoshi Miyazaki
! loop over blocks in this node
!$omp parallel do default(none) &
!$omp schedule(dynamic) &
!$omp shared(naba_atm1, naba_atm2, domain, gridfunctions, loc_bucket, &
!$omp n_pts_in_block, send_array, gridone, gridtwo) &
!$omp private(iprim_blk, n_dim_one, n_dim_two, naba1, naba2, bucket, &
!$omp ind_halo1, ind_halo2, nonef, ntwof, nsf1, nsf2, &
!$omp ii, factor_M, ind1, ind2)
do iprim_blk=1, domain%groups_on_node
! In the future we have to prepare n_dim_one & n_dim_two
! for each iprim_blk by counting all NONEF and NTWOF for
! In the future we have to prepare n_dim_one & n_dim_two
! for each iprim_blk by counting all NONEF and NTWOF for
! the neighbour atoms of the block.
! In this case, the loops ovre nsf1 & nsf2 have to be
! deleted.
@ -501,39 +510,27 @@ contains
! I HAVE TO BE CAREFUL about WHICH ONE IS LEFT
do naba1=1, naba_atm1%no_of_atom(iprim_blk) ! left atom
ind_halo1 = naba_atm1%list_atom_by_halo(naba1,iprim_blk)
if(ind_halo1 > loc_bucket%no_halo_atom1) &
call cq_abort('ERROR in no_of_halo_atoms for left',ind_halo1,loc_bucket%no_halo_atom1)
nonef = norb(naba_atm1, naba1, iprim_blk)
ind1=n_pts_in_block*(naba_atm1%ibegin_blk_orb(iprim_blk)-1+ &
naba_atm1%ibeg_orb_atom(naba1,iprim_blk)-1)+1
do naba2=1, naba_atm2%no_of_atom(iprim_blk) ! right atom
ind_halo2 = naba_atm2%list_atom_by_halo(naba2,iprim_blk)
if(ind_halo2 > loc_bucket%no_halo_atom2) &
call cq_abort('ERROR in no_of_halo_atoms for right',ind_halo2,loc_bucket%no_halo_atom2)
bucket = loc_bucket%i_h2d(ind_halo2,ind_halo1) !index of the pair
if(bucket > loc_bucket%no_pair_orb) &
call cq_abort('ERROR : bucket in act_on_vectors_new',bucket,loc_bucket%no_pair_orb)
If(bucket /= 0) then ! naba1 and naba2 makes pair
ii=bucket-1
nonef = norb(naba_atm1, naba1, iprim_blk)
ntwof = norb(naba_atm2, naba2, iprim_blk)
do nsf2=1, ntwof
ind2=n_pts_in_block*(naba_atm2%ibegin_blk_orb(iprim_blk)-1+ &
naba_atm2%ibeg_orb_atom(naba2,iprim_blk)-1+(nsf2-1))+1
do nsf1=1, nonef
ind1=n_pts_in_block*(naba_atm1%ibegin_blk_orb(iprim_blk)-1+ &
naba_atm1%ibeg_orb_atom(naba1,iprim_blk)-1+(nsf1-1))+1
ii = ii+1
factor_M=send_array(ii)
call axpy(n_pts_in_block, factor_M, &
gridfunctions(gridtwo)%griddata(ind2:ind2+n_pts_in_block-1), 1, &
gridfunctions(gridone)%griddata(ind1:ind1+n_pts_in_block-1), 1)
end do
end do
Endif ! if the two atoms are within a range
ind2=n_pts_in_block*(naba_atm2%ibegin_blk_orb(iprim_blk)-1+ &
naba_atm2%ibeg_orb_atom(naba2,iprim_blk)-1)+1
call gemm('N','T',n_pts_in_block,nonef,ntwof, &
one,gridfunctions(gridtwo)%griddata(ind2:ind2+ntwof*n_pts_in_block-1),n_pts_in_block,&
send_array(bucket:bucket+nonef*ntwof-1),nonef,&
one,gridfunctions(gridone)%griddata(ind1:ind1+nonef*n_pts_in_block-1),n_pts_in_block)
Endif ! if the two atoms are within a range
enddo ! Loop over right naba atoms
enddo ! Loop over left naba atoms
endif ! If the primary block has naba atoms
end do ! end loop over primary blocks
!$omp end parallel do
deallocate(send_array,STAT=stat)
if(stat/=0) call cq_abort("Error deallocating send_array in act_on_vectors: ",loc_bucket%no_pair_orb)
call reg_dealloc_mem(area_integn,loc_bucket%no_pair_orb,type_dbl)
@ -543,7 +540,7 @@ contains
contains
!-----------------------------------------------------------------
!sbrt collect_matrix_elements
! Created : 3/Jul/2000
! Created : 3/Jul/2000
! by Tsuyoshi Miyazaki
!
! This subroutine is called by (act_on_vector_new).
@ -552,18 +549,18 @@ contains
! \sum_{j} [A_{i alpha; j beta} phi_{j beta} (r_l)].
!
! I am sorry if this subroutine irritates you to read.
! I recommend you to read (put_matrix_elements) before reading
! I recommend you to read (put_matrix_elements) before reading
! this subroutine.
! This subroutine will do inverse things of (put_matrix_elements),
! which is called by (get_matrix_elements_new).
! <send_array>, which will be used to store their receiving arrays
! in this subroutine, has the same size as <send_array>
! in (put_matrix_elements).
! in this subroutine, has the same size as <send_array>
! in (put_matrix_elements).
!
! Need to be changed if number of functions of each atom varies
!
! 20/June/2003 T. MIYAZAKI
! We should consider the case where some of the domains have
! We should consider the case where some of the domains have
! no neighbour atoms. (surface with large vacuum area.)
subroutine collect_matrix_elements(myid, loc_bucket, rem_bucket, matM)
@ -593,11 +590,11 @@ contains
integer,parameter :: tag=1
mynode=myid+1
ierr=0
ierr=0
! First prepare receiving the array AND keep the first address
! of the data within my node in send_array.
!
!
if(loc_bucket%no_recv_node > 0) then
do inode=1,loc_bucket%no_recv_node ! Loop over recv nodes
nnd_rem=loc_bucket%list_recv_node(inode)
@ -621,7 +618,7 @@ contains
if(ierr /= 0) call cq_abort('ERROR in MPI_irecv in collect_matrix_elements',ierr)
endif
enddo ! Loop over receiving nodes
endif ! (loc_bucket%no_recv_node > 0)
endif ! (loc_bucket%no_recv_node > 0)
if(rem_bucket%no_send_node > 0) then
msize=0
@ -649,7 +646,7 @@ contains
do ipair=1,rem_bucket%no_of_pair(jnode)
loc2=rem_bucket%bucket(ipair,jnode)%ibegin_pair
loc1=matrix_pos(matM,rem_bucket%bucket(ipair,jnode)%iprim,rem_bucket%bucket(ipair,jnode)%jhalo)
if(loc1 /= 0) then
if(loc1 /= 0) then
ii=0
do isf2 = 1,halo(matrix_index(matM))%ndimj(rem_bucket%bucket(ipair,jnode)%jhalo)
do isf1 = 1,halo(matrix_index(matM))%ndimi(rem_bucket%bucket(ipair,jnode)%iprim)
@ -676,7 +673,7 @@ contains
end if
enddo ! Loop over sending nodes
call stop_timer(tmr_std_matrices)
endif !(rem_bucket%no_send_node > 0)
endif !(rem_bucket%no_send_node > 0)
!Check whether MPI_irecv has been finished.
if(loc_bucket%no_recv_node > 0) then

View File

@ -52,6 +52,10 @@
!! Moved various subroutines to md_misc_module
!! 2022/12/12 11:41 dave
!! Added SQNM maximum step size (sqnm_trust_step) as user-adjustable parameter
!! 2023/09/13 lu
!! Added XSF and XSF output frequency as user-adjustable parameter
!! 2024/01/18 lin
!! Added extended XYZ file output for run types of static, cg, lbfgs, sqnm, and optcell
!! SOURCE
!!
module control
@ -66,7 +70,9 @@ module control
implicit none
integer :: MDn_steps
integer :: MDfreq
integer :: MDfreq
integer :: XSFfreq
integer :: XYZfreq
real(double) :: MDcgtol, sqnm_trust_step
logical :: CGreset
integer :: LBFGS_history
@ -148,6 +154,8 @@ contains
flag_opt_cell, optcell_method, min_layer, flag_DM_converged
use input_module, only: leqi
use store_matrix, only: dump_pos_and_matrices
use io_module, only: write_extxyz
use md_control, only: flag_write_extxyz
implicit none
@ -180,6 +188,7 @@ contains
endif
call get_E_and_F(fixed_potential, vary_mu, total_energy,&
flag_ff, flag_wf, level=backtrace_level)
if (flag_write_extxyz) call write_extxyz('trajectory.xyz', total_energy, tot_force)
!
else if ( leqi(runtype, 'cg') ) then
if (flag_opt_cell) then
@ -313,11 +322,12 @@ contains
use GenBlas, only: dot
use force_module, only: tot_force
use io_module, only: write_atomic_positions, pdb_template, &
check_stop, write_xsf, print_atomic_positions, return_prefix
check_stop, write_xsf, write_extxyz, &
print_atomic_positions, return_prefix
use memory_module, only: reg_alloc_mem, reg_dealloc_mem, type_dbl
use timer_module
use store_matrix, ONLY: dump_InfoMatGlobal, dump_pos_and_matrices
use md_control, only: flag_write_xsf
use md_control, only: flag_write_xsf, flag_write_extxyz
implicit none
@ -486,6 +496,7 @@ contains
end if
call write_atomic_positions("UpdatedAtoms.dat", trim(pdb_template))
if (flag_write_xsf) call write_xsf('trajectory.xsf', iter)
if (flag_write_extxyz .and. mod(iter,XYZfreq) == 0) call write_extxyz('trajectory.xyz', energy1, tot_force)
! Analyse forces
g0 = dot(length, tot_force, 1, tot_force, 1)
call get_maxf(max)
@ -631,6 +642,10 @@ contains
!! Moved velocity array allocation/deallocation to init_md/end_md
!! 2020/01/06 15:40 dave
!! Add pressure-based termination for equilibration and remove Berendsen thermostat
!! 2023/09/13 lu
!! Add parameters for xsf and xyz output frequency
!! 2023/10/09 lu
!! Added variables to enable simulations with a variable temperature
!! SOURCE
!!
subroutine md_run (fixed_potential, vary_mu, total_energy)
@ -681,7 +696,9 @@ contains
md_n_ys, md_n_mts, ion_velocity, lattice_vec, &
md_baro_type, target_pressure, md_ndof_ions, &
md_equil_steps, md_equil_press, md_tau_T, md_tau_P, &
md_thermo_type
md_thermo_type, &
flag_variable_temperature, md_variable_temperature_method, &
md_initial_temperature,md_final_temperature, md_variable_temperature_rate
use md_misc, only: write_md_data, get_heat_flux, &
update_pos_and_box, integrate_pt, init_md, end_md
use atoms, only: distribute_atoms,deallocate_distribute_atom
@ -720,6 +737,9 @@ contains
type(type_thermostat), target :: thermo
type(type_barostat), target :: baro
! Variable temperature
real(double) :: temp_change_step
character(len=12) :: subname = "md_run: "
character(len=120) :: prefix
character(len=10) :: prefixF = " "
@ -819,11 +839,54 @@ contains
! Check this: it fixes H' for NVE but needs NVT confirmation
! DRB & TM 2020/01/24 12:03
call mdl%get_cons_qty
call write_md_data(i_first-1, thermo, baro, mdl, nequil, MDfreq)
call write_md_data(i_first-1, thermo, baro, mdl, nequil, MDfreq, XSFfreq, XYZfreq)
end if
do iter = i_first, i_last ! Main MD loop
mdl%step = iter
if (flag_variable_temperature) then
! At a given time step, update T_ext and ke_target
! Temperature evolves linearly from md_initial_temperature to md_final_temperature by step of temp_change_step
! Stops when target temperature has been reached (i.e. abs(dT) < abs(temp_change_step) )
temp_change_step = md_variable_temperature_rate * mdl%timestep ! Unit is K
mdl%T_ext = mdl%T_ext + temp_change_step
thermo%ke_target = half*md_ndof_ions*fac_Kelvin2Hartree*mdl%T_ext ! Update target ke for SVR
if (inode==ionode .and. iprint_MD > 0) &
write(io_lun,fmt='(6x, "Thermostat temperature at step ", i5, ": ", f9.1, " K")') iter, mdl%T_ext
if (inode == ionode .and. iprint_MD > 1 ) &
write(io_lun,fmt='(6x, "kee target is now" , f8.3)') thermo%ke_target
if (md_variable_temperature_rate > 0) then ! heating
if (mdl%T_ext > md_final_temperature) then
if (inode == ionode) &
write(io_lun,fmt='(6x, "Target temperature (",f7.1," K) has been reached (",f7.1," K). Stopping..")') &
md_final_temperature, mdl%T_ext-temp_change_step
exit
end if
elseif (md_variable_temperature_rate < 0) then ! cooling
if (mdl%T_ext < md_final_temperature) then
if (inode == ionode) &
write(io_lun,fmt='(6x, "Target temperature (",f7.1," K) has been reached (",f7.1," K). Stopping..")') &
md_final_temperature, mdl%T_ext-temp_change_step
exit
end if
end if
end if
if (inode==ionode .and. iprint_MD + min_layer > 0) &
write(io_lun,fmt='(/4x,a,i5)') trim(prefix)//" iteration ",iter
@ -995,7 +1058,7 @@ contains
call get_heat_flux(atomic_stress, ion_velocity, heat_flux)
! Write all MD data and checkpoints to disk
call write_md_data(iter, thermo, baro, mdl, nequil, MDfreq)
call write_md_data(iter, thermo, baro, mdl, nequil, MDfreq, XSFfreq, XYZfreq)
!call check_stop(done, iter) ! moved above. 2019/Nov/14 tsuyoshi
if (flag_fire_qMD.OR.flag_quench_MD) then
@ -1497,14 +1560,14 @@ contains
use GenBlas, only: dot
use force_module, only: tot_force
use io_module, only: write_atomic_positions, pdb_template, &
check_stop, write_xsf
check_stop, write_xsf, write_extxyz
use memory_module, only: reg_alloc_mem, reg_dealloc_mem, type_dbl
use primary_module, only: bundle
use store_matrix, only: dump_pos_and_matrices
use mult_module, ONLY: matK, S_trans, matrix_scale, matL, L_trans
use matrix_data, ONLY: Hrange, Lrange
use dimens, only: r_super_x, r_super_y, r_super_z
use md_control, only: flag_write_xsf
use md_control, only: flag_write_xsf, flag_write_extxyz
implicit none
@ -1655,6 +1718,7 @@ contains
! Add call to write_atomic_positions and write_xsf (2020/01/17: smujahed)
call write_atomic_positions("UpdatedAtoms.dat", trim(pdb_template))
if (flag_write_xsf) call write_xsf('trajectory.xsf', iter)
if (flag_write_extxyz .and. mod(iter,XYZfreq) == 0) call write_extxyz('trajectory.xyz', energy1, tot_force)
! Build q
do i=iter, iter_low, -1
! Indexing
@ -1785,12 +1849,12 @@ contains
use GenComms, only: myid, inode, ionode
use GenBlas, only: dot, syev
use force_module, only: tot_force
use io_module, only: write_atomic_positions, pdb_template, &
use io_module, only: write_atomic_positions, pdb_template, write_extxyz, &
check_stop, write_xsf, print_atomic_positions, return_prefix
use memory_module, only: reg_alloc_mem, reg_dealloc_mem, type_dbl
use store_matrix, only: dump_pos_and_matrices
use dimens, only: r_super_x, r_super_y, r_super_z
use md_control, only: flag_write_xsf
use md_control, only: flag_write_xsf, flag_write_extxyz
implicit none
@ -1964,6 +2028,7 @@ contains
! Add call to write_atomic_positions and write_xsf (2020/01/17: smujahed)
call write_atomic_positions("UpdatedAtoms.dat", trim(pdb_template))
if (flag_write_xsf) call write_xsf('trajectory.xsf', iter)
if (flag_write_extxyz .and. mod(iter,XYZfreq) == 0) call write_extxyz('trajectory.xyz', energy1, tot_force)
! Build significant subspace
Sij = zero
omega = zero
@ -2197,12 +2262,12 @@ contains
use GenBlas, only: dot, syev
use force_module, only: stress, tot_force
use io_module, only: write_atomic_positions, pdb_template, &
check_stop, write_xsf, leqi
check_stop, write_xsf, leqi, write_extxyz
use memory_module, only: reg_alloc_mem, reg_dealloc_mem, type_dbl
use timer_module
use dimens, ONLY: r_super_x, r_super_y, r_super_z
use store_matrix, only: dump_pos_and_matrices
use md_control, only: target_pressure, flag_write_xsf
use md_control, only: target_pressure, flag_write_xsf, flag_write_extxyz
implicit none
@ -2373,6 +2438,7 @@ contains
! Add call to write_atomic_positions and write_xsf (2020/01/17: smujahed)
call write_atomic_positions("UpdatedAtoms.dat", trim(pdb_template))
if (flag_write_xsf) call write_xsf('trajectory.xsf', iter)
if (flag_write_extxyz .and. mod(iter,XYZfreq) == 0) call write_extxyz('trajectory.xyz', energy1, tot_force)
! Build significant subspace
Sij = zero
omega = zero
@ -2604,14 +2670,14 @@ contains
use GenBlas, only: dot, syev
use force_module, only: tot_force, stress
use io_module, only: write_atomic_positions, pdb_template, &
check_stop, write_xsf
check_stop, write_xsf, write_extxyz
use memory_module, only: reg_alloc_mem, reg_dealloc_mem, type_dbl
use primary_module, only: bundle
use store_matrix, only: dump_pos_and_matrices
use mult_module, ONLY: matK, S_trans, matrix_scale, matL, L_trans
use matrix_data, ONLY: Hrange, Lrange
use dimens, only: r_super_x, r_super_y, r_super_z
use md_control, only: flag_write_xsf, target_pressure
use md_control, only: flag_write_xsf, flag_write_extxyz, target_pressure
implicit none
@ -2822,6 +2888,7 @@ contains
! Add call to write_atomic_positions and write_xsf (2020/01/17: smujahed)
call write_atomic_positions("UpdatedAtoms.dat", trim(pdb_template))
if (flag_write_xsf) call write_xsf('trajectory.xsf', iter)
if (flag_write_extxyz .and. mod(iter,XYZfreq) == 0) call write_extxyz('trajectory.xyz', energy1, tot_force)
! Build significant subspace
Sij = zero
omega = zero
@ -3061,13 +3128,13 @@ contains
use GenBlas, only: dot
use force_module, only: stress, tot_force
use io_module, only: write_atomic_positions, pdb_template, &
check_stop, print_atomic_positions, return_prefix
check_stop, print_atomic_positions, return_prefix, write_extxyz
use memory_module, only: reg_alloc_mem, reg_dealloc_mem, type_dbl
use timer_module
use io_module, only: leqi
use dimens, ONLY: r_super_x, r_super_y, r_super_z
use store_matrix, only: dump_pos_and_matrices
use md_control, only: target_pressure
use md_control, only: target_pressure, flag_write_extxyz
implicit none
@ -3221,7 +3288,7 @@ contains
rcellx, d_units(dist_units), rcelly, d_units(dist_units), rcellz, d_units(dist_units)
end if
call write_atomic_positions("UpdatedAtoms.dat", trim(pdb_template))
if (flag_write_extxyz .and. mod(iter,XYZfreq) == 0) call write_extxyz('trajectory.xyz', energy1, tot_force)
! Analyse Stresses and energies
dH = enthalpy1 - enthalpy0
volume = rcellx*rcelly*rcellz
@ -4112,11 +4179,12 @@ contains
use GenBlas, only: dot
use force_module, only: tot_force, stress
use io_module, only: write_atomic_positions, pdb_template, &
check_stop, write_xsf, return_prefix, print_atomic_positions
check_stop, write_xsf, return_prefix, print_atomic_positions, &
write_extxyz
use memory_module, only: reg_alloc_mem, reg_dealloc_mem, type_dbl
use timer_module
use store_matrix, ONLY: dump_InfoMatGlobal, dump_pos_and_matrices
use md_control, only: flag_write_xsf, target_pressure
use md_control, only: flag_write_xsf, flag_write_extxyz, target_pressure
implicit none
@ -4288,6 +4356,7 @@ contains
end if
call write_atomic_positions("UpdatedAtoms.dat", trim(pdb_template))
if (flag_write_xsf) call write_xsf('trajectory.xsf', iter)
if (flag_write_extxyz .and. mod(iter,XYZfreq) == 0) call write_extxyz('trajectory.xyz', energy1, tot_force)
! Analyse forces and stress
g0 = dot(length-3, tot_force, 1, tot_force, 1)

View File

@ -173,7 +173,7 @@ contains
pao_val = zero
y_val = zero
rec_ylm: if (.not.exx_cartesian) then
call evaluate_pao(spec,l1,acz,m1,x,y,z,pao_val)
call evaluate_pao(0,spec,l1,acz,m1,x,y,z,pao_val)
else
npts = pao(spec)%angmom(l1)%zeta(acz)%length
del_r = (pao(spec)%angmom(l1)%zeta(acz)%cutoff/&

View File

@ -964,7 +964,7 @@ contains
inode, ionode
!use DiagModule, only: diagon
! use blip_gradient, only: get_support_gradient
use PAO_grid_transform_module, only: single_PAO_to_grad
use PAO_grid_transform_module, only: PAO_or_gradPAO_to_grid
use build_PAO_matrices, only: assemble_deriv_2
use cover_module, only: BCS_parts
use functions_on_grid, only: atomfns, &
@ -988,6 +988,7 @@ contains
use GenBlas, only: axpy, scal
use calc_matrix_elements_module, only: act_on_vectors_new
use io_module, only: return_prefix
use angular_coeff_routines, ONLY: pao_elem_derivative_2
implicit none
@ -1310,7 +1311,7 @@ contains
if (flag_basis_set == blips) then
call blip_to_grad_new(inode-1, dir1, tmp_fn)
else if (flag_basis_set == PAOs) then
call single_PAO_to_grad(dir1, tmp_fn)
call PAO_or_gradPAO_to_grid(tmp_fn, pao_elem_derivative_2, dir1)
else
call cq_abort("pulay_force: basis set undefined ", flag_basis_set)
end if

View File

@ -67,7 +67,7 @@ module functions_on_grid
!!
type fn_on_grid
real(double), dimension(:), pointer :: griddata
real(double), dimension(:), allocatable :: griddata
integer :: size
integer :: type

View File

@ -869,7 +869,8 @@ contains
InvSDeltaOmegaTolerance
use blip, only: blip_info, init_blip_flag, alpha, beta
use maxima_module, only: lmax_ps
use control, only: MDn_steps, MDfreq, MDcgtol, CGreset, LBFGS_history, sqnm_trust_step
use control, only: MDn_steps, MDfreq, XSFfreq, XYZfreq, &
MDcgtol, CGreset, LBFGS_history, sqnm_trust_step
use ion_electrostatic, only: ewald_accuracy
use minimise, only: UsePulay, n_L_iterations, &
n_support_iterations, L_tolerance, &
@ -929,7 +930,9 @@ contains
flag_write_xsf, md_cell_nhc, md_nhc_cell_mass, &
md_calc_xlmass, md_equil_steps, md_equil_press, &
md_tau_T_equil, md_tau_P_equil, md_p_drag, &
md_t_drag, md_cell_constraint, flag_write_extxyz, MDtimestep, md_ensemble
md_t_drag, md_cell_constraint, flag_write_extxyz, MDtimestep, md_ensemble, &
flag_variable_temperature, md_variable_temperature_method, &
md_variable_temperature_rate, md_initial_temperature, md_final_temperature
use md_model, only: md_tdep
use move_atoms, only: threshold_resetCD, &
flag_stop_on_empty_bundle, &
@ -1568,6 +1571,12 @@ contains
CGreset = fdf_boolean('AtomMove.ResetCG', .false.)
MDn_steps = fdf_integer('AtomMove.NumSteps', 100 )
MDfreq = fdf_integer('AtomMove.OutputFreq', 50 )
XSFfreq = fdf_integer('AtomMove.XsfFreq', MDfreq )
if (leqi(runtype,'md')) then
XYZfreq = fdf_integer('AtomMove.XyzFreq', MDfreq )
else
XYZfreq = fdf_integer('AtomMove.XyzFreq', 1 )
end if
MDtimestep = fdf_double ('AtomMove.Timestep', 0.5_double)
MDcgtol = fdf_double ('AtomMove.MaxForceTol',0.0005_double)
sqnm_trust_step = fdf_double ('AtomMove.MaxSQNMStep',0.2_double )
@ -2172,6 +2181,10 @@ contains
if (restart_DM .and. flag_Multisite .and. .not.read_option) then
call cq_abort("When L or K matrix is read from files, SFcoeff also must be read from files for multi-site calculation.")
endif
if(find_chdens .and. (.not.restart_DM)) then
call cq_warn(sub_name," Cannot make charge density from K without loading K! Starting from atomic densities.")
find_chdens = .false.
end if
if (flag_XLBOMD) then
kappa=fdf_double('XL.Kappa',2.0_double)
@ -2287,6 +2300,50 @@ contains
end if
flag_heat_flux = fdf_boolean('MD.HeatFlux', .false.)
! Variable temperature
flag_variable_temperature = fdf_boolean('MD.VariableTemperature', .false.)
md_variable_temperature_method = fdf_string(20, 'MD.VariableTemperatureMethod', 'linear')
! Verify that a method for variable temperature is valid
if (flag_variable_temperature) then
! At present, only linear evolution is supported
if(.not.leqi(md_variable_temperature_method(1:6),'linear')) then
if(inode==ionode) then
write(io_lun,fmt='(6x, "Wrong method for variable temperature: ", a, " != linear. Stopping ..." )') &
trim(md_variable_temperature_method)
end if
call cq_abort("Wrong method for variable temperature")
end if
end if
md_variable_temperature_rate = fdf_double('MD.VariableTemperatureRate', 0.0_double)
md_initial_temperature = fdf_double('MD.InitialTemperature',temp_ion)
md_final_temperature = fdf_double('MD.FinalTemperature',temp_ion)
! Override temp_ion if md_initial_temperature is set
if (flag_variable_temperature .and. (abs(md_initial_temperature-temp_ion) > RD_ERR)) then
if (abs(temp_ion-300) > RD_ERR) then
call cq_warn(sub_name,'AtomMove.IonTemperature will be ignored since MD.VariableTemperature is true.')
end if
temp_ion = md_initial_temperature
end if
! Check for consistency
if (flag_variable_temperature) then
if (md_ensemble == 'nve') then
call cq_abort('NVE ensemble with MD.VariableTemperature set to true is NOT allowed.')
end if
! Verify sign of temperature change rate
if (abs(md_final_temperature-md_initial_temperature) > RD_ERR) then
if (md_variable_temperature_rate/(md_final_temperature-md_initial_temperature) < 0 ) then
call cq_abort('The temperature change rate is incompatible with the requested final temperature.')
end if
else ! initial and final temperature are equal
call cq_abort('MD.InitialTemperature and MD.FinalTemperature are the same.')
end if
end if
! Barostat
target_pressure = fdf_double('AtomMove.TargetPressure', zero)
md_box_mass = fdf_double('MD.BoxMass', one)
@ -2630,7 +2687,11 @@ contains
numN_neutral_atom_projector, pseudo_type, OLDPS, SIESTA, ABINIT
use input_module, only: leqi, chrcap
use control, only: MDn_steps
use md_control, only: md_ensemble
use md_control, only: md_ensemble, &
flag_variable_temperature, md_variable_temperature_method, &
md_initial_temperature, md_final_temperature, md_variable_temperature_rate
use omp_module, only: init_threads
use multiply_kernel, only: kernel_id
implicit none
@ -2638,11 +2699,12 @@ contains
logical :: vary_mu
character(len=80) :: titles
character(len=3) :: ensemblestr
integer :: NODES
integer :: NODES
real(double) :: mu, HNL_fac
! Local variables
integer :: n, stat
integer :: threads
character(len=10) :: today, the_time
character(len=15) :: job_str
character(len=5) :: timezone
@ -2688,6 +2750,9 @@ contains
call chrcap(ensemblestr,3)
write(io_lun, fmt='(4x,a15,a3," MD run for ",i5," steps ")') job_str, ensemblestr, MDn_steps
write(io_lun, fmt='(6x,"Initial ion temperature: ",f9.3,"K")') temp_ion
if (md_final_temperature .ne. md_initial_temperature) then
write(io_lun, fmt='(6x,"Final thermostat temperature: ",f9.3,"K")') md_final_temperature
end if
if(flag_XLBOMD) write(io_lun, fmt='(6x,"Using extended Lagrangian formalism")')
else if(leqi(runtype,'lbfgs')) then
write(io_lun, fmt='(4x,a15,"L-BFGS atomic relaxation")') job_str
@ -2825,7 +2890,14 @@ contains
else
write(io_lun,fmt="(/4x,'The calculation will be performed on ',i5,' process')") NODES
end if
call init_threads(threads)
if(threads>1) then
write(io_lun,fmt="(/4x,'The calculation will be performed on ',i5,' threads')") threads
else if (threads==1) then
write(io_lun,fmt="(/4x,'The calculation will be performed on ',i5,' thread')") threads
end if
write(io_lun,fmt='(/4x,"Using the ",a," matrix multiplication kernel")') kernel_id
if(.NOT.flag_diagonalisation) &
write(io_lun,fmt='(10x,"Density Matrix range = ",f7.4,1x,a2)') &
dist_conv*r_c, d_units(dist_units)
@ -2907,6 +2979,8 @@ contains
!! Added printing fractional k-points when read from block
!! 2022/06/29 12:00 dave
!! Moved printing to capture default gamma point behaviour
!! 2023/07/20 12:00 tsuyoshi
!! Implementing 1st version of Padding H and S matrices
!! SOURCE
!!
subroutine readDiagInfo
@ -2920,7 +2994,7 @@ contains
use GenComms, only: cq_abort, cq_warn, gcopy
use input_module
use ScalapackFormat, only: proc_rows, proc_cols, block_size_r, &
block_size_c, proc_groups, matrix_size
block_size_c, proc_groups, matrix_size, flag_padH
use DiagModule, only: nkp, kk, wtk, kT, maxefermi, &
flag_smear_type, iMethfessel_Paxton, &
max_brkt_iterations, gaussian_height, &
@ -3020,17 +3094,26 @@ contains
ms_is_prime = is_prime(matrix_size)
if ( ms_is_prime ) call cq_warn(sub_name,'matrix size is a prime number', matrix_size)
! padH or not :temporary?
flag_padH = fdf_boolean('Diag.PaddingHmatrix',.true.)
if(fdf_defined('Diag.BlockSizeR')) then
block_size_r = fdf_integer('Diag.BlockSizeR',1)
block_size_c = fdf_integer('Diag.BlockSizeC',1)
a = real(matrix_size)/real(block_size_r)
if(a - real(floor(a))>1e-8_double) &
call cq_abort('block_size_r not a factor of matrix size ! ',&
matrix_size, block_size_r)
a = real(matrix_size)/real(block_size_c)
if(a - real(floor(a))>1e-8_double) &
call cq_abort('block_size_c not a factor of matrix size ! ',&
matrix_size, block_size_c)
if(flag_padH) then
if(block_size_c .ne. block_size_r) &
call cq_abort('PaddingHmatrix: block_size_c needs to be block_size_r')
block_size_c = block_size_r
else
a = real(matrix_size)/real(block_size_r)
if(a - real(floor(a))>1e-8_double) &
call cq_abort('block_size_r not a factor of matrix size ! ',&
matrix_size, block_size_r)
a = real(matrix_size)/real(block_size_c)
if(a - real(floor(a))>1e-8_double) &
call cq_abort('block_size_c not a factor of matrix size ! ',&
matrix_size, block_size_c)
endif
else if ( ms_is_prime ) then
block_size_r = 1
block_size_c = block_size_r

View File

@ -1197,7 +1197,7 @@ contains
! where find_chdens = .false. (initial charge = atomic charge)
! But.. since this change will affect the result, we will issue this change later.
!
if(restart_DM) find_chdens=.true. ! 2018JFeb12 TM
! if(restart_DM) find_chdens=.true. ! 2018JFeb12 TM
call my_barrier()
endif
@ -1264,21 +1264,7 @@ contains
!!$
!!$
!!$
! (2) Make an inital estimate for the density matrix, L, which is an
! approximation to L = S^-1. Then use correct_electron_number()
! to modify L so that the electron number is correct.
if (.not. flag_diagonalisation .and. find_chdens .and. (start .or. start_L)) then
call initial_L()
call my_barrier()
if (inode == ionode .and. iprint_init + min_layer > 2) &
write(io_lun, fmt='(4x,a)') trim(prefix)//' got L matrix'
if (vary_mu) then
! This cannot be timed within the routine
call start_timer(tmr_std_densitymat)
call correct_electron_number
call stop_timer(tmr_std_densitymat)
end if
end if
! Load DM if flag is set; otherwise, with O(N), it will be set by McWeeny
if (restart_DM) then
if(.not.flag_diagonalisation) then
call grab_matrix2('L',inode,nfile,Info,InfoGlob,index=index_MatrixFile,n_matrix=nspin)
@ -1842,83 +1828,4 @@ contains
end subroutine check_setgrid
!!****f* initialisation/initial_L *
!!
!! NAME
!! initial_L
!! USAGE
!!
!! PURPOSE
!! Finds initial L (set equal to 1/2 S^-1)
!! INPUTS
!!
!! USES
!!
!! AUTHOR
!! D.R.Bowler/C.M.Goringe
!! CREATION DATE
!! 07/03/95
!! MODIFICATION HISTORY
!! 04/05/01 dave
!! Takes S^-1 from Hotelling's method
!! 21/06/2001 dave
!! Added ROBODoc header and indented
!! 12:20, 2004/06/09 dave
!! Fixed bug: Srange not Trange in final option
!! 10:09, 13/02/2006 drb
!! Removed all explicit references to data_ variables and rewrote
!! in terms of new
!! matrix routines
!! 2006/11/14 07:58 dave
!! Included in initialisation
!! 2011/07/01 L.Tong
!! Added initialisation for matL_dn, for spin polarisation
!! 2012/03/27 L.Tong
!! - Changed spin implementation
!! 2015/06/08 lat
!! - Added experimental backtrace
!! 2018/11/13 17:30 nakata
!! Changed matT to be spin_SF dependent
!! 2018/11/15 15:45 nakata
!! Bug fix: matL(1) should be matL(spin)
!! SOURCE
!!
subroutine initial_L(level)
use datatypes
use numbers, only: half, zero
use mult_module, only: matL, matT, matrix_sum
use global_module, only: nspin, flag_SpinDependentSF
implicit none
integer, optional :: level
integer :: spin, spin_SF
type(cq_timer) :: backtrace_timer
integer :: backtrace_level
!****lat<$
if ( present(level) ) backtrace_level = level+1
if ( .not. present(level) ) backtrace_level = -10
call start_backtrace(t=backtrace_timer,who='initial_L',&
where=area,level=backtrace_level,echo=.true.)
!****lat>$
spin_SF = 1
do spin = 1, nspin
if (flag_SpinDependentSF) spin_SF = spin
! set L for the second spin component also equal to 1/2 S^-1
call matrix_sum(zero, matL(spin), half, matT(spin_SF))
end do
!****lat<$
call stop_backtrace(t=backtrace_timer,who='initial_L',echo=.true.)
!****lat>$
return
end subroutine initial_L
!!***
end module initialisation

View File

@ -1491,7 +1491,7 @@ second: do
call io_assign (lun)
open (unit = lun, file = 'eigenvalues.dat')
write(lun,fmt='("# ",i7," eigenvalues ",i4," kpoints")') n_evals, nkp
write(lun,fmt='("# ",i7," eigenvalues ",i6," kpoints")') n_evals, nkp
if(nspin==1) then
write(lun,fmt='("# Ef: ",f18.10)') Ef(1)
else
@ -1500,7 +1500,7 @@ second: do
write(lun,fmt='("# Format: nk kx ky kz weight, followed by eigenvalues")')
do sp = 1,nspin
do kp = 1,nkp
write(lun,fmt='(i4,4f12.5)') kp,kk(1,kp),kk(2,kp),kk(3,kp),wtk(kp)
write(lun,fmt='(i6,3f12.5,f17.10)') kp,kk(1,kp),kk(2,kp),kk(3,kp),wtk(kp)
do ev = 1,n_evals
write(lun,fmt='(i6,f18.10)') ev,eval(ev,kp,sp)
end do
@ -1641,7 +1641,7 @@ second: do
close(io)
!
4 format(10x,'Sum of eigenvalues: ',f18.11,' ',a2)
7 format(10x,'Eigenvalues and occupancies for k-point ',i3,' : ',3f12.5)
7 format(10x,'Eigenvalues and occupancies for k-point ',i6,' : ',3f12.5)
8 format(10x,f15.7,x,f8.5,2x)
9 format(10x,f15.7,x,f8.5,2x,f15.7,x,f8.5,2x)
10 format(10x,f15.7,x,f8.5,2x,f15.7,x,f8.5,2x,f15.7,x,f8.5)
@ -2934,7 +2934,7 @@ second: do
do i=1,ni_in_cell
atom_name = adjustr(species_label(species_glob(i))(1:2))
write(lun,'(a4,6f16.8)') atom_name, atom_coord(:,i)*dist_conv_loc, &
write(lun,'(a4,3f16.8,3e16.8)') atom_name, atom_coord(:,i)*dist_conv_loc, &
(for_conv_loc*atom_force(j,i), j = 1, 3)
! species_glob(i),flag_move_atom(1,i),flag_move_atom(2,i), &
end do

View File

@ -9,7 +9,7 @@
!!****h* Conquest/Conquest *
!!
!! NAME
!! NAME
!! Conquest
!! PURPOSE
!! Main routine for the Conquest code
@ -37,15 +37,15 @@
!! 13/06/2001 dave
!! Changed call to cq_init to use numprocs
!! 15/03/2002 dave
!! Added RCS id tag for object file identification and tidied
!! Added RCS id tag for object file identification and tidied
!! comment structure a little (added header)
!! 15:20, 25/09/2002 mjg & drb
!! 15:20, 25/09/2002 mjg & drb
!! Changed so that the variable density is used from density_module
!! 12:43, 04/02/2003 drb
!! 12:43, 04/02/2003 drb
!! Changed to use init_comms and end_comms from GenComms
!! 13:50, 10/02/2003 drb
!! 13:50, 10/02/2003 drb
!! Changed to use control_run
!! 15:01, 12/03/2003 drb
!! 15:01, 12/03/2003 drb
!! Removed reference to workspace
!! 10:18, 2004/01/09 dave
!! Added use pseudopotential_common
@ -59,7 +59,7 @@
!! - updated some calls that no longer passes mu
!! 2016/01/28 16:45 dave
!! Updated module name to ion_electrostatic
!! 2019/12/24 tsuyoshi
!! 2019/12/24 tsuyoshi
!! Removed flag_atomic_density_from_pao
!! SOURCE
!!
@ -103,13 +103,14 @@ program Conquest
use minimise
use timer_stdclocks_module
use references, only: compile_biblio
use omp_module, only: init_threads
!use output_module
!use complete_module
implicit none
! RCS tag for object file identification
! RCS tag for object file identification
character(len=80), save :: &
CQid = "$Id$"
@ -118,7 +119,7 @@ program Conquest
! Energies and electrons
real(double) :: total_energy
! Chemical potential
real(double) :: mu
logical :: vary_mu
@ -141,7 +142,7 @@ program Conquest
call print_time_report
!**<lat>** as initialise routine we may need a complete routine
! cheking if everything is fine before ending ; write_mem_use
! and print_time_report can be within this routine
! and print_time_report can be within this routine
!call complete()
!call close_user_output()

View File

@ -259,6 +259,7 @@ contains
! Module usage
use datatypes
use basic_types
use numbers, ONLY: RD_ERR
use matrix_module
use GenComms, ONLY: cq_abort
use global_module, ONLY: id_glob, species_glob, sf, nlpf, paof, napf
@ -277,7 +278,6 @@ contains
integer :: inp, cumu_ndims, neigh_spec
integer :: nn,j,np,ni,ist
real(double) :: rcutsq,dx,dy,dz
real(double), parameter :: tol=1.0e-8_double
! Check that prim and gcs are correctly set up
if((.NOT.ASSOCIATED(gcs%xcover)).OR. &
@ -322,7 +322,7 @@ contains
dx=gcs%xcover(gcs%icover_ibeg(np)+ni-1)-prim%xprim(inp)
dy=gcs%ycover(gcs%icover_ibeg(np)+ni-1)-prim%yprim(inp)
dz=gcs%zcover(gcs%icover_ibeg(np)+ni-1)-prim%zprim(inp)
if(dx*dx+dy*dy+dz*dz<rcutsq-tol) then
if(dx*dx+dy*dy+dz*dz<rcutsq-RD_ERR) then
amat(nn)%n_nab(j)=amat(nn)%n_nab(j)+1
!write(io_lun,*) 'Neighbour: ',j,amat(nn)%n_nab(j)
if(amat(nn)%n_nab(j).gt.amat(nn)%mx_abs) then
@ -412,6 +412,7 @@ contains
! Module usage
use datatypes
use basic_types
use numbers, ONLY: RD_ERR
use matrix_module
use GenComms, ONLY: cq_abort
use global_module, ONLY: sf
@ -432,7 +433,6 @@ contains
integer :: nn,j,np,ni
integer :: tot_nabs, nabs_of_atom, mx_abs_nabs
real(double) :: rcutsq,dx,dy,dz
real(double), parameter :: tol=1.0e-8_double
! Check that prim and gcs are correctly set up
if((.NOT.ASSOCIATED(gcs%xcover)).OR. &
@ -466,7 +466,7 @@ contains
dx=gcs%xcover(gcs%icover_ibeg(np)+ni-1)-prim%xprim(inp)
dy=gcs%ycover(gcs%icover_ibeg(np)+ni-1)-prim%yprim(inp)
dz=gcs%zcover(gcs%icover_ibeg(np)+ni-1)-prim%zprim(inp)
if(dx*dx+dy*dy+dz*dz<rcutsq-tol) then
if(dx*dx+dy*dy+dz*dz<rcutsq-RD_ERR) then
nabs_of_atom = nabs_of_atom + 1
tot_nabs = tot_nabs + 1
endif

View File

@ -673,6 +673,8 @@ contains
if(stat/=0) then
call cq_abort('alloc_halo: error allocating ndimi')
endif
halo%ndimi = 0
halo%ndimj = 0
call stop_timer(tmr_std_allocation)
return
end subroutine allocate_halo

View File

@ -51,6 +51,8 @@
!! flying ice-cube effect)
!! 2022/09/29 16:46 dave
!! Moved subroutines from control and tidied output
!! 2023/10/09 lu
!! Added variables to enable simulations with a variable temperature
!! SOURCE
!!
module md_control
@ -74,18 +76,21 @@ module md_control
! Files
character(20) :: md_position_file = 'md.position'
character(20) :: md_check_file = "md.checkpoint"
character(20) :: md_temperature_file = "md.temperature"
! Module variables
character(20) :: md_thermo_type, md_baro_type
character(20) :: md_thermo_type, md_baro_type, md_variable_temperature_method
character(3) :: md_ensemble
real(double) :: md_tau_T, md_tau_P, target_pressure, md_bulkmod_est, &
md_box_mass, md_ndof_ions, md_omega_t, md_omega_p, &
md_tau_T_equil, md_tau_P_equil, md_p_drag, md_t_drag, &
md_equil_press
md_equil_press, &
md_variable_temperature_rate, md_initial_temperature, md_final_temperature
real(double) :: MDtimestep
integer :: md_n_nhc, md_n_ys, md_n_mts, md_equil_steps
logical :: flag_write_xsf, md_cell_nhc, md_calc_xlmass, flag_nhc, &
flag_write_extxyz
flag_write_extxyz, flag_variable_temperature
real(double), dimension(:), allocatable :: md_nhc_mass, md_nhc_cell_mass
real(double), dimension(:,:), allocatable, target :: ion_velocity
real(double), dimension(3,3), target :: lattice_vec
@ -2421,6 +2426,9 @@ contains
!! Zamaan Raza
!! CREATION DATE
!! 2018/08/12 10:19
!! MODIFICATION HISTORY
!! 2023/10/09 lu
!! Added routine to write the current thermostat temperature in file md.temperature
!! SOURCE
!!
subroutine write_md_checkpoint(th, baro)
@ -2503,11 +2511,63 @@ contains
end if
end if
call io_close(lun)
if (flag_variable_temperature) then
call io_assign(lun)
! Write instantaneous temperature in md.temperature
open(unit=lun,file=md_temperature_file,status='replace')
write(lun, '(e20.12)') th%T_ext
call io_close(lun)
end if
end if
end subroutine write_md_checkpoint
!!***
!! md_control/read_md_temperature *
!! NAME
!! read_md_checkpoint
!! PURPOSE
!! Read thermostat temperature for MD restart
!! AUTHOR
!! Anh Khoa Augustin Lu
!! CREATION DATE
!! 2023/12/26
!! MODIFICATION HISTORY
!! 2023/12/26 Anh Khoa Augustin Lu
!! Read temperature of the thermostat for restart runs
!! SOURCE
!!
subroutine read_md_temperature(th)
use GenComms, only: gcopy
use input_module, only: io_assign, io_close
use global_module, only: min_layer
class(type_thermostat), intent(inout) :: th
integer :: lun
if (inode == ionode) then
if (iprint_MD + min_layer > -5) &
write(io_lun,*) &
"Reading MD thermostat temperature from ", md_temperature_file
call io_assign(lun)
open(unit=lun,file=md_temperature_file,status='old')
read(lun,*) th%T_ext
call io_close(lun)
end if
call gcopy(th%T_ext)
if (inode == ionode) then
write(io_lun, *) "Read thermostat temperature : ", th%T_ext , "K"
end if
end subroutine read_md_temperature
!!****m* md_control/read_md_checkpoint *
!! NAME
!! read_md_checkpoint
@ -2517,6 +2577,9 @@ contains
!! Zamaan Raza
!! CREATION DATE
!! 2018/08/12 10:19
!! MODIFICATION HISTORY
!! 2023/12/26 Anh Khoa Augustin Lu
!! Read temperature of the thermostat for restart runs
!! SOURCE
!!
subroutine read_md_checkpoint(th, baro)

View File

@ -70,14 +70,15 @@ contains
!! 2022/10/04 17:27 dave
!! Reworking to set initial KE of ions correctly
!! SOURCE
!!
!!
subroutine init_md(baro, thermo, mdl, md_ndof, nequil, second_call)
use numbers
use input_module, only: leqi
use io_module, only: read_velocity
use md_model, only: type_md_model
use md_control, only: lattice_vec, type_thermostat, type_barostat, read_md_checkpoint
use md_control, only: lattice_vec, type_thermostat, type_barostat, &
read_md_checkpoint, read_md_temperature, flag_variable_temperature
use GenComms, only: inode, ionode, gcopy, cq_warn
use memory_module, only: reg_alloc_mem, type_dbl
use global_module, only: rcellx, rcelly, rcellz, temp_ion, ni_in_cell, &
@ -229,7 +230,12 @@ contains
! N.B. atomic stress is allocated in initialisation_module/initialise! - zamaan
if (flag_MDcontinue) call read_md_checkpoint(thermo, baro)
if (flag_MDcontinue) then
call read_md_checkpoint(thermo, baro)
if (flag_variable_temperature) then
call read_md_temperature(thermo)
end if
end if
end subroutine init_md
!!***
@ -543,7 +549,7 @@ contains
!! Added call for extended XYZ output (includes forces)
!! SOURCE
!!
subroutine write_md_data(iter, thermo, baro, mdl, nequil, MDfreq)
subroutine write_md_data(iter, thermo, baro, mdl, nequil, MDfreq, XSFfreq, XYZfreq)
use GenComms, only: inode, ionode
use io_module, only: write_xsf, write_extxyz, return_prefix
@ -556,7 +562,7 @@ contains
type(type_barostat), intent(inout) :: baro
type(type_thermostat), intent(inout) :: thermo
type(type_md_model), intent(inout) :: mdl
integer, intent(in) :: iter, nequil, MDfreq
integer, intent(in) :: iter, nequil, MDfreq, XSFfreq, XYZfreq
! local variables
character(len=16) :: subname = "write_md_data: "
@ -568,9 +574,12 @@ contains
call write_md_checkpoint(thermo, baro)
call mdl%dump_stats(md_stats_file, nequil)
if (flag_write_xsf) call write_xsf(md_trajectory_file, iter)
if (flag_write_extxyz) &
if (flag_write_xsf .and. mod(iter,XSFfreq) == 0) then
call write_xsf(md_trajectory_file, iter)
end if
if (flag_write_extxyz .and. mod(iter,XYZfreq) == 0) then
call write_extxyz('trajectory.xyz', mdl%dft_total_energy, mdl%atom_force)
end if
if (flag_heat_flux) call mdl%dump_heat_flux(md_heat_flux_file)
if (mod(iter, MDfreq) == 0) then
call mdl%dump_frame(md_frames_file)

View File

@ -218,19 +218,21 @@ contains
if(present(iter)) then
if(iter==0 .and. (.not. restart_DM)) then
reset_L = .true.
else if(iter==0 .and. (restart_DM)) then
reset_L = .false.
end if
end if
else if(.NOT.restart_DM) then
reset_L = .true.
endif
! Now check
if(reset_L .and. flag_LmatrixReuse .and. flag_DM_converged) reset_L = .false.
if((.not.reset_L) .and. (.not.flag_DM_converged) .and. (.not.restart_DM)) reset_L = .true.
! If General.LoadDM T is set, do not reset_L but only the first time
if(restart_DM) then
reset_L = .false.
restart_DM = .false.
end if
! Now check
if(reset_L .and. flag_LmatrixReuse .and. flag_DM_converged) reset_L = .false.
if((.not.reset_L) .and. (.not.flag_DM_converged) .and. (.not.restart_DM)) reset_L = .true.
dE_DMM = zero
dE_SCF = zero
dE_PAO = zero

View File

@ -26,6 +26,8 @@
!!
module multiply_kernel
character(len=*), parameter :: kernel_id = "default"
!!*****
contains
@ -148,12 +150,12 @@ contains
real(double) :: c(lenc)
integer, optional :: debug
! Remote indices
integer(integ) :: ib_nd_acc(mx_part)
integer(integ) :: ibaddr(mx_part)
integer(integ) :: nbnab(mx_part)
integer(integ) :: ibpart(mx_part*mx_absb)
integer(integ) :: ibseq(mx_part*mx_absb)
integer(integ) :: bndim2(mx_part*mx_absb)
integer(integ), intent(in) :: ib_nd_acc(:)
integer(integ), intent(in) :: ibaddr(:)
integer(integ), intent(in) :: nbnab(:)
integer(integ), intent(in) :: ibpart(:)
integer(integ), intent(in) :: ibseq(:)
integer(integ), intent(in) :: bndim2(:)
! Local variables
integer :: jbnab2ch(mx_absb) ! Automatic array
integer :: nbkbeg, k, k_in_part, k_in_halo, j, jpart, jseq
@ -162,6 +164,7 @@ contains
integer :: nd1, nd2, nd3
integer :: naaddr, nbaddr, ncaddr
!$omp single
! Loop over atoms k in current A-halo partn
do k = 1, ahalo%nh_part(kpart)
k_in_halo = ahalo%j_beg(kpart) + k - 1
@ -216,6 +219,7 @@ contains
nabeg = nabeg + nd1 * nd3
end do ! End of i = 1, at%n_hnab
end do ! End of k = 1, nahpart
!$omp end single
return
end subroutine m_kern_max
!!*****
@ -339,12 +343,12 @@ contains
real(double) :: b(lenb)
real(double) :: c(lenc)
! dimension declarations
integer :: ibaddr(mx_part)
integer :: ib_nd_acc(mx_part)
integer :: nbnab(mx_part)
integer :: ibpart(mx_part*mx_absb)
integer :: ibseq(mx_part*mx_absb)
integer :: bndim2(mx_part*mx_absb)
integer(integ), intent(in) :: ib_nd_acc(:)
integer(integ), intent(in) :: ibaddr(:)
integer(integ), intent(in) :: nbnab(:)
integer(integ), intent(in) :: ibpart(:)
integer(integ), intent(in) :: ibseq(:)
integer(integ), intent(in) :: bndim2(:)
! Local variables
integer :: jbnab2ch(mx_absb)
integer :: k, k_in_part, k_in_halo, nbkbeg, j, jpart, jseq
@ -353,6 +357,7 @@ contains
integer :: nd1, nd2, nd3
integer :: naaddr, nbaddr, ncaddr
!$omp single
! Loop over atoms k in current A-halo partn
do k = 1, ahalo%nh_part(kpart)
k_in_halo = ahalo%j_beg(kpart) + k - 1
@ -402,6 +407,7 @@ contains
nabeg = nabeg + nd1 * nd3
end do
end do
!$omp end single
return
end subroutine m_kern_min
!!*****

View File

@ -26,6 +26,8 @@
!!
module multiply_kernel
character(len=*), parameter :: kernel_id = "gemm"
!!*****
contains
@ -149,12 +151,12 @@ contains
real(double) :: c(lenc)
integer, optional :: debug
! Remote indices
integer(integ) :: ib_nd_acc(mx_part)
integer(integ) :: ibaddr(mx_part)
integer(integ) :: nbnab(mx_part)
integer(integ) :: ibpart(mx_part*mx_absb)
integer(integ) :: ibseq(mx_part*mx_absb)
integer(integ) :: bndim2(mx_part*mx_absb)
integer(integ), intent(in) :: ib_nd_acc(:)
integer(integ), intent(in) :: ibaddr(:)
integer(integ), intent(in) :: nbnab(:)
integer(integ), intent(in) :: ibpart(:)
integer(integ), intent(in) :: ibseq(:)
integer(integ), intent(in) :: bndim2(:)
! Local variables
integer :: jbnab2ch(mx_absb) ! Automatic array
integer :: nbkbeg, k, k_in_part, k_in_halo, j, jpart, jseq
@ -166,6 +168,7 @@ contains
integer :: sofar, maxlen, max2, prend1
external :: dgemm
!$omp single
allocate(tempa(1,1), tempc(1,1))
do k = 1, ahalo%nh_part(kpart) ! Loop over atoms k in current A-halo partn
k_in_halo = ahalo%j_beg(kpart) + k - 1
@ -273,6 +276,7 @@ contains
end do ! end of k = 1, nahpart
if (allocated(tempa)) deallocate(tempa)
if (allocated(tempc)) deallocate(tempc)
!$omp end single
return
end subroutine m_kern_max
!!*****
@ -396,12 +400,12 @@ contains
real(double) :: b(lenb)
real(double) :: c(lenc)
! dimension declarations
integer :: ibaddr(mx_part)
integer :: ib_nd_acc(mx_part)
integer :: nbnab(mx_part)
integer :: ibpart(mx_part*mx_absb)
integer :: ibseq(mx_part*mx_absb)
integer :: bndim2(mx_part*mx_absb)
integer(integ), intent(in) :: ib_nd_acc(:)
integer(integ), intent(in) :: ibaddr(:)
integer(integ), intent(in) :: nbnab(:)
integer(integ), intent(in) :: ibpart(:)
integer(integ), intent(in) :: ibseq(:)
integer(integ), intent(in) :: bndim2(:)
! Local variables
integer :: jbnab2ch(mx_absb)
integer :: k, k_in_part, k_in_halo, nbkbeg, j, jpart, jseq
@ -414,6 +418,7 @@ contains
real(double), allocatable, dimension(:,:) :: tempb, tempc
external :: dgemm
!$omp single
do k = 1, ahalo%nh_part(kpart) ! Loop over atoms k in current A-halo partn
k_in_halo = ahalo%j_beg(kpart) + k - 1
k_in_part = ahalo%j_seq(k_in_halo)
@ -481,6 +486,7 @@ contains
nabeg = nabeg + nd1 * nd3
end do
end do
!$omp end single
return
end subroutine m_kern_min
!!*****

View File

@ -26,6 +26,8 @@
!!
module multiply_kernel
character(len=*), parameter :: kernel_id = "ompDoii"
!!*****
contains
@ -168,12 +170,12 @@ contains
real(double) :: c(lenc)
integer, optional :: debug
! Remote indices
integer(integ) :: ib_nd_acc(mx_part)
integer(integ) :: ibaddr(mx_part)
integer(integ) :: nbnab(mx_part)
integer(integ) :: ibpart(mx_part*mx_absb)
integer(integ) :: ibseq(mx_part*mx_absb)
integer(integ) :: bndim2(mx_part*mx_absb)
integer(integ), intent(in) :: ib_nd_acc(:)
integer(integ), intent(in) :: ibaddr(:)
integer(integ), intent(in) :: nbnab(:)
integer(integ), intent(in) :: ibpart(:)
integer(integ), intent(in) :: ibseq(:)
integer(integ), intent(in) :: bndim2(:)
! Local variables
integer :: jbnab2ch(mx_absb) ! Automatic array
integer :: nbkbeg, k, k_in_part, k_in_halo, j, jpart, jseq
@ -184,14 +186,6 @@ contains
! OpenMP required indexing variables
integer :: nd1_1st(at%mx_halo), nd2_1st(mx_absb)
!$omp parallel default(none) &
!$omp shared(kpart, ibaddr, ib_nd_acc, nbnab, ibpart, ibseq, &
!$omp k_off, bndim2, mx_absb, mx_part, at, ahalo, chalo, &
!$omp a, b, c) &
!$omp private(i, j, k, j_in_halo, k_in_halo, k_in_part, nbkbeg, &
!$omp nb_nd_kbeg, nd1, nd2, nd3, jpart, jseq, jbnab2ch, &
!$omp nabeg, nbbeg, ncbeg, i_in_prim, icad, naaddr, &
!$omp nbaddr, ncaddr, n1, n2, n3, nd1_1st, nd2_1st)
! Loop over atoms k in current A-halo partn
do k = 1, ahalo%nh_part(kpart)
k_in_halo = ahalo%j_beg(kpart) + k - 1
@ -257,9 +251,7 @@ contains
end if ! End of if(j_in_halo.ne.0)
end do ! End of j = 1, nbnab
end do ! End of i = 1, at%n_hnab
!$omp end do
end do ! End of k = 1, nahpart
!$omp end parallel
return
end subroutine m_kern_max
!!*****
@ -389,12 +381,12 @@ contains
real(double) :: b(lenb)
real(double) :: c(lenc)
! dimension declarations
integer :: ibaddr(mx_part)
integer :: ib_nd_acc(mx_part)
integer :: nbnab(mx_part)
integer :: ibpart(mx_part*mx_absb)
integer :: ibseq(mx_part*mx_absb)
integer :: bndim2(mx_part*mx_absb)
integer(integ), intent(in) :: ib_nd_acc(:)
integer(integ), intent(in) :: ibaddr(:)
integer(integ), intent(in) :: nbnab(:)
integer(integ), intent(in) :: ibpart(:)
integer(integ), intent(in) :: ibseq(:)
integer(integ), intent(in) :: bndim2(:)
! Local variables
integer :: jbnab2ch(mx_absb)
integer :: k, k_in_part, k_in_halo, nbkbeg, j, jpart, jseq
@ -405,14 +397,6 @@ contains
! For OpenMP
integer :: nd1_1st(at%mx_halo), nd2_1st(mx_absb)
!$omp parallel default(none) &
!$omp shared(kpart, ibaddr, ib_nd_acc, nbnab, ibpart, ibseq, &
!$omp k_off, bndim2, mx_absb, mx_part, at, ahalo, chalo, &
!$omp a, b, c) &
!$omp private(j_in_halo, k_in_halo, k_in_part, nbkbeg, &
!$omp nb_nd_kbeg, nd1, nd2, nd3, i, j, k, jpart, jseq, &
!$omp jbnab2ch, icad, nabeg, nbbeg, ncbeg, naaddr, nbaddr, &
!$omp ncaddr, n1, n2, n3, i_in_prim, nd1_1st, nd2_1st)
! Loop over atoms k in current A-halo partn
do k = 1, ahalo%nh_part(kpart)
k_in_halo = ahalo%j_beg(kpart) + k - 1
@ -472,7 +456,6 @@ contains
end do
!$omp end do
end do
!$omp end parallel
return
end subroutine m_kern_min
!!*****

View File

@ -26,6 +26,8 @@
!!
module multiply_kernel
character(len=*), parameter :: kernel_id = "ompDoik"
!!*****
contains
@ -168,12 +170,12 @@ contains
real(double) :: c(lenc)
integer, optional :: debug
! Remote indices
integer(integ) :: ib_nd_acc(mx_part)
integer(integ) :: ibaddr(mx_part)
integer(integ) :: nbnab(mx_part)
integer(integ) :: ibpart(mx_part*mx_absb)
integer(integ) :: ibseq(mx_part*mx_absb)
integer(integ) :: bndim2(mx_part*mx_absb)
integer(integ), intent(in) :: ib_nd_acc(:)
integer(integ), intent(in) :: ibaddr(:)
integer(integ), intent(in) :: nbnab(:)
integer(integ), intent(in) :: ibpart(:)
integer(integ), intent(in) :: ibseq(:)
integer(integ), intent(in) :: bndim2(:)
! Local variables
integer :: jbnab2ch(mx_absb) ! Automatic array
integer :: nbkbeg, k, k_in_part, k_in_halo, j, jpart, jseq
@ -184,14 +186,6 @@ contains
! OpenMP required indexing variables
integer :: nd1_1st(at%mx_halo), nd2_1st(mx_absb)
!$omp parallel default(none) &
!$omp shared(kpart, ibaddr, ib_nd_acc, nbnab, ibpart, ibseq, &
!$omp k_off, bndim2, mx_absb, mx_part, at, ahalo, chalo, &
!$omp a, b, c) &
!$omp private(i, j, k, j_in_halo, k_in_halo, k_in_part, nbkbeg, &
!$omp nb_nd_kbeg, nd1, nd2, nd3, jpart, jseq, jbnab2ch, &
!$omp nabeg, nbbeg, ncbeg, i_in_prim, icad, naaddr, &
!$omp nbaddr, ncaddr, n1, n2, n3, nd1_1st, nd2_1st)
! Loop over atoms k in current A-halo partn
do k = 1, ahalo%nh_part(kpart)
k_in_halo = ahalo%j_beg(kpart) + k - 1
@ -218,7 +212,7 @@ contains
jseq = ibseq(nbkbeg+j-1)
jbnab2ch(j) = chalo%i_halo(chalo%i_hbeg(jpart)+jseq-1)
end do
!$omp do schedule(runtime)
!$omp do schedule(runtime)
! Loop over primary-set A-neighbours of k
do i = 1, at%n_hnab(k_in_halo)
! nabeg = at%i_beg(k_in_halo) + i - 1
@ -259,7 +253,6 @@ contains
end do ! End of i = 1, at%n_hnab
!$omp end do
end do ! End of k = 1, nahpart
!$omp end parallel
return
end subroutine m_kern_max
!!*****
@ -389,12 +382,12 @@ contains
real(double) :: b(lenb)
real(double) :: c(lenc)
! dimension declarations
integer :: ibaddr(mx_part)
integer :: ib_nd_acc(mx_part)
integer :: nbnab(mx_part)
integer :: ibpart(mx_part*mx_absb)
integer :: ibseq(mx_part*mx_absb)
integer :: bndim2(mx_part*mx_absb)
integer(integ), intent(in) :: ib_nd_acc(:)
integer(integ), intent(in) :: ibaddr(:)
integer(integ), intent(in) :: nbnab(:)
integer(integ), intent(in) :: ibpart(:)
integer(integ), intent(in) :: ibseq(:)
integer(integ), intent(in) :: bndim2(:)
! Local variables
integer :: jbnab2ch(mx_absb)
integer :: k, k_in_part, k_in_halo, nbkbeg, j, jpart, jseq
@ -405,16 +398,8 @@ contains
! For OpenMP
integer :: nd1_1st(at%mx_halo), nd2_1st(mx_absb)
!$omp parallel default(none) &
!$omp shared(kpart, ibaddr, ib_nd_acc, nbnab, ibpart, ibseq, &
!$omp k_off, bndim2, mx_absb, mx_part, at, ahalo, chalo, &
!$omp a, b, c) &
!$omp private(j_in_halo, k_in_halo, k_in_part, nbkbeg, &
!$omp nb_nd_kbeg, nd1, nd2, nd3, i, j, k, jpart, jseq, &
!$omp jbnab2ch, icad, nabeg, nbbeg, ncbeg, naaddr, nbaddr, &
!$omp ncaddr, n1, n2, n3, i_in_prim, nd1_1st, nd2_1st)
! Loop over atoms k in current A-halo partn
!$omp do schedule(runtime)
!$omp do schedule(runtime)
do k = 1, ahalo%nh_part(kpart)
k_in_halo = ahalo%j_beg(kpart) + k - 1
k_in_part = ahalo%j_seq(k_in_halo)
@ -472,7 +457,6 @@ contains
end do
end do
!$omp end do
!$omp end parallel
return
end subroutine m_kern_min
!!*****

View File

@ -26,6 +26,8 @@
!!
module multiply_kernel
character(len=*), parameter :: kernel_id = "ompDoji"
!!*****
contains
@ -168,12 +170,12 @@ contains
real(double) :: c(lenc)
integer, optional :: debug
! Remote indices
integer(integ) :: ib_nd_acc(mx_part)
integer(integ) :: ibaddr(mx_part)
integer(integ) :: nbnab(mx_part)
integer(integ) :: ibpart(mx_part*mx_absb)
integer(integ) :: ibseq(mx_part*mx_absb)
integer(integ) :: bndim2(mx_part*mx_absb)
integer(integ), intent(in) :: ib_nd_acc(:)
integer(integ), intent(in) :: ibaddr(:)
integer(integ), intent(in) :: nbnab(:)
integer(integ), intent(in) :: ibpart(:)
integer(integ), intent(in) :: ibseq(:)
integer(integ), intent(in) :: bndim2(:)
! Local variables
integer :: jbnab2ch(mx_absb) ! Automatic array
integer :: nbkbeg, k, k_in_part, k_in_halo, j, jpart, jseq
@ -184,14 +186,6 @@ contains
! OpenMP required indexing variables
integer :: nd1_1st(at%mx_halo), nd2_1st(mx_absb)
!$omp parallel default(none) &
!$omp shared(kpart, ibaddr, ib_nd_acc, nbnab, ibpart, ibseq, &
!$omp k_off, bndim2, mx_absb, mx_part, at, ahalo, chalo, &
!$omp a, b, c) &
!$omp private(i, j, k, j_in_halo, k_in_halo, k_in_part, nbkbeg, &
!$omp nb_nd_kbeg, nd1, nd2, nd3, jpart, jseq, jbnab2ch, &
!$omp nabeg, nbbeg, ncbeg, i_in_prim, icad, naaddr, &
!$omp nbaddr, ncaddr, n1, n2, n3, nd1_1st, nd2_1st)
! Loop over atoms k in current A-halo partn
do k = 1, ahalo%nh_part(kpart)
k_in_halo = ahalo%j_beg(kpart) + k - 1
@ -259,7 +253,6 @@ contains
!$omp end do
end do ! End of i = 1, at%n_hnab
end do ! End of k = 1, nahpart
!$omp end parallel
return
end subroutine m_kern_max
!!*****
@ -389,12 +382,12 @@ contains
real(double) :: b(lenb)
real(double) :: c(lenc)
! dimension declarations
integer :: ibaddr(mx_part)
integer :: ib_nd_acc(mx_part)
integer :: nbnab(mx_part)
integer :: ibpart(mx_part*mx_absb)
integer :: ibseq(mx_part*mx_absb)
integer :: bndim2(mx_part*mx_absb)
integer(integ), intent(in) :: ib_nd_acc(:)
integer(integ), intent(in) :: ibaddr(:)
integer(integ), intent(in) :: nbnab(:)
integer(integ), intent(in) :: ibpart(:)
integer(integ), intent(in) :: ibseq(:)
integer(integ), intent(in) :: bndim2(:)
! Local variables
integer :: jbnab2ch(mx_absb)
integer :: k, k_in_part, k_in_halo, nbkbeg, j, jpart, jseq
@ -405,14 +398,6 @@ contains
! For OpenMP
integer :: nd1_1st(at%mx_halo), nd2_1st(mx_absb)
!$omp parallel default(none) &
!$omp shared(kpart, ibaddr, ib_nd_acc, nbnab, ibpart, ibseq, &
!$omp k_off, bndim2, mx_absb, mx_part, at, ahalo, chalo, &
!$omp a, b, c) &
!$omp private(j_in_halo, k_in_halo, k_in_part, nbkbeg, &
!$omp nb_nd_kbeg, nd1, nd2, nd3, i, j, k, jpart, jseq, &
!$omp jbnab2ch, icad, nabeg, nbbeg, ncbeg, naaddr, nbaddr, &
!$omp ncaddr, n1, n2, n3, i_in_prim, nd1_1st, nd2_1st)
! Loop over atoms k in current A-halo partn
do k = 1, ahalo%nh_part(kpart)
k_in_halo = ahalo%j_beg(kpart) + k - 1
@ -472,7 +457,6 @@ contains
end do
!$omp end do
end do
!$omp end parallel
return
end subroutine m_kern_min
!!*****

View File

@ -26,6 +26,8 @@
!!
module multiply_kernel
character(len=*), parameter :: kernel_id = "ompDojk"
!!*****
contains
@ -168,12 +170,12 @@ contains
real(double) :: c(lenc)
integer, optional :: debug
! Remote indices
integer(integ) :: ib_nd_acc(mx_part)
integer(integ) :: ibaddr(mx_part)
integer(integ) :: nbnab(mx_part)
integer(integ) :: ibpart(mx_part*mx_absb)
integer(integ) :: ibseq(mx_part*mx_absb)
integer(integ) :: bndim2(mx_part*mx_absb)
integer(integ), intent(in) :: ib_nd_acc(:)
integer(integ), intent(in) :: ibaddr(:)
integer(integ), intent(in) :: nbnab(:)
integer(integ), intent(in) :: ibpart(:)
integer(integ), intent(in) :: ibseq(:)
integer(integ), intent(in) :: bndim2(:)
! Local variables
integer :: jbnab2ch(mx_absb) ! Automatic array
integer :: nbkbeg, k, k_in_part, k_in_halo, j, jpart, jseq
@ -184,14 +186,6 @@ contains
! OpenMP required indexing variables
integer :: nd1_1st(at%mx_halo), nd2_1st(mx_absb)
!$omp parallel default(none) &
!$omp shared(kpart, ibaddr, ib_nd_acc, nbnab, ibpart, ibseq, &
!$omp k_off, bndim2, mx_absb, mx_part, at, ahalo, chalo, &
!$omp a, b, c) &
!$omp private(i, j, k, j_in_halo, k_in_halo, k_in_part, nbkbeg, &
!$omp nb_nd_kbeg, nd1, nd2, nd3, jpart, jseq, jbnab2ch, &
!$omp nabeg, nbbeg, ncbeg, i_in_prim, icad, naaddr, &
!$omp nbaddr, ncaddr, n1, n2, n3, nd1_1st, nd2_1st)
! Loop over atoms k in current A-halo partn
do k = 1, ahalo%nh_part(kpart)
k_in_halo = ahalo%j_beg(kpart) + k - 1
@ -259,7 +253,6 @@ contains
!$omp end do
end do ! End of i = 1, at%n_hnab
end do ! End of k = 1, nahpart
!$omp end parallel
return
end subroutine m_kern_max
!!*****
@ -389,12 +382,12 @@ contains
real(double) :: b(lenb)
real(double) :: c(lenc)
! dimension declarations
integer :: ibaddr(mx_part)
integer :: ib_nd_acc(mx_part)
integer :: nbnab(mx_part)
integer :: ibpart(mx_part*mx_absb)
integer :: ibseq(mx_part*mx_absb)
integer :: bndim2(mx_part*mx_absb)
integer(integ), intent(in) :: ib_nd_acc(:)
integer(integ), intent(in) :: ibaddr(:)
integer(integ), intent(in) :: nbnab(:)
integer(integ), intent(in) :: ibpart(:)
integer(integ), intent(in) :: ibseq(:)
integer(integ), intent(in) :: bndim2(:)
! Local variables
integer :: jbnab2ch(mx_absb)
integer :: k, k_in_part, k_in_halo, nbkbeg, j, jpart, jseq
@ -405,14 +398,6 @@ contains
! For OpenMP
integer :: nd1_1st(at%mx_halo), nd2_1st(mx_absb)
!$omp parallel default(none) &
!$omp shared(kpart, ibaddr, ib_nd_acc, nbnab, ibpart, ibseq, &
!$omp k_off, bndim2, mx_absb, mx_part, at, ahalo, chalo, &
!$omp a, b, c) &
!$omp private(j_in_halo, k_in_halo, k_in_part, nbkbeg, &
!$omp nb_nd_kbeg, nd1, nd2, nd3, i, j, k, jpart, jseq, &
!$omp jbnab2ch, icad, nabeg, nbbeg, ncbeg, naaddr, nbaddr, &
!$omp ncaddr, n1, n2, n3, i_in_prim, nd1_1st, nd2_1st)
! Loop over atoms k in current A-halo partn
!$omp do schedule(runtime)
do k = 1, ahalo%nh_part(kpart)
@ -472,7 +457,6 @@ contains
end do
end do
!$omp end do
!$omp end parallel
return
end subroutine m_kern_min
!!*****

View File

@ -26,6 +26,8 @@
!!
module multiply_kernel
character(len=*), parameter :: kernel_id = "ompGemm"
!!*****
contains
@ -149,12 +151,12 @@ contains
real(double) :: c(lenc)
integer, optional :: debug
! Remote indices
integer(integ) :: ib_nd_acc(mx_part)
integer(integ) :: ibaddr(mx_part)
integer(integ) :: nbnab(mx_part)
integer(integ) :: ibpart(mx_part*mx_absb)
integer(integ) :: ibseq(mx_part*mx_absb)
integer(integ) :: bndim2(mx_part*mx_absb)
integer(integ), intent(in) :: ib_nd_acc(:)
integer(integ), intent(in) :: ibaddr(:)
integer(integ), intent(in) :: nbnab(:)
integer(integ), intent(in) :: ibpart(:)
integer(integ), intent(in) :: ibseq(:)
integer(integ), intent(in) :: bndim2(:)
! Local variables
integer :: jbnab2ch(mx_absb) ! Automatic array
integer :: nbkbeg, k, k_in_part, k_in_halo, j, jpart, jseq
@ -168,15 +170,6 @@ contains
! OpenMP required indexing variables
integer :: nd1_1st(at%mx_halo), nd2_1st(mx_absb)
!$omp parallel default(none) &
!$omp shared(kpart, ibaddr, ib_nd_acc, nbnab, ibpart, ibseq, &
!$omp k_off, bndim2, mx_absb, mx_part, at, ahalo, chalo, &
!$omp a, b, c) &
!$omp private(i, j, k, j_in_halo, k_in_halo, k_in_part, nbkbeg, &
!$omp nb_nd_kbeg, nd1, nd2, nd3, jpart, jseq, jbnab2ch, &
!$omp nabeg, nbbeg, ncbeg, i_in_prim, icad, naaddr, &
!$omp nbaddr, ncaddr, n1, n2, n3, nd1_1st, nd2_1st, &
!$omp tempa, tempb, tempc, prend1, maxlen, sofar)
allocate(tempa(1,1), tempc(1,1))
do k = 1, ahalo%nh_part(kpart) ! Loop over atoms k in current A-halo partn
k_in_halo = ahalo%j_beg(kpart) + k - 1
@ -184,7 +177,6 @@ contains
nbkbeg = ibaddr(k_in_part)
nb_nd_kbeg = ib_nd_acc(k_in_part)
nd3 = ahalo%ndimj(k_in_halo)
! if (PRESENT(debug)) write (21+debug,*) 'Details1: ', k, nb_nd_kbeg
! for OpenMP sub-array indexing
nd1_1st(1) = 0
do i = 2, at%n_hnab(k_in_halo)
@ -207,15 +199,15 @@ contains
prend1 = 0
!$omp do schedule(runtime)
! Loop over primary-set A-neighbours of k
do i = 1, at%n_hnab(k_in_halo)
! nabeg = at%i_beg(k_in_halo) + i - 1
A_i : do i = 1, at%n_hnab(k_in_halo)
i_in_prim = at%i_prim(at%i_beg(k_in_halo)+i-1)
nd1 = ahalo%ndimi(i_in_prim)
nabeg = at%i_nd_beg(k_in_halo) + nd1_1st(i)
if (nd1 /= prend1) then
deallocate(tempc, tempa)
allocate(tempa(nd1,nd3), tempc(nd1,maxlen))
! allocate(tempa(nd3,nd1), tempc(nd1,maxlen))
deallocate(tempc)
deallocate(tempa)
allocate(tempa(nd1,nd3))
allocate(tempc(nd1,maxlen))
end if
tempa = zero
tempb = zero
@ -224,38 +216,17 @@ contains
naaddr = nabeg + nd3 * (n1 - 1)
do n3 = 1, nd3
tempa(n1,n3) = a(naaddr+n3-1)
! tempa(n3,n1) = a(naaddr+n3-1)
end do
end do
icad = (i_in_prim - 1) * chalo%ni_in_halo
! nbbeg = nb_nd_kbeg
sofar = 0
do j = 1, nbnab(k_in_part) ! Loop over B-neighbours of atom k
! nbbeg = nbkbeg + j - 1
nd2 = bndim2(nbkbeg+j-1)
nbbeg = nb_nd_kbeg + nd2_1st(j)
j_in_halo = jbnab2ch(j)
if (j_in_halo /= 0) then
ncbeg = chalo%i_h2d(icad+j_in_halo)
! nd2 = chalo%ndimj(j_in_halo)
if (ncbeg /= 0) then ! multiplication of ndim x ndim blocks
! if (present(debug)) &
! write (21+debug,*) 'Details2: ', j, nd2, &
! (nabeg-1)/(nd1*nd3), &
! (ncbeg-1)/(nd1*nd2), &
! (nbbeg-1)/(nd2*nd3)
!DIR$ NOPATTERN
!! do n2=1, nd2
!! nbaddr = nbbeg+nd3*(n2-1)
!! ncaddr = ncbeg+nd1*(n2-1)
!! do n1=1, nd1
!! naaddr=nabeg+nd3*(n1-1)
!! do n3=1, nd3
!! c(ncaddr+n1-1) = c(ncaddr+n1-1) &
!! +a(naaddr+n3-1)*b(nbaddr+n3-1)
!! end do
!! end do
!! end do
do n2 = 1, nd2
nbaddr = nbbeg + nd3 * (n2 - 1)
do n3 = 1, nd3
@ -267,9 +238,6 @@ contains
end if ! End of if (j_in_halo /= 0)
end do ! End of 1, nbnab
if (sofar > 0) then
! m, n, k, alpha, a, lda, b, ldb, beta, c, ldc
! call dgemm('t', 'n', nd1, sofar, nd3, 1.0_double, tempa, &
! nd3, tempb, nd3,0.0_double, tempc, nd1)
call dgemm('n', 'n', nd1, sofar, nd3, 1.0_double, tempa, &
nd1, tempb, nd3, zero, tempc, nd1)
end if
@ -291,13 +259,12 @@ contains
end if
end if
end do
end do ! end of i = 1, at%n_hnab
end do A_i
!$omp end do
deallocate(tempb)
end do ! end of k = 1, nahpart
if (allocated(tempa)) deallocate(tempa)
if (allocated(tempc)) deallocate(tempc)
!$omp end parallel
return
end subroutine m_kern_max
!!*****
@ -421,12 +388,12 @@ contains
real(double) :: b(lenb)
real(double) :: c(lenc)
! dimension declarations
integer :: ibaddr(mx_part)
integer :: ib_nd_acc(mx_part)
integer :: nbnab(mx_part)
integer :: ibpart(mx_part*mx_absb)
integer :: ibseq(mx_part*mx_absb)
integer :: bndim2(mx_part*mx_absb)
integer(integ), intent(in) :: ib_nd_acc(:)
integer(integ), intent(in) :: ibaddr(:)
integer(integ), intent(in) :: nbnab(:)
integer(integ), intent(in) :: ibpart(:)
integer(integ), intent(in) :: ibseq(:)
integer(integ), intent(in) :: bndim2(:)
! Local variables
integer :: jbnab2ch(mx_absb)
integer :: k, k_in_part, k_in_halo, nbkbeg, j, jpart, jseq
@ -445,15 +412,6 @@ contains
! mx_a = maxnsf
! maxlen = maxnsf * max(nbnab)
!$omp parallel default(none) &
!$omp shared(kpart, ibaddr, ib_nd_acc, nbnab, ibpart, ibseq, &
!$omp k_off, bndim2, mx_absb, mx_part, at, ahalo, chalo, &
!$omp a, b, c) &
!$omp private(i, j, k, j_in_halo, k_in_halo, k_in_part, nbkbeg, &
!$omp nb_nd_kbeg, nd1, nd2, nd3, jpart, jseq, jbnab2ch, &
!$omp nabeg, nbbeg, ncbeg, i_in_prim, icad, naaddr, &
!$omp nbaddr, ncaddr, n1, n2, n3, nd1_1st, nd2_1st, &
!$omp tempb, tempc, maxlen, sofar)
do k = 1, ahalo%nh_part(kpart) ! Loop over atoms k in current A-halo partn
k_in_halo = ahalo%j_beg(kpart) + k - 1
k_in_part = ahalo%j_seq(k_in_halo)
@ -532,7 +490,6 @@ contains
end do
!$omp end do
end do
!$omp end parallel
return
end subroutine m_kern_min
!!*****

View File

@ -26,6 +26,8 @@
!!
module multiply_kernel
character(len=*), parameter :: kernel_id = "ompGemm_m"
!!*****
contains
@ -149,12 +151,12 @@ contains
real(double) :: c(lenc)
integer, optional :: debug
! Remote indices
integer(integ) :: ib_nd_acc(mx_part)
integer(integ) :: ibaddr(mx_part)
integer(integ) :: nbnab(mx_part)
integer(integ) :: ibpart(mx_part*mx_absb)
integer(integ) :: ibseq(mx_part*mx_absb)
integer(integ) :: bndim2(mx_part*mx_absb)
integer(integ), intent(in) :: ib_nd_acc(:)
integer(integ), intent(in) :: ibaddr(:)
integer(integ), intent(in) :: nbnab(:)
integer(integ), intent(in) :: ibpart(:)
integer(integ), intent(in) :: ibseq(:)
integer(integ), intent(in) :: bndim2(:)
! Local variables
integer :: jbnab2ch(mx_absb) ! Automatic array
integer :: nbkbeg, k, k_in_part, k_in_halo, j, jpart, jseq
@ -168,16 +170,7 @@ contains
! OpenMP required indexing variables
integer :: nd1_1st(at%mx_halo), nd2_1st(mx_absb)
!$omp parallel default(none) &
!$omp shared(kpart, ibaddr, ib_nd_acc, nbnab, ibpart, ibseq, &
!$omp k_off, bndim2, mx_absb, mx_part, at, ahalo, chalo, &
!$omp a, b, c) &
!$omp private(i, j, k, j_in_halo, k_in_halo, k_in_part, nbkbeg, &
!$omp nb_nd_kbeg, nd1, nd2, nd3, jpart, jseq, jbnab2ch, &
!$omp nabeg, nbbeg, ncbeg, i_in_prim, icad, naaddr, &
!$omp nbaddr, ncaddr, n1, n2, n3, nd1_1st, nd2_1st, &
!$omp tempa, tempb, tempc, maxnd1, maxnd2, maxnd3, &
!$omp maxlen, sofar)
! Allocate tempa, tempb, tempc to largest possible size outside the loop
maxnd1 = maxval(ahalo%ndimi)
maxnd2 = maxval(bndim2)
maxnd3 = maxval(ahalo%ndimj)
@ -276,7 +269,6 @@ contains
!$omp end do
end do ! end of k = 1, nahpart
deallocate(tempa, tempb, tempc)
!$omp end parallel
return
end subroutine m_kern_max
!!*****
@ -401,12 +393,12 @@ contains
real(double) :: b(lenb)
real(double) :: c(lenc)
! dimension declarations
integer :: ibaddr(mx_part)
integer :: ib_nd_acc(mx_part)
integer :: nbnab(mx_part)
integer :: ibpart(mx_part*mx_absb)
integer :: ibseq(mx_part*mx_absb)
integer :: bndim2(mx_part*mx_absb)
integer(integ), intent(in) :: ib_nd_acc(:)
integer(integ), intent(in) :: ibaddr(:)
integer(integ), intent(in) :: nbnab(:)
integer(integ), intent(in) :: ibpart(:)
integer(integ), intent(in) :: ibseq(:)
integer(integ), intent(in) :: bndim2(:)
! Local variables
integer :: jbnab2ch(mx_absb)
integer :: k, k_in_part, k_in_halo, nbkbeg, j, jpart, jseq
@ -420,16 +412,6 @@ contains
! OpenMP required indexing variables
integer :: nd1_1st(at%mx_halo), nd2_1st(mx_absb)
!$omp parallel default(none) &
!$omp shared(kpart, ibaddr, ib_nd_acc, nbnab, ibpart, ibseq, &
!$omp k_off, bndim2, mx_absb, mx_part, at, ahalo, chalo, &
!$omp a, b, c) &
!$omp private(i, j, k, j_in_halo, k_in_halo, k_in_part, nbkbeg, &
!$omp nb_nd_kbeg, nd1, nd2, nd3, jpart, jseq, jbnab2ch, &
!$omp nabeg, nbbeg, ncbeg, i_in_prim, icad, naaddr, &
!$omp nbaddr, ncaddr, n1, n2, n3, nd1_1st, nd2_1st, &
!$omp tempb, tempc, maxnd1, maxnd2, maxnd3, maxlen, &
!$omp sofar)
maxnd1 = maxval(ahalo%ndimi)
maxnd2 = maxval(bndim2)
maxnd3 = maxval(ahalo%ndimj)
@ -503,7 +485,6 @@ contains
!$omp end do
end do
deallocate(tempb, tempc)
!$omp end parallel
return
end subroutine m_kern_min
!!*****

View File

@ -26,6 +26,8 @@
!!
module multiply_kernel
character(len=*), parameter :: kernel_id = "ompTsk"
!!*****
contains

View File

@ -146,7 +146,7 @@ contains
integer :: lab_const
integer :: invdir,ierr,kpart,ind_part,ncover_yz,n_which,ipart,nnode
integer :: icall,n_cont,kpart_next,ind_partN,k_off
integer :: icall2,stat,ilen2,lenb_rem
integer :: stat,ilen2,lenb_rem
! Remote variables to be allocated
integer(integ),allocatable :: ibpart_rem(:)
real(double),allocatable :: b_rem(:)
@ -164,10 +164,10 @@ contains
integer :: offset,sends,i,j
integer, dimension(MPI_STATUS_SIZE) :: mpi_stat
integer, allocatable, dimension(:) :: recv_part
logical flag,call_flag
real(double) :: t0,t1
logical :: new_partition
call start_timer(tmr_std_matmult)
call start_timer(tmr_std_allocation)
@ -213,92 +213,40 @@ contains
!write(io_lun,*) 'Returned ',a_b_c%ahalo%np_in_halo,myid
ncover_yz=a_b_c%gcs%ncovery*a_b_c%gcs%ncoverz
! #ifdef OMP_M
! !$omp parallel default(none) &
! !$omp shared(a, b, c, a_b_c, myid, lena, lenc, tmr_std_allocation, &
! !$omp ncover_yz, ibpart_rem, atrans, usegemm) &
! !$omp private(kpart, icall, ind_part, ipart, nnode, b_rem, &
! !$omp lenb_rem, n_cont, part_array, ilen2, offset, &
! !$omp nbnab_rem, ibind_rem, ib_nd_acc_rem, ibseq_rem, &
! !$omp npxyz_rem, ibndimj_rem, k_off, icall2)
! !$omp do
! #end if
!$omp parallel default(shared)
main_loop: do kpart = 1,a_b_c%ahalo%np_in_halo
do kpart = 1,a_b_c%ahalo%np_in_halo ! Main loop
!write(io_lun,*) 'Part: ',kpart,myid
!$omp master
icall=1
ind_part = a_b_c%ahalo%lab_hcell(kpart)
!write(io_lun,*) 'ind_part: ',ind_part
if(kpart>1) then ! Is it a periodic image of the previous partition ?
new_partition = .true.
! Check if this is a periodic image of the previous partition
if(kpart>1) then
if(ind_part.eq.a_b_c%ahalo%lab_hcell(kpart-1)) then
icall=0
else ! Get the data
!write(io_lun,*) myid,' seq: ',size(a_b_c%parts%i_cc2seq)
ipart = a_b_c%parts%i_cc2seq(ind_part)
!write(io_lun,*) myid,' Alloc b_rem part: ',ipart
nnode = a_b_c%comms%neigh_node_list(kpart)
recv_part(nnode) = recv_part(nnode)+1
!write(io_lun,*) myid,' Alloc b_rem node: ',nnode
!write(io_lun,*) myid,' Alloc b_rem icc: ', a_b_c%parts%i_cc2node(ind_part)
!write(io_lun,*) myid,' Alloc b_rem alloc: ',allocated(b_rem)
if(allocated(b_rem)) deallocate(b_rem)
if(a_b_c%parts%i_cc2node(ind_part)==myid+1) then
lenb_rem = a_b_c%bmat(ipart)%part_nd_nabs
else
lenb_rem = a_b_c%comms%ilen3rec(ipart,nnode)
end if
allocate(b_rem(lenb_rem))
call prefetch(kpart,a_b_c%ahalo,a_b_c%comms,a_b_c%bmat,icall,&
n_cont,part_array,a_b_c%bindex,b_rem,lenb_rem,b,myid,ilen2,&
mx_msg_per_part,a_b_c%parts,a_b_c%prim,a_b_c%gcs,(recv_part(nnode)-1)*2)
!write(io_lun,*) 'b_rem: ',lenb_rem
! Now point the _rem variables at the appropriate parts of
! the array where we will receive the data
offset = 0
nbnab_rem => part_array(offset+1:offset+n_cont)
offset = offset+n_cont
ibind_rem => part_array(offset+1:offset+n_cont)
offset = offset+n_cont
ib_nd_acc_rem => part_array(offset+1:offset+n_cont)
offset = offset+n_cont
ibseq_rem => part_array(offset+1:offset+ilen2)
offset = offset+ilen2
npxyz_rem => part_array(offset+1:offset+3*ilen2)
offset = offset+3*ilen2
ibndimj_rem => part_array(offset+1:offset+ilen2)
if(offset+ilen2>3*a_b_c%parts%mx_mem_grp+ &
5*a_b_c%parts%mx_mem_grp*a_b_c%bmat(1)%mx_abs) then
call cq_abort('mat_mult: error pointing to part_array ',kpart)
end if
! Create ibpart_rem
call end_part_comms(myid,n_cont,nbnab_rem,ibind_rem,npxyz_rem,&
ibpart_rem,ncover_yz,a_b_c%gcs%ncoverz)
new_partition = .false.
end if
else ! Get the data
!write(io_lun,*) myid,' seq: ',size(a_b_c%parts%i_cc2seq)
end if
if(new_partition) then
! Get the data
ipart = a_b_c%parts%i_cc2seq(ind_part)
!write(io_lun,*) myid,' Alloc b_rem part: ',ipart
nnode = a_b_c%comms%neigh_node_list(kpart)
recv_part(nnode) = recv_part(nnode)+1
!write(io_lun,*) myid,' Alloc b_rem node: ',nnode
!write(io_lun,*) myid,' Alloc b_rem icc: ',a_b_c%parts%i_cc2node(ind_part)
!write(io_lun,*) myid,' Alloc b_rem alloc: ',allocated(b_rem)
if(allocated(b_rem)) deallocate(b_rem)
if(a_b_c%parts%i_cc2node(ind_part)==myid+1) then
lenb_rem = a_b_c%bmat(ipart)%part_nd_nabs
else
lenb_rem = a_b_c%comms%ilen3rec(ipart,nnode)
end if
call start_timer(tmr_std_allocation)
allocate(b_rem(lenb_rem))
call stop_timer(tmr_std_allocation)
part_array = 0
b_rem = zero
call prefetch(kpart,a_b_c%ahalo,a_b_c%comms,a_b_c%bmat,icall,&
n_cont,part_array,a_b_c%bindex,b_rem,lenb_rem,b,myid,ilen2,&
mx_msg_per_part,a_b_c%parts,a_b_c%prim,a_b_c%gcs,(recv_part(nnode)-1)*2)
lenb_rem = size(b_rem)
!write(io_lun,*) 'b_rem: ',lenb_rem
! Now point the _rem variables at the appropriate parts of the array
! where we will receive the data
! Now point the _rem variables at the appropriate parts of
! the array where we will receive the data
offset = 0
nbnab_rem => part_array(offset+1:offset+n_cont)
offset = offset+n_cont
@ -313,22 +261,20 @@ contains
ibndimj_rem => part_array(offset+1:offset+ilen2)
if(offset+ilen2>3*a_b_c%parts%mx_mem_grp+ &
5*a_b_c%parts%mx_mem_grp*a_b_c%bmat(1)%mx_abs) then
call cq_abort('Error pointing to part_array !',kpart)
call cq_abort('mat_mult: error pointing to part_array ',kpart)
end if
! Create ibpart_rem
call end_part_comms(myid,n_cont,nbnab_rem,ibind_rem,npxyz_rem,&
ibpart_rem,ncover_yz,a_b_c%gcs%ncoverz)
end if ! End of the "if this isn't the first partition" loop
end if
k_off=a_b_c%ahalo%lab_hcover(kpart) ! --- offset for pbcs
icall2=1
! Check dimensions to be used in m_kern_min/max
!call check_mkm(kpart,a_b_c%ahalo%nh_part,a_b_c%ahalo%j_seq, &
! a_b_c%ahalo%j_beg,&
! ibind_rem,ibpart_rem,nbnab_rem,&
! ibseq_rem,a_b_c%chalo%i_hbeg,k_off,icall2,&
! a_b_c%ahalo%mx_part,a_b_c%gcs%mx_gcover,a_b_c%ahalo%mx_halo, &
! a_b_c%parts%mx_mem_grp, &
! a_b_c%bmat(1)%mx_abs,a_b_c%gcs%mx_mcover)
!if(icall2.eq.1) then ! If check is OK, do the mult
! Omp master doesn't include a implicit barrier. We want master
! to be finished with comms before calling the multiply kernels
! hence the explicit barrier
!$omp end master
!$omp barrier
if(a_b_c%mult_type.eq.1) then ! C is full mult
call m_kern_max( k_off,kpart,ib_nd_acc_rem, ibind_rem,nbnab_rem,&
ibpart_rem,ibseq_rem,ibndimj_rem,&
@ -342,14 +288,9 @@ contains
a_b_c%bmat(1)%mx_abs,a_b_c%parts%mx_mem_grp, &
a_b_c%prim%mx_iprim, lena, lenb_rem, lenc)
end if
!else
! call cq_abort('mat_mult: error in check_mkm ',kpart)
!end if
end do ! End of the kpart=1,ahalo%np_in_halo loop !
! #ifdef OMP_M
! !$omp end do
! !$omp end parallel
! #end if
!$omp barrier
end do main_loop
!$omp end parallel
call start_timer(tmr_std_allocation)
if(allocated(b_rem)) deallocate(b_rem)
call stop_timer(tmr_std_allocation)

View File

@ -130,12 +130,13 @@ contains
use dimens, only: n_my_grid_points
use maxima_module, only: maxngrid
use functions_on_grid, only: atomfns, H_on_atomfns
use PAO_grid_transform_module, only: single_PAO_to_grid
use PAO_grid_transform_module, only: PAO_or_gradPAO_to_grid
use S_matrix_module, only: get_S_matrix
use H_matrix_module, only: get_H_matrix
use store_matrix, only: dump_pos_and_matrices
use GenComms, only: mtime
use io_module, only: return_prefix
use angular_coeff_routines, only: evaluate_pao
implicit none
@ -164,7 +165,7 @@ contains
if (flag_LFD) then
! Prepare Spao and Hpao
! 1. Calculate PAO values on grids
if (LFD_build_Spao) call single_PAO_to_grid(atomfns)
if (LFD_build_Spao) call PAO_or_gradPAO_to_grid(atomfns, evaluate_pao, 0)
! 2. Construct matSpao
if (LFD_build_Spao) call get_S_matrix(inode, ionode, transform_AtomF_to_SF=.false.)
! 3. Construct matHpao

View File

@ -8,6 +8,7 @@ ODD_OBJS = global_module.o \
logicals_module.o \
memory_module.o \
mpi.o \
omp_module${OMP_DUMMY}.o \
timer_module.o \
timer_stdclocks_module.o \
auxiliary_types.o \

View File

@ -833,7 +833,7 @@ contains
!! SOURCE
!!
subroutine evaluate_pao(sp,l,nz,m,x,y,z,pao_val)
subroutine evaluate_pao(i_vector,sp,l,nz,m,x,y,z,pao_val)
use datatypes
use numbers
@ -841,6 +841,7 @@ contains
implicit none
integer, intent(in) :: i_vector ! dummy argument, included to satisfy interface in PAO_grid_transform_module
integer, intent(in) :: sp,l,nz,m
real(double), intent(in) :: x,y,z
real(double), intent(out) :: pao_val
@ -968,7 +969,7 @@ contains
!RC 09/11/03 using (now debugged) routine pp_elem_derivative (see
! above) as template for this sbrt pao_elem_derivative
real(double), intent(inout) :: x_i,y_i,z_i
real(double), intent(in) :: x_i,y_i,z_i
real(double), intent(out) :: drvtv_val
integer, intent(in) :: i_vector, l, m, spec, nzeta
integer :: n1,n2

19
src/omp_module.f90 Normal file
View File

@ -0,0 +1,19 @@
module omp_module
!! The idea of this module is to isolate the dependency on omp_lib to one place
use omp_lib
implicit none
contains
subroutine init_threads(number_of_threads)
!! Return the number of threads given by the omp library call
integer, intent(out) :: number_of_threads
number_of_threads = omp_get_max_threads()
!! Outside of a parallel region, get_max_threads returns the number of available threads
end subroutine init_threads
end module omp_module

16
src/omp_moduleDUMMY.f90 Normal file
View File

@ -0,0 +1,16 @@
module omp_module
!! This module allows compiling without the OpenMP library
implicit none
contains
subroutine init_threads(number_of_threads)
!! Return 0
integer, intent(out) :: number_of_threads
number_of_threads = 0
end subroutine init_threads
end module omp_module

View File

@ -415,7 +415,7 @@ contains
! if(distsq < rcutsq) then ! If it is a neighbour block,...
! if(distsq < rcutsq+very_small) then ! If it is a neighbour block,...
if(distsq < rcutsq(spec)+RD_ERR) then ! If it is a neighbour block,...
if(distsq < rcutsq(spec)-RD_ERR) then ! If it is a neighbour block,...
! nxmin etc. (those will be used in BtoG trans.)
if(naba_blk%no_naba_blk(inp)==0) then
@ -626,7 +626,7 @@ contains
zmax= zmin+ dcellz_block -dcellz_grid
call distsq_blk_atom&
(xatom,yatom,zatom,xmin,xmax,ymin,ymax,zmin,zmax,distsq)
if(distsq < rcutsq(spec)+RD_ERR) then ! If it is a neighbour block,...
if(distsq < rcutsq(spec)-RD_ERR) then ! If it is a neighbour block,...
ind_block= BCS_blocks%lab_cell(iblock) !CC in a sim. cell
if(ind_block > blocks%mx_gcell) call cq_abort(' ERROR: ind_block in get_naba_BCSblk',ind_block,blocks%mx_gcell)
@ -845,7 +845,7 @@ contains
call distsq_blk_atom &
(xatom,yatom,zatom,xmin,xmax,ymin,ymax,zmin,zmax,distsq)
spec = species_glob( id_glob( parts%icell_beg(DCS_parts%lab_cell(np)) +ni-1 ))
if(distsq<rcutsq(spec)+RD_ERR) then
if(distsq<rcutsq(spec)-RD_ERR) then
!if(distsq < rcutsq) then ! have found a naba atom
ia=ia+1 ! seq. no. of naba atoms for iprim_blk
halo_set%ihalo(icover)=1 ! icover-th atom is a halo atom
@ -1093,7 +1093,7 @@ contains
call distsq_blk_atom(xatom,yatom,zatom,xmin,xmax,ymin,ymax,zmin,zmax,distsq)
spec = species_glob( id_glob( parts%icell_beg(DCS_parts%lab_cell(np)) +ni-1 ))
if(distsq < rcutsq(spec)+RD_ERR) then ! have found a naba atom
if(distsq < rcutsq(spec)-RD_ERR) then ! have found a naba atom
ia=ia+1
atoms = .true.
ihalo(icover) = 1

View File

@ -593,7 +593,7 @@ contains
! commented by TM 18Oct2006
distsq=(xmu-xnu)**2+(ymu-ynu)**2+(zmu-znu)**2
if(distsq < rcutsq ) then
if(distsq < rcutsq -RD_ERR ) then
if(loc_bucket%i_h2d(ind_halo2,ind_halo1) == 0) then !new pair
npair=npair+1
loc_bucket%i_h2d(ind_halo2,ind_halo1)=npair

View File

@ -1,49 +0,0 @@
#
# Set compilers
FC=mpif90
F77=mpif77
# Linking flags
LINKFLAGS= -L/usr/local/lib
ARFLAGS=
# Compilation flags
# NB for gcc10 you need to add -fallow-argument-mismatch
COMPFLAGS= -O3 $(XC_COMPFLAGS)
COMPFLAGS_F77= $(COMPFLAGS)
# Set BLAS and LAPACK libraries
# MacOS X
# BLAS= -lvecLibFort
# Intel MKL use the Intel tool
# Generic
# BLAS= -llapack -lblas
# Full library call; remove scalapack if using dummy diag module
LIBS= $(FFT_LIB) $(XC_LIB) -lscalapack $(BLAS)
# LibXC compatibility (LibXC below) or Conquest XC library
# Conquest XC library
#XC_LIBRARY = CQ
#XC_LIB =
#XC_COMPFLAGS =
# LibXC compatibility
# Choose LibXC version: v4 (deprecated) or v5/6 (v5 and v6 have the same interface)
# XC_LIBRARY = LibXC_v4
XC_LIBRARY = LibXC_v5
XC_LIB = -lxcf90 -lxc
XC_COMPFLAGS = -I/usr/local/include
# Set FFT library
FFT_LIB=-lfftw3
FFT_OBJ=fft_fftw3.o
# Matrix multiplication kernel type
MULT_KERN = default
# Use dummy DiagModule or not
DIAG_DUMMY =

View File

@ -0,0 +1,56 @@
# This is an example system-specific makefile. You will need to adjust
# it for the actual system you are running on.
# Set compilers
FC=mpif90
# OpenMP flags
# Set this to "OMPFLAGS= " if compiling without openmp
# Set this to "OMPFLAGS= -fopenmp" if compiling with openmp
OMPFLAGS=
# Set this to "OMP_DUMMY = DUMMY" if compiling without openmp
# Set this to "OMP_DUMMY = " if compiling with openmp
OMP_DUMMY = DUMMY
# Set BLAS and LAPACK libraries
# MacOS X
# BLAS= -lvecLibFort
# Intel MKL use the Intel tool
# Generic
BLAS= -llapack -lblas
# Full scalapack library call; remove -lscalapack if using dummy diag module.
# If using OpenMPI, use -lscalapack-openmpi instead.
# If using Cray-libsci, use -llibsci_cray_mpi instead.
SCALAPACK = -lscalapack
# LibXC: choose between LibXC compatibility below or Conquest XC library
# Conquest XC library
#XC_LIBRARY = CQ
#XC_LIB =
#XC_COMPFLAGS =
# LibXC compatibility
# Choose LibXC version: v4 (deprecated) or v5/6 (v5 and v6 have the same interface)
#XC_LIBRARY = LibXC_v4
XC_LIBRARY = LibXC_v5
XC_LIB = -lxcf90 -lxc
XC_COMPFLAGS = -I/usr/local/include
# Set FFT library
FFT_LIB=-lfftw3
FFT_OBJ=fft_fftw3.o
LIBS= $(FFT_LIB) $(XC_LIB) $(SCALAPACK) $(BLAS)
# Compilation flags
# NB for gcc10 you need to add -fallow-argument-mismatch
COMPFLAGS= -O3 $(OMPFLAGS) $(XC_COMPFLAGS)
# Linking flags
LINKFLAGS= -L/usr/local/lib $(OMPFLAGS)
# Matrix multiplication kernel type
MULT_KERN = default
# Use dummy DiagModule or not
DIAG_DUMMY =

View File

@ -1,6 +1,7 @@
# System-specific makefile for the GitHub Actions runners.
# Linking flags
LINKFLAGS= -L/usr/lib -L/usr/lib/x86_64-linux-gnu
ARFLAGS=
LINKFLAGS=-fopenmp -L/usr/lib -L/usr/lib/x86_64-linux-gnu
# Set BLAS and LAPACK libraries
BLAS= -llapack -lblas
# LibXC compatibility (LibXC below) or Conquest XC library
@ -10,13 +11,10 @@ XC_COMPFLAGS = -I/usr/include
# Set FFT library
FFT_LIB=-lfftw3
FFT_OBJ=fft_fftw3.o
# Matrix multiplication kernel type
MULT_KERN = default
# Use dummy DiagModule or not
DIAG_DUMMY =
# Full library call; remove scalapack if using dummy diag module
LIBS= $(XC_LIB) -lscalapack-openmpi $(BLAS) $(FFT_LIB)
# Compilation flags
# NB for gcc10 you need to add -fallow-argument-mismatch
COMPFLAGS= -O3 $(XC_COMPFLAGS) -fallow-argument-mismatch
COMPFLAGS_F77= $(COMPFLAGS)
COMPFLAGS= -O3 -fopenmp $(XC_COMPFLAGS) -fallow-argument-mismatch

View File

@ -0,0 +1,56 @@
# This is a system.make file for the UCL Kathleen machine. See
# https://www.rc.ucl.ac.uk/docs/Clusters/Kathleen/ for details
# Set compilers
FC=mpif90
# OpenMP flags
# Set this to "OMPFLAGS= " if compiling without openmp
# Set this to "OMPFLAGS= -fopenmp" if compiling with openmp
OMPFLAGS= -fopenmp
# Set this to "OMP_DUMMY = DUMMY" if compiling without openmp
# Set this to "OMP_DUMMY = " if compiling with openmp
OMP_DUMMY =
# Set BLAS and LAPACK libraries
# MacOS X
# BLAS= -lvecLibFort
# Intel MKL use the Intel tool
# Generic
#BLAS= -llapack -lblas
# LibXC: choose between LibXC compatibility below or Conquest XC library
# Conquest XC library
#XC_LIBRARY = CQ
#XC_LIB =
#XC_COMPFLAGS =
# LibXC compatibility
# Choose LibXC version: v4 (deprecated) or v5/6 (v5 and v6 have the same interface)
# XC_LIBRARY = LibXC_v4
XC_LIBRARY = LibXC_v5
XC_LIB = -lxcf90 -lxc
XC_COMPFLAGS = -I/usr/local/include
# Set FFT library
FFT_LIB=-lmkl_rt
FFT_OBJ=fft_fftw3.o
# Full library call; remove scalapack if using dummy diag module
# If using OpenMPI, use -lscalapack-openmpi instead.
#LIBS= $(FFT_LIB) $(XC_LIB) -lscalapack $(BLAS)
LIBS= $(FFT_LIB) $(XC_LIB)
# Compilation flags
# NB for gcc10 you need to add -fallow-argument-mismatch
COMPFLAGS= -xAVX -O3 -g $(OMPFLAGS) $(XC_COMPFLAGS) -I"${MKLROOT}/include"
# Linking flags
LINKFLAGS= -L${MKLROOT}/lib/intel64 -lmkl_scalapack_lp64 -lmkl_cdft_core -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -ldl $(OMPFLAGS) $(XC_LIB)
# Matrix multiplication kernel type
MULT_KERN = ompGemm
# Use dummy DiagModule or not
DIAG_DUMMY =

View File

@ -0,0 +1,39 @@
# This is a system.make file for the MMM young Tier 2 machine. See
# https://www.rc.ucl.ac.uk/docs/Clusters/Young/ for details
# Set compilers
FC=mpif90
# OpenMP flags
OMPFLAGS= -fopenmp
OMP_DUMMY=
# LibXC compatibility
# Choose LibXC version: v4 or v5
XC_LIBRARY = LibXC_v4
XC_LIB = -L/shared/ucl/apps/libxc/4.2.3/intel-2018/lib -lxcf90 -lxc
XC_COMPFLAGS = -I/shared/ucl/apps/libxc/4.2.3/intel-2018/include
#XC_LIBRARY = LibXC_v5
#XC_LIB = -L/home/cceaosk/libxc-5.2.3/install/lib64/ -lxc -lxcf90
#XC_COMPFLAGS = -I/home/cceaosk/libxc-5.2.3/install/include/
# Set FFT library
FFT_LIB=-lmkl_rt
FFT_OBJ=fft_fftw3.o
# Linking flags
LINKFLAGS= -L${MKLROOT}/lib/intel64 -lmkl_scalapack_lp64 -lmkl_cdft_core -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -ldl $(OMPFLAGS) $(XC_LIB)
# Compilation flags
# NB for gcc10 you need to add -fallow-argument-mismatch
COMPFLAGS= -g -O2 $(OMPFLAGS) $(XC_COMPFLAGS) -I"${MKLROOT}/include"
# Matrix multiplication kernel type
MULT_KERN = ompGemm_m
# Use dummy DiagModule or not
DIAG_DUMMY =
# Full library call; remove scalapack if using dummy diag module
LIBS= $(FFT_LIB) $(XC_LIB)

View File

@ -1637,11 +1637,12 @@ contains
use GenComms, only: myid, inode, ionode, cq_abort
use H_matrix_module, only: get_H_matrix
use blip_grid_transform_module, only: blip_to_support_new
use PAO_grid_transform_module, only: single_PAO_to_grid
use PAO_grid_transform_module, only: PAO_or_gradPAO_to_grid
use functions_on_grid, only: atomfns
use density_module, only: density
use maxima_module, only: maxngrid
use memory_module, only: reg_alloc_mem, reg_dealloc_mem, type_dbl
use angular_coeff_routines, only: evaluate_pao
implicit none
@ -1709,8 +1710,8 @@ contains
! Reproject blips
call blip_to_support_new(inode-1, atomfns)
else if (flag_basis_set == PAOs) then
! Regenerate PAO with a call to single_PAO_to_grid
call single_PAO_to_grid(atomfns)
! Regenerate PAO with a call to PAO_or_gradPAO_to_grid
call PAO_or_gradPAO_to_grid(atomfns, evaluate_pao, 0)
end if
! Note that we've held K fixed but allow potential to vary ? Yes:
! this way we get h_on_atomfns in workspace_support

View File

@ -5,14 +5,16 @@
# in directories named test_000_* to test_999_*, and runs pytest to
# check the results using test_check_output.py
#
# You can pass in the number of parallel processes as a command line
# argument, by default it is 1.
# You can pass in the number of parallel processes and number of
# OpenMP threads as a command line arguments, by default both are 1.
NP=${1:-1}
FILE=../bin/Conquest
if [ ! -f "$FILE" ]; then
(cd ../src; make -j $NP)
fi
NT=${2:-1}
export OMP_NUM_THREADS=$NT
export OMP_STACKSIZE=100M
echo "Running tests on $NP processes and $NT threads"
(cd ../src; make -j $NP)
for dn in $(ls -d test_[0-9][0-9][0-9]_*)
do

View File

@ -18,7 +18,7 @@ contains
use io_module, ONLY: pdb_format, pdb_template, read_atomic_positions, flag_MatrixFile_BinaryFormat
use dimens, ONLY: r_super_x, r_super_y, r_super_z, GridCutoff
use species_module, ONLY: n_species, species_label, species_file, mass, type_species, charge, nsf_species
use units, ONLY: HaToeV
use units, ONLY: HaToeV, dist_units, dist_conv, ang, bohr, BohrToAng
use block_module, only: n_pts_in_block, in_block_x,in_block_y,in_block_z, blocks_raster, blocks_hilbert
use pseudo_tm_info, only: setup_pseudo_info
use GenComms, only: cq_abort
@ -26,7 +26,7 @@ contains
implicit none
character(len=80) :: input_string, proc_coords
character(len=80) :: input_string, proc_coords, tmp
integer :: i, j, n_grid_x, n_grid_y, n_grid_z
integer :: n_kp_lines
logical :: flag_kp_lines, flag_spin_polarisation, flag_Multisite
@ -37,6 +37,17 @@ contains
! Load the Conquest_input files
call load_input
! Now scan for parameters
! Distance units
tmp = fdf_string(8,'General.DistanceUnits','bohr')
if(leqi(tmp(1:2),'a0').OR.leqi(tmp(1:2),'bo')) then
dist_units = bohr
dist_conv = one
else if(leqi(tmp(1:1),'A')) then
dist_units = ang
! NB this is used to convert internal Conquest distances in Bohr to Angstroms for output
dist_conv = BohrToAng
endif
! Spin
flag_spin_polarisation = fdf_boolean('Spin.SpinPolarised', .false.)
nspin = 1
if(flag_spin_polarisation) nspin = 2
@ -272,6 +283,7 @@ contains
E_wf_max = BIG
end if
flag_wf_range = .true.
flag_wf_range_Ef = fdf_boolean('IO.WFRangeRelative',.true.)
flag_procwf_range_Ef = fdf_boolean('Process.WFRangeRelative',.false.)
flag_l_resolved = fdf_boolean('Process.pDOS_l_resolved',.false.)
flag_lm_resolved = fdf_boolean('Process.pDOS_lm_resolved',.false.)