     T *h_aggregate = new T[TOTAL_ITEMS];
 
     // Initialize problem
-    T aggregates[NUM_WARPS];
+    T aggregates[MAX_WARPS];
 
     Initialize(
         gen_mode,

        LOGICAL_WARP_THREADS,
        scan_op,
        initial_value,
        aggregates);

    if (g_verbose)
    {

/******************************************************************************
 * Copyright (c) 2011, Duane Merrill.  All rights reserved.
 * Copyright (c) 2011-2022, NVIDIA CORPORATION.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
