   cudaMalloc(&numNeighbours, g->numvertices * sizeof(int));
   cudaMalloc(&tra, g->numvertices * sizeof(float));
   cudaMalloc(&swg, g->numvertices * sizeof(float));
-  cudaMalloc(&speed, g->numvertices * sizeof(float));
   cudaMalloc(&oldForceX, g->numvertices * sizeof(float));
   cudaMalloc(&oldForceY, g->numvertices * sizeof(float));
   cudaMalloc(&graphSwing, sizeof(float));

  fa2UpdateTract(gid, numvertices, forceX, forceY, oldForceX, oldForceY, tra);

  // Update speed of vertices.
  fa2UpdateSpeed(gid, numvertices, speed, swg, forceX, forceY, graphSpeed);

  // Update displacement of vertices.
  fa2UpdateDisplacement(gid, numvertices, speed, forceX, forceY, &dispX, &dispY);

        numNeighbours,
        tra,
        swg,
        oldForceX,
        oldForceY,
        graphSwing,
