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

For adjoint simulation, NSOURCES hardcoded constraint <=1000 in initialize_simulations.f90 #279

Closed
amir-allam opened this issue Oct 28, 2014 · 3 comments
Assignees

Comments

@amir-allam
Copy link

For adjoint simulations (SIMULATION_TYPE=3), a CMTSOLUTION file with more than 1000 sources will cause the following error:
for adjoint simulations, NSOURCES <= 1000
Error detected, aborting MPI... proc 66

This comes from line 399 in initialize_simulation.f90:
if (SIMULATION_TYPE /= 1 .and. NSOURCES > 1000) call exit_mpi(myrank, 'for adjoint simulations, NSOURCES <= 1000')

I don't see why this constraint exists. Shouldn't it be either a parameter, or just equal to the maximum of either sources or receivers? There are many reasons a user might want to create a kernel with more than 1000 sources.

@danielpeter
Copy link
Contributor

closed by cb7bfc5

for an explanation, see the email below on the seismo-dev list:

hi Carl,

the limit is somewhat arbitrary and i think goes back to the implementation from Qinya. for pure adjoint simulations (SIMULATION_TYPE == 2), the code outputs displacement (S00001.NT.BXX.semd,..) and strains (S00001.NT.SEE.semd,..) as well as source derivative kernels (src_frechet.00001,..) all for each point source. the naming convention for those files used something like (.., i5.5,..), which would have limit the number of sources to 99999.

for now, i submitted a commit which uses the same convention as in the global code. in the global code, we use a hard limit of 999,999, because file names use (..,i6.6,..). if that is still too low, please let me know and i increase it further.

best wishes,
daniel

@danielpeter danielpeter self-assigned this Nov 4, 2014
@carltape
Copy link
Contributor

carltape commented Nov 4, 2014

Thank you, Daniel! Great to have such an explicit error message and to have
consistency with the global code.

Carl

On Tue, Nov 4, 2014 at 5:14 AM, daniel peter notifications@github.com
wrote:

closed by cb7bfc5
cb7bfc5

for an explanation, see the email below on the seismo-dev list:

hi Carl,

the limit is somewhat arbitrary and i think goes back to the
implementation from Qinya. for pure adjoint simulations (SIMULATION_TYPE ==
2), the code outputs displacement (S00001.NT.BXX.semd,..) and strains
(S00001.NT.SEE.semd,..) as well as source derivative kernels
(src_frechet.00001,..) all for each point source. the naming convention for
those files used something like (.., i5.5,..), which would have limit the
number of sources to 99999.

for now, i submitted a commit which uses the same convention as in the
global code. in the global code, we use a hard limit of 999,999, because
file names use (..,i6.6,..). if that is still too low, please let me know
and i increase it further.

best wishes,
daniel


Reply to this email directly or view it on GitHub
#279 (comment)
.

@komatits
Copy link
Contributor

komatits commented Nov 8, 2014

email below added as a comment in both source codes (since it is a
useful explanation).

Dimitri.

On 11/04/2014 03:14 PM, daniel peter wrote:

closed by cb7bfc5
cb7bfc5

for an explanation, see the email below on the seismo-dev list:

hi Carl,

the limit is somewhat arbitrary and i think goes back to the
implementation from Qinya. for pure adjoint simulations (SIMULATION_TYPE
== 2), the code outputs displacement (S00001.NT.BXX.semd,..) and strains
(S00001.NT.SEE.semd,..) as well as source derivative kernels
(src_frechet.00001,..) all for each point source. the naming convention
for those files used something like (.., i5.5,..), which would have
limit the number of sources to 99999.

for now, i submitted a commit which uses the same convention as in the
global code. in the global code, we use a hard limit of 999,999, because
file names use (..,i6.6,..). if that is still too low, please let me
know and i increase it further.

best wishes,
daniel


Reply to this email directly or view it on GitHub
#279 (comment)
Bug from
https://github.com/notifications/beacon/AFjDKT6fyleDNlEoxBXxkkzFgP7WJRbWks5nKNa7gaJpZM4C0HiC.gif

{"@context":"http://schema.org","@type":"EmailMessage","description":"View
this Issue on
GitHub","action":{"@type":"ViewAction","url":"https://github.com/geodynamics/specfem3d/issues/279#issuecomment-61644661","name":"View
Issue"}}

Dimitri Komatitsch
CNRS Research Director (DR CNRS), Laboratory of Mechanics and Acoustics,
UPR 7051, Marseille, France http://komatitsch.free.fr

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

4 participants