 	cudaThreadSynchronize();
 	CUT_CHECK_ERROR("Kernel execution failed: IntegrateInTimeD");
 #else
-	IntegrateInTimeD __KERNEL__(nBlock_FlexBodies, nThreads_FlexBodies)(
+	IntegrateInTimeD(
 			R3CAST(ANCF_NodesH2), R3CAST(ANCF_SlopesH2), R3CAST(ANCF_NodesVelH2), R3CAST(ANCF_SlopesVelH2),
 			R3CAST(ANCF_NodesVelH), R3CAST(ANCF_SlopesVelH), R3CAST(ANCF_NodesAccH), R3CAST(ANCF_SlopesAccH),
 			I2CAST(ANCF_ReferenceArrayNodesOnBeamsH), BCAST(ANCF_IsCantileverH));
-	cudaThreadSynchronize();
-	CUT_CHECK_ERROR("Kernel execution failed: IntegrateInTimeD");
-#endif
+#endif
+
+	printf("a3\n");
+
 
 	ANCF_NodesAccD.clear();
 	ANCF_SlopesAccD.clear();
 	ANCF_NodesAccH.clear();
 	ANCF_SlopesAccH.clear();
+	printf("a4\n");
 
 	//---------------------------------------------
 

	cudaThreadSynchronize();
	CUT_CHECK_ERROR("Kernel execution failed: CalcElasticForcesD");
#else
	CalcElasticForcesD __KERNEL__(nBlock_FlexBodies, nThreads_FlexBodies)(
			R3CAST(flex_FSI_NodesForcesH1), R3CAST(flex_FSI_NodesForcesH2),
			R3CAST(ANCF_NodesH), R3CAST(ANCF_SlopesH), R3CAST(ANCF_NodesVelH), R3CAST(ANCF_SlopesVelH),
			I2CAST(ANCF_ReferenceArrayNodesOnBeamsH), R1CAST(ANCF_Beam_LengthH));
#endif

	int totalNumberOfFlexNodes = flex_FSI_NodesForcesD1.size();
	thrust::device_vector<real3> ANCF_NodesAccD(totalNumberOfFlexNodes);
	thrust::device_vector<real3> ANCF_SlopesAccD(totalNumberOfFlexNodes);

	cutilSafeCall( cudaMemcpyToSymbolAsync(numFlexBodiesD, &numFlexBodies, sizeof(int))); //This can be updated in the future, to work with numObjectsD
	cutilSafeCall( cudaMemcpyToSymbolAsync(GQD, &GQ, sizeof(GaussQuadrature))); //This can be updated in the future, to work with numObjects
#else

	flexParamsD = flexParams;
	dTD = dT;
	numFlexBodiesD = numFlexBodies;
