Code Monkey home page Code Monkey logo

Comments (13)

jerabaul29 avatar jerabaul29 commented on July 19, 2024

Hi!

Strange, I had not seen this before.

  • Are you using the singularity container?

  • What happens if you replace the printind by a normal print in generate_msh.py line 11 (and possibly at other locations in the code where printind may be called)? This is where the error message points to.

from cylinder2dflowcontroldrl.

jerabaul29 avatar jerabaul29 commented on July 19, 2024

Another issue I have seen several times is failure to call gmsh from within the program; however at this point it does not look like this is the problem you have.

from cylinder2dflowcontroldrl.

yangtianyong avatar yangtianyong commented on July 19, 2024

Yes,I used the singularity container.I replaced the printind by a normal print just now,it didn't work.
Here are my steps: in empty_simulation,i changed jet_angle=5,and then plot=false,last run make_mesh.py.
So I wonder if there are any details i missed.
appreciated your answer

from cylinder2dflowcontroldrl.

jerabaul29 avatar jerabaul29 commented on July 19, 2024

What error messages do you obtain replacing the printind calls by some print calls? Can you show me your terminal output?

from cylinder2dflowcontroldrl.

yangtianyong avatar yangtianyong commented on July 19, 2024

still the same mistake.

iUFL can be obtained from https://github.com/MiroK/ufl-interpreter
Make converge initial state for 10000 iterations
--- call init ---
Traceback (most recent call last):
File "make_mesh.py", line 2, in
env.resume_env(plot=False, remesh=True)
File "/home/yang/Downloads/jet_angle5/Cylinder2DFlowControlWithRL/empty_simulation/env.py", line 181, in resume_env
simu_name = simu_name)
File "/home/yang/Downloads/jet_angle5/Cylinder2DFlowControlWithRL/empty_simulation/../Env2DCylinder.py", line 132, in init
self.start_class(complete_reset=True)
File "/home/yang/Downloads/jet_angle5/Cylinder2DFlowControlWithRL/empty_simulation/../Env2DCylinder.py", line 183, in start_class
generate_mesh(self.geometry_params, template=self.geometry_params['template'])
File "/home/yang/Downloads/jet_angle5/Cylinder2DFlowControlWithRL/empty_simulation/generate_msh.py", line 11, in generate_mesh
print(template)
File "/usr/local/lib/python2.7/dist-packages/printind/printind_function.py", line 38, in printiv
string = inspect.getframeinfo(frame[0]).code_context[0].strip()
TypeError: 'NoneType' object has no attribute 'getitem'
Aborted (core dumped)

from cylinder2dflowcontroldrl.

jerabaul29 avatar jerabaul29 commented on July 19, 2024

I am sorry, I do not understand what you did / where the problem is. I know other people managed to change the number and position of jets, and we also did it successfully. Can you turn plot to True and see if something changes?

from cylinder2dflowcontroldrl.

jerabaul29 avatar jerabaul29 commented on July 19, 2024

sorry, I mean put back plot=500 .

from cylinder2dflowcontroldrl.

yangtianyong avatar yangtianyong commented on July 19, 2024

well ,i will have a try .thank you

from cylinder2dflowcontroldrl.

jerabaul29 avatar jerabaul29 commented on July 19, 2024

As a side note: other people had problems in the past to get the gmsh calls here to work:

https://github.com/jerabaul29/Cylinder2DFlowControlDRL/blob/master/Cylinder2DFlowControlWithRL/generate_msh.py#L35

https://github.com/jerabaul29/Cylinder2DFlowControlDRL/blob/master/Cylinder2DFlowControlWithRL/generate_msh.py#L52

This is because, 'stupidly', gmsh is not installed inside the singularity container.

To solve this there are 2 solutions:

  • Export the gmsh provided in the repo to the singularity container: this is what is recommended in the Readme: export PATH="SET_YOUR_PATH/gmsh-git-Linux64/bin:$PATH

  • Update the two lines listed above to directly execute the gmsh provided in the repo. For this to work, you will need to first do a chmod to make the gmsh binary executable, and then call it in a ./ fashion in the code.

from cylinder2dflowcontroldrl.

yangtianyong avatar yangtianyong commented on July 19, 2024

Well,with the material you offered,I successfully sovle the problem.

from cylinder2dflowcontroldrl.

jerabaul29 avatar jerabaul29 commented on July 19, 2024

Great to hear, many thanks for the update!

For the records, what was the problem / which step solved it? :)

from cylinder2dflowcontroldrl.

yangtianyong avatar yangtianyong commented on July 19, 2024

There are lots of versions 3.+ about gmsh,maybe some of them are not suitable.So I used 3.0.6 that you talked about in readme.md at last,and it works.
I realize that I shuold follow your guideline at the begin,and I can avoid lots of problems.
So kind of you!

from cylinder2dflowcontroldrl.

jerabaul29 avatar jerabaul29 commented on July 19, 2024

Ok. Good to know it works when you follow the Readme ;) .

from cylinder2dflowcontroldrl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.