# Tuple size issues

**URL:** <https://discourse.julialang.org/t/tuple-size-issues/70107>\
**Category:** General Usage\
**Tags:** question\
**Created:** [October 20, 2021, 5:37pm UTC](https://discourse.julialang.org/t/tuple-size-issues/70107 "2021-10-20T17:37:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brock](https://avatars.discourse-cdn.com/v4/letter/b/a8b319/32.png) [@Brock](https://discourse.julialang.org/u/Brock)\
**Post date:** [October 20, 2021, 5:37pm UTC](https://discourse.julialang.org/t/tuple-size-issues/70107/1 "2021-10-20T17:37:49Z")

</div>

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 –

---

<div class="post-metadata">

**Author:** ![cjdoris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cjdoris/32/213133_2.png) [@cjdoris](https://discourse.julialang.org/u/cjdoris)\
**Post date:** [October 20, 2021, 5:42pm UTC](https://discourse.julialang.org/t/tuple-size-issues/70107/2 "2021-10-20T17:42:03Z")

</div>

Tuples are supposed to be small, use vectors instead:

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

```

---

<div class="post-metadata">

**Author:** ![Brock](https://avatars.discourse-cdn.com/v4/letter/b/a8b319/32.png) [@Brock](https://discourse.julialang.org/u/Brock)\
**Post date:** [October 20, 2021, 7:49pm UTC](https://discourse.julialang.org/t/tuple-size-issues/70107/3 "2021-10-20T19:49:59Z")

</div>

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