Skip to content

Commit 551dd60

Browse files
author
Damian Rouson
committed
First updates to the CMake files to support building with Portland Group.
1 parent f92ef12 commit 551dd60

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/extensions/opencoarrays.F90

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,11 @@ pure function logical_operator(lhs,rhs) result(lhs_op_rhs)
198198

199199
! --------------------
200200

201+
#ifndef PORTLAND_GROUP_COMPILER
201202
integer(c_int), save, volatile, bind(C,name="CAF_COMM_WORLD") :: CAF_COMM_WORLD
203+
#else
204+
integer(c_int), volatile, bind(C,name="CAF_COMM_WORLD") :: CAF_COMM_WORLD
205+
#endif
202206
integer(c_int32_t), parameter :: bytes_per_word=4_c_int32_t
203207

204208
interface gfc_descriptor

src/mpi/CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ if("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "GNU")
66
set(gfortran_compiler true)
77
elseif("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "Cray")
88
set(cray_compiler true)
9+
elseif("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "PGI")
10+
set(portland_group_compiler true)
911
endif()
1012

1113
if (NOT CMAKE_VERSION VERSION_LESS 3.3.1)
@@ -24,15 +26,17 @@ else()
2426
endif()
2527
endif()
2628

27-
if(opencoarrays_aware_compiler)
28-
else()
29+
if(NOT opencoarrays_aware_compiler)
2930
if(gfortran_compiler)
3031
# This applied to gfortran 4.9 and some earlier versions (FIX ME: find out which)
3132
add_definitions(-DCOMPILER_SUPPORTS_CAF_INTRINSICS)
3233
elseif (cray_compiler)
3334
# This applies to CCE 8.4 beta or earlier
3435
add_definitions(-DCOMPILER_LACKS_C_PTRDIFF_T)
3536
add_definitions(-DCOMPILER_LACKS_C_SIZEOF_ASSUMED_RANK)
37+
elseif (portland_group_compiler)
38+
add_definitions(-DCOMPILER_LACKS_C_PTRDIFF_T)
39+
add_definitions(-DPORTLAND_GROUP_COMPILER)
3640
endif()
3741
endif()
3842
add_library(caf_mpi mpi_caf.c ../common/caf_auxiliary.c ../extensions/opencoarrays.F90)

0 commit comments

Comments
 (0)