Skip to content
Permalink
Browse files

Set xflag for Python/Shell scripts w/ shebang, removed trailing wspac…

…e/tabs and 'tools/mic' (#499)

Set executable flag (Python/Shell scripts w/ shebang), removed trailing whitespaces and tabs. Removed tools/mic (outdated/non-working KNC/offload support).
  • Loading branch information...
hfp committed Aug 2, 2019
1 parent 004f0d6 commit cfeaaad94f9419d87b3a00a9af9f9724f74b4b79
Showing with 85 additions and 6,885 deletions.
  1. +1 −1 src/base/machine_cpuid.c
  2. +2 −2 src/pw/cuda/fft_cuda_internal.h
  3. +34 −34 src/pw/fpga/fft_fpga.c
  4. +8 −8 src/pw/fpga/opencl_utils.c
  5. +15 −15 src/semi_empirical_int_debug.h
  6. +9 −9 src/sockets.c
  7. +2 −2 tools/autotune_grid/generate_makefile.sh
  8. +10 −10 tools/autotune_grid/get_results.sh
  9. +0 −1 tools/mic/libxstream/.gitignore
  10. +0 −28 tools/mic/libxstream/LICENSE
  11. +0 −217 tools/mic/libxstream/README.md
  12. +0 −38 tools/mic/libxstream/README.sh
  13. +0 −4 tools/mic/libxstream/include/PACKAGE
  14. +0 −238 tools/mic/libxstream/include/libxstream.h
  15. +0 −37 tools/mic/libxstream/include/libxstream_begin.h
  16. +0 −165 tools/mic/libxstream/include/libxstream_config.h
  17. +0 −33 tools/mic/libxstream/include/libxstream_end.h
  18. +0 −254 tools/mic/libxstream/include/libxstream_macros.h
  19. +0 −4 tools/mic/libxstream/samples/multi-dgemm/PACKAGE
  20. +0 −27 tools/mic/libxstream/samples/multi-dgemm/benchmark.sh
  21. +0 −217 tools/mic/libxstream/samples/multi-dgemm/benchmark.txt
  22. +0 −46 tools/mic/libxstream/samples/multi-dgemm/make.sh
  23. +0 −246 tools/mic/libxstream/samples/multi-dgemm/multi-dgemm-type.cpp
  24. +0 −87 tools/mic/libxstream/samples/multi-dgemm/multi-dgemm-type.hpp
  25. +0 −205 tools/mic/libxstream/samples/multi-dgemm/multi-dgemm.cpp
  26. +0 −9 tools/mic/libxstream/samples/multi-dgemm/multi-dgemm.sh
  27. +0 −11 tools/mic/libxstream/samples/multi-dgemm/plot.plt
  28. +0 −23 tools/mic/libxstream/samples/multi-dgemm/plot.sh
  29. +0 −4 tools/mic/libxstream/samples/test/PACKAGE
  30. +0 −46 tools/mic/libxstream/samples/test/make.sh
  31. +0 −299 tools/mic/libxstream/samples/test/test.cpp
  32. +0 −51 tools/mic/libxstream/samples/test/test.hpp
  33. +0 −4 tools/mic/libxstream/src/PACKAGE
  34. +0 −1,427 tools/mic/libxstream/src/libxstream.cpp
  35. +0 −60 tools/mic/libxstream/src/libxstream.hpp
  36. +0 −377 tools/mic/libxstream/src/libxstream_alloc.cpp
  37. +0 −64 tools/mic/libxstream/src/libxstream_alloc.hpp
  38. +0 −162 tools/mic/libxstream/src/libxstream_argument.cpp
  39. +0 −94 tools/mic/libxstream/src/libxstream_argument.hpp
  40. +0 −392 tools/mic/libxstream/src/libxstream_capture.cpp
  41. +0 −201 tools/mic/libxstream/src/libxstream_capture.hpp
  42. +0 −74 tools/mic/libxstream/src/libxstream_context.cpp
  43. +0 −50 tools/mic/libxstream/src/libxstream_context.hpp
  44. +0 −218 tools/mic/libxstream/src/libxstream_event.cpp
  45. +0 −75 tools/mic/libxstream/src/libxstream_event.hpp
  46. +0 −527 tools/mic/libxstream/src/libxstream_offload.cpp
  47. +0 −42 tools/mic/libxstream/src/libxstream_offload.hpp
  48. +0 −607 tools/mic/libxstream/src/libxstream_stream.cpp
  49. +0 −136 tools/mic/libxstream/src/libxstream_stream.hpp
  50. +1 −1 tools/package_planner/pkg_plan.txt
  51. +1 −1 tools/package_planner/plan_packages.py
  52. 0 tools/plot_mem_from_trace.py
  53. 0 tools/prettify/fprettify/__init__.py
  54. +1 −1 tools/toolchain/scripts/install_openblas.sh
  55. +1 −1 tools/toolchain/scripts/tool_kit.sh
@@ -28,7 +28,7 @@ int m_cpuid_static(void)
return CP_MACHINE_X86_SSE4;
#else
return CP_MACHINE_CPU_GENERIC;
#endif
#endif
}

