Skip to content

Commit

Permalink
add FORTRAN/CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyeli committed Apr 3, 2020
1 parent efd3a61 commit e4afa27
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
30 changes: 30 additions & 0 deletions FORTRAN/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
include_directories(${SuperLU_DIST_SOURCE_DIR}/SRC)

# Libs linked to all of the examples
set(all_link_libs superlu_dist ${MPI_Fortran_LIBRARIES} ${BLAS_LIB})
if (NOT MSVC)
list(APPEND all_link_libs m)
endif ()

set(F_MOD superlupara.f90 superlu_mod.f90)

if(enable_double)
set(C_DWRAP dcreate_dist_matrix.c superlu_c2f_dwrap.c)
set(F_DEXM ${F_MOD} dhbcode1.f90 f_pddrive.f90 ${C_DWRAP})
add_executable(f_pddrive ${F_DEXM})
target_link_libraries(f_pddrive ${all_link_libs})
set_target_properties(f_pddrive PROPERTIES LINKER_LANGUAGE Fortran)

set(F_5x5 ${F_MOD} f_5x5.f90 sp_ienv.c ${C_DWRAP})
add_executable(f_5x5 ${F_5x5})
target_link_libraries(f_5x5 ${all_link_libs})
set_target_properties(f_5x5 PROPERTIES LINKER_LANGUAGE Fortran)
endif()

if(enable_complex16)
set(C_ZWRAP zcreate_dist_matrix.c superlu_c2f_zwrap.c)
set(F_ZEXM ${F_MOD} zhbcode1.f90 f_pzdrive.f90 ${C_ZWRAP})
add_executable(f_pzdrive ${F_ZEXM})
target_link_libraries(f_pzdrive ${all_link_libs})
set_target_properties(f_pzdrive PROPERTIES LINKER_LANGUAGE Fortran)
endif()
6 changes: 3 additions & 3 deletions run_cmake_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ then
export COMBBLAS_ROOT=/project/projectdirs/sparse/xiaoye/Cori/combinatorial-blas-2.0/CombBLAS
# export COMBBLAS_ROOT=/project/projectdirs/sparse/xiaoye/Cori/CombBLAS_beta_16_2
cmake .. \
-DCMAKE_Fortran_COMPILER=ftn \
-DCMAKE_C_FLAGS="-std=c99 -fPIC -DPRNTlevel=0" \
-DTPL_PARMETIS_INCLUDE_DIRS="${PARMETIS_ROOT}/include;${PARMETIS_ROOT}/metis/include" \
-DTPL_PARMETIS_LIBRARIES="${PARMETIS_BUILD_DIR}/libparmetis/libparmetis.a;${PARMETIS_BUILD_DIR}/libmetis/libmetis.a" \
-DTPL_COMBBLAS_INCLUDE_DIRS="${COMBBLAS_ROOT}/_install/include;${COMBBLAS_ROOT}/Applications/BipartiteMatchings" \
-DTPL_COMBBLAS_LIBRARIES="${COMBBLAS_ROOT}/_install/lib/libCombBLAS.a" \
-DTPL_ENABLE_BLASLIB=OFF \
-DTPL_ENABLE_COMBBLASLIB=ON \
-DCMAKE_Fortran_COMPILER=ftn \
-DCMAKE_C_FLAGS="-std=c99 -fPIC -DPRNTlevel=0" \
-Denable_fortran=ON \
-DCMAKE_INSTALL_PREFIX=.
# -Denable_fortran=ON \
# -DTPL_BLAS_LIBRARIES="-mkl" \
# -DXSDK_INDEX_SIZE=64
# -DCMAKE_EXE_LINKER_FLAGS="-shared" \
Expand Down

0 comments on commit e4afa27

Please sign in to comment.