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

LoadError when using back_prop with MPI #34

Open
ctpeterson opened this issue Sep 15, 2023 · 1 comment
Open

LoadError when using back_prop with MPI #34

ctpeterson opened this issue Sep 15, 2023 · 1 comment

Comments

@ctpeterson
Copy link

I am trying to calculate the force of a gauge action that is composed of stout-smeared gauge links (using stout layers) with respect to unsmeared links with MPI. When the code gets to calling back_prop, I get the following error.

ERROR: ERROR: LoadError: LoadError: Traceless_antihermitian! is not implemented in type Gaugefields.AbstractGaugefields_module.Gaugefields_4D_wing_mpi{3} 

My guess is that this is an implementation error, but I am not sure. Below is a minimal code sample that reproduces this error (based on the code samples provided in Gaugefields' README.md).

using Random
using Gaugefields
using LinearAlgebra
using MPI

if length(ARGS) < 5
    error("USAGE: ","""
    mpirun -np 2 exe.jl 1 1 1 2 true
    """)
end

const pes = Tuple(parse.(Int64, ARGS[1:4]))
const mpi = parse(Bool, ARGS[5])

function test()
   U = Initialize_Gaugefields(3, 1,
                              16, 16, 16, 16,
                              condition = "hot",
                              PEs = pes, mpi = mpi, 
                              mpiinit = false)
   action = GaugeAction(U, hascovnet = false)
   #push!(action.covneuralnet, STOUT_Layer(["plaquette"], [0.1], [16, 16, 16, 16]))
   plaqloop = make_loops_fromname("plaquette")
   append!(plaqloop, plaqloop')
   push!(action, 5.7, plaqloop)

   nn = CovNeuralnet()
   push!(nn, STOUT_Layer(["plaquette"], [0.1], [16, 16, 16, 16]))

   dSdU = similar(U)

   temps = get_temporary_gaugefields(action)
   Uout, Uout_multi, _ = calc_smearedU(U, nn)
   
   for μ = 1 : 4
      calc_dSdUμ!(dSdU[μ], action, μ, Uout)
   end

   dSdUbare = back_prop(dSdU, nn, Uout_multi, U)

end

test()

A longer traceback is as follows.

ERROR: ERROR: LoadError: LoadError: Traceless_antihermitian! is not implemented in type Gaugefields.AbstractGaugefields_module.Gaugefields_4D_wing_mpi{3}
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [2] Traceless_antihermitian!(vout::Gaugefields.AbstractGaugefields_module.Gaugefields_4D_wing_mpi{3}, vin::Gaugefields.AbstractGaugefields_module.Gaugefields_4D_wing_mpi{3})
    @ Gaugefields.AbstractGaugefields_module ~/.julia/packages/Gaugefields/t2cED/src/AbstractGaugefields.jl:1918
  [3] construct_Qμ!(Qμ::Gaugefields.AbstractGaugefields_module.Gaugefields_4D_wing_mpi{3}, μ::Int64, Cμs::Vector{Gaugefields.AbstractGaugefields_module.Gaugefields_4D_wing_mpi{3}}, Uin::Vector{Gaugefields.AbstractGaugefields_module.Gaugefields_4D_wing_mpi{3}}, temps::Vector{Gaugefields.AbstractGaugefields_module.Gaugefields_4D_wing_mpi{3}})
    @ Gaugefields.Abstractsmearing_module ~/.julia/packages/Gaugefields/t2cED/src/smearing/stout.jl:431
  [4] construct_Qμs!(Qμs::Vector{Gaugefields.AbstractGaugefields_module.Gaugefields_4D_wing_mpi{3}}, Cμs::Traceless_antihermitian! is not implemented in type Gaugefields.AbstractGaugefields_module.Gaugefields_4D_wing_mpi{3} Vector{Gaugefields.AbstractGaugefields_module.Gaugefields_4D_wing_mpi{3}}, Uin::
Stacktrace:
  [1] error(s::Vector{Gaugefields.AbstractGaugefields_module.Gaugefields_4D_wing_mpi{3}}, temps::Vector{Gaugefields.AbstractGaugefields_module.Gaugefields_4D_wing_mpi{3}})
    @ Gaugefields.Abstractsmearing_module ~/.julia/packages/Gaugefields/t2cED/src/smearing/stout.jl:443
  [5] layer_pullback!(δ_prev::Vector{Gaugefields.AbstractGaugefields_module.Gaugefields_4D_wing_mpi{3}}, δ_current::Vector{Gaugefields.AbstractGaugefields_module.Gaugefields_4D_wing_mpi{3}}, layer::STOUT_Layer{4}, Uprev::Vector{Gaugefields.AbstractGaugefields_module.Gaugefields_4D_wing_mpi{3}}, temps::Vector{Gaugefields.AbstractGaugefields_module.Gaugefields_4D_wing_mpi{3}}, tempf::Vector{Gaugefields.AbstractGaugefields_module.TA_Gaugefields_4D_mpi{3, 8}})
    @ Gaugefields.Abstractsmearing_module ~/.julia/packages/Gaugefields/t2cED/src/smearing/stout.jl:239
  [6] back_prop(δL::Vector{Gaugefields.AbstractGaugefields_module.Gaugefields_4D_wing_mpi{3}}, net::CovNeuralnet{4}, Uout_multi::Vector{Vector{Gaugefields.AbstractGaugefields_module.Gaugefields_4D_wing_mpi{3}}}, Uin::Vector{Gaugefields.AbstractGaugefields_module.Gaugefields_4D_wing_mpi{3}})
@akio-tomiya
Copy link
Owner

I am sorry for responding this. We are working on this issue. Thank you for getting interested our library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants