Commit 2a469598 authored by Kim, Jungwon's avatar Kim, Jungwon

fortran support in Theta

parent e064cdb4
......@@ -2,6 +2,6 @@
rm -rf build install
mkdir build
cd build
#cmake .. -DCMAKE_INSTALL_PREFIX=../install -DMPIEXEC="/opt/intel/compilers_and_libraries_2017.4.196/linux/mpi/intel64/bin/mpirun" -DMPIEXEC_NUMPROC_FLAG="-n" # Stampede2
cmake .. -DCMAKE_INSTALL_PREFIX=../install -DMPIEXEC="/opt/slurm/default/bin/srun" -DMPIEXEC_NUMPROC_FLAG="-n" -DPAPYRUS_USE_FORTRAN=ON #Grand Tave
cmake .. -DCMAKE_INSTALL_PREFIX=../install -DMPIEXEC="/opt/intel/compilers_and_libraries_2017.4.196/linux/mpi/intel64/bin/mpirun" -DMPIEXEC_NUMPROC_FLAG="-n" -DPAPYRUS_USE_FORTRAN=ON # Stampede2
#cmake .. -DCMAKE_INSTALL_PREFIX=../install -DMPIEXEC="/opt/slurm/default/bin/srun" -DMPIEXEC_NUMPROC_FLAG="-n" -DPAPYRUS_USE_FORTRAN=ON #Grand Tave
make -j install
......@@ -26,7 +26,6 @@ if(PAPYRUS_USE_FORTRAN)
set(PAPYRUSKV_SOURCES ${PAPYRUSKV_SOURCES}
C_Binding.f90
)
set(CMAKE_Fortran_MODULE_DIRECTORY ${PROJECT_BINARY_DIR}/include)
endif()
add_library(papyruskv ${PAPYRUSKV_SOURCES})
......@@ -34,5 +33,5 @@ add_library(papyruskv ${PAPYRUSKV_SOURCES})
install(TARGETS papyruskv DESTINATION lib)
if(PAPYRUS_USE_FORTRAN)
install(FILES ${PROJECT_BINARY_DIR}/include/papyrus.mod DESTINATION include)
install(FILES papyrus.mod DESTINATION include)
endif()
......@@ -11,10 +11,12 @@ PROGRAM TEST14_FORTRAN
INTEGER(KIND=8) :: KEYLEN, VALLEN
CALL MPI_INIT_THREAD(MPI_THREAD_MULTIPLE, PROVIDED, IERROR)
CALL MPI_BARRIER(MPI_COMM_WORLD, IERROR)
CALL PAPYRUSKV_INIT('./pkv_repo', IERROR)
IF (IERROR /= PAPYRUSKV_OK) THEN
PRINT*, 'FAILED'
ENDIF
CALL MPI_COMM_RANK(MPI_COMM_WORLD, RANK, IERROR)
CALL MPI_COMM_SIZE(MPI_COMM_WORLD, NRANKS, IERROR)
......
......@@ -8,11 +8,12 @@ macro(papyruskv_test arg)
endmacro(papyruskv_test)
macro(papyruskv_test_fortran arg)
include_directories(${PROJECT_BINARY_DIR}/include)
include_directories(${PROJECT_SOURCE_DIR}/kv/src)
add_executable(kv.${arg} ${arg}.f90)
target_link_libraries(kv.${arg} papyruskv pthread stdc++)
add_test(kv.${arg} ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 4 ./kv.${arg})
set_tests_properties(kv.${arg} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED")
set(CMAKE_CXX_COMPILER "${CMAKE_Fortran_COMPILER}") # HACK
endmacro(papyruskv_test_fortran)
add_subdirectory(01_open_close)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment