Skip to content

Conversation

@mloubout
Copy link
Contributor

@mloubout mloubout commented Aug 7, 2016

Rewrite of the Acoustic and TTI operators and codegen to separate operator, model and data.
Gradient test is also back in even so it may be too memory expensive for travis.

@mloubout
Copy link
Contributor Author

mloubout commented Aug 7, 2016

Currently fails because of memory and permission error for deployement

@mloubout
Copy link
Contributor Author

mloubout commented Aug 8, 2016

Only fails because of memory on linux travis, apple passes

@mloubout
Copy link
Contributor Author

mloubout commented Aug 8, 2016

@navjotk @mlange05
This one need review.

Time_substitution is still there as this was created from Zhang.

I made a change to operator to output the structure (TimeData,...) instead of the data. It allow to pass back to gradient directly this structure and avoid useless memory copies. There may be a better way to do it than what I did but this is the main idea.

Finally i moved most of the u,v,rec,... to the operators in fwi_operators instead of Acoustic_codegen as most of it are temporary or input variable there is no reason to have as a property of the operator as it's only needed at computation if called.

damp_boundary(self.damp.data)

self.src = SourceLike(name="src", npoint=1, nt=self.nt, dt=self.dt, h=self.h,
self.src = SourceLike(name="src", npoint=1, nt=data.traces.shape[1], dt=self.dt, h=self.model.get_spacing(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should really try hard to have lines shorter than 90 characters

@FabioLuporini
Copy link
Contributor

I'll go through this properly later, but we should start having smaller, lighter PRs

@mloubout
Copy link
Contributor Author

mloubout commented Aug 9, 2016

@FabioLuporini
This one is really hard to make smaller. In practice there is not much as it is only on test (gradient), but it required some rewrite to be able to run it properly without blowing up everything.

@mloubout
Copy link
Contributor Author

The inversion repo is based on this branch so @vincepandolfo (because you worked already on inversion an looked a bit a this branch) and @mlange05 can we get this one going.


if self.openmp:
print "WARNING: Disabling OpenMP because clang does not support it."
print("WARNING: Disabling OpenMP because clang does not support it.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use logger module here

from examples.containers import IGrid, IShot


class Test_Gradient(object):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One shouldn't use _ for class names -- I think it's quite a common rule in Python

@mlange05 mlange05 merged commit 2793d8a into master Aug 12, 2016
@mloubout mloubout deleted the gradient_test branch August 12, 2016 14:29
ZoeLeibowitz added a commit that referenced this pull request Apr 3, 2025
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

Successfully merging this pull request may close these issues.

5 participants