Skip to content

Add max_tries argument to stan::services::util::initialize #3395

Open
WardBrian wants to merge 2 commits into
developfrom
services/initialize-max-tries
Open

Add max_tries argument to stan::services::util::initialize #3395
WardBrian wants to merge 2 commits into
developfrom
services/initialize-max-tries

Conversation

@WardBrian
Copy link
Copy Markdown
Member

Submission Checklist

  • Run unit tests: ./runTests.py src/test/unit
  • Run cpplint: make cpplint
  • Declare copyright holder and open-source license: see below

Summary

This takes what is currently a hardcoded value and promotes it to an argument with the same default.

Intended Effect

Improve usability of the function, e.g. in roualdes/bridgestan#319

How to Verify

Side Effects

Documentation

Copyright and Licensing

Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company):

Simons Foundation

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:

@WardBrian WardBrian requested a review from SteveBronder June 1, 2026 14:09
@WardBrian WardBrian changed the title Services/initialize max tries Add max_tries argument to stan::services::util::initialize Jun 1, 2026
@stan-buildbot
Copy link
Copy Markdown
Contributor


Name Old Result New Result Ratio Performance change( 1 - new / old )
low_dim_corr_gauss/low_dim_corr_gauss.stan 0.01 0.01 1.04 3.84% faster
sir/sir.stan 74.73 73.11 1.02 2.17% faster
gp_regr/gen_gp_data.stan 0.03 0.03 0.98 -1.68% slower
gp_regr/gp_regr.stan 0.09 0.1 0.99 -1.23% slower
low_dim_gauss_mix_collapse/low_dim_gauss_mix_collapse.stan 7.54 7.54 1.0 0.09% faster
arma/arma.stan 0.27 0.27 1.0 0.25% faster
irt_2pl/irt_2pl.stan 3.95 3.96 1.0 -0.41% slower
garch/garch.stan 0.39 0.39 0.99 -0.72% slower
pkpd/sim_one_comp_mm_elim_abs.stan 0.26 0.25 1.02 1.8% faster
pkpd/one_comp_mm_elim_abs.stan 19.73 18.65 1.06 5.49% faster
eight_schools/eight_schools.stan 0.05 0.06 0.98 -1.69% slower
low_dim_gauss_mix/low_dim_gauss_mix.stan 2.85 2.81 1.01 1.35% faster
gp_pois_regr/gp_pois_regr.stan 1.93 1.93 1.0 -0.11% slower
arK/arK.stan 1.54 1.54 1.0 0.03% faster
performance.compilation 111.3 100.94 1.1 9.31% faster
Mean result: 1.0133965334483532

Jenkins Console Log
Blue Ocean
Commit hash: ff806c1f385be2b5e1c4862bba67bb43f3c612b9


Machine information No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release: 20.04 Codename: focal

CPU:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
Address sizes: 43 bits physical, 48 bits virtual
CPU(s): 128
On-line CPU(s) list: 0-127
Thread(s) per core: 1
Core(s) per socket: 64
Socket(s): 2
NUMA node(s): 2
Vendor ID: AuthenticAMD
CPU family: 23
Model: 49
Model name: AMD EPYC 7742 64-Core Processor
Stepping: 0
Frequency boost: enabled
CPU MHz: 2250.000
CPU max MHz: 3416.0681
CPU min MHz: 1500.0000
BogoMIPS: 4491.30
Virtualization: AMD-V
L1d cache: 4 MiB
L1i cache: 4 MiB
L2 cache: 64 MiB
L3 cache: 512 MiB
NUMA node0 CPU(s): 0-63
NUMA node1 CPU(s): 64-127
Vulnerability Gather data sampling: Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Not affected
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed: Mitigation; untrained return thunk; SMT disabled
Vulnerability Spec rstack overflow: Mitigation; SMT disabled
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Retpolines; IBPB conditional; STIBP disabled; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected
Vulnerability Srbds: Not affected
Vulnerability Tsa: Not affected
Vulnerability Tsx async abort: Not affected
Vulnerability Vmscape: Mitigation; IBPB before exit to userspace
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru wbnoinvd amd_ppin arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif v_spec_ctrl umip rdpid overflow_recov succor smca sev sev_es

G++:
g++ (Ubuntu 9.4.0-1ubuntu1~20.04) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Clang:
clang version 10.0.0-4ubuntu1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

@drezap

This comment was marked as off-topic.

@drezap

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants