Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • S src
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 59
    • Issues 59
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OPAL
  • src
  • Issues
  • #110

Closed
Open
Created May 19, 2017 by snuverink_j@snuverink_jDeveloper

PartBunch::get_bounds can produce NaNs

While trying to update the PSI-Ring simulations to the master branch, I encountered the following running error:

OPAL> PartBunch.cpp: 1574	nan	2.000000e-02
Error> 
Error> *** User error detected by function "PartBunch::boundp() "
Error> *** in line 311 of file "Ring.in":
Error>      RUN,METHOD="CYCLOTRON-T",BEAM=BEAM1,FIELDSOLVER=FS1,DISTRIBUTION=DIST;
Error>     h<0, can not build a mesh

The nan gets introduced in line 1521: get_bounds(rmin_m, rmax_m);

Printing out rmax and rmin before and after this line gives (ymmv):

before:

(i,rmax, rmin) 0 0.0000000000000000e+00 0.0000000000000000e+00
(i,rmax, rmin) 1 0.0000000000000000e+00 0.0000000000000000e+00
(i,rmax, rmin) 2 0.0000000000000000e+00 0.0000000000000000e+00

after

(i,rmax, rmin) 0 7.1153710538428058e-03 -6.9640951722910538e-03
(i,rmax, rmin) 1 4.0421699390708048e-02 -4.0512781208033796e-02
(i,rmax, rmin) 2 -nan -nan

I likely do something wrong with my input, but I believe the code should not get this far and produce a better error message.

This can be reproduced with OPAL master (0469d1ac), and the latest version of PSI-Ring and executing runOpal --nobatch

Edit 20 July:

#110 (comment 1914): Simplified input file Ring.in

#110 (comment 1916): Regression test RingCyclotron has the same bug when one changes the distribution from gauss to either single particle or binomial.

Assignee
Assign to
Time tracking