Skip to content
Snippets Groups Projects
  1. Sep 09, 2016
    • Christopher Subich's avatar
      Add vector-valued options to the config file · 770804ec
      Christopher Subich authored
      This change modifeis Options.hpp to add the possibility of
      vector-valued options to the config file and command line.
      From the 'case' code, this option is used by (for example)
      
      std::vector<int> intvec;
      add_option("Name",&intvec,"Description);
      
      When run, options of the form --Name 1 2 3 4 (at the command
      line) or Name = 1 2 3 4 (in the config file) will be added
      to the vector 'intvec' as separate entries.
      
      Because add_option is a template function, this works
      identically for double (floating point)-valued options.  It
      has not been tested with string options.
      
      Since an empty vector is a perfectly cromulent and
      unambiguous possibility, vector-valued options do *not*
      permit the specification of defaults.
      770804ec
    • Christopher Subich's avatar
      Modify make_deps to download boost 1.61 · 0f06c74a
      Christopher Subich authored
      This modifies the helper make_deps.sh script to download
      Boost 1.6.1, rather than the previous 1.5.1 version.  At
      least for now, the URL for the download points to
      Sourceforge rather than csubich's public-facing web presence
      on belize.math.uwaterloo.ca.
      
      If Sourceforge shuts down, or if Boost moves its historic
      releases off the site, then this will need modified.
      0f06c74a
  2. Jun 21, 2016
  3. Jan 18, 2016
    • Christopher Subich's avatar
      Revert parallel output into a testing branch · bc72df43
      Christopher Subich authored
      After some experimentation, the previous commit of MPI-IO file
      output/input had (and has) lingering bugs.  To prevent breaking existing
      code, these changes have been moved into a 'testing' branch and the
      'master' branch has been reverted to its prior state with this merge.
      
      Once the MPI-IO output is fully working, it will be restored into the
      master branch.
      bc72df43
  4. Dec 15, 2015
  5. Oct 28, 2015
    • Christopher Subich's avatar
      Fix compilation of automatic_grid · 1ac02e05
      Christopher Subich authored
      The automatic_grid() helper function in BaseCase was not properly
      functional if called without supplied arguments for the 1D grids
      xx/yy/zz.  Now, if these arguments are null or not supplied, the
      function will do its grid generation using temporarily-allocated
      internal 1D arrays, deleted at the end of its execution.
      1ac02e05
    • Christopher Subich's avatar
      Correct sign error in automatic generation of grids · 5c13e0d9
      Christopher Subich authored
      Previously, the automatic_grid function was creating Chebyshev-type
      grids with points ordered as:
      
      {x,z} = L/2 + L/2*cos(pi*ii/(N-1))
      
      This is incorrect.  The expected ordering is actually the reverse, or
      
      {x,z} = L/2 - L/2*cos(...)
      5c13e0d9
  6. Sep 18, 2015
  7. Aug 24, 2015
  8. Jun 10, 2015
  9. Nov 28, 2014
    • Christopher Subich's avatar
      Fix for wavenumbers of null transform · a41e044e
      Christopher Subich authored
      Parformer.cpp -- previously, an all-NULL transform being
      asked for its wavenumbers would only return an array of size
      one, rather than one of appropriate length for the (real)
      "temporary" array.  This could conceivably have caused
      problems for the graceful use of 3D routines on
      2D-but-layered fields.
      a41e044e
  10. Sep 29, 2014
    • Christopher Subich's avatar
      Removed old "Transformer" code · 1a1c8814
      Christopher Subich authored
      The pair of Transformer.[ch]pp files contained old code built for SPINS
      before parallel transformation (over MPI) was fully implemented.  These
      classes were replaced wholesale with Parformer.[ch]pp (Parallel
      Transformer), but the older code remained in the repository.
      
      Removing these files should not affect any active code.  It will affect
      certain disued test cases (subject to changing #includes), but these
      cases themselves need more serious maintenance to update for the
      "gradient object" interface.
      1a1c8814
    • Michael's avatar
      Print descriptive names for dimtype and expansion · c8cdf0c1
      Michael authored
      At startup, print a string describing the dimension
      type and spectral expansion type, rather than the
      internal enum value.
      c8cdf0c1
  11. Sep 18, 2014
  12. Sep 11, 2014
    • Christopher Subich's avatar
      wave_reader, tracer file output · 2a7736a9
      Christopher Subich authored
      Previously for the wave_reader case file, "tracer.0" and
      "tracer_reader.m" files were being output regardless of whether the
      configuration specified that there was a passive tracer.  This arose
      because of a scoping error during tracer initalization; tracer.0
      contained a copy of rho.0.
      
      This has been fixed in this commit.  No numerical results were in error
      because of this bug.
      2a7736a9
  13. Sep 10, 2014
    • Michael Dunphy's avatar
      Embed the case file source in the SPINS binary. · 1d616e81
      Michael Dunphy authored
      The case file source code is embedded into the binary at compile time.
      At runtime, the source code is printed to spinscase.cpp. This eliminates
      the need to maintain a copy of the case file alongside the binary.
      1d616e81
  14. Jun 17, 2014
    • Christopher Subich's avatar
      Include sanity checking for quadrature weight init · c6a0c6d5
      Christopher Subich authored
      The quadrature weight "get" functions will now check whether the
      corresponding array has been initialized (length >= 1) before returning
      the array.  This will catch errors where quadrature weights are used
      before being initialized.
      c6a0c6d5
  15. Mar 24, 2014
  16. Mar 20, 2014
    • Christopher Subich's avatar
      Fixed "automatic" grid calculation error for wave_reader · d2454796
      Christopher Subich authored
      The "automatic" (unmapped) grid calculation used by wave_reader
      (automatic_grid in BaseCase.cpp) was in error for grids of
      Chebyshev-type.  Instead of computing:
      
      z = -Lz/2 + Lz/2*cos(pi*(0:(N-1))/(N-1))
      
      it instead computed
      
      z = -Lz/2 + Lz/2*cos(pi*(0:(N-1))/N)
      
      (to use matlab-style notation).  This caused the written-out zgrid to be
      in error near the bottom (max z-index) boundary.  Files using a
      chebyshev-type unmapped x-coordinate would see the error as well in the
      x-grid (max x-index).
      
      This error affects only processing that uses the grid variables itself.
      Within wave_reader where this was used, the automatic-generated grids
      were used only for writing out; the input velocities and density were
      read directly in from their corresponding files.  Likewise, SPINS
      performed the "correct" differentiation internally without reference to
      the grid coordinate.
      d2454796
  17. Mar 17, 2014
  18. Nov 28, 2013
  19. Oct 02, 2013
  20. Sep 26, 2013
  21. Jul 22, 2013
    • Christopher Subich's avatar
      bf9ac2d5
    • Christopher Subich's avatar
      6a0fa2f6
    • Christopher Subich's avatar
      fe74f84c
    • Christopher Subich's avatar
      Cleaned up compiler warnings · 5ede1ef9
      Christopher Subich authored
      As compiler versions march on, some previously-valid code was generating
      warnings; these have been corrected.
      
      *) In Plan_holder and T_util, using <ext/hash_map> was generating a
      deprecation warning.  The proper replacement for the GCC <hash_map> is
      the STL <unordered_map>, however that is part of the C++-0x standard
      that is not yet supported by default in GCC 4.3-4.6, requiring a
      compile-time command-line flag.
      
      Since implementing *that* over a broad range of systems will be
      extremely difficult, the better option for now is to silence the
      deprecation warning by selectively undefining __DEPRECATED around the
      inclusion of <ext/hash_map>.  This preserves any GCC deprecation
      warnings around other bits of code.
      
      *) In T_util and gmres_1d_solver, "literal string constants" were being
      assigned to char *, when string literals are supposed to be const char
      *.  This reflected an error in the variable spec; there's no reason that
      the assigned-to-vars couldn't themselves be const char *.
      
      As of this commit, the code compiles (make cases/bench_dipole.x)
      compiles warning-free on belize.
      5ede1ef9
    • Christopher Subich's avatar
      Include mpi.h in Split_reader_impl.cc · 3434eded
      Christopher Subich authored
      3434eded
    • Christopher Subich's avatar
      Fixes to make old dipole cases compile · 78a57549
      Christopher Subich authored
      The old dipole cases in the cases/ directory (dipole crashing into
      no-slip boundary) were initially written before the 'analysis'
      routine was given pressure.  Adding pressure-analysis to NSIntegrator
      changed the method's prototype, leading to a compile-time error on
      these files.  The fix is to add a dummy 'pressure' reference to the
      dipoles' analysis methods; the behaviour of the other parameters is
      unchanged so no logic changes are necessary.
      78a57549
  22. Jul 09, 2013
    • Christopher Subich's avatar
      Added MPI_Barrier to split file reader · 6b137f48
      Christopher Subich authored
      This update adds an explicit MPI Barrier to the end of the split 2D file
      reader.  This should address a race condition discovered by Nancy when
      resuming a 2D case as 3D on Scinet, where the initially-2D files were
      (correctly) overwritten by their 3D versions.  It appears that the
      overwrite happened on some processes before others had opened the file,
      causing the later processes to read incomplete files.  The exact
      sequence appears to have been:
      
      * Process 1 opens 'u.0' as a 2D-split file to read
      * Process 1 finishes its reading and assigns the contents to its
        internally-3D array
      * Process 1 begins writing out its segment of the 3D array, as 'u.0'.
        (It blocks on the write-synchronization, but has already written to
        disk.)
      * Process 2 wakes up (on a remote node) and opens 'u.0' as a
        presumably-2D file.  It dies.
      
      This race condition could, under different circumstances, also cause
      data corruption (if process N wasn't reading past the end of the file in
      a linear sense; possible for large Ny and small Np).  The corrective
      measure was to apply an MPI Barrier at the end of read_2d_slice in
      Split_reader_impl.cc (the implementation fucntion used by the more
      user-friendly functions in Science.cpp).
      6b137f48
  23. Jun 04, 2013
  24. May 27, 2013
    • Christopher Subich's avatar
      Add -ftz for builds on winisk · ebb3432a
      Christopher Subich authored
      This patch specifically includes -ftz for winisk builds; this
      forces denormalized floats to be flushed to 0, which should
      avoid software-floating-point-faults that spam /var/log/messages
      and probably slow down the program.  (Quick checks suggest a ~8%
      speed increase for bench_dipole).
      
      Additionally, make_deps is also extended to specifically include
      CFLAGS and mark building with CC on the ./configure command line.
      This should ensure that the library is built with the same
      compiler (and settings) as SPINS itself.  If you have to modify
      this part, pay special attention to the comment abour use of bash
      array syntax.
      ebb3432a
  25. Apr 24, 2013
    • Christopher Subich's avatar
      Added build options for clean build on plata · 2f6524af
      Christopher Subich authored
      Prior modifications to systems/plata.sh did not result in a clean
      build; spins itself and the UMFPACK libraries were built in 64-
      bit with the -m64 option, but fftw, blitz, and boost were not.
      This led to build-time errors.  The fix involves making sure that
      make_deps specifies CFLAGS/CXXFLAGS as appropriate, and this was
      done via including $BOOST_OPTIONS/$FFTW_OPTIONS/etc flags.  Where
      those didn't already exist in make_deps, they were added so that
      it will be easy to make a similar change in the future for other
      systems.
      2f6524af
Loading