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

Error about "UnsupportedOperation: fileno" #58

Open
FJGEODEV opened this issue Aug 5, 2022 · 5 comments
Open

Error about "UnsupportedOperation: fileno" #58

FJGEODEV opened this issue Aug 5, 2022 · 5 comments

Comments

@FJGEODEV
Copy link

FJGEODEV commented Aug 5, 2022

Hi, I was trying to run Devito on a BP's TTI dataset based on this repo:

https://github.com/ofmla/RTM----segyio-devito-

But after reading necessary velocity parameters, this error came out. Have no clue to solve it, could you help to take a look?

I am running it under Amazon SageMaker, Tensorflow 1.15, Python 3.7

Thanks.

---------------------------------------------------------------------------
UnsupportedOperation                      Traceback (most recent call last)
<ipython-input-45-b0eb6f81bb80> in <module>
----> 1 final_image = forward_modeling_single_shot(records[0], table, par_files) #forward_modeling_multi_shots(par_files, shots)

<ipython-input-44-7f422d0900a0> in forward_modeling_single_shot(record, table, par_files)
    166         wrp = Revolver(cp, wrap_fw, wrap_rev, n_checkpoints, dobs_resam.shape[0]-2)
    167         print('Revolver storage: {}\n'.format(humanbytes(cp.size*n_checkpoints*itemsize)))
--> 168         wrp.apply_forward()
    169         print('{} run finished\n'.format(strng))
    170         summary = wrp.apply_reverse()

/usr/local/lib/python3.7/site-packages/pyrevolve/pyrevolve.py in apply_forward(self)
    100         while(True):
    101             # ask Revolve what to do next.
--> 102             action = self.scheduler.next()
    103             if(action.type == Action.ADVANCE):
    104                 # advance forward computation

/usr/local/lib/python3.7/site-packages/pyrevolve/schedulers.py in next(self)
     43 
     44     def next(self):
---> 45         return Action(self.translations[self.revolve.revolve()], self.capo,
     46                       self.old_capo, self.cp_pointer)
     47 

pyrevolve/crevolve.pyx in pyrevolve.crevolve.CRevolve.revolve()

/usr/local/lib/python3.7/site-packages/pyrevolve/tools.py in __init__(self, stream, threaded)
     16         if self.origstream is None:
     17             self.origstream = sys.stdout
---> 18         self.origstreamfd = self.origstream.fileno()
     19         self.capturedtext = ""
     20         # Create a pipe so the stream can be captured:

UnsupportedOperation: fileno
@navjotk
Copy link
Member

navjotk commented Aug 5, 2022

@speglich Does this ring a bell?

@FJGEODEV
Copy link
Author

Hi, wondering if you have any thoughts on this error. Thanks.

@navjotk
Copy link
Member

navjotk commented Aug 22, 2022

Can I just check how you installed pyrevolve?

@speglich
Copy link
Contributor

Hey @FJGEODEV, what is your installed PyRevolve version?

@FJGEODEV
Copy link
Author

Hi, I believe this could be caused by this issue #57. I can submit job using .py file, will upgrade pyrevolve to test.

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