Changes between Version 30 and Version 31 of FAQ

Mar 31, 2011, 10:38:07 AM (10 years ago)



  • FAQ

    v30 v31  
    11= Vespa - Simulation FAQ Page =
    3 At the moment, only the Simulation application has been released for beta testing. Thus we have chosen to put all FAQs here at the top level of the project to make them more accessible for users. As all three applications are release, questions specific to each application will be relocated to a FAQ on the application's wiki.
     3Questions and answers specific to the VeSPA project and sometimes a bit more ...
    55== Index ==
    99'''[#HowdoIinstallVespa How do I install Vespa?]'''
    11 '''[#WheredoIfindtheSimulationUserManual Where do I find the Simulation User Manual?]'''
    13 '''[#WherecanIreadmoreaboutNMRsimulationandprocessing Where can I read more about NMR simulation and processing?]'''
    15 '''[#WhydoesSimulationappeartohangorslowdownforlargespinsystems Why does Simulation appear to hang or slow down for large spin systems?]'''
    17 '''[#MyPyGAMMAProgramIsUnstableorBehavesBadlyandYetitLooksFine My PyGAMMA Program Is Unstable or Behaves Badly and Yet it Looks Fine?]'''
     11'''[#WheredoIfindApplicationspecificFAQs Where do I find Application specific FAQs?]'''
    2721Complete instructions for installing Vespa are on the [wiki:Installation Installation] page.
    29 === Where do I find the Simulation User Manual? ===
    30 The User Manual documentation for the Simulation application is included in PDF format under the docs/ directory in the package that you downloaded. It can also be [browser:/trunk/docs/simulation_user_manual.pdf accessed directly here].
     23=== Where do I find Application specific FAQs? ===
     24Each application has its own wiki that contains a extensive information and links. Some are still under construction but will be included when they are released in beta. FAQs for each can be found here:  [simulation:FAQ Simulation FAQs], [rfpulse:FAQ RFPulse FAQs], Analysis FAQs
    32 === Where can I read more about NMR simulation and processing? ===
    33 [wiki:SpectralSimRef Here is a list of references for spectral simulation and processing]
    35 === Why does Simulation appear to hang or slow down for large spin systems? ===
    36 When doing calculations with a spin of 8,9, or 10, your system may appear to slow down or even hang. A likely explanation is that for larger spins it take a much longer time for the spectral calculations in the underlying [gamma:wiki GAMMA] package. For example, at a spin count of 7, a single FID experiment takes GAMMA 0.4 seconds, but at spin 10 it takes 1 hour and 24 minutes (on a 2.66 GHz Intel machine). [gamma:GammaVsSpin Here is a list of GAMMA timing results for various spin sizes]. The "slow down" may be compounded if doing a large number of individual simulations for different timings, or spacial locations.
    38 Note: The time it takes to run these specific jobs is virtually identical in GAMMA versus Simulation - as there is little overhead (e.g. converting arrays between python and C++) when compared to the overall time of the calculations.
    40 === My PyGAMMA Program Is Unstable or Behaves Badly and Yet it Looks Fine? ===
    41 Under certain circumstances your PyGAMMA code can be written in perfectly good Python style yet give unpredictable errors (or no error at all).
    43 We created PyGAMMA by applying SWIG to GAMMA. In this treatment we did not apply any special code for handling return values that are pointers or references. This has caused non-pythonic behavior to be observed in some situations.
    45 If you have written code that involves subroutines, like this pseudocode,
    46 {{{
    47 import pygamma as pg
    49 def binning()
    50    # do something interesting
    51    pass
    53 def my_pulse_sequence()
    54     sys = pg.spin_system()
    55     # do something else interesting
    56     ACQ = pg.acquire1D(pygamma.gen_op(D), H, 0.000001)
    57     mx = ACQ.table(sigma0)
    58     return mx
    60 mxa = my_pulse_sequence()
    62 # About to have a problem...
    63 binning(mxa, field, spin_count)
    64 }}}
    66 then you are at risk of having one of a number of problems.
    68 This is because mxa points to a an object that is contained within another object that has been made available for deletion. In this example we are returning mx, a transition table (TTable1D), which is an object that is contained within ACQ (an acquire1D object). The ACQ object will be released at the end of my_pulse_function() and therefore so will mx. When you try to use the return value, in this case mxa, in some other process (e.g. binning(mxa,...)), the behavior is unpredictable and usually bad.
    70 So far in our research we have see this situation cause these errors:
    72     * Segfault
    73     * Bus Errors
    74     * Pointers to uninitialized data
    75     * An error box saying something bad happened
    76     * Pointer to the correct value with no notification of any kind of error (and that may not be valid the next time you look)
    78 We list here a [gamma:SwigIssueSegfault detailed description of the problem and suggest some simple work-arounds].