Skip to content

Commit 4df2f4d

Browse files
authored
Merge pull request #252 from phoebe-team/coupledTests
Tests and reference data for the JDFTx interface
2 parents 0562e08 + 9306081 commit 4df2f4d

File tree

13 files changed

+2319
-23
lines changed

13 files changed

+2319
-23
lines changed

.github/workflows/buildandtest.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
run: |
2525
sudo apt-get update
2626
sudo apt install -y libopenblas-dev liblapack-dev libhdf5-dev libhdf5-openmpi-dev libscalapack-openmpi-dev python3-pip gfortran cmake -o Acquire::Retries=3 --fix-missing
27-
pip3 install numpy --break-system-packages
27+
pip3 install numpy h5py --break-system-packages
2828
- name: Checkout
2929
uses: actions/checkout@v2
3030
with:
@@ -64,6 +64,7 @@ jobs:
6464
unzip -j master.zip "phoebe-data-master/example/Silicon-ph/qe-phonons/*" -d "example/Silicon-ph/qe-phonons"
6565
unzip -j master.zip "phoebe-data-master/example/Silicon-ph/qe-ph-anharmonic/*" -d "example/Silicon-ph/thirdorder.py-anharmonic"
6666
unzip -j master.zip "phoebe-data-master/example/Silicon-el/qe-elph/*" -d "example/Silicon-el/qe-elph"
67+
unzip -j master.zip "phoebe-data-master/example/MgB2-elph-JDFTx/jdftx-elph/outputs/*" -d "example/MgB2-elph-JDFTx/jdftx-elph"
6768
unzip 'example/Silicon-el/qe-elph/silicon.phoebe.*.dat.zip' -d example/Silicon-el/qe-elph/
6869
cp example/Silicon-el/qe-elph/* example/Silicon-epa/qe-elph
6970
mkdir example/Silicon-epa/qe-elph/out
@@ -144,16 +145,23 @@ jobs:
144145
run: |
145146
mpirun -np 4 --oversubscribe ../../build/phoebe -in coupledTransport.in
146147
python3 reference/run_check.py
147-
#- name: Run coupled BTE example without MPI (too slow...)
148-
# if: ${{ matrix.compiler == 'GCC' && matrix.mpi == 'OFF' && matrix.omp == 'ON' }}
149-
# working-directory: example/Silicon-coupled
150-
# run: |
151-
# mpirun -np 4 --oversubscribe ../../build/phoebe -in coupledTransport.in
152-
# python3 reference/run_check.py
153148
# run rta kappa with phph and phel ------------------
154149
- name: Run RTA kappa with phph and phel with MPI and OMP
155150
if: ${{ matrix.compiler == 'GCC' && matrix.mpi == 'ON' && matrix.omp == 'ON' }}
156151
working-directory: example/Silicon-ph/kappa_phph-phel/
157152
run: |
153+
export OMP_NUM_THREADS=2
158154
mpirun -np 2 --oversubscribe ../../../build/phoebe -in phononTransport.in
159155
python3 reference/run_check.py
156+
# run JDFTx tests -----------------------------------
157+
- name: Run a test with JDFTx files
158+
if: ${{ matrix.compiler == 'GCC' && matrix.mpi == 'ON' && matrix.omp == 'ON' }}
159+
working-directory: example/MgB2-elph-JDFTx/
160+
run: |
161+
# test that conversion script is the same
162+
cd jdftx-elph
163+
python ../../../scripts/developerScripts/jdftx2Phoebe.py
164+
cd ../
165+
export OMP_NUM_THREADS=2
166+
mpirun -np 2 --oversubscribe ../../build/phoebe -in electronWannierTransport.in
167+
python3 reference/run_check.py

.github/workflows/buildandtest_push.yaml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
run: |
2020
sudo apt-get update
2121
sudo apt install -y libopenblas-dev liblapack-dev libhdf5-dev libhdf5-openmpi-dev libscalapack-openmpi-dev python3-pip gfortran cmake -o Acquire::Retries=3 --fix-missing
22-
pip3 install numpy --break-system-packages
22+
pip3 install numpy h5py --break-system-packages
2323
- name: Checkout
2424
uses: actions/checkout@v2
2525
with:
@@ -59,6 +59,7 @@ jobs:
5959
unzip -j master.zip "phoebe-data-master/example/Silicon-ph/qe-phonons/*" -d "example/Silicon-ph/qe-phonons"
6060
unzip -j master.zip "phoebe-data-master/example/Silicon-ph/qe-ph-anharmonic/*" -d "example/Silicon-ph/thirdorder.py-anharmonic"
6161
unzip -j master.zip "phoebe-data-master/example/Silicon-el/qe-elph/*" -d "example/Silicon-el/qe-elph"
62+
unzip -j master.zip "phoebe-data-master/example/MgB2-elph-JDFTx/jdftx-elph/outputs/*" -d "example/MgB2-elph-JDFTx/jdftx-elph"
6263
unzip 'example/Silicon-el/qe-elph/silicon.phoebe.*.dat.zip' -d example/Silicon-el/qe-elph/
6364
cp example/Silicon-el/qe-elph/* example/Silicon-epa/qe-elph
6465
mkdir example/Silicon-epa/qe-elph/out
@@ -139,16 +140,23 @@ jobs:
139140
run: |
140141
mpirun -np 4 --oversubscribe ../../build/phoebe -in coupledTransport.in
141142
python3 reference/run_check.py
142-
#- name: Run coupled BTE example without MPI (too slow...)
143-
# if: ${{ matrix.compiler == 'GCC' && matrix.mpi == 'OFF' && matrix.omp == 'ON' }}
144-
# working-directory: example/Silicon-coupled
145-
# run: |
146-
# mpirun -np 4 --oversubscribe ../../build/phoebe -in coupledTransport.in
147-
# python3 reference/run_check.py
148143
# run rta kappa with phph and phel ------------------
149144
- name: Run RTA kappa with phph and phel with MPI and OMP
150145
if: ${{ matrix.compiler == 'GCC' && matrix.mpi == 'ON' && matrix.omp == 'ON' }}
151146
working-directory: example/Silicon-ph/kappa_phph-phel/
152147
run: |
148+
export OMP_NUM_THREADS=2
153149
mpirun -np 2 --oversubscribe ../../../build/phoebe -in phononTransport.in
154150
python3 reference/run_check.py
151+
# run JDFTx tests -----------------------------------
152+
- name: Run a test with JDFTx files
153+
if: ${{ matrix.compiler == 'GCC' && matrix.mpi == 'ON' && matrix.omp == 'ON' }}
154+
working-directory: example/MgB2-elph-JDFTx/
155+
run: |
156+
# test that conversion script is the same
157+
cd jdftx-elph
158+
python ../../../scripts/developerScripts/jdftx2Phoebe.py
159+
cd ../
160+
export OMP_NUM_THREADS=2
161+
mpirun -np 2 --oversubscribe ../../build/phoebe -in electronWannierTransport.in
162+
python3 reference/run_check.py
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
appName = "electronWannierTransport"
2+
3+
JDFTxScfOutFile = "jdftx-elph/totalE.out"
4+
phFC2FileName = "jdftx-elph/jdftx.elph.phoebe.hdf5"
5+
sumRuleFC2 = "simple"
6+
electronH0Name = "jdftx-elph/jdftx.elph.phoebe.hdf5",
7+
elphFileName = "jdftx-elph/jdftx.elph.phoebe.hdf5"
8+
9+
kMesh = [10,10,10]
10+
temperatures = [300.]
11+
dopings = [1.e21]
12+
13+
smearingMethod = "gaussian"
14+
smearingWidth = 0.5 eV
15+
windowType = "population"
16+
numOccupiedStates = 4
17+
18+
useSymmetries = true
19+
scatteringMatrixInMemory=false
20+
#solverBTE = ["iterative","variational","relaxons"] # just run RTA for now
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"particleType": "electron",
3+
"specificHeat": [
4+
23134.55288583149
5+
],
6+
"specificHeatUnit": "J / K / m^3",
7+
"temperatureUnit": "K",
8+
"temperatures": [
9+
300.0
10+
]
11+
}

0 commit comments

Comments
 (0)