File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -123,28 +123,20 @@ function panua_is_licensed()
123
123
elseif PARDISO_LICENSED[]
124
124
return true
125
125
end
126
+ # Suppress unwanted output from pardisoinit, which prints license info to stdout
126
127
redirect_stdout (devnull ) do
127
128
try
128
129
ps = PardisoSolver (;loadchecks = false )
129
- pardisoinit (ps) # errors if unlicensed
130
+ pardisoinit (ps) # errors if unlicensed
130
131
PARDISO_LICENSED[] = true
131
132
return true
132
133
catch e
133
- if isa (e, ErrorException) && occursin ( r" (?i)licen[cs]e|unlicensed|not licensed " , e . msg )
134
+ if isa (e, PardisoException )
134
135
return false
135
136
else
136
137
rethrow (e)
137
138
end
138
- try
139
- ps = PardisoSolver (;loadchecks = false )
140
- # Suppress unwanted output from pardisoinit, which prints license info to stdout
141
- redirect_stdout (devnull ) do
142
- pardisoinit (ps) # errors if unlicensed
143
139
end
144
- PARDISO_LICENSED[] = true
145
- return true
146
- catch e
147
- return false
148
140
end
149
141
end
150
142
You can’t perform that action at this time.
0 commit comments