Loading Makefile +3 −6 Original line number Diff line number Diff line Loading @@ -52,9 +52,6 @@ OPT += -DPHASE_ON # Support CFITSIO !!! Remember to add the path to the CFITSIO library to LD_LIBRARY_PATH #OPT += -DFITSIO # Perform true parallel images writing OPT += -DPARALLELIO # Normalize uvw in case it is not done in the binMS #OPT += -DNORMALIZE_UVW Loading @@ -74,13 +71,13 @@ OPT += -DGAUSS #OPT += -DNVIDIA #use cuda for GPUs OPT += -DCUDACC #OPT += -DCUDACC # use GPU acceleration via OMP #OPT += -DACCOMP # perform stacking on GPUs OPT += -DGPU_STACKING #OPT += -DGPU_STACKING # use NVIDIA GPU to perform the reduce #OPT += -DNCCL_REDUCE Loading @@ -89,7 +86,7 @@ OPT += -DGPU_STACKING #OPT += -DRCCL_REDUCE # use GPU to perform FFT OPT += -DCUFFTMP #OPT += -DCUFFTMP #support for AMD GPUs #OPT += __HIP_PLATFORM_AMD__ Loading fourier_transform.c +9 −40 Original line number Diff line number Diff line Loading @@ -280,41 +280,12 @@ void write_fftw_data(){ fits_write_subset(fptrimg, TDOUBLE, fpixel, lpixel, image_imag, &status); fits_close_file(fptrimg, &status); #endif //FITSIO for (int isector=0; isector<size; isector++) { MPI_Barrier(MPI_COMM_WORLD); if(isector == rank) { printf("%d writing\n",isector); #ifdef FITSIO fpixel[0] = 1; fpixel[1] = isector*yaxis+1; lpixel[0] = xaxis; lpixel[1] = (isector+1)*yaxis; status = 0; fits_open_image(&fptreal, testfitsreal, READWRITE, &status); fits_write_subset(fptreal, TDOUBLE, fpixel, lpixel, image_real, &status); fits_close_file(fptreal, &status); status = 0; fits_open_image(&fptrimg, testfitsimag, READWRITE, &status); fits_write_subset(fptrimg, TDOUBLE, fpixel, lpixel, image_imag, &status); fits_close_file(fptrimg, &status); #endif //FITSIO file.pFilereal = fopen (out.fftfile2,"ab"); file.pFileimg = fopen (out.fftfile3,"ab"); uint global_index = isector*(xaxis*yaxis)*sizeof(double); uint global_index = rank*(xaxis*yaxis)*sizeof(double); fseek(file.pFilereal, global_index, SEEK_SET); fwrite(image_real, xaxis*yaxis, sizeof(double), file.pFilereal); Loading @@ -323,8 +294,6 @@ void write_fftw_data(){ fclose(file.pFilereal); fclose(file.pFileimg); } } MPI_Barrier(MPI_COMM_WORLD); Loading main.c +13 −2 Original line number Diff line number Diff line Loading @@ -70,8 +70,19 @@ int main(int argc, char * argv[]) MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &size); if(rank == 0) printf("Runn ing with %d MPI tasks\n", size); { printf("\n"); printf("RRR III CCCC K K\n"); printf("R R I C K K \n"); printf("RRR I C KK \n"); printf("R R I C K K \n"); printf("R R III CCCC K K\n"); printf("\n"); printf("Radio Imaging Code Kernels (v2.0.0)\n"); printf("\n"); printf("Running with %d MPI tasks\n", size); } MPI_Comm_dup(MPI_COMM_WORLD, &MYMPI_COMM_WORLD); FFT_INIT; Loading Loading
Makefile +3 −6 Original line number Diff line number Diff line Loading @@ -52,9 +52,6 @@ OPT += -DPHASE_ON # Support CFITSIO !!! Remember to add the path to the CFITSIO library to LD_LIBRARY_PATH #OPT += -DFITSIO # Perform true parallel images writing OPT += -DPARALLELIO # Normalize uvw in case it is not done in the binMS #OPT += -DNORMALIZE_UVW Loading @@ -74,13 +71,13 @@ OPT += -DGAUSS #OPT += -DNVIDIA #use cuda for GPUs OPT += -DCUDACC #OPT += -DCUDACC # use GPU acceleration via OMP #OPT += -DACCOMP # perform stacking on GPUs OPT += -DGPU_STACKING #OPT += -DGPU_STACKING # use NVIDIA GPU to perform the reduce #OPT += -DNCCL_REDUCE Loading @@ -89,7 +86,7 @@ OPT += -DGPU_STACKING #OPT += -DRCCL_REDUCE # use GPU to perform FFT OPT += -DCUFFTMP #OPT += -DCUFFTMP #support for AMD GPUs #OPT += __HIP_PLATFORM_AMD__ Loading
fourier_transform.c +9 −40 Original line number Diff line number Diff line Loading @@ -280,41 +280,12 @@ void write_fftw_data(){ fits_write_subset(fptrimg, TDOUBLE, fpixel, lpixel, image_imag, &status); fits_close_file(fptrimg, &status); #endif //FITSIO for (int isector=0; isector<size; isector++) { MPI_Barrier(MPI_COMM_WORLD); if(isector == rank) { printf("%d writing\n",isector); #ifdef FITSIO fpixel[0] = 1; fpixel[1] = isector*yaxis+1; lpixel[0] = xaxis; lpixel[1] = (isector+1)*yaxis; status = 0; fits_open_image(&fptreal, testfitsreal, READWRITE, &status); fits_write_subset(fptreal, TDOUBLE, fpixel, lpixel, image_real, &status); fits_close_file(fptreal, &status); status = 0; fits_open_image(&fptrimg, testfitsimag, READWRITE, &status); fits_write_subset(fptrimg, TDOUBLE, fpixel, lpixel, image_imag, &status); fits_close_file(fptrimg, &status); #endif //FITSIO file.pFilereal = fopen (out.fftfile2,"ab"); file.pFileimg = fopen (out.fftfile3,"ab"); uint global_index = isector*(xaxis*yaxis)*sizeof(double); uint global_index = rank*(xaxis*yaxis)*sizeof(double); fseek(file.pFilereal, global_index, SEEK_SET); fwrite(image_real, xaxis*yaxis, sizeof(double), file.pFilereal); Loading @@ -323,8 +294,6 @@ void write_fftw_data(){ fclose(file.pFilereal); fclose(file.pFileimg); } } MPI_Barrier(MPI_COMM_WORLD); Loading
main.c +13 −2 Original line number Diff line number Diff line Loading @@ -70,8 +70,19 @@ int main(int argc, char * argv[]) MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &size); if(rank == 0) printf("Runn ing with %d MPI tasks\n", size); { printf("\n"); printf("RRR III CCCC K K\n"); printf("R R I C K K \n"); printf("RRR I C KK \n"); printf("R R I C K K \n"); printf("R R III CCCC K K\n"); printf("\n"); printf("Radio Imaging Code Kernels (v2.0.0)\n"); printf("\n"); printf("Running with %d MPI tasks\n", size); } MPI_Comm_dup(MPI_COMM_WORLD, &MYMPI_COMM_WORLD); FFT_INIT; Loading