Skip to content

Commit 5840eb5

Browse files
committed
prep for testing spblas in root dir (since this is a workable setup...
1 parent 7c1dc7e commit 5840eb5

File tree

4 files changed

+42
-8
lines changed

4 files changed

+42
-8
lines changed

CMakeLists.txt

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,46 @@ if(${ENABLE_SPBLAS})
2424
endif()
2525
set(MKLLIB ${MKLROOT}/lib CACHE PATH "Path to Intel MKL Libraries")
2626
set(MKLINCLUDE ${MKLROOT}/include CACHE PATH "Path to Intel MKL include files")
27+
28+
add_executable(
29+
test_root_spblas
30+
test_root_spblas.f90
31+
)
32+
33+
# Add include directories
34+
target_include_directories(
35+
test_root_spblas
36+
PRIVATE ${MKLINCLUDE}
37+
)
38+
39+
# Specify the MKL libraries for linking
40+
target_link_libraries(
41+
test_root_spblas
42+
PRIVATE
43+
# must be static
44+
${MKLLIB}/libmkl_blas95_ilp64.a
45+
46+
# must shared
47+
${MKLLIB}/libmkl_intel_ilp64.so
48+
${MKLLIB}/libmkl_sequential.so # or libmkl_intel_thread.so
49+
${MKLLIB}/libmkl_core.so
50+
51+
# standard shared libs
52+
pthread
53+
m
54+
dl
55+
)
2756
endif()
2857

2958
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake")
3059

3160
# build externals with specified version corresponding to git tag
32-
include(FetchContent)
33-
message(STATUS "Build extern")
34-
set(fftpack_GIT_TAG main)
35-
set(pFUnit_GIT_TAG cf37fb694f7c015d3718c1b4f7f3e9a56613067a) # fixes fetch content
36-
set(test-drive_GIT_TAG main)
37-
add_subdirectory(extern)
61+
#include(FetchContent)
62+
#message(STATUS "Build extern")
63+
#set(fftpack_GIT_TAG main)
64+
#set(pFUnit_GIT_TAG cf37fb694f7c015d3718c1b4f7f3e9a56613067a) # fixes fetch content
65+
#set(test-drive_GIT_TAG main)
66+
#add_subdirectory(extern)
3867

3968
message(STATUS "Build src")
4069
include(GNUInstallDirs)

config/intel_ubuntu_spblas

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/bash
2+
cmake -S . -B build-spblas -DCMAKE_Fortran_COMPILER=ifx -DBUILD_TESTING=ON
3+
cmake --build build-spblas
4+
./build/test/test_spblas

src/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ target_include_directories(${PROJECT_NAME} PUBLIC
2727
)
2828

2929
# Could use cmake/helpers.cmake::link_libraries but fftpack include dir is not needed
30-
target_link_libraries(${PROJECT_NAME} fftpack)
30+
# TODO:
31+
#target_link_libraries(${PROJECT_NAME} fftpack)
3132

3233
# installation/configuration steps (modified from fotran-lang/stdlib)
3334
install(

src/mo_square.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
!!
66

77
MODULE mo_square
8-
USE fftpack
8+
!USE fftpack
99
IMPLICIT NONE
1010

1111
CONTAINS

0 commit comments

Comments
 (0)