• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
      • Theories
      • Rule-classes
      • Proof-builder
      • Hons-and-memoization
      • Events
      • History
      • Parallelism
        • Set-waterfall-parallelism
        • Parallel-programming
        • Set-waterfall-printing
        • Unsupported-parallelism-features
        • Set-total-parallelism-work-limit
        • Set-parallel-execution
        • Set-total-parallelism-work-limit-error
        • Compiling-ACL2p
        • Waterfall-parallelism-for-book-certification
        • Cpu-core-count
          • Set-waterfall-parallelism-hacks-enabled
          • Parallel-proof
          • Non-parallel-book
          • Parallel
          • Without-waterfall-parallelism
          • Set-waterfall-parallelism-hacks-enabled!
          • With-waterfall-parallelism
          • Parallelism-build
        • Programming
        • Start-here
        • Real
        • Debugging
        • Miscellaneous
        • Output-controls
        • Macros
        • Interfacing-tools
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Testing-utilities
      • Math
    • Parallelism
    • ACL2-built-ins

    Cpu-core-count

    The number of cpu cores

    This documentation topic relates to the experimental extension of ACL2 supporting parallel execution and proof; see parallelism.

    Unless the ACL2 executable supports parallel execution (see parallelism), this function returns (mv 1 state). Otherwise:

    (Cpu-core-count state) returns (mv core-count state), where core-count is determined as follows. If environment variable ACL2_CORE_COUNT has a non-empty value, then that value should represent a positive integer (else an error occurs), which is the returned core-count. Otherwise, the returned core-count may be obtained from the underlying Common Lisp implementation, else as a positive integer value from state global variable 'cpu-core-count (see assign). Otherwise an error occurs.

    Example:
    (cpu-core-count state) ==> (mv 4 state)

    Cpu-core-count has the following logical definition.

    Function: cpu-core-count

    (defun cpu-core-count (state)
           (declare (xargs :stobjs state :guard t))
           (mv-let (nullp val state)
                   (read-acl2-oracle state)
                   (declare (ignore nullp))
                   (mv val state)))