Skip to content

Commit c893d7f

Browse files
committed
update hip cmake
1 parent b60581b commit c893d7f

File tree

5 files changed

+11
-8
lines changed

5 files changed

+11
-8
lines changed

SeisAcoMod2D/HIP/CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ set(CMAKE_CXX_EXTENSIONS OFF)
1919
if(MPI_HOME)
2020
message(STATUS "Using provided MPI_HOME=${MPI_HOME}")
2121
else()
22-
set(MPI_HOME "/opt/intel/oneapi/mpi/latest")
22+
# set(MPI_HOME "/opt/intel/oneapi/mpi/latest")
23+
set(MPI_HOME "/usr/lib/x86_64-linux-gnu/openmpi")
2324
message(STATUS "Using default MPI_HOME=${MPI_HOME}")
2425
endif()
2526

@@ -30,12 +31,12 @@ if(NOT DEFINED ROCM_PATH)
3031
set(ROCM_PATH $ENV{ROCM_PATH} CACHE PATH "Path to which HIP has been installed")
3132
endif()
3233
endif()
33-
set(CMAKE_MODULE_PATH "${ROCM_PATH}/hip/cmake" ${CMAKE_MODULE_PATH})
34+
set(CMAKE_MODULE_PATH "${ROCM_PATH}/lib/cmake/hip" ${CMAKE_MODULE_PATH})
3435
set(HIP_INCLUDE_DIRS "${ROCM_PATH}/include" ${HIP_INCLUDE_DIRS})
3536
set(HIP_LIBRARIES "${ROCM_PATH}/lib" ${HIP_LIBRARIES})
3637

3738
set(DEF_WL_CXX_FLAGS " -D__HIP_PLATFORM_AMD__ ")
38-
set(DEF_GENERAL_CXX_FLAGS " -cxx=hipcc -O3 -std=c++17 -fopenmp ")
39+
set(DEF_GENERAL_CXX_FLAGS " -O3 -std=c++17 ")
3940
set(DEF_COMBINED_CXX_FLAGS "${DEF_GENERAL_CXX_FLAGS} ${DEF_WL_CXX_FLAGS}")
4041

4142
# -DCMAKE_CXX_FLAGS=" -blah -blah " overrides the default flags (BOTH general and WL specific)
@@ -79,4 +80,4 @@ include_directories(
7980

8081
add_executable(SeisAcoMod2D ${SOURCES})
8182

82-
target_link_libraries(SeisAcoMod2D -L${MPI_HOME}/lib -L${HIP_LIBRARIES})
83+
target_link_libraries(SeisAcoMod2D -L${HIP_LIBRARIES} -L${MPI_HOME}/lib -lmpi_cxx -lmpi)

bitcracker/HIP/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ if(NOT DEFINED ROCM_PATH)
3535
set(ROCM_PATH $ENV{ROCM_PATH} CACHE PATH "Path to which HIP has been installed")
3636
endif()
3737
endif()
38-
set(CMAKE_MODULE_PATH "${ROCM_PATH}/hip/cmake" ${CMAKE_MODULE_PATH})
38+
set(CMAKE_MODULE_PATH "${ROCM_PATH}/lib/cmake/hip" ${CMAKE_MODULE_PATH})
3939
set(HIP_INCLUDE_DIRS "${ROCM_PATH}/include" ${HIP_INCLUDE_DIRS})
4040
set(HIP_LIBRARIES "${ROCM_PATH}/lib" ${HIP_LIBRARIES})
4141

hashtable/HIP/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ if(NOT DEFINED ROCM_PATH)
2323
set(ROCM_PATH $ENV{ROCM_PATH} CACHE PATH "Path to which HIP has been installed")
2424
endif()
2525
endif()
26-
set(CMAKE_MODULE_PATH "${ROCM_PATH}/hip/cmake" ${CMAKE_MODULE_PATH})
26+
set(CMAKE_MODULE_PATH "${ROCM_PATH}/lib/cmake/hip" ${CMAKE_MODULE_PATH})
2727
set(HIP_INCLUDE_DIRS "${ROCM_PATH}/include" ${HIP_INCLUDE_DIRS})
2828
set(HIP_LIBRARIES "${ROCM_PATH}/lib" ${HIP_LIBRARIES})
2929

sobel_filter/HIP/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ if(NOT DEFINED ROCM_PATH)
3636
set(ROCM_PATH $ENV{ROCM_PATH} CACHE PATH "Path to which HIP has been installed")
3737
endif()
3838
endif()
39-
set(CMAKE_MODULE_PATH "${ROCM_PATH}/hip/cmake" ${CMAKE_MODULE_PATH})
39+
set(CMAKE_MODULE_PATH "${ROCM_PATH}/lib/cmake/hip" ${CMAKE_MODULE_PATH})
4040
set(HIP_INCLUDE_DIRS "${ROCM_PATH}/include" ${HIP_INCLUDE_DIRS})
4141
set(HIP_LIBRARIES "${ROCM_PATH}/lib" ${HIP_LIBRARIES})
4242

tsne/HIP/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ if(NOT DEFINED ROCM_PATH)
4343
set(ROCM_PATH $ENV{ROCM_PATH} CACHE PATH "Path to which HIP has been installed")
4444
endif()
4545
endif()
46-
set(CMAKE_MODULE_PATH "${ROCM_PATH}/hip/cmake" ${CMAKE_MODULE_PATH})
46+
set(CMAKE_MODULE_PATH "${ROCM_PATH}/lib/cmake/hip" ${CMAKE_MODULE_PATH})
4747
set(HIP_INCLUDE_DIRS "${ROCM_PATH}/include" ${HIP_INCLUDE_DIRS})
4848
set(HIP_LIBRARIES "${ROCM_PATH}/lib" ${HIP_LIBRARIES})
4949

@@ -78,6 +78,7 @@ set(SOURCES
7878
${CMAKE_SOURCE_DIR}/src/utils/math_utils.cpp
7979
${CMAKE_SOURCE_DIR}/src/utils/matrix_broadcast_utils.cpp
8080
${CMAKE_SOURCE_DIR}/src/utils/reduce_utils.cpp
81+
${CMAKE_SOURCE_DIR}/../data/verify.cpp
8182

8283
# Kernels
8384
${CMAKE_SOURCE_DIR}/src/kernels/apply_forces.cpp
@@ -95,6 +96,7 @@ set(SOURCES
9596
include_directories(
9697
${CMAKE_SOURCE_DIR}/src
9798
${CMAKE_SOURCE_DIR}/src/include
99+
${CMAKE_SOURCE_DIR}/../data
98100
${HIP_INCLUDE_DIRS}
99101
)
100102

0 commit comments

Comments
 (0)