Commit a5e62fcb authored by Kim, Jungwon's avatar Kim, Jungwon

fortran for summitdev (XL)

parent 5e36fa6b
......@@ -3,5 +3,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" -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
#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/ibm/spectrum_mpi/jsm_pmix/bin/jsrun" -DMPIEXEC_NUMPROC_FLAG="-n" -DPAPYRUS_USE_FORTRAN=ON #Summitdev
make -j install
......@@ -12,7 +12,7 @@ PROGRAM TEST14_FORTRAN
CALL MPI_INIT_THREAD(MPI_THREAD_MULTIPLE, PROVIDED, IERROR)
PRINT*, 'THIS IS A HACK CODE FOR PORTABILITY'
CALL PAPYRUSKV_INIT('./pkv_repo', IERROR)
CALL PAPYRUSKV_INIT('./pkv_repo'//CHAR(0), IERROR)
IF (IERROR /= PAPYRUSKV_OK) THEN
PRINT*, 'FAILED'
ENDIF
......@@ -39,13 +39,13 @@ PROGRAM TEST14_FORTRAN
PEER = RANK + 1
ENDIF
CALL PAPYRUSKV_OPEN('TEST_DB', IOR(PAPYRUSKV_CREATE, PAPYRUSKV_RDWR), DB, IERROR)
CALL PAPYRUSKV_OPEN('TEST_DB'//CHAR(0), IOR(PAPYRUSKV_CREATE, PAPYRUSKV_RDWR), DB, IERROR)
IF (IERROR /= PAPYRUSKV_OK) THEN
PRINT*, 'FAILED'
ENDIF
IF (RANK < SIZE(KEY)) THEN
PRINT*, 'PUT --> RANK', RANK, 'KEY:', TRIM(KEY(RANK + 1)), ' VAL:', TRIM(VAL(RANK + 1))
PRINT*, 'PUT--> RANK', RANK, 'KEY:', TRIM(KEY(RANK + 1)), ' VAL:', TRIM(VAL(RANK + 1))
KEYLEN = LEN(TRIM(KEY(RANK + 1)), KIND = 8)
VALLEN = LEN(TRIM(VAL(RANK + 1)), KIND = 8)
CALL PAPYRUSKV_PUT(DB, TRIM(KEY(RANK + 1)), KEYLEN, TRIM(VAL(RANK + 1)), VALLEN, IERROR)
......
......@@ -13,7 +13,11 @@ macro(papyruskv_test_fortran arg)
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
if("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "XL")
target_link_libraries(kv.${arg} papyruskv pthread stdc++ mpi_ibm_mpifh)
else()
set(CMAKE_CXX_COMPILER "${CMAKE_Fortran_COMPILER}")
endif()
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