##
## User settings that are commonly modified:
##

# Include the 'user' and 'computer' fields in the results.json.txt file, and
# prepend the user ID and computer name to each result in the results file in
# the same manner as Prime95 and mprime.
#
# V5UserID and ComputerID must both be set to enable these features. You must
# also set LegacyResultsTxt=1 to save results to the results.txt file.
#
# Default: none (unset)

#V5UserID=<PrimeNet ID>
#ComputerID=<hostname>

# GPUSieveSize defines the size of the GPU sieve to use, in Mib.
# Default is set to 256 for maximum compatibility and to avoid issues on older
# devices. Using a value of 2047 can give better performance on newer GPUs.
#
# Minimum: GPUSieveSize=4
# Maximum: GPUSieveSize=2047
#
# Default: GPUSieveSize=256

#GPUSieveSize=2047
GPUSieveSize=256


##
## Other optional configuration settings:
##


# Set the number of CUDA streams / data sets.
#
# mfaktc can process a stream / data set on the GPU while the GPU pre-processes
# another. For two or more streams, the time needed to transfer the data from
# the CPU to GPU can be hidden if supported by the hardware; most modern GPUs
# should support this.
# A value of 2 or 3 is often good enough on Linux systems. Some users have
# reported a larger number is needed on Windows.
# A greater number increases the memory consumed by mfaktc on both the host and
# GPU. mfaktc currently supports up to 10 streams.
# Don't be too greedy as high values are usually just a waste of memory.
#
# Minimum: NumStreams=1
# Maximum: NumStreams=10
#
# Default: NumStreams=3

NumStreams=3


# Set the number of data sets which can be pre-processed on CPU. This allows
# more jitter to be tolerated at runtime during pre-processing and CUDA
# streams.
# Don't be too greedy as high values are usually just a waste of memory.
#
# Minimum: CPUStreams=1
# Maximum: CPUStreams=5
#
# Default: CPUStreams=3

CPUStreams=3


# GridSize affects the number of threads per grid.
# Depending also on the number of multiprocessors in your GPU, the
# threads per grid is automatically set to:
#   GridSize = 0:  65536 < threads per grid <=  131072
#   GridSize = 1: 131072 < threads per grid <=  262144
#   GridSize = 2: 262144 < threads per grid <=  524288
#   GridSize = 3: 524288 < threads per grid <= 1048576 (default)
# A smaller GridSize has more overhead for large jobs. However, very small jobs
# can slightly benefit from reduced computation time for small GridSize values,
# which also directly reduce the run time per kernel launch and might
# result in better interactivity on older GPUs.
#
# Default: GridSize=3

GridSize=3


# Checkpoints = 0: disable checkpoints
# Checkpoints = 1: enable checkpoints
# A checkpoint file allows an assignment to be saved across sessions. mfaktc
# can write a checkpoint after finishing a class.
#
# Default: Checkpoints=1

Checkpoints=1


# CheckpointDelay is the time in seconds between two checkpoint writes.
#
# Minimum: CheckpointDelay=0
# Maximum: CheckpointDelay=900
#
# Default: CheckpointDelay=30

CheckpointDelay=30


# WorkFileAddDelay defines how often mfaktc should check for a worktodo.add
# file. mfaktc will wait WorkFileAddDelay seconds before processing the file
# after first detection.
#
# Minimum: WorkFileAddDelay=30 (set to 0 to disable this feature)
# Maximum: WorkFileAddDelay=3600
#
# Default: WorkFileAddDelay=600

WorkFileAddDelay=600


# Allow an assignment to be split into multiple bit ranges.
# 0 = disabled
# 1 = enabled
#
# Only makes sense when StopAfterFactor > 0.
# Do not change this in the middle of a run that spans multiple bit
# levels as mfaktc will ignore the checkpoint file and start over.
#
# Default: Stages=0

Stages=0


