None of the options for setting the random seed in .spiceinit seem to work. The attached script prints a random resistance each time, despite three different ways of setting the random seed in .spiceinit:
option seed=1
setseed 1
set rndseed=1
With the above in .spiceinit in the current directory:
for i in 1 2 3 4 5 6 7 8 9 10 ; do ngspice -b spiceinit_fail.cir| fgrep resistance ; done
@r1[resistance] = 9.738833e+02
@r1[resistance] = 8.706737e+02
@r1[resistance] = 8.131219e+02
@r1[resistance] = 1.001660e+03
@r1[resistance] = 9.268301e+02
@r1[resistance] = 8.859511e+02
@r1[resistance] = 1.179932e+03
@r1[resistance] = 9.320947e+02
@r1[resistance] = 8.938548e+02
@r1[resistance] = 1.005027e+03
Thanks for the report.
This requires some major overhaul. I have some code ready, but it still needs a lot of testing.
I have pushed a fix to git development branch pre-master-48.
Please test.
Looks like it works to set 'setseed N' in .spiceinit
Thanks!
The fix in git breaks "option klu" in .spiceinit
Before the commit, KLU is used. After the patch, SPARSE is used.
Another fix is pushed to git branch pre-master-48.