Tuple size issues

When I run a small size problem I don’t have issues but when my problem is larger my code crashes with some kind of exception error. I will paste the error below. I was able to isolate the issue. It is due to the size of a Tuple I am creating. More specifically, after I successfully create the Tuple I am trying to create a set of decision variable for CPLEX model in the size of that tuple. I have another set of decisions variable which works fine. Is there a way to get around this problem? Thanks

For example:
T1 = Tuple((X1[q], Y1[q], Z1[q]) for q in 1:NumT1)
T2 = Tuple((X2[q], Y2[q], Z2[q]) for q in 1:NumT2)

X1 = @variable(CPLEXModel, X1[(l,j,k) in T1], Bin)
X2 = @variable(CPLEXModel, X2[(j,i,k) in T2], Bin)

I am able to create T1 and T2 (no problems here)
X1 causes no problems (NumT1 is in the order of 500)
X2 is the issue (NumT2 is in the order of 15,000)

The Error I get is:

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: UNKNOWN at 0x7ffb82714f99 – RaiseException at C:\WINDOWS\System32\KERNELBASE.dll (unknown line)
in expression starting at C:\Users\burak\HanaProject\GHG Only\SupplyChainDesign.jl:66
RaiseException at C:\WINDOWS\System32\KERNELBASE.dll (unknown line)
_Unwind_RaiseException at /workspace/srcdir/gcc-8.1.0/libgcc\unwind-seh.c:334
__cxa_throw at /workspace/srcdir/gcc-9.1.0/libstdc+±v3/libsupc++\eh_throw.cc:90
operator new at /workspace/srcdir/gcc-9.1.0/libstdc+±v3/libsupc++\new_op.cc:54
_ZN4llvm20BumpPtrAllocatorImplINS_15MallocAllocatorELy4096ELy4096ELy128EE8AllocateEyNS_5AlignE at C:\julia\bin\LLVM.dll (unknown line)
_ZN4llvm12SelectionDAG14createOperandsEPNS_6SDNodeENS_8ArrayRefINS_7SDValueEEE at C:\julia\bin\LLVM.dll (unknown line)
_ZN4llvm12SelectionDAG7getNodeEjRKNS_5SDLocENS_8SDVTListENS_8ArrayRefINS_7SDValueEEENS_11SDNodeFlagsE at C:\julia\bin\LLVM.dll (unknown line)
_ZN4llvm19SelectionDAGBuilder16visitInsertValueERKNS_4UserE at C:\julia\bin\LLVM.dll (unknown line)
_ZN4llvm19SelectionDAGBuilder5visitERKNS_11InstructionE at C:\julia\bin\LLVM.dll (unknown line)
_ZN4llvm16SelectionDAGISel16SelectBasicBlockENS_14ilist_iteratorINS_12ilist_detail12node_optionsINS_11InstructionELb0ELb0EvEELb0ELb1EEES6_Rb at C:\julia\bin\LLVM.dll (unknown line)
_ZN4llvm16SelectionDAGISel20SelectAllBasicBlocksERKNS_8FunctionE at C:\julia\bin\LLVM.dll (unknown line)
_ZN4llvm16SelectionDAGISel20runOnMachineFunctionERNS_15MachineFunctionE.part.908 at C:\julia\bin\LLVM.dll (unknown line)
_ZN12_GLOBAL__N_115X86DAGToDAGISel20runOnMachineFunctionERN4llvm15MachineFunctionE at C:\julia\bin\LLVM.dll (unknown line)
_ZN4llvm19MachineFunctionPass13runOnFunctionERNS_8FunctionE at C:\julia\bin\LLVM.dll (unknown line)
_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE at C:\julia\bin\LLVM.dll (unknown line)
_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE at C:\julia\bin\LLVM.dll (unknown line)
_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE at C:\julia\bin\LLVM.dll (unknown line)

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: UNKNOWN at 0x7ffb82714f99 –

Tuples are supposed to be small, use vectors instead:

T1 = [(X1[q], Y1[q], Z1[q]) for q in 1:NumT1]
T2 = [(X2[q], Y2[q], Z2[q]) for q in 1:NumT2]
1 Like

Thank you. This worked. Basically I crated the same data structure but did not define it as a Tuple.