# Configure what happens when a factor is found. Possible values:
# 0: Do not stop the current assignment after a factor is found.
# 1: Stop at the current bit level after finding a factor. Only makes sense
#    when Stages is enabled.
# 2: Stop at the current class after finding a factor. Leaves bit level
#    incomplete and may result in reduced GIMPS credit depending on factor
#    size. Strongly discouraged.
#
# Default: StopAfterFactor=1

StopAfterFactor=1


# Configure the output behavior during runtime. Possible values:
# 0: print a new line for each finished class
# 1: update the current line for a more compact output
#
# Some environments, such as Google Colab, do not support PrintMode=1 and will
# cause mfaktc to not show progress.
#
# Default: PrintMode=1

PrintMode=1


# also print the contents of stdout to mfaktc.log
# 0: do not append stdout lines to mfaktc.log
# 1: append stdout lines to mfaktc.log
#
# Default: Logging=0

Logging=0


# LegacyResultsTxt can be used to enable deprecated results.txt output
# 0: Do not write the results in deprecated format to results.txt
# 1: Output the results in deprecated format to results.txt
#
# Default: LegacyResultsTxt=0

LegacyResultsTxt=0


# TimeStampInResults determines whether each line in the results.txt file is
# preceded with a timestamp (similar to Prime95 and mprime)
#
# Default: TimeStampInResults=0

TimeStampInResults=0


# Configure how timestamps are recorded in the results.txt file. Possible
# values:
#
# 0: print the timestamp on a separate line before each result line. Enables
#	 tools such as grep and sed to parse the output more easily
# 1: include the timestamp in the same line as the result (overrides
#	 ResultsFileTimestampInterval and always prints a timestamp)
#
# Default: TimestampOnSameLine=0

TimestampOnSameLine=0


# Configure how many seconds must pass before mfaktc records a new timestamp
# in the results.txt file.
#
# Possible values: 0 <= ResultsFileTimestampInterval <= 86400
#
# Default: ResultsFileTimestampInterval=1
#
# Please note:
# 1. Unlike in Prime95 and mprime, ResultsFileTimestampInterval=0 does not
#	 disable timestamps. To do this, set TimeStampInResults=0 as described
#    above.
# 2. TimestampOnSameLine=1 overrides this option and always prints a timestamp
#	 for each result line.
# 3. mfaktc does not store timestamp information between sessions.

ResultsFileTimestampInterval=1


# PrintFormat allows the progress output to be customized. You can use
# any combination of the following format specifications:
#
#  %C - class ID (n/420) or (n/4620)   "%4d"
#  %c - class number (n/96) or (n/960) "%3d"
#  %p - percent complete (%)           "%5.1f"
#  %g - GHz-days/day (GHz)             "%8.2f"
#  %t - time per class (s)             "%6.0f" / "%6.1f" / "%6.2f" / "%6.3f"
#  %e - ETA (d/h/m/s)                  "%2dm%02ds" / "%2dh%02dm" / "%2dd%02dh"
#  %E - elapsed (d/h/m/s)              "%2dm%02ds" / "%2dh%02dm" / "%2dd%02dh"
#  %n - number of candidates (M/G)     "%6.2fM"/"%6.2fG"
#  %r - rate (M/s)                     "%6.2f" / "%6.1f"
#  %s - SievePrimes                    "%7d"
#  %w - CPU wait time for GPU (us)     n.a. (mfakto only - no need to use)
#  %W - CPU wait % (%)                 "6.2f"
#  %d - date (Mon nn)                  "%b %d"  (strftime format)
#  %T - time (HH:MM)                   "%H:%M"  (strftime format)
#  %U - username (as configured)       "%s"     no fixed width
#  %H - hostname (as configured)       "%s"     no fixed width
#  %M - the exponent being worked on   "%-10u"
#  %l - the lower bit-limit            "%2d"
#  %u - the upper bit-limit            "%2d"
#
# You can use ProgressHeader to specify a fixed string that is displayed as
# a static progress header.
# Be aware the number of candidates and rate are calculated differently
# depending on whether or not GPU is enabled. mfaktc counts all factor
# candidates when sieving on the GPU, but only the post-processed factor
# candidates when sieving on the CPU.

