Skip to content

Commit 608f504

Browse files
committed
Per #131, removed duplicate lines and moved gpuErrchk line which would have been lost in the deletion.
1 parent e72d44a commit 608f504

1 file changed

Lines changed: 2 additions & 31 deletions

File tree

SRC/HYDRO_CORE/CUDA/cuda_hydroCoreDevice.cu

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -146,36 +146,6 @@ extern "C" int cuda_hydroCoreDeviceSetup(){
146146
errorCode = cuda_auxScalarsDeviceSetup();
147147
}//end if NhydroAuxScalars > 0
148148

149-
/*PRESSURE*/
150-
if(pgfSelector > 0){
151-
errorCode = cuda_pressureDeviceSetup();
152-
}//end if pgfSelector > 0
153-
154-
/*BASESTATE*/
155-
errorCode = cuda_BaseStateDeviceSetup();
156-
157-
/*SGSTURB*/
158-
if(turbulenceSelector > 0){
159-
errorCode = cuda_sgsTurbDeviceSetup();
160-
/* SGSTKE */
161-
if (TKESelector > 0) {
162-
errorCode = cuda_sgstkeDeviceSetup();
163-
} // end if TKESelector > 0
164-
}//end if turbulenceSelector > 0
165-
166-
if (diffusionSelector > 0) {
167-
errorCode = cuda_molecularDiffDeviceSetup();
168-
}
169-
if (surflayerSelector > 0) {
170-
errorCode = cuda_surfaceLayerDeviceSetup();
171-
}
172-
gpuErrchk( cudaPeekAtLastError() ); /*Check for errors in the cudaMalloc calls*/
173-
174-
/* CANOPY */
175-
if (canopySelector > 0){
176-
errorCode = cuda_canopyDeviceSetup();
177-
}
178-
179149
/*ADVECTION*/
180150
if(advectionSelector >= 0){
181151
errorCode = cuda_advectionDeviceSetup();
@@ -204,7 +174,8 @@ extern "C" int cuda_hydroCoreDeviceSetup(){
204174
if (surflayerSelector > 0) {
205175
errorCode = cuda_surfaceLayerDeviceSetup();
206176
}
207-
177+
gpuErrchk( cudaPeekAtLastError() ); /*Check for errors in the cudaMalloc calls*/
178+
208179
/* CELL PERTURBATION METHOD */
209180
if (cellpertSelector > 0) {
210181
errorCode = cuda_cellpertDeviceSetup();

0 commit comments

Comments
 (0)