#if defined(__cplusplus)
@@ -26,8 +26,8 @@ static const int max_2d_plans = 0;
static const int max_1d_plans = 30;


static const int sum_plans = max_3d_plans + max_2d_plans + max_1d_plans;
static const int max_plans = sum_plans > 1? sum_plans : 1;
static const int sum_plans = max_3d_plans + max_2d_plans + max_1d_plans;
static const int max_plans = sum_plans > 1? sum_plans : 1;

#if (__CUDACC_VER_MAJOR__<8)
// configuration(s)
@@ -38,8 +38,8 @@ void pw_fpga_final_(){
}

/******************************************************************************
* \brief check whether FFT3d can be computed on the FPGA or not. This depends
* on the availability of bitstreams whose sizes are for now listed here
* \brief check whether FFT3d can be computed on the FPGA or not. This depends
* on the availability of bitstreams whose sizes are for now listed here
* If the fft sizes are found and the FPGA is not setup before, it is done
* \param data_path - path to the data directory
* \param N - integer pointer to the size of the FFT3d
@@ -86,11 +86,11 @@ int pw_fpga_check_bitstream_(char *data_path, int N[3]){
/******************************************************************************
* \brief compute an in-place single precision complex 3D-FFT on the FPGA
* \param direction : direction - 1/forward, otherwise/backward FFT3d
* \param N : integer pointer to size of FFT3d
* \param din : complex input/output single precision data pointer
* \param N : integer pointer to size of FFT3d
* \param din : complex input/output single precision data pointer
*****************************************************************************/
void pw_fpga_fft3d_sp_(int direction, int N[3], cmplx *din) {
// setup device specific constructs
// setup device specific constructs
if(direction == 1){
fftfpga_run_3d(0, N, din);
}
@@ -102,11 +102,11 @@ void pw_fpga_fft3d_sp_(int direction, int N[3], cmplx *din) {
/******************************************************************************
* \brief compute an in-place double precision complex 3D-FFT on the FPGA
* \param direction : direction - 1/forward, otherwise/backward FFT3d
* \param N : integer pointer to size of FFT3d
* \param din : complex input/output single precision data pointer
* \param N : integer pointer to size of FFT3d
* \param din : complex input/output single precision data pointer
*****************************************************************************/
void pw_fpga_fft3d_dp_(int direction, int N[3], cmplx *din) {
// setup device specific constructs
// setup device specific constructs
if(direction == 1){
fftfpga_run_3d(0, N, din);
}
@@ -118,15 +118,15 @@ void pw_fpga_fft3d_dp_(int direction, int N[3], cmplx *din) {
/******************************************************************************
* \brief Execute a single precision complex FFT3d
* \param inverse : int
* \param N : integer pointer to size of FFT3d
* \param din : complex input/output single precision data pointer
* \param N : integer pointer to size of FFT3d
* \param din : complex input/output single precision data pointer
*****************************************************************************/
void fftfpga_run_3d(int inverse, int N[3], cmplx *c_in) {
cl_int status = 0;
int inverse_int = inverse;
cl_kernel fft_kernel = NULL, fft_kernel_2 = NULL;
cl_kernel fetch_kernel = NULL, transpose_kernel = NULL, transpose_kernel_2 = NULL;

// Device memory buffers
cl_mem d_inData, d_outData;

@@ -216,25 +216,25 @@ void fftfpga_run_3d(int inverse, int N[3], cmplx *c_in) {
queue_cleanup();

if (h_outData)
free(h_outData);
free(h_outData);
if (h_inData)
free(h_inData);
free(h_inData);

if (d_inData)
clReleaseMemObject(d_inData);
if (d_outData)
clReleaseMemObject(d_outData);

if(fetch_kernel)
clReleaseKernel(fetch_kernel);
if(fft_kernel)
clReleaseKernel(fft_kernel);
if(fft_kernel_2)
clReleaseKernel(fft_kernel_2);
if(transpose_kernel)
clReleaseKernel(transpose_kernel);
if(transpose_kernel_2)
clReleaseKernel(transpose_kernel_2);
clReleaseMemObject(d_inData);
if (d_outData)
clReleaseMemObject(d_outData);

if(fetch_kernel)
clReleaseKernel(fetch_kernel);
if(fft_kernel)
clReleaseKernel(fft_kernel);
if(fft_kernel_2)
clReleaseKernel(fft_kernel_2);
if(transpose_kernel)
clReleaseKernel(transpose_kernel);
if(transpose_kernel_2)
clReleaseKernel(transpose_kernel_2);
}


@@ -267,7 +267,7 @@ void init_program(int N[3], char *data_path){
* \brief Free resources allocated during program initialization
*****************************************************************************/
void cleanup_program(){
if(program)
if(program)
clReleaseProgram(program);
if(context)
clReleaseContext(context);
@@ -325,17 +325,17 @@ void queue_setup(){
* \brief Release all command queues
*****************************************************************************/
void queue_cleanup() {
if(queue1)
if(queue1)
clReleaseCommandQueue(queue1);
if(queue2)
if(queue2)
clReleaseCommandQueue(queue2);
if(queue3)
if(queue3)
clReleaseCommandQueue(queue3);
if(queue4)
if(queue4)
clReleaseCommandQueue(queue4);
if(queue5)
if(queue5)
clReleaseCommandQueue(queue5);
if(queue6)
if(queue6)
clReleaseCommandQueue(queue6);
}

@@ -66,7 +66,7 @@ cl_platform_id findPlatform(char *platform_name){
size_t sz;
for(i=0; i<num_platforms; i++){
// Get the size of the platform name referred to by the id
status = clGetPlatformInfo(pids[i], CL_PLATFORM_NAME, 0, NULL, &sz);
status = clGetPlatformInfo(pids[i], CL_PLATFORM_NAME, 0, NULL, &sz);
if (status != CL_SUCCESS){
printf("Query for platform info failed\n");
free(pids);
@@ -77,7 +77,7 @@ cl_platform_id findPlatform(char *platform_name){
char plat_name[sz];

// Store the name of string size
status = clGetPlatformInfo(pids[i], CL_PLATFORM_NAME, sz, pl_name, NULL);
status = clGetPlatformInfo(pids[i], CL_PLATFORM_NAME, sz, pl_name, NULL);
if (status != CL_SUCCESS){
printf("Query for platform info failed\n");
free(pids);
@@ -97,7 +97,7 @@ cl_platform_id findPlatform(char *platform_name){

/******************************************************************************
* \brief returns the list of all devices for the specfic platform
* \param platform id to search for devices
* \param platform id to search for devices
* \param specific type of device to search for
* \param total number of devices found for the given platform
* \retval array of device ids
@@ -155,7 +155,7 @@ cl_program getProgramWithBinary(cl_context context, const cl_device_id *devices,
#endif
char *foldername;
const char *filename = "fft3d.aocx";

if( !getFolderPath(&foldername, N) ){
printf("Path not found for the size (%d,%d,%d)", N[0], N[1], N[2]);
return NULL;
@@ -207,7 +207,7 @@ int getFolderPath(char **folderPath, int N[3]){
char folder[] = "syn32/";
*folderPath = malloc(strlen(folder)+1);
strncpy(*folderPath, folder, strlen(folder));
}
}
else if (N[0] == 64 && N[1] == 64 && N[2] == 64){
char folder[] = "syn64/";
*folderPath = malloc(strlen(folder)+1);
@@ -247,7 +247,7 @@ static size_t loadBinary(char *binary_path, char **buf){
}

/******************************************************************************
* \brief Allocate host side buffers to be 64-byte aligned to make use of DMA
* \brief Allocate host side buffers to be 64-byte aligned to make use of DMA
* transfer between host and global memory
* \param size in bytes : allocate size bytes multiples of 64
* \retval pointer to allocated memory on successful allocation otherwise NULL
@@ -353,7 +353,7 @@ void _checkError(const char *file, int line, const char *func, cl_int err, const
printError(err);
printf("\nError Location: %s:%d:%s\n", file, line, func);

// custom message
// custom message
va_list vl;
va_start(vl, msg);
vprintf(msg, vl);
@@ -369,7 +369,7 @@ void _checkError(const char *file, int line, const char *func, cl_int err, const
/******************************************************************************
* \brief converts a given null-terminated string to lowercase and stores in q
* \param p : null-terminated string
* \param q : string with (strlen(p)+1) length
* \param q : string with (strlen(p)+1) length
*****************************************************************************/
static void tolowercase(char *p, char *q){
int i;
@@ -9,7 +9,7 @@
!> \author Teodoro Laino [tlaino] - University of Zurich
!> \date 04.2008 [tlaino]
! *****************************************************************************
INTERFACE
INTERFACE
SUBROUTINE check_rotmat_der( sepi, sepj, rjiv, ij_matrix, do_invert)
USE kinds, ONLY: dp
USE semi_empirical_types, ONLY: rotmat_type,&
@@ -20,7 +20,7 @@ INTERFACE
TYPE(rotmat_type), POINTER :: ij_matrix
LOGICAL, INTENT(IN) :: do_invert
END SUBROUTINE check_rotmat_der
END INTERFACE
END INTERFACE

! *****************************************************************************
!> \brief Check Numerical Vs Analytical NUCINT ssss
@@ -45,7 +45,7 @@ INTERFACE
TYPE(se_int_control_type), INTENT(IN) :: se_int_control
TYPE(se_taper_type), POINTER :: se_taper
END SUBROUTINE check_dssss_nucint_ana
END INTERFACE
END INTERFACE

! *****************************************************************************
!> \brief Check Numerical Vs Analytical NUCINT core
@@ -55,7 +55,7 @@ END INTERFACE
!> 04.2008 created [tlaino]
!> \author Teodoro Laino - Zurich University
! *****************************************************************************
INTERFACE
INTERFACE
SUBROUTINE check_dcore_nucint_ana (sepi,sepj,r,dcore,itype,se_int_control,&
se_taper)
USE kinds, ONLY: dp
@@ -70,7 +70,7 @@ INTERFACE
TYPE(se_int_control_type), INTENT(IN) :: se_int_control
TYPE(se_taper_type), POINTER :: se_taper
END SUBROUTINE check_dcore_nucint_ana
END INTERFACE
END INTERFACE

! *****************************************************************************
!> \brief Check Numerical Vs Analytical ROTNUC
@@ -80,7 +80,7 @@ END INTERFACE
!> 04.2008 created [tlaino]
!> \author Teodoro Laino - Zurich University
! *****************************************************************************
INTERFACE
INTERFACE
SUBROUTINE check_drotnuc_ana(sepi, sepj, rijv, itype, se_int_control, se_taper,&
e1b, e2a, de1b, de2a)
USE kinds, ONLY: dp
@@ -98,7 +98,7 @@ INTERFACE
REAL(dp), DIMENSION(45, 3), &
INTENT(IN), OPTIONAL :: de1b, de2a
END SUBROUTINE check_drotnuc_ana
END INTERFACE
END INTERFACE

! *****************************************************************************
!> \brief Check Numerical Vs Analytical CORECORE
@@ -108,7 +108,7 @@ END INTERFACE
!> 04.2008 created [tlaino]
!> \author Teodoro Laino - Zurich University
! *****************************************************************************
INTERFACE
INTERFACE
SUBROUTINE check_dcorecore_ana(sepi, sepj, rijv, itype,se_int_control,&
se_taper, enuc, denuc)
USE kinds, ONLY: dp
@@ -126,7 +126,7 @@ INTERFACE
TYPE(se_taper_type), POINTER :: se_taper
END SUBROUTINE check_dcorecore_ana

END INTERFACE
END INTERFACE

! *****************************************************************************
!> \brief Check Numerical Vs Analytical rot_2el_2c_first
@@ -136,7 +136,7 @@ END INTERFACE
!> 04.2008 created [tlaino]
!> \author Teodoro Laino - Zurich University
! *****************************************************************************
INTERFACE
INTERFACE
SUBROUTINE rot_2el_2c_first_debug(sepi, sepj, rijv, se_int_control, se_taper,&
invert, ii, kk, v_d)
USE kinds, ONLY: dp
@@ -153,7 +153,7 @@ INTERFACE
REAL(KIND=dp), DIMENSION(45, 45, 3), &
INTENT(IN) :: v_d
END SUBROUTINE rot_2el_2c_first_debug
END INTERFACE
END INTERFACE

! *****************************************************************************
!> \brief Check Numerical Vs Analytical check_dterep_ana
@@ -163,7 +163,7 @@ END INTERFACE
!> 04.2008 created [tlaino]
!> \author Teodoro Laino - Zurich University
! *****************************************************************************
INTERFACE
INTERFACE
SUBROUTINE check_dterep_ana (sepi,sepj,r,ri,dri,se_int_control,se_taper,lgrad)
USE kinds, ONLY: dp
USE semi_empirical_types, ONLY: semi_empirical_type,&
@@ -177,7 +177,7 @@ INTERFACE
LOGICAL, INTENT(IN) :: lgrad
TYPE(se_taper_type), POINTER :: se_taper
END SUBROUTINE check_dterep_ana
END INTERFACE
END INTERFACE

! *****************************************************************************
!> \brief Check Numerical Vs Analytical check_rotint_ana
@@ -187,7 +187,7 @@ END INTERFACE
!> 04.2008 created [tlaino]
!> \author Teodoro Laino - Zurich University
! *****************************************************************************
INTERFACE
INTERFACE
SUBROUTINE check_rotint_ana(sepi,sepj,rijv,w,dw,se_int_control,se_taper)
USE kinds, ONLY: dp
USE semi_empirical_types, ONLY: semi_empirical_type,&
@@ -203,4 +203,4 @@ INTERFACE
TYPE(se_int_control_type), INTENT(IN) :: se_int_control
TYPE(se_taper_type), POINTER :: se_taper
END SUBROUTINE check_rotint_ana
END INTERFACE
END INTERFACE

0 comments on commit cfeaaad

Please sign in to comment.
You can’t perform that action at this time.