Skip to content
Snippets Groups Projects
  1. Nov 30, 2019
  2. Nov 28, 2019
  3. Oct 27, 2019
    • Ke Liu's avatar
      changed cmake_minimum_required to VERSION 3.1 · 6d1858e4
      Ke Liu authored
      6d1858e4
    • Jonas Greitemann's avatar
      Remove deprecated member type from interface def · 9297b794
      Jonas Greitemann authored
      The member types `phase_label` and `phase_sweep_policy_type` formerly
      required a definition as part of the TKSVM simulation class interface.
      The need for this historically originated in when classifiers and sweep
      policies were determined at compile time. Now that these are derived of
      abstract policies, the remaining uses of these types could be replaced
      by their canonical definitions:
      
          using phase_label = typename phase_space::classifier::policy<phase_point>::label_type;
          using phase_sweep_policy_type = phase_space::sweep::policy<phase_point>;
      
      TKSVM-compliant simulation classes are thus now longer required to
      implement these.
      9297b794
  4. Oct 22, 2019
  5. Oct 05, 2019
  6. Sep 30, 2019
    • Jonas Greitemann's avatar
      Use `clustered_config_policy` for frustmag code · 6798cad2
      Jonas Greitemann authored
      Introduced two new ClusterPolicies which adapt `lattice::bravais` for
      cluster iteration:
      * `frustmag_lattice` (selected by parameter cluster=lattice) uses the
        natural bravais lattice unitcell as the spin cluster
      * `frustmag_single` (cluster=single) uses a single-spin cluster
      6798cad2
  7. Aug 27, 2019
  8. Jul 12, 2019
  9. Jun 25, 2019
  10. Jun 22, 2019
  11. Jun 21, 2019
  12. Jun 19, 2019
    • Jonas Greitemann's avatar
      Select "cluster" ("lattice" / "single") parameter · 5f244c80
      Jonas Greitemann authored
      Users can choose to use the lattice unit cell ("lattice"; previous
      behavior; default) or single spins ("single") as the "cluster"
      parameter. This mirrors the similar feature supported by the gauge model
      config policy for a long time.
      5f244c80
  13. May 10, 2019
  14. Apr 08, 2019
  15. Mar 29, 2019
    • Jonas Greitemann's avatar
      2a29261a
    • Jonas Greitemann's avatar
      Delete frustmag main program · 28cea58e
      Jonas Greitemann authored
      The executables build from `frustmag/CMakeLists.txt` were intended to
      run the frustmag codes (for testing purposes) without the attached SVM
      framework.
      
      This was outdated (not supporting PT) and as of the previous commit,
      the frustmag-test program covers all this functionality. It has, hence,
      been removed.
      28cea58e
    • Jonas Greitemann's avatar
      Allow for dynamic selection of test sweep policy · e2256746
      Jonas Greitemann authored
      Sweep policy used to generate phase space points for the testing stage
      can be specified from parameters using `test.policy`. Any other
      parameters are specified in much the same way as their `sweep.*`
      counterparts. The only difference is that `test.policy` defaults to
      "line_scan" (meaning that existing parameter files remain valid),
      whereas `sweep.policy` defaults to "cycle".
      
      Also note that the "multipurpose" parameter `sweep.N` (which applied to
      the `uniform` and `uniform_line`) has been replaced with separate `N`
      parameters.
      e2256746
  16. Mar 28, 2019
  17. Mar 26, 2019
    • Jonas Greitemann's avatar
      Measure the current phase point in frustmag · e0fd9190
      Jonas Greitemann authored
      This is a consistency check that is meant to ensure the integrity of
      measurements accumulated using PT. The mean of this observable should
      exactly equal the giving phase space point, with variance zero (within
      numerical precision).
      
      This commit may be revert in the future if PT has proven itself.
      e0fd9190
  18. Mar 25, 2019
    • Jonas Greitemann's avatar
      Replace set_pta call with variadic ctor args · 30544430
      Jonas Greitemann authored
      This is the mechanism used to supply the `parallel_tempering` update in
      the frustmag sim with a reference to the `pt_adapter` to invoke
      `negotiate_update`. The previous solution was ugly (required tons of
      metaprogramming to fiddle through the update muxer). We now pass a
      reference to the simulation as an addition ctor argument to all updates.
      The update ctors can choose to bind these additional arguments or absorb
      them in a variadic argument pack.
      30544430
    • Jonas Greitemann's avatar
      measurements() member function shadows member var · 59651150
      Jonas Greitemann authored
      The change described in the commit message of 489a6f27 has been
      implemented. Client codes have to replace any usage of the protected
      `measurements` member variable (of `alps::mcbase`) with the
      `measurements()` member function. Failing to do so generates errors
      (because the function shadows the variable) thus accidental misuse is
      precluded.
      59651150
  19. Mar 24, 2019
    • Jonas Greitemann's avatar
      Use pt_adapter as base class of frustmag sim · 489a6f27
      Jonas Greitemann authored
      Follow-up to prev commit. The pt.hpp is gone; the `negotiate_update` has
      been migrated to the pt_adapter itself. Its signature is more compact
      because the pt_adapter already has access to a lot of the relevant info.
      
      The reference to the `pt_adapter` has to be passed (rather ugly) to the
      `parallel_tempering` update. Meta-programming is used to fiddle the
      reference through the update mux. Not ideal, perhaps use ctor (template)
      argument for all updates instead and ignore if not needed. On the other
      hand, no rebind_communicator magic is needed anymore.
      
      Since plain references cannot be rebound, the measurements object is
      exposed (as a protected member) as a std::reference_wrapper.
      Consequently, the derived simulation classes have to call `get()` on it.
      This change has only been done for the frustmag code for now, breaking
      the interface for the ising and gauge codes. Perhaps, we should use a
      member function `measurements()` instead. This is more elegant and is
      arguably better practice than exposing member variables in the first
      place. However, this choice has been made by ALPSCore devs and changing
      it breaks the interface. All other things being equal, the current
      solution also breaks the interface, therefore this is probably still an
      acceptable price to pay.
      489a6f27
  20. Mar 22, 2019
    • Jonas Greitemann's avatar
      Install PT update callback & use it to update pt · 2f58e500
      Jonas Greitemann authored
      Previously, the client-side `update::parallel_tempering` actually took
      care itself of updating the phase space point, rather than calling into
      update_phase_point(...). This bypassed the observable-management that is
      done in the pt_adapter (as well as potentially any other intermediate
      simulation adapters).
      
      The fix I eventually came up with is not a thing of beauty: simulations
      which want to use PT must define a `install_pt_update_callback(...)`
      member function as part of their SVM interface; otherwise it is not
      necessary. This hands it a callback function which invokes
      `update_phase_point` on the `pt_adapter`. The simulation should store
      this callback and eventually pass it on to `pt::negotiate_update`. Never
      should the client code invoke the callback itself.
      
      A (somewhat more elegant alternative) would be to make
      `update_phase_point` a virtual function and invoke it polymorphically
      that way. This would be more elegant for most codes, but it would still
      not help for frustmag, where the individual updates do not have access
      to the simulation class. This may be subject to refactoring.
      
      Also, right now the simulation is crashing still.
      2f58e500
    • Jonas Greitemann's avatar
      Enable rebind_communicator in update multiplexer · e2e2bbd0
      Jonas Greitemann authored
      ...using type traits and meta programming. The multiplexer (mux) will
      only support the rebind_communicator member function if at least one of
      its constituent updates has it. The mux then forward the call only to
      those. The `pt_adapter` assumes that the simulation base class supports
      rebind_communicator to pass it on; however this mechanism always one to
      use the frustmag simulation w/o parallel tempering in which case also no
      `mpi::communicator` has to be defined, i.e. the program compiles without
      MPI headers and libs.
      e2e2bbd0
    • Jonas Greitemann's avatar
      Implement PT negotiation & enable for Ising model · d1802f0d
      Jonas Greitemann authored
      Added a `parallel_tempering` update to the frustmag ising model. It
      defines parameters to control the PT update frequency and interface with
      the hamiltonian, but the actual PT logic and MPI communication is
      delegated to `pt::negotiate_update` which is model-agnostic.
      
      On the other side of the fence, the `pt_adapter` now spins up a thread
      running its static `manage(comm)` function. This manager thread acts
      like a central registry keeping track of pairs of processes (primary and
      secondary) which are currently involved in a PT update. The primary one
      is the process initiating the update and asking the manager for a
      partner, while the secondary one is that chosen partner. The manager
      makes sure both processes know their respective partner.
      
      Processes have to message the manager to deregister *before* they they
      can wrap up their simulation. The manager is free to reject
      deregistration if the thread has been scheduled to take part in an
      ongoing PT update as secondary partner. In this case, the process has to
      carry out additional updates and retry until deregistration is confirmed
      by the manager. This is done in `pt_adapter::run(...)`.
      d1802f0d
  21. Mar 20, 2019
    • Jonas Greitemann's avatar
      Reset measurements in reset_sweeps; interface ch'd · 3f1b2cde
      Jonas Greitemann authored
      SVM interface has changed: update_phase_point(...) is now supposed to
      return a bool, indicating whether the point has indeed changed (i.e.
      fresh thermalization is in order). It should *no longer* call
      reset_sweeps itself. This is because it is intended to be used in PT to
      update the current phase space point w/o resetting the progress of the
      simulation.
      
      As a consequence, the test_adapter is also no longer allowed to reset
      the simulation's measurements member; this is now done in reset_sweeps.
      Analogously it befalls to the pt_adapter to clear the measurements for
      all the slices in reset_sweeps. I.e. this would be the case when the PT
      *batch* is changed, but not when the PT update issues a swap of phase
      space points.
      3f1b2cde
  22. Mar 19, 2019
    • Jonas Greitemann's avatar
      Add missing operator[] to spin_Z2 site state · d4043d08
      Jonas Greitemann authored
      The index passed is ignored and the Z2 spin is returned as a double.
      Implementation is required for generic use in the SVM framework.
      d4043d08
    • Jonas Greitemann's avatar
      Fix bug: ISING define name collision (frustmag) · 60840c0b
      Jonas Greitemann authored
      The ISING preprocessor variable definition used to select the ising
      model in the frustmag client code clashed with that which selects the
      ising client code. The former has been renamed to ISING_HAMILTONIAN
      (along with HEISENBERG_HAMILTONIAN) to avoid this. This change does not
      affect the user-facing values of the HAMILTONIAN CMake variable.
      60840c0b
  23. Mar 04, 2019
    • Jonas Greitemann's avatar
      Sample program completed; run sim, write .clone.h5 · e3a421c5
      Jonas Greitemann authored
      The training_adapter no longer manages the sweep. The interface function
      update_phase_point has been changed such that it accepts concrete phase
      space points, rather than generating them from the sweep policy. The
      sweep_policy is only used in the sample program and consumed to generate
      all the phase space points.
      
      Resuming simulation from the checkpoint in the sample program works now.
      
      The learn program has been stripped down to its SVM optimization part;
      no sampling takes place there.
      e3a421c5
  24. Feb 20, 2019
    • Jonas Greitemann's avatar
      Add flag --infinite-temperature in learn program · 1538ef30
      Jonas Greitemann authored
      To compare phases to the "infinite temperature" state where all spins
      are randomly oriented, a new flag --infinite-temperature, -i has been
      introduced to the learn program. When specified, an additional "fake"
      phase space point is "sampled" were the configurations are perfectly
      random.
      
      To achieve this, the SVM interface for client codes has been expanded to
      include a random_configuration() function. This is a breaking change as
      client codes have to implement this from now on.
      
      This feature is intended to be used with the fixed_from_cycle classifier
      which has been made aware of the "fake" infinity phase point and will
      classifier those samples with a distinct label.
      1538ef30
  25. Feb 19, 2019
  26. Feb 07, 2019
  27. Feb 04, 2019
    • Jonas Greitemann's avatar
      Removed ElemPol const qualifiers in return type · 7cb4384f
      Jonas Greitemann authored
      This are actually meaningless and prompt compiler warnings.
      
      Instead (though technically unrelated), declared those functions
      constexpr.
      
      Also removed some unused argument names to silence the corresponding
      warnings.
      7cb4384f
Loading