     if(deviceCount>1) {
       sys[sysIndex] = new ANCFSystem(sysIndex);
     } else {
-      sys[sysIndex] = new ANCFSystem();
+      sys[sysIndex] = new ANCFSystem(); // Create both systems on the same device
     }
 
     sys[sysIndex]->setTimeStep(hh, 1e-10);

        {
          cout << "SWITCH SYSTEM " << loc_working_thread << " -> " << abs(1-loc_working_thread) << "... ";
          sys[loc_working_thread]->transferState(sys[abs(1-loc_working_thread)]);
          cout << "SWITCH COMPLETE." << endl;
        }
      }

    sys[sysIndex]->setSolverType(2);
    sys[sysIndex]->setPrecondType(0);
    sys[sysIndex]->fullJacobian = 1;

    if(argc>1) {
      sys[sysIndex]->setNumPartitions((int)atoi(argv[1]));
