Skip to content

Commit

Permalink
Merge pull request #67 from SotaYoshida/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
SotaYoshida authored Jan 13, 2023
2 parents eed67f8 + 3d4383d commit 706d1b8
Show file tree
Hide file tree
Showing 23 changed files with 2,763 additions and 511 deletions.
35 changes: 20 additions & 15 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
fail-fast: false
matrix:
include:
- {version: '1.7', os: ubuntu-latest, payload: serial}
- {version: '1.7', os: macOS-latest, payload: serial}
- {version: '1.7', os: windows-2019, payload: serial}
- {version: nightly, os: ubuntu-latest, payload: serial}
- {version: '1.8', os: ubuntu-latest, payload: serial}
- {version: '1.8', os: macOS-latest, payload: serial}
- {version: '1.8', os: windows-2019, payload: serial}
- {version: nightly, os: ubuntu-latest, payload: serial}
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
Expand All @@ -35,12 +35,12 @@ jobs:
if: ${{ matrix.payload == 'serial' }}
continue-on-error: ${{ matrix.version == 'nightly' }}
build:
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
strategy:
fail-fast: false
matrix:
include:
- {version: '1.7', os: ubuntu-latest, payload: mpi}
- {version: '1.8', os: 'ubuntu-18.04', payload: mpi}
mpi: [ 'openmpi' ]
name: mpi test
steps:
Expand All @@ -51,18 +51,23 @@ jobs:
arch: x64
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- name: Setup MPI
uses: mpi4py/setup-mpi@v1
with:
mpi: ${{ matrix.mpi }}
- run: mpiexec -n 4 julia --project="@." ./test/mpirun_test.jl
- name: "Run mpi tests"
run: |
export JULIA_PROJECT=@.
export JULIA_MPIEXEC=mpiexecjl
export JULIA_NUM_THREADS=1
julia --project -e 'ENV["JULIA_MPI_BINARY"]=""; using Pkg; Pkg.add("MPI"); Pkg.build("MPI"; verbose=true); using MPI; MPI.install_mpiexecjl()'
julia --project=@. -e "using InteractiveUtils; versioninfo(verbose=true)"
julia --project=@. -e "using Pkg; Pkg.instantiate(); Pkg.build()"
export PATH=$PATH:/home/runner/.julia/bin
mpiexecjl -n 4 julia --depwarn=yes --project=@. ./test/mpirun_test.jl
build2:
runs-on: ubuntu-latest
runs-on: 'ubuntu-18.04'
strategy:
fail-fast: false
matrix:
include:
- {version: '1.7', os: ubuntu-latest}
- {version: '1.8', os: 'ubuntu-18.04'}
name: Run sample_script.jl
steps:
- uses: actions/checkout@v2
Expand All @@ -81,12 +86,12 @@ jobs:
commit_message: Update log_sample_script.txt
docs:
name: Documentation
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1.7'
version: '1.8'
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-docdeploy@v1
env:
Expand Down
54 changes: 37 additions & 17 deletions Manifest.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# This file is machine-generated - editing it directly is not advised

julia_version = "1.7.3"
julia_version = "1.8.5"
manifest_format = "2.0"
project_hash = "2e06d70ed04492db9a8fbdf16aeace0744eb05b9"

[[deps.ArgTools]]
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"
version = "1.1.1"

[[deps.Artifacts]]
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
Expand All @@ -31,18 +33,19 @@ version = "1.0.2"

[[deps.Compat]]
deps = ["Dates", "LinearAlgebra", "UUIDs"]
git-tree-sha1 = "3ca828fe1b75fa84b021a7860bd039eaea84d2f2"
git-tree-sha1 = "00a2cccc7f098ff3b66806862d275ca3db9e6e5a"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "4.3.0"
version = "4.5.0"

