I build a circuit (different) with the same model and it gives similar error messages (however, the simulation works and the result make sense):
Circuit: KiCad schematic
Error on line 0 :
a.xu3.asor_swp %vd xu3.clamp xu3.55 %gd xu3.clamp xu3.55 xu3:as_vswitch_1
MIF-ERROR - unable to find definition of model xu3:as_vswitch_1
Error on line 0 :
a.xu3.asor_swn %vd xu3.56 xu3.clamp %gd xu3.56 xu3.clamp xu3:as_vswitch_2
MIF-ERROR - unable to find definition of model xu3:as_vswitch_2
Error on line 0 :
a.xu3.as1 %vd xu3.sw_ol xu3.mid %gd xu3.28 xu3.29 xu3:as_vswitch_3
MIF-ERROR - unable to find definition of model xu3:as_vswitch_3
Error on line 0 :
a.xu3.as7 %vd 0 output_3 %gd 0 output_3 xu3:as_vswitch_4
MIF-ERROR - unable to find definition of model xu3:as_vswitch_4
Error on line 0 :
a.xu3.as6 %vd output_3 +5v %gd output_3 +5v xu3:as_vswitch_5
MIF-ERROR - unable to find definition of model xu3:as_vswitch_5
Warning: Model issue on line 0 :
.model xu3:as_vswitch_1 aswitch(r_on=10m r_off=1t cntl_on=10m cntl_off=0 ...
Unknown model type aswitch - ignored
Warning: Model issue on line 0 :
.model xu3:as_vswitch_2 aswitch(r_on=10m r_off=1t cntl_on=10m cntl_off=0 ...
Unknown model type aswitch - ignored
Warning: Model issue on line 0 :
.model xu3:as_vswitch_3 aswitch(r_on=1m r_off=1t cntl_on=500m cntl_off=1 ...
Unknown model type aswitch - ignored
Warning: Model issue on line 0 :
.model xu3:as_vswitch_4 aswitch(r_on=50 r_off=1t cntl_on=500m cntl_off=4 ...
Unknown model type aswitch - ignored
Warning: Model issue on line 0 :
.model xu3:as_vswitch_5 aswitch(r_on=50 r_off=1t cntl_on=500m cntl_off=4 ...
Unknown model type aswitch - ignored
Background thread stopped with timeout = 0
Reducing trtol to 1 for xspice 'A' devices
Doing analysis at TEMP = 27.000000 and TNOM = 27.000000
Warning: v2: no DC value, transient time 0 value used
Warning: v1: no DC value, transient time 0 value used

test-lm2.bak1.tar.gz (8.1 KB)
I am using ngSpice 30 built myself.
If I remove the file ~/.spiceinit the simulation does not work at all:
Circuit: KiCad schematic
Error: no such function 'if'
Error: no such function 'if'
Error: no such function 'if'
Error: no such function 'if'
Error: no such function 'if'
Error: no such function 'if'
Error: no such function 'if'
Error: no such function 'if'
Error: no such function 'if'
Error: no such function 'if'
Error: no such function 'if'
PTerror: syntax error
Warning: Model issue on line 0 :
.model xu3:r_noiseless res(t_abs=-273.15) ...
unrecognized parameter (t_abs) - ignored
Error on line 0 :
b.xu3.xu3.be1 xu3.xu3.e1_int1 0 v= if ( v(xu3.24,xu3.mid) < v(xu3.vee_b,xu3.mid) - 3.0000000000e-01 , v(xu3.vcc_b,xu3.mid) , v(xu3.24,xu3.mid) )
parameter value out of range or the wrong type
Error on line 0 :
b.xu3.xu3.be2 xu3.xu3.e2_int1 0 v= if ( v(xu3.25,xu3.mid) < v(xu3.vee_b,xu3.mid) - 3.0000000000e-01 , v(xu3.vcc_b,xu3.mid) , v(xu3.25,xu3.mid) )
parameter value out of range or the wrong type
Error on line 0 :
b.xu3.xu1.bgcr xu3.xu1.gcr_int1 0 v= if ( ( abs ( v(xu3.xu1.zc,xu3.mid) ) <= 9.0000000000e-01 ) , 0.0000000000e+00 , 1.0000000000e+00 )
parameter value out of range or the wrong type
Error on line 0 :
b.xu3.xiqpos.bg1 xu3.xiqpos.g1_int1 0 v= if ( ( v(xu3.vimon,xu3.mid) <= 0.0000000000e+00 ) , 0.0000000000e+00 , ( 1.00000000000000002e-03 ) * v(xu3.vimon,xu3.mid) )
parameter value out of range or the wrong type
Error on line 0 :
b.xu3.xiqneg.bg1 xu3.xiqneg.g1_int1 0 v= if ( ( v(xu3.mid,xu3.vimon) <= 0.0000000000e+00 ) , 0.0000000000e+00 , ( 1.00000000000000002e-03 ) * v(xu3.mid,xu3.vimon) )
parameter value out of range or the wrong type
Error on line 0 :
b.xu3.xcl_amp.bgvo+ xu3.xcl_amp.gvo+_int1 0 v= if ( v(xu3.vimon,xu3.mid) > v(xu3.51,xu3.mid) , ( ( v(xu3.vimon,xu3.mid) - v(xu3.51,xu3.mid) ) * ( 1.00000000000000000e+00 ) ) , 0.0000000000e+00 )
parameter value out of range or the wrong type
Error on line 0 :
b.xu3.xcl_amp.bgvo- xu3.xcl_amp.gvo-_int1 0 v= if ( v(xu3.vimon,xu3.mid) < v(xu3.52,xu3.mid) , ( ( v(xu3.52,xu3.mid) - v(xu3.vimon,xu3.mid) ) * ( 1.00000000000000000e+00 ) ) , 0.0000000000e+00 )
parameter value out of range or the wrong type
Error on line 0 :
s.xu3.sor_swp xu3.clamp xu3.55 xu3.clamp xu3.55 xu3:s_vswitch_1
Unable to find definition of model xu3:s_vswitch_1 - default assumed
Error on line 0 :
s.xu3.sor_swn xu3.56 xu3.clamp xu3.56 xu3.clamp xu3:s_vswitch_2
Unable to find definition of model xu3:s_vswitch_2 - default assumed
Error on line 0 :
b.xu3.xgr_amp.bgvo+ xu3.xgr_amp.gvo+_int1 0 v= if ( v(xu3.59,xu3.mid) > v(xu3.57,xu3.mid) , ( ( v(xu3.59,xu3.mid) - v(xu3.57,xu3.mid) ) * ( 1.00000000000000000e+01 ) ) , 0.0000000000e+00 )
parameter value out of range or the wrong type
Error on line 0 :
b.xu3.xgr_amp.bgvo- xu3.xgr_amp.gvo-_int1 0 v= if ( v(xu3.59,xu3.mid) < v(xu3.58,xu3.mid) , ( ( v(xu3.58,xu3.mid) - v(xu3.59,xu3.mid) ) * ( 1.00000000000000000e+01 ) ) , 0.0000000000e+00 )
parameter value out of range or the wrong type
Error on line 0 :
b.xu3.xclaw_amp.bgvo+ xu3.xclaw_amp.gvo+_int1 0 v= if ( v(xu3.vout_s,xu3.mid) > v(xu3.vcc_clp,xu3.mid) , ( ( v(xu3.vout_s,xu3.mid) - v(xu3.vcc_clp,xu3.mid) ) * ( 1.00000000000000000e+00 ) ) , 0.0000000000e+00 )
parameter value out of range or the wrong type
Error on line 0 :
b.xu3.xclaw_amp.bgvo- xu3.xclaw_amp.gvo-_int1 0 v= if ( v(xu3.vout_s,xu3.mid) < v(xu3.vee_clp,xu3.mid) , ( ( v(xu3.vee_clp,xu3.mid) - v(xu3.vout_s,xu3.mid) ) * ( 1.00000000000000000e+00 ) ) , 0.0000000000e+00 )
parameter value out of range or the wrong type
Error on line 0 :
b.xu3.xol_sense.bgsw+ xu3.xol_sense.gsw+_int1 0 v= if ( ( v(xu3.40,xu3.mid) > 1.0000000000e-02 | v(xu3.38,xu3.mid) > 1.0000000000e-02 ) , 1.0000000000e+00 , 0.0000000000e+00 )
parameter value out of range or the wrong type
Error on line 0 :
s.xu3.s1 xu3.28 xu3.29 xu3.sw_ol xu3.mid xu3:s_vswitch_3
Unable to find definition of model xu3:s_vswitch_3 - default assumed
Error on line 0 :
s.xu3.s7 0 output_3 0 output_3 xu3:s_vswitch_4
Unable to find definition of model xu3:s_vswitch_4 - default assumed
Error on line 0 :
s.xu3.s6 output_3 +5v output_3 +5v xu3:s_vswitch_5
Unable to find definition of model xu3:s_vswitch_5 - default assumed
Warning: Model issue on line 0 :
.model xu3:s_vswitch_1 vswitch (ron=10m roff=1t von=10m voff=0) ...
Unknown model type vswitch - ignored
Warning: Model issue on line 0 :
.model xu3:s_vswitch_2 vswitch (ron=10m roff=1t von=10m voff=0) ...
Unknown model type vswitch - ignored
Warning: Model issue on line 0 :
.model xu3:s_vswitch_3 vswitch (ron=1m roff=1t von=500m voff=100m) ...
Unknown model type vswitch - ignored
Warning: Model issue on line 0 :
.model xu3:s_vswitch_4 vswitch (ron=50 roff=1t von=500m voff=450m) ...
Unknown model type vswitch - ignored
Warning: Model issue on line 0 :
.model xu3:s_vswitch_5 vswitch (ron=50 roff=1t von=500m voff=450m) ...
Unknown model type vswitch - ignored
Doing analysis at TEMP = 27.000000 and TNOM = 27.000000
doAnalyses: parameter value out of range or the wrong type
run simulation(s) aborted
