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

Issue in run_LQCD("my_parameters.toml") when using a run_wizard() default parameter setup file #56

Open
bjobilal opened this issue Sep 21, 2024 · 4 comments

Comments

@bjobilal
Copy link

I am trying to follow the 4-step implementation method. I am able to use Julia successfully on my mac terminal and load the LatticeQCD.jl package. I use run_wizard() to set up my my_parameters.toml file. However, on running the run_LQCD("my_parameters.toml") command, after some computation, I receive the following error:

ERROR: MethodError: no method matching get_temporary_gaugefields(::QCDMeasurements.Plaquette_measurement{4, Gaugefields.AbstractGaugefields_module.Gaugefields_4D_nowing{3}})

Closest candidates are:
get_temporary_gaugefields(::Gaugefields.GaugeAction_module.GaugeAction)
@ Gaugefields ~/.julia/packages/Gaugefields/T2fTK/src/action/GaugeActions.jl:48

Stacktrace:
[1] run_LQCD_file(filenamein::String; MPIparallel::Bool)
@ LatticeQCD.LQCD ~/.julia/packages/LatticeQCD/mL8PL/src/system/lqcd.jl:159
[2] run_LQCD(filenamein::String; MPIparallel::Bool)
@ LatticeQCD.LQCD ~/.julia/packages/LatticeQCD/mL8PL/src/system/lqcd.jl:28
[3] run_LQCD(filenamein::String)
@ LatticeQCD.LQCD ~/.julia/packages/LatticeQCD/mL8PL/src/system/lqcd.jl:27
[4] top-level scope
@ REPL[4]:1

I assumed that there is an issue with loading the gaugefield methods, so I used Pkg to load the Gaugefields.jl package in addition to the LatticeQCD package, but i received the same error. I have tried this on a different IDE, but the issue persists.

I have been stuck on this issue for a while, but I hope that I can get some insight on what exactly went wrong and how I can fix it. Thank you!

@YtihalX
Copy link

YtihalX commented Sep 21, 2024

Same issue here, running into the function call matching get_temporary_gaugefields(::QCDMeasurements.Plaquette_measurement{4, Gaugefields.AbstractGaugefields_module.Gaugefields_4D_nowing{3}}) and got an error

@YtihalX
Copy link

YtihalX commented Sep 24, 2024

Same issue here, running into the function call matching get_temporary_gaugefields(::QCDMeasurements.Plaquette_measurement{4, Gaugefields.AbstractGaugefields_module.Gaugefields_4D_nowing{3}}) and got an error

After looking into the code, I found that the line 159 in LatticeQCD/src/system/lqcd.jl, which is

temps = get_temporary_gaugefields(plaq_m)

seems want to get the temporary gauge field from a Plaquette_measurement struct, while the function get_temporary_gaugefields is only implemented for GaugeActions in the Gaugefields.jl package, and the Plaquette_measurement struct does have a field called _temporary_gaugefields, so I replaced line 159 with

temps = plaq_m._temporary_gaugefields

and now it seems okay to run.

But I'm not sure if this is the right logic, new to LQCD

@YtihalX
Copy link

YtihalX commented Sep 25, 2024

Same issue here, running into the function call matching get_temporary_gaugefields(::QCDMeasurements.Plaquette_measurement{4, Gaugefields.AbstractGaugefields_module.Gaugefields_4D_nowing{3}}) and got an error

After looking into the code, I found that the line 159 in LatticeQCD/src/system/lqcd.jl, which is

temps = get_temporary_gaugefields(plaq_m)

seems want to get the temporary gauge field from a Plaquette_measurement struct, while the function get_temporary_gaugefields is only implemented for GaugeActions in the Gaugefields.jl package, and the Plaquette_measurement struct does have a field called _temporary_gaugefields, so I replaced line 159 with

temps = plaq_m._temporary_gaugefields

and now it seems okay to run.

But I'm not sure if this is the right logic, new to LQCD

I seem to find the reason why run_LQCD_file isn't working, the function get_temporary_gaugefields is implemented both in Gaugefields.jl and QCDMeasurements.jl packages, and in the lqcd.jl file they need using Gaugefields which brings the identifier of get_temporary_gaugefields to the module LQCD and thus causing an conflict with the one from QCDMeasurements, which is the correct function we need to call at line 159, and they comment out the get_temporary_gaugefields from the code and leading to the bug we are facing.

temps = plaq_m._temporary_gaugefields

this workaround should work as the right logic BTW.

While throughout the LQCD module this conflict of identifiers seems harmless, I think that this can be safely ignored.

@cometscome
Copy link
Collaborator

Thank you for giving comments. You are right. The complete modification is using a multiple dispatch in QCDMeasurements. So we will modify QCDMeasurements.jl. Now, I added a simple modification in LatticeQCD.jl and will version up.

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

3 participants