Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug for the clib code in Vertex4 #37

Merged
merged 4 commits into from
Apr 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions example/diagram_compile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ using FeynmanDiagram
end

diagtype = :vertex4 # :sigma, :vertex3, :vertex4, :freeEnergy, :green, :chargePolar
order = 2
order = 4
KinL, KoutL, KinR = zeros(16), zeros(16), zeros(16)
KinL[1], KoutL[2], KinR[3] = 1.0, 1.0, 1.0

para = UEG.ParaMC(rs=1.0, beta=25, order=order, isDynamic=false)

if diagtype == :chargePolar || diagtype == :sigma
Expand All @@ -27,7 +30,8 @@ if diagtype == :vertex4 || diagtype == :vertex3
o == 0 && sOrder > 0 && continue
push!(partition, (o, sOrder, vOrder))
end
FeynGraphs = Diagram.diagram_parquet_response(diagtype, para, partition, optimize_level=1)

FeynGraphs = Diagram.diagram_parquet_response(diagtype, para, partition, optimize_level=1, filter= [Parquet.NoHartree, Parquet.Proper], transferLoop = KinL - KoutL)
elseif diagtype == :green || diagtype == :freeEnergy || diagtype == :chargePolar
partition = Vector{NTuple{3,Int}}()
for (o, sOrder, vOrder) in _partition
Expand All @@ -41,4 +45,4 @@ else
end

# compile C library
Diagram.compileC_ParquetAD_toFiles(FeynGraphs, totalMomNum(order, diagtype), String(diagtype), compiler="icc")
Diagram.compileC_ParquetAD_toFiles(FeynGraphs, totalMomNum(order, diagtype), String(diagtype), compiler="gcc")
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@

function eval_vertex4Proper_ParquetAD000!(root::Vector{Float64}, leafVal::Vector{Float64})
@ccall joinpath(@__DIR__, "vertex4Proper_ParquetAD.so").eval_graph000(root::Ptr{Cdouble}, leafVal::Ptr{Cdouble})::Cvoid
end
function eval_vertex4Proper_ParquetAD001!(root::Vector{Float64}, leafVal::Vector{Float64})
@ccall joinpath(@__DIR__, "vertex4Proper_ParquetAD.so").eval_graph001(root::Ptr{Cdouble}, leafVal::Ptr{Cdouble})::Cvoid
end
function eval_vertex4Proper_ParquetAD002!(root::Vector{Float64}, leafVal::Vector{Float64})
@ccall joinpath(@__DIR__, "vertex4Proper_ParquetAD.so").eval_graph002(root::Ptr{Cdouble}, leafVal::Ptr{Cdouble})::Cvoid
end
function eval_vertex4Proper_ParquetAD003!(root::Vector{Float64}, leafVal::Vector{Float64})
@ccall joinpath(@__DIR__, "vertex4Proper_ParquetAD.so").eval_graph003(root::Ptr{Cdouble}, leafVal::Ptr{Cdouble})::Cvoid
end
function eval_vertex4Proper_ParquetAD004!(root::Vector{Float64}, leafVal::Vector{Float64})
@ccall joinpath(@__DIR__, "vertex4Proper_ParquetAD.so").eval_graph004(root::Ptr{Cdouble}, leafVal::Ptr{Cdouble})::Cvoid
end
function eval_vertex4Proper_ParquetAD100!(root::Vector{Float64}, leafVal::Vector{Float64})
@ccall joinpath(@__DIR__, "vertex4Proper_ParquetAD.so").eval_graph100(root::Ptr{Cdouble}, leafVal::Ptr{Cdouble})::Cvoid
end
function eval_vertex4Proper_ParquetAD101!(root::Vector{Float64}, leafVal::Vector{Float64})
@ccall joinpath(@__DIR__, "vertex4Proper_ParquetAD.so").eval_graph101(root::Ptr{Cdouble}, leafVal::Ptr{Cdouble})::Cvoid
end
function eval_vertex4Proper_ParquetAD102!(root::Vector{Float64}, leafVal::Vector{Float64})
@ccall joinpath(@__DIR__, "vertex4Proper_ParquetAD.so").eval_graph102(root::Ptr{Cdouble}, leafVal::Ptr{Cdouble})::Cvoid
end
function eval_vertex4Proper_ParquetAD103!(root::Vector{Float64}, leafVal::Vector{Float64})
@ccall joinpath(@__DIR__, "vertex4Proper_ParquetAD.so").eval_graph103(root::Ptr{Cdouble}, leafVal::Ptr{Cdouble})::Cvoid
end
function eval_vertex4Proper_ParquetAD110!(root::Vector{Float64}, leafVal::Vector{Float64})
@ccall joinpath(@__DIR__, "vertex4Proper_ParquetAD.so").eval_graph110(root::Ptr{Cdouble}, leafVal::Ptr{Cdouble})::Cvoid
end
function eval_vertex4Proper_ParquetAD111!(root::Vector{Float64}, leafVal::Vector{Float64})
@ccall joinpath(@__DIR__, "vertex4Proper_ParquetAD.so").eval_graph111(root::Ptr{Cdouble}, leafVal::Ptr{Cdouble})::Cvoid
end
function eval_vertex4Proper_ParquetAD112!(root::Vector{Float64}, leafVal::Vector{Float64})
@ccall joinpath(@__DIR__, "vertex4Proper_ParquetAD.so").eval_graph112(root::Ptr{Cdouble}, leafVal::Ptr{Cdouble})::Cvoid
end
function eval_vertex4Proper_ParquetAD120!(root::Vector{Float64}, leafVal::Vector{Float64})
@ccall joinpath(@__DIR__, "vertex4Proper_ParquetAD.so").eval_graph120(root::Ptr{Cdouble}, leafVal::Ptr{Cdouble})::Cvoid
end
function eval_vertex4Proper_ParquetAD121!(root::Vector{Float64}, leafVal::Vector{Float64})
@ccall joinpath(@__DIR__, "vertex4Proper_ParquetAD.so").eval_graph121(root::Ptr{Cdouble}, leafVal::Ptr{Cdouble})::Cvoid
end
function eval_vertex4Proper_ParquetAD130!(root::Vector{Float64}, leafVal::Vector{Float64})
@ccall joinpath(@__DIR__, "vertex4Proper_ParquetAD.so").eval_graph130(root::Ptr{Cdouble}, leafVal::Ptr{Cdouble})::Cvoid
end
function eval_vertex4Proper_ParquetAD200!(root::Vector{Float64}, leafVal::Vector{Float64})
@ccall joinpath(@__DIR__, "vertex4Proper_ParquetAD.so").eval_graph200(root::Ptr{Cdouble}, leafVal::Ptr{Cdouble})::Cvoid
end
function eval_vertex4Proper_ParquetAD201!(root::Vector{Float64}, leafVal::Vector{Float64})
@ccall joinpath(@__DIR__, "vertex4Proper_ParquetAD.so").eval_graph201(root::Ptr{Cdouble}, leafVal::Ptr{Cdouble})::Cvoid
end
function eval_vertex4Proper_ParquetAD202!(root::Vector{Float64}, leafVal::Vector{Float64})
@ccall joinpath(@__DIR__, "vertex4Proper_ParquetAD.so").eval_graph202(root::Ptr{Cdouble}, leafVal::Ptr{Cdouble})::Cvoid
end
function eval_vertex4Proper_ParquetAD210!(root::Vector{Float64}, leafVal::Vector{Float64})
@ccall joinpath(@__DIR__, "vertex4Proper_ParquetAD.so").eval_graph210(root::Ptr{Cdouble}, leafVal::Ptr{Cdouble})::Cvoid
end
function eval_vertex4Proper_ParquetAD211!(root::Vector{Float64}, leafVal::Vector{Float64})
@ccall joinpath(@__DIR__, "vertex4Proper_ParquetAD.so").eval_graph211(root::Ptr{Cdouble}, leafVal::Ptr{Cdouble})::Cvoid
end
function eval_vertex4Proper_ParquetAD220!(root::Vector{Float64}, leafVal::Vector{Float64})
@ccall joinpath(@__DIR__, "vertex4Proper_ParquetAD.so").eval_graph220(root::Ptr{Cdouble}, leafVal::Ptr{Cdouble})::Cvoid
end
function eval_vertex4Proper_ParquetAD300!(root::Vector{Float64}, leafVal::Vector{Float64})
@ccall joinpath(@__DIR__, "vertex4Proper_ParquetAD.so").eval_graph300(root::Ptr{Cdouble}, leafVal::Ptr{Cdouble})::Cvoid
end
function eval_vertex4Proper_ParquetAD301!(root::Vector{Float64}, leafVal::Vector{Float64})
@ccall joinpath(@__DIR__, "vertex4Proper_ParquetAD.so").eval_graph301(root::Ptr{Cdouble}, leafVal::Ptr{Cdouble})::Cvoid
end
function eval_vertex4Proper_ParquetAD310!(root::Vector{Float64}, leafVal::Vector{Float64})
@ccall joinpath(@__DIR__, "vertex4Proper_ParquetAD.so").eval_graph310(root::Ptr{Cdouble}, leafVal::Ptr{Cdouble})::Cvoid
end
function eval_vertex4Proper_ParquetAD400!(root::Vector{Float64}, leafVal::Vector{Float64})
@ccall joinpath(@__DIR__, "vertex4Proper_ParquetAD.so").eval_graph400(root::Ptr{Cdouble}, leafVal::Ptr{Cdouble})::Cvoid
end
Binary file not shown.
Loading
Loading