# Question on Xpress.license function

**URL:** <https://discourse.julialang.org/t/question-on-xpress-license-function/77762>\
**Category:** Optimization (Mathematical)\
**Tags:** jump\
**Created:** [March 11, 2022, 4:20pm UTC](https://discourse.julialang.org/t/question-on-xpress-license-function/77762 "2022-03-11T16:20:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marie](https://avatars.discourse-cdn.com/v4/letter/m/bc8723/32.png) [@Marie](https://discourse.julialang.org/u/Marie)\
**Post date:** [March 11, 2022, 4:20pm UTC](https://discourse.julialang.org/t/question-on-xpress-license-function/77762/1 "2022-03-11T16:20:30Z")

</div>

I am using Xpress and JuMP packages to solve LP problem. First i need to initialize xpress license. There’s a function under Xpress lib.jl:

‘’’  
function XPRSlicense(\_i1, \_c1)

```
ccall((:XPRSlicense, libxprs), Cint, (Ptr{Cint}, Cstring), _i1, _c1)

```

end  
‘’’  
Which arguments should I provide?  
For example, in C# - i would call XPRS.License(ref oemVal, ref oemMsg) where first arg is int and second one is string.  
That didn’t work with Xpress.license function.  
Thanks for your help!

---

<div class="post-metadata">

**Author:** ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Post date:** [March 11, 2022, 5:04pm UTC](https://discourse.julialang.org/t/question-on-xpress-license-function/77762/2 "2022-03-11T17:04:11Z")

</div>

If you are using `Xpress.jl` and `JuMP.jl` you should not need to call `XPRSlicense(_i1, _c1)` by hand, just have the license file in the expected folder. I have used both together in the past and I did not need to validate the license manually, this is done automatically.

---

<div class="post-metadata">

**Author:** ![Marie](https://avatars.discourse-cdn.com/v4/letter/m/bc8723/32.png) [@Marie](https://discourse.julialang.org/u/Marie)\
**Post date:** [March 11, 2022, 5:38pm UTC](https://discourse.julialang.org/t/question-on-xpress-license-function/77762/3 "2022-03-11T17:38:21Z")

</div>

I have an official xpauth.xpr from fico and their’s trial one that comes with xpress install. If i use official xpauth.xpr in my xpress/bin - it gives me an error that "This is an OEM license but the specified OEM number is incorrect. " If i remove oem part from .xpr file - it give me “invalid signature” error. So I’ve been using the trial xpauth.xpr - which is initialized fine. I wonder if the trial one has limitations on problem size, such as number of rows and columns.  
In our C# code we adjust OEM value to make it work with officially provided .xpr.

---

<div class="post-metadata">

**Author:** ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Post date:** [March 11, 2022, 5:43pm UTC](https://discourse.julialang.org/t/question-on-xpress-license-function/77762/4 "2022-03-11T17:43:06Z")

</div>

I have never needed to change the OEM number, so I cannot help you with that. I have used specific machine licenses in the past, but they always worked out of the box.

---

<div class="post-metadata">

**Author:** ![Marie](https://avatars.discourse-cdn.com/v4/letter/m/bc8723/32.png) [@Marie](https://discourse.julialang.org/u/Marie)\
**Post date:** [March 11, 2022, 6:09pm UTC](https://discourse.julialang.org/t/question-on-xpress-license-function/77762/5 "2022-03-11T18:09:50Z")

</div>

Thank you, that was very helpful feedback. I’ll see what can be done on our side.
