Skip to content

Commit

Permalink
upload our code
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-kan committed May 5, 2021
1 parent d2c19e8 commit ead1524
Show file tree
Hide file tree
Showing 25 changed files with 4,573 additions and 104 deletions.
17 changes: 12 additions & 5 deletions QuEST/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ message(STATUS "MPI distribution is ${DISTRIBUTED}")

# ----- FATAL -----------------------------------------------------------------

if (${DISTRIBUTED} AND ${GPUACCELERATED})
message(FATAL_ERROR "DISTRIBUTED=${DISTRIBUTED} and \
GPUACCELERATED=${GPUACCELERATED} set but \
distributed GPU acceleration not supported. Aborting")
endif()
# if (${DISTRIBUTED} AND ${GPUACCELERATED})
# message(FATAL_ERROR "DISTRIBUTED=${DISTRIBUTED} and \
# GPUACCELERATED=${GPUACCELERATED} set but \
# distributed GPU acceleration not supported. Aborting")
# endif()

if ( NOT(${PRECISION} EQUAL 1) AND
NOT(${PRECISION} EQUAL 2) AND
Expand All @@ -71,6 +71,13 @@ endif()

# ----- WARNINGS --------------------------------------------------------------

if (${DISTRIBUTED} AND ${GPUACCELERATED})
message(WARNING "DISTRIBUTED=${DISTRIBUTED} and \
GPUACCELERATED=${GPUACCELERATED} set. \
Distributed GPU acceleration is supported by \
Student Cluster Competition Team @ Sun Yat-sen University.")
endif()

if (${GPUACCELERATED} AND ${MULTITHREADED})
message(WARNING "MULTITHREADED=${MULTITHREADED} and \
GPUACCELERATED=${GPUACCELERATED} set but GPU \
Expand Down
3 changes: 2 additions & 1 deletion QuEST/include/QuEST.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ typedef struct Qureg

//! Storage for generated QASM output
QASMLogger* qasmLog;

void *rhandle;
} Qureg;

/** Information about the environment the program is running in.
Expand All @@ -118,6 +118,7 @@ typedef struct QuESTEnv
{
int rank;
int numRanks;
void* ehandle;
} QuESTEnv;


Expand Down
17 changes: 11 additions & 6 deletions QuEST/src/GPU/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
set(QuEST_SRC_ARCHITECTURE_DEPENDENT
${CMAKE_CURRENT_SOURCE_DIR}/QuEST_gpu.cu
PARENT_SCOPE
)


if (DISTRIBUTED)
set(QuEST_SRC_ARCHITECTURE_DEPENDENT
${CMAKE_CURRENT_SOURCE_DIR}/QuEST_gpu_distributed.cu
PARENT_SCOPE
)
else()
set(QuEST_SRC_ARCHITECTURE_DEPENDENT
${CMAKE_CURRENT_SOURCE_DIR}/QuEST_gpu.cu
PARENT_SCOPE
)
endif()
Loading

0 comments on commit ead1524

Please sign in to comment.