google / or-tools

Google's Operations Research tools:
https://developers.google.com/optimization/
Apache License 2.0
11k stars 2.1k forks source link

Migration fails from 9.7 to 9.10 due to missing AVX Instruction Set #4343

Open daniatic opened 1 month ago

daniatic commented 1 month ago

What version of OR-Tools and what language are you using? Version: 9.10 Language: any

Which solver are you using (e.g. CP-SAT, Routing Solver, GLOP, BOP, Gurobi) GLOP | LinearSolver | CLP_LINEAR_PROGRAMMING

What operating system (Linux, Windows, ...) and version? Windows 10

What did you do? Steps to reproduce the behavior:

  1. Create a medium to large size model (very small models just work)
  2. Call Solver.Solve
  3. Observe it crashing

What did you expect to see That it not crashes the whole process, but rather throws an exception like "Google OrTools requires AVX instruction set to run properly".

What did you see instead? SEHException 0xc000001d

Make sure you include information that can help us debug (full error message, model Proto).

The exception arises from the vcmpgtpd instruction which is part of the AVX Instruction Set, which was not required on 9.7 and before.

Anything else we should know about your project / environment

lperron commented 1 month ago

which solver did you use ? glop or clp ?

daniatic commented 1 month ago

We used the default solver, so I think GLOP. Thats my instantiation statement in .net:

new Google.OrTools.LinearSolver.Solver("LinearSolver", Solver.OptimizationProblemType.CLP_LINEAR_PROGRAMMING)

lperron commented 1 month ago

No, you use CLP

Can you try with glop?

Le lun. 12 août 2024, 05:18, daniatic @.***> a écrit :

We used the default solver, so I think GLOP. Thats my instantiation statement in .net:

new Google.OrTools.LinearSolver.Solver("LinearSolver", Solver.OptimizationProblemType.CLP_LINEAR_PROGRAMMING)

— Reply to this email directly, view it on GitHub https://github.com/google/or-tools/issues/4343#issuecomment-2283818855, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACUPL3JQOYMXSJPQGFPVL7LZRCR2HAVCNFSM6AAAAABML76P3CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBTHAYTQOBVGU . You are receiving this because you commented.Message ID: @.***>

daniatic commented 1 month ago

Excuse me! My Fault. We're obviously using clp! Using glop it works just fine. So there is an update of clp that causes that issue? Nonetheless, the failing instruction comes directly from google-ortools-native: image

lperron commented 1 month ago

The CLP code or build instructions have not changed in years.

Le lun. 12 août 2024, 06:23, daniatic @.***> a écrit :

Excuse me! My Fault. We're obviously using clp! Using glop it works just fine. So there is an update of clp that causes that issue? Nonetheless, the failing instruction comes directly from google-ortools-native: image.png (view on web) https://github.com/user-attachments/assets/7b74beba-8fe3-4e4b-a8aa-d5fa3f617a61

— Reply to this email directly, view it on GitHub https://github.com/google/or-tools/issues/4343#issuecomment-2283984101, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACUPL3KBL4RTTZCBZEWH5BDZRCZN3AVCNFSM6AAAAABML76P3CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBTHE4DIMJQGE . You are receiving this because you commented.Message ID: @.***>

daniatic commented 1 month ago

Thats very odd. I can just in place replace the google-ortools-native.dll between 9.7 and 9.10 and with 9.7 it works and with 9.10 it fails...

daniatic commented 1 month ago

I tried to tackle down the origin of the call from google-ortools-native directly, but I was unable to build google-ortools on my machine, due to duplicate symbol error from Mutex. If I only had the symbol files I could investigate where the error comes from. @lperron could you provide the symbol files directly for windows and 9.10?

Mizux commented 1 month ago

@daniatic I can create a 9.11 pre-release, windows only, package if you want. Which language did you want C#/nuget, Java/Maven or Python/Wheel ?

daniatic commented 1 month ago

@Mizux that would be great. I need c# nuget.

Mizux commented 1 month ago

Here a Windows only or-tools v9.11 RC nupkg... export.zip

note: In your csproj simply add a relative path so the csproj can found it

Project.csproj:

<Project Sdk="Microsoft.NET.Sdk">
...
  <!-- Dependencies -->
  <PropertyGroup>
     <RestoreSources>path_to_find_it;$(RestoreSources);https://api.nuget.org/v3/index.json</RestoreSources>
  </PropertyGroup>
daniatic commented 1 month ago

I just unpacked the NuGet packages, but I couldn't find the PDB symbol files for the native DLL, which I need to trace the origin of the exception.

Or did you want me to try the latest version to see if the exception still occurs?

lperron commented 1 month ago

Please check of the error still occurs.

Thanks

Le mer. 14 août 2024, 06:02, daniatic @.***> a écrit :

I just unpacked the NuGet packages, but I couldn't find the PDB symbol files for the native DLL, which I need to trace the origin of the exception.

Or did you want me to try the latest version to see if the exception still occurs?

— Reply to this email directly, view it on GitHub https://github.com/google/or-tools/issues/4343#issuecomment-2288681936, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACUPL3LBCRKM47VSRRXY5RLZRNIQHAVCNFSM6AAAAABML76P3CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBYGY4DCOJTGY . You are receiving this because you were mentioned.Message ID: @.***>

daniatic commented 1 month ago

Unfortunately we just updated the virtual machine so that it exposes the AVX instruction set, so I'm no longer able to test it. I asked my IT if we still have machines that do not expose it or if they could create me one instance, so that I can test it. I'll keep you updated.

daniatic commented 1 month ago

My IT still had one machine where I tried it with the provided 9.11 Version but error still persists. Now we'll also update that machine, so will not be able to test any further. If you want to look into it further it should be possible by starting up a windows virtual machine with qemu and leaving the default cpu as is: https://www.qemu.org/docs/master/system/i386/cpu.html#default-x86-cpu-models

Thank you for your support.