[[deps.CompilerSupportLibraries_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
version = "1.0.1+0"

[[deps.DataAPI]]
git-tree-sha1 = "e08915633fcb3ea83bf9d6126292e5bc5c739922"
git-tree-sha1 = "e8119c1a33d267e16108be441a287a6981ba1630"
uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
version = "1.13.0"
version = "1.14.0"

[[deps.DataStructures]]
deps = ["Compat", "InteractiveUtils", "OrderedCollections"]
Expand All @@ -60,13 +63,14 @@ uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"

[[deps.DocStringExtensions]]
deps = ["LibGit2"]
git-tree-sha1 = "c36550cb29cbe373e95b3f40486b9a4148f89ffd"
git-tree-sha1 = "2fb1e02f2b635d0845df5d7c167fec4dd739b00d"
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
version = "0.9.2"
version = "0.9.3"

[[deps.Downloads]]
deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"]
uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
version = "1.6.0"

[[deps.ExprTools]]
git-tree-sha1 = "56559bbef6ca5ea0c0818fa5c90320398a6fbf8d"
Expand Down Expand Up @@ -135,10 +139,12 @@ uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3"
[[deps.LibCURL]]
deps = ["LibCURL_jll", "MozillaCACerts_jll"]
uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21"
version = "0.6.3"

[[deps.LibCURL_jll]]
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"]
uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0"
version = "7.84.0+0"

[[deps.LibGit2]]
deps = ["Base64", "NetworkOptions", "Printf", "SHA"]
Expand All @@ -147,6 +153,7 @@ uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"
[[deps.LibSSH2_jll]]
deps = ["Artifacts", "Libdl", "MbedTLS_jll"]
uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8"
version = "1.10.2+0"

[[deps.Libdl]]
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
Expand All @@ -157,18 +164,18 @@ uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

[[deps.LogExpFunctions]]
deps = ["ChainRulesCore", "ChangesOfVariables", "DocStringExtensions", "InverseFunctions", "IrrationalConstants", "LinearAlgebra"]
git-tree-sha1 = "94d9c52ca447e23eac0c0f074effbcd38830deb5"
git-tree-sha1 = "946607f84feb96220f480e0422d3484c49c00239"
uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688"
version = "0.3.18"
version = "0.3.19"

[[deps.Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"

[[deps.MPI]]
deps = ["Distributed", "DocStringExtensions", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "Requires", "Serialization", "Sockets"]
git-tree-sha1 = "649b1c447a6c737d3bec80d0b72ccb7aba82310d"
git-tree-sha1 = "3bb087eb4322bd73db110722f97624f3f2edb047"
uuid = "da04e1cc-30fd-572f-bb4f-1f8673147195"
version = "0.20.4"
version = "0.20.7"

[[deps.MPICH_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "Pkg", "TOML"]
Expand All @@ -178,9 +185,9 @@ version = "4.0.2+5"

[[deps.MPIPreferences]]
deps = ["Libdl", "Preferences"]
git-tree-sha1 = "34892fb69751a76bcf8b7add84ec77015208a1ec"
git-tree-sha1 = "71f937129731a29eabe6969db2c90368a4408933"
uuid = "3da0fdf6-3ccc-4f1b-acd9-58baa6c99267"
version = "0.1.6"
version = "0.1.7"

[[deps.MPItrampoline_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "Pkg", "TOML"]
Expand All @@ -195,6 +202,7 @@ uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
[[deps.MbedTLS_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"
version = "2.28.0+0"

[[deps.MicrosoftMPI_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
Expand All @@ -204,23 +212,27 @@ version = "10.1.3+2"

[[deps.Missings]]
deps = ["DataAPI"]
git-tree-sha1 = "bf210ce90b6c9eed32d25dbcae1ebc565df2687f"
git-tree-sha1 = "f66bdc5de519e8f8ae43bdc598782d35a25b1272"
uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28"
version = "1.0.2"
version = "1.1.0"

[[deps.MozillaCACerts_jll]]
uuid = "14a3606d-f60d-562e-9121-12d972cd8159"
version = "2022.2.1"

[[deps.NetworkOptions]]
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"
version = "1.2.0"

[[deps.OpenBLAS_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"]
uuid = "4536629a-c528-5b80-bd46-f80d51c5b363"
version = "0.3.20+0"

[[deps.OpenLibm_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "05823500-19ac-5b8b-9628-191a04bc5112"
version = "0.8.1+0"

[[deps.OpenMPI_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "Pkg", "TOML"]
Expand All @@ -242,6 +254,7 @@ version = "1.4.1"
[[deps.Pkg]]
deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
version = "1.8.0"

[[deps.Preferences]]
deps = ["TOML"]
Expand Down Expand Up @@ -280,6 +293,7 @@ version = "1.3.0"

[[deps.SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
version = "0.7.0"

[[deps.Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
Expand All @@ -289,9 +303,9 @@ uuid = "6462fe0b-24de-5631-8697-dd941f90decc"

[[deps.SortingAlgorithms]]
deps = ["DataStructures"]
git-tree-sha1 = "b3363d7460f7d098ca0912c69b082f75625d7508"
git-tree-sha1 = "a4ada03f999bd01b3a25dcaa30b2d929fe537e00"
uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c"
version = "1.0.1"
version = "1.1.0"

[[deps.SparseArrays]]
deps = ["LinearAlgebra", "Random"]
Expand Down Expand Up @@ -328,10 +342,12 @@ version = "0.33.21"
[[deps.TOML]]
deps = ["Dates"]
uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
version = "1.0.0"

[[deps.Tar]]
deps = ["ArgTools", "SHA"]
uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"
version = "1.10.1"

[[deps.Test]]
deps = ["InteractiveUtils", "Logging", "Random", "Serialization"]
Expand Down Expand Up @@ -359,15 +375,19 @@ version = "2.0.0"
[[deps.Zlib_jll]]
deps = ["Libdl"]
uuid = "83775a58-1f1d-513f-b197-d71354ab007a"
version = "1.2.12+3"

[[deps.libblastrampoline_jll]]
deps = ["Artifacts", "Libdl", "OpenBLAS_jll"]
uuid = "8e850b90-86db-534c-a0d3-1478176c7d93"
version = "5.1.1+0"

[[deps.nghttp2_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d"
version = "1.48.0+0"

[[deps.p7zip_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0"
version = "17.4.0+0"
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ SpecialFunctions = "1.8, 2"
StatsBase = "0.33"
TimerOutputs = "0.5"
WignerSymbols = "1.1, 2"
julia = "1.7"
julia = "1.8"
9 changes: 5 additions & 4 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ You can try the package in the following ways:

`$ julia -t 8 example/sample_script.jl`

This performs:
- calculation of NN potential from Chiral EFT
- HFMBPT(3) and IMSRG/VS-IMSRG(2) calculation with it
- shell-model calculations with the effective interaction derived by VS-IMSRG
This performs:
- calculation of NN potential from Chiral EFT
- HFMBPT(3) and IMSRG/VS-IMSRG(2) calculation with it
- shell-model calculations with the effective interaction derived by VS-IMSRG

An expected results using the latest dev branch can be found [here](https://github.com/SotaYoshida/NuclearToolkit.jl/blob/develop/example/log_sample_script.txt).
* Try sample codes in [HowToUse](howtouse) page.

Expand Down
8 changes: 4 additions & 4 deletions example/log_sample_script.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
@emax 4 hitCG 29351 dWS < 11.31 MB 9j(1430) < 2.51 MB HOB (5179) < 0.31 MB
@emax 4 hitCG 29351 dWS < 9.52 MB 9j(1430) < 2.51 MB HOB (5179) < 0.31 MB
target: O16 Ref. => Z=8 N=8 E: -132.9506 = E1b 363.70 + E2b -496.65 ( -55.16 -367.32 -74.18)
EMP2 -23.70628 1b -0.000 pp -1.437 pn -20.815 nn -1.454
EMP3 0.37645 pp -0.111 hh -1.895 ph 2.383
E_HF -132.95058 E_MBPT(3) = -156.2804 Eexp: -127.619

parameters in optional_parameters.jl will be used.
step: s E0 ||Omega_1|| ||Omega_2|| ||Eta_1|| ||Eta_2|| Ncomm. nwritten
0 0.000 -132.95057781 0.000000e+00 0.000000e+00 7.576852e-17 1.410292e+00 0 0
1 0.500 -150.64837608 3.788426e-17 7.051459e-01 4.457285e-02 6.465559e-01 8 0
0 0.000 -132.95057781 0.000000e+00 0.000000e+00 8.338154e-17 1.410292e+00 0 0
1 0.500 -150.64837608 4.169077e-17 7.051459e-01 4.457285e-02 6.465559e-01 8 0
2 1.000 -154.78704837 2.228643e-02 3.232779e-01 5.387093e-02 3.441643e-01 15 1
3 1.500 -156.02709506 2.693546e-02 1.720822e-01 5.200791e-02 1.968159e-01 21 2
4 2.000 -156.46234613 5.291574e-02 2.697514e-01 4.609815e-02 1.192463e-01 28 2
Expand Down Expand Up @@ -282,6 +282,6 @@ Starting VS-IMSRG flow
Operator:Rp2
HF point proton radius 2.045093 charge radius 2.206924 => HF+PT 2.219037
IMSRG point proton radius 2.091495 charge radius 2.249990
Mg24 Z,N=(12,12) c(8,8) v(4,4) mdim: 28503 ( 4.45 ) J [0.0, 2.0, 2.0, 3.0, 4.0, 4.0, 5.0, 1.0, -1.0, -1.0]
Mg24 Z,N=(12,12) c(8,8) v(4,4) mdim: 28503 ( 4.45 ) J [0.0, 2.0, 2.0, 3.0, 4.0, 4.0, 5.0, 1.0, 6.0, 2.0]
En. -109.065 -107.717 -106.056 -104.800 -104.748 -103.238 -101.177 -100.704 -100.138 -100.119
Ex. 0.000 1.348 3.010 4.265 4.317 5.828 7.889 8.361 8.928 8.946
6 changes: 6 additions & 0 deletions sample_3nf.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
include("src/genuine3NF.jl")
using .genuine3NF

#make_chiEFTint(;is_show=true)

test3NF()
8 changes: 0 additions & 8 deletions src/IMSRG.jl/imsrg_util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -559,14 +559,6 @@ function DoPandyaTransformation(O,Obar_ph,tbc_cc,Chan2bD,HFobj,numbers_ch,dict6j
return nothing
end

function get_nkey_from_key6j(tkey;ofst_unit=1000)
nkey = tkey[1] + tkey[2] * ofst_unit + tkey[3] * ofst_unit^2 + tkey[4] * ofst_unit^3 + tkey[5] * ofst_unit^4
return nkey
end
function get_nkey_from_key6j(ji,jj,jk,jl,Jp;ofst_unit=1000)
return ji + jj*ofst_unit + jk * ofst_unit^2+ jl* ofst_unit^3 + Jp * ofst_unit^4
end

function IMSRGflow(binfo::basedat,HFobj::HamiltonianNormalOrdered,IMSRGobj::IMSRGobject,PandyaObj::PandyaObject,Chan1b::chan1b,Chan2bD,dictMono,dict6j,
core_generator,valence_generator,to;valenceflow=false,debugmode=0,maxstep=2000,magnusmethod="split")
Chan2b = Chan2bD.Chan2b
Expand Down
2 changes: 2 additions & 0 deletions src/NuclearToolkit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ include("chiEFTint/calibration.jl")
include("chiEFTint/valence.jl")
include("chiEFTint/renorm.jl")
include("chiEFTint/threebodyforce.jl")
include("chiEFTint/threebody_Jacobi.jl")
include("chiEFTint/threebody_JacobiHO.jl")
include("chiEFTint/matter.jl")
include("chiEFTint/nn_sampling.jl")
export make_chiEFTint
Expand Down
3 changes: 1 addition & 2 deletions src/ShellModel/lanczos_methods.jl
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,7 @@ function diagonalize_T!(k::Int64,num_ev::Int64,
en::Array{Array{Float64,1}},
num_history::Int64,
TF::Array{Bool,1},
tol::Float64) where{FA<:Array{Float64,1},
FA2<:Array{Float64,2}}
tol::Float64)
for ith = num_history:-1:2
en[ith] .= en[ith-1]
end
Expand Down
Loading

0 comments on commit 706d1b8

Please sign in to comment.