# mfaktc 0.20 (default)
ProgressHeader=Date    Time | class   Pct |   time     ETA | GHz-d/day    Sieve     Wait
ProgressFormat=%d %T | %C %p%% | %t  %e |  %g  %s  %W%%

# old mfaktc 0.18/0.19 style
#
#ProgressHeader=    class | candidates |    time |    ETA | avg. rate | SievePrimes | CPU wait
#ProgressFormat=%C/4620 |    %n | %ts | %e | %rM/s |     %s |  %W%%

# print everything
#ProgressHeader=[date    time]  exponent [TF bits]: percent  class #, seq    |     GHz |    time |    ETA |    #FCs |      rate | SieveP. | CPU wait | V5UserID@ComputerID
#ProgressFormat=[%d %T] M%M [%l-%u]: %p%% %C/4620,%c/960 | %g | %ts | %e | %n | %rM/s | %s |  %W%% | %U@%H


# enable or disable GPU sieving
# SieveOnGPU=0: use the CPU to sieve factor candidates; high CPU usage
# SieveOnGPU=1: use the GPU to sieve factor candidates; minimal CPU usage
# GPU sieving is supported on GPUs with compute capability 2.0 or higher, such
# as the GeForce 400 series or newer
#
# Default: SieveOnGPU=1

SieveOnGPU=1


# GPUSievePrimes defines how far to sieve the factor candidates on the GPU.
# The first <GPUSievePrimes> primes are sieved.
#
# Minimum: GPUSievePrimes=0
# Maximum: GPUSievePrimes=1075000
#
# Default: GPUSievePrimes=82486

GPUSievePrimes=82486
#GPUSievePrimes=15000
#GPUSievePrimes=8000


# GPUSieveSize
#
# Please scroll to the top as the option has been moved there.


# GPUSieveProcessSize defines the size of the sieve each TF block
# processes, in Kib. Larger values may lead to less wasted cycles by
# reducing how often the threads in a warp are idle. However, this may reduce
# occupancy due to increased share memory usage.
# Smaller values should lead to a more responsive system as each kernel takes
# less time to execute. GPUSieveProcessSize must be a multiple of 8.
#
# Minimum: GPUSieveProcessSize=8
# Maximum: GPUSieveProcessSize=32
#
# Default: GPUSieveProcessSize=16

GPUSieveProcessSize=16


##
## CPU sieving settings (obsolete and may be removed in the future)
##


# Sets whether to allow the CPU to sleep for a short time when idle; this
# usually happens when the CPU has to wait for the GPU.
# 0: Disable CPU sleep
# 1: Enable CPU sleep
#
# Default: AllowSleep=0

AllowSleep=1


# SievePrimes defines how far the factor candidates (FCs) are pre-sieved on
# the CPU. The first <SievePrimes> odd primes are used to sieve the FCs.
#
# Minimum: SievePrimes=2000 (check SievePrimesMin)
# Maximum: SievePrimes=200000
#
# Default: SievePrimes=25000

SievePrimes=25000


# Set this to 1 to enable automatic adjustments of SievePrimes during
# runtime based on the "average CPU wait"
#
# Default: SievePrimesAdjust=1

SievePrimesAdjust=1


# Set the minimum and maximum limit for SievePrimes; this is needed if
# SievePrimesAdjust is enabled. Configured values are soft limits; there are
# hard limits in the code which should never ever be changed.
#
# Current limits are:
# 2000 <= SievePrimesMin <= SievePrimes <= SievePrimesMax <= 200000
#
# Default: SievePrimesMin=5000
#          SievePrimesMax=100000

SievePrimesMin=5000
SievePrimesMax=100000
