Skip to content

Commit 22d6f06

Browse files
committed
Merge branch 'master' of TinkerTools/tinker9 into hippo-dev
2 parents 2ce8e5e + 94c9f6d commit 22d6f06

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

include/macro.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ to mimic its name mangling.
3939
#if defined(__INTEL_COMPILER)
4040
# define TINKER_ICPC
4141

42+
#elif defined(__PGIC__)
43+
# define TINKER_PGI
44+
4245
#elif defined(__clang__)
4346
# define TINKER_CLANG
4447
// xcode clang is different from llvm clang

src/compilers.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ std::string cxx_compiler_name()
99
#if defined(TINKER_ICPC)
1010
n = format("icpc %d.%d", __INTEL_COMPILER, __INTEL_COMPILER_BUILD_DATE);
1111

12+
#elif defined(TINKER_PGI)
13+
if (__PGIC__ <= 19)
14+
n = format("pgc++ %d.%d.%d", __PGIC__, __PGIC_MINOR__,
15+
__PGIC_PATCHLEVEL__);
16+
else
17+
n = format("nvc++ %d.%d.%d", __PGIC__, __PGIC_MINOR__,
18+
__PGIC_PATCHLEVEL__);
19+
1220
#elif defined(TINKER_APPLE_CLANG)
1321
n = format("clang++ %d.%d.%d (xcode)", __clang_major__, __clang_minor__,
1422
__clang_patchlevel__);

src/compilers_acc.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@ namespace tinker {
66
#if TINKER_CUDART
77
std::string acc_compiler_name()
88
{
9-
return format("pgc++ %d.%d.%d", __PGIC__, __PGIC_MINOR__,
10-
__PGIC_PATCHLEVEL__);
9+
if (__PGIC__ <= 19)
10+
return format("pgc++ %d.%d.%d", __PGIC__, __PGIC_MINOR__,
11+
__PGIC_PATCHLEVEL__);
12+
else
13+
return format("nvc++ %d.%d.%d", __PGIC__, __PGIC_MINOR__,
14+
__PGIC_PATCHLEVEL__);
1115
}
1216
#endif
1317
}

0 commit comments

Comments
 (0)