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

Join different scan running issue #556

Open
ltang320 opened this issue Jun 27, 2024 · 1 comment
Open

Join different scan running issue #556

ltang320 opened this issue Jun 27, 2024 · 1 comment

Comments

@ltang320
Copy link
Collaborator

ltang320 commented Jun 27, 2024

When I joined two scans and reconstructed them as a whole object, I encountered an issue with the storage ID's KeyError. It stopped when it should start the 1st iteration.

I use the same setup for simulation, which can work. I checked the initial starts, and it looks fine. Could you help me take a look?

Thanks for your help! @daurer

  O1,O2 = P.obj.storages.values()
  print(O1,O2)
  P1,P2 = P.probe.storages.values()
  D1,D2 = P.diff.storages.values()
  
  for v in O2.views:
      v.storage = O1
      v.storageID = O1.ID
      v.coord[-1] += v.psize[-1]*500
    Traceback (most recent call last):
          File "/asap3/petra3/gpfs/p06/2023/data/11017456/processed/macros/ptypy/TL/rec_TL_singlecombine_GPU_up2_testLargeObj.py", line 969, in <module>
            P.run()
          File "/home/litang/ptypy_v8/ptypy/build/lib/ptypy/core/ptycho.py", line 784, in run
            self.run(engine=engine)
          File "/home/litang/ptypy_v8/ptypy/build/lib/ptypy/core/ptycho.py", line 713, in run
            engine.iterate()
          File "/home/litang/ptypy_v8/ptypy/build/lib/ptypy/engines/base.py", line 233, in iterate
            self.error = self.engine_iterate(niter_contiguous)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File "/home/litang/ptypy_v8/ptypy/build/lib/ptypy/accelerate/cuda_pycuda/engines/projectional_pycuda_stream.py", line 168, in engine_iterate
            cfact = self.ob_cfact[oID]
                    ~~~~~~~~~~~~~^^^^^
        KeyError: 'Sscan01G00'
        Traceback (most recent call last):
          File "/asap3/petra3/gpfs/p06/2023/data/11017456/processed/macros/ptypy/TL/rec_TL_singlecombine_GPU_up2_testLargeObj.py", line 969, in <module>
            P.run()
          File "/home/litang/ptypy_v8/ptypy/build/lib/ptypy/core/ptycho.py", line 784, in run
            self.run(engine=engine)
          File "/home/litang/ptypy_v8/ptypy/build/lib/ptypy/core/ptycho.py", line 713, in run
            engine.iterate()
          File "/home/litang/ptypy_v8/ptypy/build/lib/ptypy/engines/base.py", line 233, in iterate
            self.error = self.engine_iterate(niter_contiguous)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File "/home/litang/ptypy_v8/ptypy/build/lib/ptypy/accelerate/cuda_pycuda/engines/projectional_pycuda_stream.py", line 168, in engine_iterate
            cfact = self.ob_cfact[oID]
                    ~~~~~~~~~~~~~^^^^^
        KeyError: 'Sscan01G00'
        Traceback (most recent call last):
          File "/asap3/petra3/gpfs/p06/2023/data/11017456/processed/macros/ptypy/TL/rec_TL_singlecombine_GPU_up2_testLargeObj.py", line 969, in <module>
            P.run()
          File "/home/litang/ptypy_v8/ptypy/build/lib/ptypy/core/ptycho.py", line 784, in run
            self.run(engine=engine)
          File "/home/litang/ptypy_v8/ptypy/build/lib/ptypy/core/ptycho.py", line 713, in run
            engine.iterate()
          File "/home/litang/ptypy_v8/ptypy/build/lib/ptypy/engines/base.py", line 233, in iterate
            self.error = self.engine_iterate(niter_contiguous)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File "/home/litang/ptypy_v8/ptypy/build/lib/ptypy/accelerate/cuda_pycuda/engines/projectional_pycuda_stream.py", line 168, in engine_iterate
            cfact = self.ob_cfact[oID]
                    ~~~~~~~~~~~~~^^^^^
        KeyError: 'Sscan01G00'
        Traceback (most recent call last):
          File "/asap3/petra3/gpfs/p06/2023/data/11017456/processed/macros/ptypy/TL/rec_TL_singlecombine_GPU_up2_testLargeObj.py", line 969, in <module>
            P.run()
          File "/home/litang/ptypy_v8/ptypy/build/lib/ptypy/core/ptycho.py", line 784, in run
            self.run(engine=engine)
          File "/home/litang/ptypy_v8/ptypy/build/lib/ptypy/core/ptycho.py", line 713, in run
            engine.iterate()
          File "/home/litang/ptypy_v8/ptypy/build/lib/ptypy/engines/base.py", line 233, in iterate
            self.error = self.engine_iterate(niter_contiguous)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File "/home/litang/ptypy_v8/ptypy/build/lib/ptypy/accelerate/cuda_pycuda/engines/projectional_pycuda_stream.py", line 168, in engine_iterate
            cfact = self.ob_cfact[oID]
                    ~~~~~~~~~~~~~^^^^^
        KeyError: 'Sscan01G00'
        
        Primary job  terminated normally, but 1 process returned
        a non-zero exit code. Per user-direction, the job has been aborted.
        
        mpirun detected that one or more processes exited with non-zero status, thus causing
        the job to be terminated. The first process to do so was:
        
          Process name: [[50300,1],2]
          Exit code:    1
@daurer
Copy link
Contributor

daurer commented Jul 16, 2024

@ltang320 sorry for the long delay. I think you will have to delete the storage for O2 once you have reassigned all of its views to use the O1 storage, something like

P.obj.storages.pop(O2.ID)

Let me know if that works?

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