summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authortakanori-ihara <62980219+takanori-ihara@users.noreply.github.com>2021-02-22 13:06:56 +0900
committerGitHub <noreply@github.com>2021-02-22 04:06:56 +0000
commit26d2356ad4f8b19ce071ddc09611bbf9ef449954 (patch)
treecfd6b1a3af0366e18de6544998a1c31cab9a3876 /var
parent2d1fbddebe6eea3662dd8c6471a92cf21677ae13 (diff)
downloadspack-26d2356ad4f8b19ce071ddc09611bbf9ef449954.tar.gz
spack-26d2356ad4f8b19ce071ddc09611bbf9ef449954.tar.bz2
spack-26d2356ad4f8b19ce071ddc09611bbf9ef449954.tar.xz
spack-26d2356ad4f8b19ce071ddc09611bbf9ef449954.zip
genesis: New package. (#21183)
* genesis: New package. * fujitsu-ssl2: fix unit test error * genesis: Fix for comments and add test method * genesis: Fix for comments * genesis: Fix for comments
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/genesis/fj_compiler.patch342
-rw-r--r--var/spack/repos/builtin/packages/genesis/fj_compiler_1.5.1.patch286
-rw-r--r--var/spack/repos/builtin/packages/genesis/package.py112
3 files changed, 740 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/genesis/fj_compiler.patch b/var/spack/repos/builtin/packages/genesis/fj_compiler.patch
new file mode 100644
index 0000000000..e71fc33855
--- /dev/null
+++ b/var/spack/repos/builtin/packages/genesis/fj_compiler.patch
@@ -0,0 +1,342 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -124,11 +124,7 @@ AC_PROG_F77($genesis_default_fc)
+ # check actual compiler
+ AC_MSG_CHECKING([for actual compiler])
+
+-if test x"${FC}" = x"mpifrtpx"; then
+- VER_OPT="-V"
+-else
+- VER_OPT="--version"
+-fi
++VER_OPT="--version"
+
+ fc_ver_info=$(${FC} -E ${VER_OPT})
+ for vtok in ${fc_ver_info} ; do
+@@ -158,9 +154,13 @@ for vtok in ${fc_ver_info} ; do
+ done
+
+ if test -z "${FC_ACT}"; then
+- FC_ACT=${FC}
++ FC_ACT=`basename ${FC}`
+ fi
+
++
++
++
++
+ AC_MSG_RESULT([$FC_ACT])
+
+ version_warning=yes
+@@ -256,7 +256,7 @@ for vtok in ${cc_ver_info} ; do
+ done
+
+ if test -z "${CC_ACT}"; then
+- CC_ACT=${CC}
++ CC_ACT=`basename ${CC}`
+ fi
+
+ AC_MSG_RESULT([$CC_ACT])
+@@ -322,18 +322,12 @@ if test x"${enable_openmp}" = x"yes"; th
+ elif test x"${FC_ACT}" = x"pgf90"; then
+ OPT_OPENMP="-mp"
+
+- elif test x"${FC_ACT}" = x"frtpx"; then
++ elif test x"${FC_ACT}" = x"frtpx" -o x"${FC_ACT}" = x"frt"; then
+ OPT_OPENMP="-Kopenmp"
+
+- elif test x"${FC_ACT}" = x"mpifrtpx"; then
++ elif test x"${FC_ACT}" = x"mpifrtpx" -o x"${FC_ACT}" = x"mpifrt"; then
+ OPT_OPENMP="-Kopenmp"
+
+- elif test x"${FC_ACT}" = x"frt"; then
+- OPT_OPENMP="-KOMP"
+-
+- elif test x"${FC_ACT}" = x"mpifrt"; then
+- OPT_OPENMP="-KOMP"
+-
+ fi
+ fi
+
+@@ -439,7 +433,8 @@ fi
+ AC_ARG_ENABLE([parallel_IO],
+ [AS_HELP_STRING([--enable-parallel_IO], [enable parallel_IO (defalt: no)])],
+ [], [enable_parallel_IO=no])
+-if test x"${FC_ACT}" = x"frtpx" -o x"${FC_ACT}" = x"mpifrtpx"; then
++if test x"${FC_ACT}" = x"frtpx" -o x"${FC_ACT}" = x"mpifrtpx" -o \
++ x"${FC_ACT}" = x"frt" -o x"${FC_ACT}" = x"mpifrt"; then
+ enable_parallel_IO=no
+ fi
+ #if test x"${mainly_single}" = x"yes"; then
+@@ -742,22 +737,16 @@ else
+ elif test x"${FC_ACT}" = x"pgf90"; then
+ FCFLAGS="-O2 -fastsse -Mipa=fast,inline -m64 -Mflushz -pc 64 -mcmodel=medium -Msmartalloc=huge"
+
+- elif test x"${FC_ACT}" = x"frtpx"; then
+- FCFLAGS="-m -Kvisimpact -Kocl -Kswp"
+-
+- elif test x"${FC_ACT}" = x"mpifrtpx"; then
+- FCFLAGS="-m -Kocl -Kfast,openmp,parallel,simd=2,noalias -Nlst=t -Koptmsg=2"
+- FCFLAGS_FFTE_KERNEL_FPP__PGI__SP=" -m -Kocl -Kfast,openmp,parallel,simd=2,noalias -Nlst=t -Koptmsg=2"
+- FCFLAGS_FPP__PGI_NOOPT="-m -Kocl -Kfast,openmp,parallel,simd=2,noalias -Nlst=t -Koptmsg=2"
+- FCFLAGS_KERNELS_PAIRLIST="-m -Kocl -Kfast,openmp,parallel,simd=2,nounroll,swp_strong,noalias=s -Nlst=t -Koptmsg=2"
+- FCFLAGS_DIHEDRAL="-m -xsp_energy_dihedrals_mod.calculate_dihedral_2 -Kocl -Kfast,openmp,parallel,simd=2,noalias -Nlst=t -Koptmsg=2"
+- FCFLAGS_KERNELS=" -m -Kocl -Kfast,openmp,parallel,simd=2,swp_strong,noalias=s -Nlst=t -Koptmsg=2"
++ elif test x"${FC_ACT}" = x"frtpx" -o x"${FC_ACT}" = x"frt"; then
++ FCFLAGS="-Kocl"
+
+- elif test x"${FC_ACT}" = x"frt"; then
+- FCFLAGS="-m -Am -Kfast"
+-
+- elif test x"${FC_ACT}" = x"mpifrt"; then
+- FCFLAGS="-m -Am -Kfast"
++ elif test x"${FC_ACT}" = x"mpifrtpx" -o x"${FC_ACT}" = x"mpifrt"; then
++ FCFLAGS="-Kocl -Kfast,openmp,parallel,simd=2,noalias -Nlst=t -Koptmsg=2"
++ FCFLAGS_FFTE_KERNEL_FPP__PGI__SP="-Kocl -Kfast,openmp,parallel,simd=2,noalias -Nlst=t -Koptmsg=2"
++ FCFLAGS_FPP__PGI_NOOPT="-Kocl -Kfast,openmp,parallel,simd=2,noalias -Nlst=t -Koptmsg=2"
++ FCFLAGS_KERNELS_PAIRLIST="-Kocl -Kfast,openmp,parallel,simd=2,nounroll,swp_strong,noalias=s -Nlst=t -Koptmsg=2"
++ FCFLAGS_DIHEDRAL="-xsp_energy_dihedrals_mod.calculate_dihedral_2 -Kocl -Kfast,openmp,parallel,simd=2,noalias -Nlst=t -Koptmsg=2"
++ FCFLAGS_KERNELS="-Kocl -Kfast,openmp,parallel,simd=2,swp_strong,noalias=s -Nlst=t -Koptmsg=2"
+
+ fi
+
+@@ -776,22 +765,16 @@ else
+ elif test x"${FC_ACT}" = x"pgf90"; then
+ FCFLAGS="-m64 -Mflushz -pc 64 -mcmodel=medium -Msmartalloc=huge"
+
+- elif test x"${FC_ACT}" = x"frtpx"; then
+- FCFLAGS="-m -Kocl "
+-
+- elif test x"${FC_ACT}" = x"mpifrtpx"; then
+- FCFLAGS=" -m -Kocl -Kopenmp -Nlst=t -Koptmsg=2"
+- FCFLAGS_KERNELS=" -m -Kocl -Kopenmp -Nlst=t -Koptmsg=2"
+- FCFLAGS_KERNELS_PAIRLIST="-m -Kocl -Kopenmp -Nlst=t -Koptmsg=2"
+- FCFLAGS_FFTE_KERNEL_FPP__PGI__SP=" -m -Kocl -Kopenmp -Nlst=t -Koptmsg=2"
+- FCFLAGS_FPP__PGI_NOOPT=" -m -Kocl -Kopenmp -Nlst=t -Koptmsg=2"
+- FCFLAGS_DIHEDRAL=" -m -Kocl -Kopenmp -Nlst=t -Koptmsg=2"
+-
+- elif test x"${FC_ACT}" = x"frt"; then
+- FCFLAGS="-m "
++ elif test x"${FC_ACT}" = x"frtpx" -o x"${FC_ACT}" = x"frt"; then
++ FCFLAGS="-Kocl "
+
+- elif test x"${FC_ACT}" = x"mpifrt"; then
+- FCFLAGS="-m "
++ elif test x"${FC_ACT}" = x"mpifrtpx" -o x"${FC_ACT}" = x"mpifrt"; then
++ FCFLAGS=" -Kocl -Kopenmp -Nlst=t -Koptmsg=2"
++ FCFLAGS_KERNELS="-Kocl -Kopenmp -Nlst=t -Koptmsg=2"
++ FCFLAGS_KERNELS_PAIRLIST="-Kocl -Kopenmp -Nlst=t -Koptmsg=2"
++ FCFLAGS_FFTE_KERNEL_FPP__PGI__SP="-Kocl -Kopenmp -Nlst=t -Koptmsg=2"
++ FCFLAGS_FPP__PGI_NOOPT="-Kocl -Kopenmp -Nlst=t -Koptmsg=2"
++ FCFLAGS_DIHEDRAL="-Kocl -Kopenmp -Nlst=t -Koptmsg=2"
+
+ fi
+
+@@ -813,22 +796,16 @@ else
+ elif test x"${FC_ACT}" = x"pgf90"; then
+ FCFLAGS="-g -m64 -Mflushz -pc 64 -mcmodel=medium -Msmartalloc=huge"
+
+- elif test x"${FC_ACT}" = x"frtpx"; then
+- FCFLAGS="-g -m -Kocl -Kopenmp"
++ elif test x"${FC_ACT}" = x"frtpx" -o x"${FC_ACT}" = x"frt"; then
++ FCFLAGS="-g -Kocl -Kopenmp"
+
+- elif test x"${FC_ACT}" = x"mpifrtpx"; then
+- FCFLAGS=" -g -m -Kocl -Kopenmp -Nlst=t -Koptmsg=2"
+- FCFLAGS_KERNELS=" -g -m -Kocl -Kopenmp -Nlst=t -Koptmsg=2"
+- FCFLAGS_KERNELS_PAIRLIST=" -g -m -Kocl -Kopenmp -Nlst=t -Koptmsg=2"
+- FCFLAGS_FFTE_KERNEL_FPP__PGI__SP=" -g -m -Kocl -Kopenmp -Nlst=t -Koptmsg=2"
+- FCFLAGS_FPP__PGI_NOOPT=" -g -m -Kocl -Kopenmp -Nlst=t -Koptmsg=2"
+- FCFLAGS_DIHEDRAL=" -g -m -Kocl -Kopenmp -Nlst=t -Koptmsg=2"
+-
+- elif test x"${FC_ACT}" = x"frt"; then
+- FCFLAGS="-g -m "
+-
+- elif test x"${FC_ACT}" = x"mpifrt"; then
+- FCFLAGS="-g -m "
++ elif test x"${FC_ACT}" = x"mpifrtpx" -o x"${FC_ACT}" = x"mpifrt"; then
++ FCFLAGS=" -g -Kocl -Kopenmp -Nlst=t -Koptmsg=2"
++ FCFLAGS_KERNELS=" -g -Kocl -Kopenmp -Nlst=t -Koptmsg=2"
++ FCFLAGS_KERNELS_PAIRLIST=" -g -Kocl -Kopenmp -Nlst=t -Koptmsg=2"
++ FCFLAGS_FFTE_KERNEL_FPP__PGI__SP=" -g -Kocl -Kopenmp -Nlst=t -Koptmsg=2"
++ FCFLAGS_FPP__PGI_NOOPT=" -g -Kocl -Kopenmp -Nlst=t -Koptmsg=2"
++ FCFLAGS_DIHEDRAL=" -g -Kocl -Kopenmp -Nlst=t -Koptmsg=2"
+
+ fi
+
+@@ -850,23 +827,23 @@ else
+ elif test x"${FC_ACT}" = x"pgf90"; then
+ FCFLAGS="-O0 -g -m64 -Msmartalloc=huge"
+
+- elif test x"${FC_ACT}" = x"frtpx"; then
++ elif test x"${FC_ACT}" = x"frtpx" -o x"${FC_ACT}" = x"frt"; then
+ # FCFLAGS="-O0 -g -Hs -Hu -Ha"
+ FCFLAGS="-O0 -g -Kocl -Kopenmp -Hs -Hu -Ha -Nlst=t -Koptmsg=2"
+
+- elif test x"${FC_ACT}" = x"mpifrtpx"; then
+- FCFLAGS=" -O0 -g -m -Kocl -Kopenmp -Hs -Hu -Ha -Nlst=t -Koptmsg=2"
+- FCFLAGS_KERNELS=" -O0 -g -m -Kocl -Kopenmp -Hs -Hu -Ha -Nlst=t -Koptmsg=2"
+- FCFLAGS_KERNELS_PAIRLIST=" -O0 -g -m -Kocl -Kopenmp -Hs -Hu -Ha -Nlst=t -Koptmsg=2"
+- FCFLAGS_FFTE_KERNEL_FPP__PGI__SP=" -O0 -g -m -Kocl -Kopenmp -Hs -Hu -Ha -Nlst=t -Koptmsg=2"
+- FCFLAGS_FPP__PGI_NOOPT=" -O0 -g -m -Kocl -Kopenmp -Hs -Hu -Ha -Nlst=t -Koptmsg=2"
+- FCFLAGS_DIHEDRAL=" -O0 -g -m -Kocl -Kopenmp -Hs -Hu -Ha -Nlst=t -Koptmsg=2"
++ elif test x"${FC_ACT}" = x"mpifrtpx" -o x"${FC_ACT}" = x"mpifrt"; then
++ FCFLAGS=" -O0 -g -Kocl -Kopenmp -Hs -Hu -Ha -Nlst=t -Koptmsg=2"
++ FCFLAGS_KERNELS=" -O0 -g -Kocl -Kopenmp -Hs -Hu -Ha -Nlst=t -Koptmsg=2"
++ FCFLAGS_KERNELS_PAIRLIST=" -O0 -g -Kocl -Kopenmp -Hs -Hu -Ha -Nlst=t -Koptmsg=2"
++ FCFLAGS_FFTE_KERNEL_FPP__PGI__SP=" -O0 -g -Kocl -Kopenmp -Hs -Hu -Ha -Nlst=t -Koptmsg=2"
++ FCFLAGS_FPP__PGI_NOOPT=" -O0 -g -Kocl -Kopenmp -Hs -Hu -Ha -Nlst=t -Koptmsg=2"
++ FCFLAGS_DIHEDRAL=" -O0 -g -Kocl -Kopenmp -Hs -Hu -Ha -Nlst=t -Koptmsg=2"
+
+- elif test x"${FC_ACT}" = x"frt"; then
+- FCFLAGS="-O0 -g"
++ #elif test x"${FC_ACT}" = x"frt"; then
++ # FCFLAGS="-O0 -g"
+
+- elif test x"${FC_ACT}" = x"mpifrt"; then
+- FCFLAGS="-O0 -g"
++ #elif test x"${FC_ACT}" = x"mpifrt"; then
++ # FCFLAGS="-O0 -g"
+
+ fi
+ else
+@@ -930,17 +907,11 @@ else
+ elif test x"${CC_ACT}" = x"pgcc"; then
+ CFLAGS="-O3 -fastsse -Mipa=fast,inline -m64 -Mflushz -pc 64 -mcmodel=medium -Msmartalloc=huge"
+
+- elif test x"${CC_ACT}" = x"fccpx"; then
+- CFLAGS="-m -Kvisimpact -Kocl -Kswp"
+-
+- elif test x"${CC_ACT}" = x"mpifccpx"; then
+- CFLAGS="-m -Kvisimpact -Kocl -Kswp"
++ elif test x"${CC_ACT}" = x"fccpx" -o x"${CC_ACT}" = x"fcc"; then
++ CFLAGS="-Kocl"
+
+- elif test x"${CC_ACT}" = x"fcc"; then
+- CFLAGS="-m -Am -Kfast"
+-
+- elif test x"${CC_ACT}" = x"mpifcc"; then
+- CFLAGS="-m -Am -Kfast"
++ elif test x"${CC_ACT}" = x"mpifccpx" -o x"${CC_ACT}" = x"mpifcc"; then
++ CFLAGS="-Kocl"
+
+ fi
+
+@@ -959,17 +930,11 @@ else
+ elif test x"${CC_ACT}" = x"pgcc"; then
+ CFLAGS="-fastsse -Mipa=fast,inline -m64 -Mflushz -pc 64 -mcmodel=medium -Msmartalloc=huge"
+
+- elif test x"${CC_ACT}" = x"fccpx"; then
+- CFLAGS="-m -Kocl"
+-
+- elif test x"${CC_ACT}" = x"mpifccpx"; then
+- CFLAGS="-m -Kocl"
+-
+- elif test x"${CC_ACT}" = x"fcc"; then
+- CFLAGS="-m -Am -Kfast"
++ elif test x"${CC_ACT}" = x"fccpx" -o x"${CC_ACT}" = x"fcc"; then
++ CFLAGS="-Kocl"
+
+- elif test x"${CC_ACT}" = x"mpifcc"; then
+- CFLAGS="-m -Am -Kfast"
++ elif test x"${CC_ACT}" = x"mpifccpx" -o x"${CC_ACT}" = x"mpifcc"; then
++ CFLAGS="-Kocl"
+
+ fi
+
+@@ -991,17 +956,11 @@ else
+ elif test x"${CC_ACT}" = x"pgcc"; then
+ CFLAGS="-g -fastsse -Mipa=fast,inline -m64 -Mflushz -pc 64 -mcmodel=medium -Msmartalloc=huge"
+
+- elif test x"${CC_ACT}" = x"fccpx"; then
+- CFLAGS="-g -m -Kocl"
++ elif test x"${CC_ACT}" = x"fccpx" -o x"${CC_ACT}" = x"fcc"; then
++ CFLAGS="-g -Kocl"
+
+- elif test x"${CC_ACT}" = x"mpifccpx"; then
+- CFLAGS="-g -m -Kocl"
+-
+- elif test x"${CC_ACT}" = x"fcc"; then
+- CFLAGS="-g -m -Am -Kfast"
+-
+- elif test x"${CC_ACT}" = x"mpifcc"; then
+- CFLAGS="-g -m -Am -Kfast"
++ elif test x"${CC_ACT}" = x"mpifccpx" -o x"${CC_ACT}" = x"mpifcc"; then
++ CFLAGS="-g -Kocl"
+
+ fi
+
+@@ -1023,19 +982,13 @@ else
+ elif test x"${CC_ACT}" = x"pgcc"; then
+ CFLAGS="-O0 -g -m64 -Msmartalloc=huge"
+
+- elif test x"${CC_ACT}" = x"fccpx"; then
++ elif test x"${CC_ACT}" = x"fccpx" -o x"${CC_ACT}" = x"fcc"; then
+ # CFLAGS="-O0 -g -Hs -Hu -Ha"
+ CFLAGS="-O0 -g -Kocl"
+
+- elif test x"${CC_ACT}" = x"mpifccpx"; then
++ elif test x"${CC_ACT}" = x"mpifccpx" -o x"${CC_ACT}" = x"mpifcc"; then
+ CFLAGS="-O0 -g -Kocl"
+
+- elif test x"${CC_ACT}" = x"fcc"; then
+- CFLAGS="-O0 -g"
+-
+- elif test x"${CC_ACT}" = x"mpifcc"; then
+- CFLAGS="-O0 -g"
+-
+ fi
+
+ fi
+@@ -1056,17 +1009,11 @@ if test -z "${LDFLAGS}"; then
+ LDFLAGS=""
+ #LDFLAGS="-march=native -fuse-linker-plugin"
+
+- elif test x"${FC_ACT}" = x"frtpx"; then
+- LDFLAGS="-SSL2 -Kparallel -Nfjomplib"
+-
+- elif test x"${FC_ACT}" = x"mpifrtpx"; then
+- LDFLAGS="-SSL2BLAMP -Kparallel -Nfjomplib"
+-
+- elif test x"${FC_ACT}" = x"frt"; then
+- LDFLAGS="-KSPARC64VII,V9FMADD -SSL2"
++ elif test x"${FC_ACT}" = x"frtpx" -o x"${FC_ACT}" = x"frt"; then
++ LDFLAGS="-Kparallel -Kopenmp -Nlibomp"
+
+- elif test x"${FC_ACT}" = x"mpifrt"; then
+- LDFLAGS="-KSPARC64VII,V9FMADD -SSL2"
++ elif test x"${FC_ACT}" = x"mpifrtpx" -o x"${FC_ACT}" = x"mpifrt"; then
++ LDFLAGS="-Kparallel -Kopenmp -Nlibomp"
+
+ fi
+ fi
+@@ -1101,7 +1048,9 @@ AC_SUBST(PPFLAGS)
+
+ # USEKCOMP
+ AM_CONDITIONAL(USEKCOMP, test x"${FC_ACT}" = x"frtpx" -o \
+- x"${FC_ACT}" = x"mpifrtpx")
++ x"${FC_ACT}" = x"mpifrtpx" -o \
++ x"${FC_ACT}" = x"frt" -o \
++ x"${FC_ACT}" = x"mpifrt")
+
+ # KCOMP preprocess macro
+ AC_ARG_ENABLE([pktimer],
+@@ -1130,7 +1079,8 @@ AC_ARG_WITH([fj_timer_2],
+ [use FJ-timer in main loop (default: not use)])],
+ [], [with_fj_timer_2=no])
+
+-if test x"${FC_ACT}" = x"frtpx" -o x"${FC_ACT}" = x"mpifrtpx"; then
++if test x"${FC_ACT}" = x"frtpx" -o x"${FC_ACT}" = x"mpifrtpx" -o \
++ x"${FC_ACT}" = x"frt" -o x"${FC_ACT}" = x"mpifrt"; then
+ AC_DEFINE(KCOMP, 1, [defined if K-computer compiler is used.])
+ DEFINED_VARIABLES+=" -DKCOMP"
+
+@@ -1148,7 +1098,7 @@ if test x"${FC_ACT}" = x"frtpx" -o x"${F
+ mainly_pktimer=no
+ if test x"${enable_pktimer}" = x"yes"; then
+
+- if test x"${FC_ACT}" = x"mpifrtpx"; then
++ if test x"${FC_ACT}" = x"mpifrtpx" -o x"${FC_ACT}" = x"mpifrt"; then
+ AC_DEFINE(PKTIMER, 1, [defined if PKTIMER is used.])
+ DEFINED_VARIABLES+=" -DPKTIMER"
+ mainly_pktimer=yes
diff --git a/var/spack/repos/builtin/packages/genesis/fj_compiler_1.5.1.patch b/var/spack/repos/builtin/packages/genesis/fj_compiler_1.5.1.patch
new file mode 100644
index 0000000000..0bdbd4f58e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/genesis/fj_compiler_1.5.1.patch
@@ -0,0 +1,286 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -90,11 +90,7 @@ AC_PROG_F77($genesis_default_fc)
+ # check actual compiler
+ AC_MSG_CHECKING([for actual compiler])
+
+-if test x"${FC}" = x"mpifrtpx"; then
+- VER_OPT="-V"
+-else
+- VER_OPT="--version"
+-fi
++VER_OPT="--version"
+
+ fc_ver_info=$(${FC} -E ${VER_OPT})
+ for vtok in ${fc_ver_info} ; do
+@@ -124,7 +120,7 @@ for vtok in ${fc_ver_info} ; do
+ done
+
+ if test -z "${FC_ACT}"; then
+- FC_ACT=${FC}
++ FC_ACT=`basename ${FC}`
+ fi
+
+ AC_MSG_RESULT([$FC_ACT])
+@@ -228,7 +224,7 @@ for vtok in ${cc_ver_info} ; do
+ done
+
+ if test -z "${CC_ACT}"; then
+- CC_ACT=${CC}
++ CC_ACT=`basename ${CC}`
+ fi
+
+ AC_MSG_RESULT([$CC_ACT])
+@@ -294,18 +290,12 @@ if test x"${enable_openmp}" = x"yes"; th
+ elif test x"${FC_ACT}" = x"pgf90"; then
+ OPT_OPENMP="-mp"
+
+- elif test x"${FC_ACT}" = x"frtpx"; then
++ elif test x"${FC_ACT}" = x"frtpx" -o x"${FC_ACT}" = x"frt"; then
+ OPT_OPENMP="-Kopenmp"
+
+- elif test x"${FC_ACT}" = x"mpifrtpx"; then
++ elif test x"${FC_ACT}" = x"mpifrtpx" -o x"${FC_ACT}" = x"mpifrt"; then
+ OPT_OPENMP="-Kopenmp"
+
+- elif test x"${FC_ACT}" = x"frt"; then
+- OPT_OPENMP="-KOMP"
+-
+- elif test x"${FC_ACT}" = x"mpifrt"; then
+- OPT_OPENMP="-KOMP"
+-
+ fi
+ fi
+
+@@ -411,7 +401,8 @@ fi
+ AC_ARG_ENABLE([parallel_IO],
+ [AS_HELP_STRING([--enable-parallel_IO], [enable parallel_IO (defalt: yes(intel)/no(fujitsu))])],
+ [], [enable_parallel_IO=yes])
+-if test x"${FC_ACT}" = x"frtpx" -o x"${FC_ACT}" = x"mpifrtpx"; then
++if test x"${FC_ACT}" = x"frtpx" -o x"${FC_ACT}" = x"mpifrtpx" -o \
++ x"${FC_ACT}" = x"frt" -o x"${FC_ACT}" = x"mpifrt"; then
+ enable_parallel_IO=no
+ fi
+ if test x"${enable_single}" = x"yes"; then
+@@ -639,19 +630,13 @@ else
+ elif test x"${FC_ACT}" = x"pgf90"; then
+ FCFLAGS="-O2 -fastsse -m64 -Mflushz -pc 64 -mcmodel=medium -Msmartalloc=huge -Mbackslash"
+
+- elif test x"${FC_ACT}" = x"frtpx"; then
+- FCFLAGS="-m -Kocl -Kfast,openmp,parallel,simd=2,noalias -Nlst=t -Koptmsg=2"
+- FCFLAGS_KERNELS_NONBOND="-m -O3 -Kocl -Kfsimple,noreduction,fp_contract,fp_relaxed,fz,ilfunc,mfunc,omitfp,simd_packed_promotion,openmp,parallel,simd=2 -Nlst=t -Koptmsg=2"
+-
+- elif test x"${FC_ACT}" = x"mpifrtpx"; then
+- FCFLAGS="-m -Kocl -Kfast,openmp,parallel,simd=2,noalias -Nlst=t -Koptmsg=2"
+- FCFLAGS_KERNELS_NONBOND="-m -O3 -Kocl -Kfsimple,noreduction,fp_contract,fp_relaxed,fz,ilfunc,mfunc,omitfp,simd_packed_promotion,openmp,parallel,simd=2 -Nlst=t -Koptmsg=2"
+-
+- elif test x"${FC_ACT}" = x"frt"; then
+- FCFLAGS="-m -Am -Kfast"
+-
+- elif test x"${FC_ACT}" = x"mpifrt"; then
+- FCFLAGS="-m -Am -Kfast"
++ elif test x"${FC_ACT}" = x"frtpx" -o x"${FC_ACT}" = x"frt"; then
++ FCFLAGS="-Kocl -Kfast,openmp,parallel,simd=2,noalias -Nlst=t -Koptmsg=2"
++ FCFLAGS_KERNELS_NONBOND="-O3 -Kocl -Kfsimple,noreduction,fp_contract,fp_relaxed,fz,ilfunc,mfunc,omitfp,simd_packed_promotion,openmp,parallel,simd=2 -Nlst=t -Koptmsg=2"
++
++ elif test x"${FC_ACT}" = x"mpifrtpx" -o x"${FC_ACT}" = x"mpifrt"; then
++ FCFLAGS="-Kocl -Kfast,openmp,parallel,simd=2,noalias -Nlst=t -Koptmsg=2"
++ FCFLAGS_KERNELS_NONBOND="-O3 -Kocl -Kfsimple,noreduction,fp_contract,fp_relaxed,fz,ilfunc,mfunc,omitfp,simd_packed_promotion,openmp,parallel,simd=2 -Nlst=t -Koptmsg=2"
+
+ fi
+
+@@ -670,20 +655,14 @@ else
+ elif test x"${FC_ACT}" = x"pgf90"; then
+ FCFLAGS="-m64 -Mflushz -pc 64 -mcmodel=medium -Msmartalloc=huge -Mbackslash"
+
+- elif test x"${FC_ACT}" = x"frtpx"; then
+- FCFLAGS="-m -Kocl -Kopenmp -Nlst=t -Koptmsg=2"
+- FCFLAGS_KERNELS_NONBOND="-m -Kocl -Kopenmp -Nlst=t -Koptmsg=2"
+-
++ elif test x"${FC_ACT}" = x"frtpx" -o x"${FC_ACT}" = x"frt"; then
++ FCFLAGS="-Kocl -Kopenmp -Nlst=t -Koptmsg=2"
++ FCFLAGS_KERNELS_NONBOND="-Kocl -Kopenmp -Nlst=t -Koptmsg=2"
+
+- elif test x"${FC_ACT}" = x"mpifrtpx"; then
+- FCFLAGS="-m -Kocl -Kopenmp -Nlst=t -Koptmsg=2"
+- FCFLAGS_KERNELS_NONBOND="-m -Kocl -Kopenmp -Nlst=t -Koptmsg=2"
+
+- elif test x"${FC_ACT}" = x"frt"; then
+- FCFLAGS="-m "
+-
+- elif test x"${FC_ACT}" = x"mpifrt"; then
+- FCFLAGS="-m "
++ elif test x"${FC_ACT}" = x"mpifrtpx" -o x"${FC_ACT}" = x"mpifrt"; then
++ FCFLAGS="-Kocl -Kopenmp -Nlst=t -Koptmsg=2"
++ FCFLAGS_KERNELS_NONBOND="-Kocl -Kopenmp -Nlst=t -Koptmsg=2"
+
+ fi
+
+@@ -705,19 +684,13 @@ else
+ elif test x"${FC_ACT}" = x"pgf90"; then
+ FCFLAGS="-g -m64 -Mflushz -pc 64 -mcmodel=medium -Msmartalloc=huge -Mbackslash"
+
+- elif test x"${FC_ACT}" = x"frtpx"; then
+- FCFLAGS="-g -m -Kocl -Kopenmp"
+- FCFLAGS_KERNELS_NONBOND=" -g -m -Kocl -Kopenmp -Nlst=t -Koptmsg=2"
+-
+- elif test x"${FC_ACT}" = x"mpifrtpx"; then
+- FCFLAGS=" -g -m -Kocl -Kopenmp -Nlst=t -Koptmsg=2"
+- FCFLAGS_KERNELS_NONBOND=" -g -m -Kocl -Kopenmp -Nlst=t -Koptmsg=2"
+-
+- elif test x"${FC_ACT}" = x"frt"; then
+- FCFLAGS="-g -m "
+-
+- elif test x"${FC_ACT}" = x"mpifrt"; then
+- FCFLAGS="-g -m "
++ elif test x"${FC_ACT}" = x"frtpx" -o x"${FC_ACT}" = x"frt"; then
++ FCFLAGS="-g -Kocl -Kopenmp"
++ FCFLAGS_KERNELS_NONBOND=" -g -Kocl -Kopenmp -Nlst=t -Koptmsg=2"
++
++ elif test x"${FC_ACT}" = x"mpifrtpx" -o x"${FC_ACT}" = x"mpifrt"; then
++ FCFLAGS=" -g -Kocl -Kopenmp -Nlst=t -Koptmsg=2"
++ FCFLAGS_KERNELS_NONBOND=" -g -Kocl -Kopenmp -Nlst=t -Koptmsg=2"
+
+ fi
+
+@@ -739,18 +712,12 @@ else
+ elif test x"${FC_ACT}" = x"pgf90"; then
+ FCFLAGS="-O0 -g -m64 -Msmartalloc=huge"
+
+- elif test x"${FC_ACT}" = x"frtpx"; then
+- FCFLAGS=" -O0 -g -m -Kocl -Kopenmp -Hs -Hu -Ha -Nlst=t -Koptmsg=2"
+- FCFLAGS_KERNELS_NONBOND=" -O0 -g -m -Kocl -Kopenmp -Hs -Hu -Ha -Nlst=t -Koptmsg=2"
+-
+- elif test x"${FC_ACT}" = x"mpifrtpx"; then
+- FCFLAGS_KERNELS_NONBOND=" -O0 -g -m -Kocl -Kopenmp -Hs -Hu -Ha -Nlst=t -Koptmsg=2"
++ elif test x"${FC_ACT}" = x"frtpx" -o x"${FC_ACT}" = x"frt"; then
++ FCFLAGS=" -O0 -g -Kocl -Kopenmp -Hs -Hu -Ha -Nlst=t -Koptmsg=2"
++ FCFLAGS_KERNELS_NONBOND=" -O0 -g -Kocl -Kopenmp -Hs -Hu -Ha -Nlst=t -Koptmsg=2"
+
+- elif test x"${FC_ACT}" = x"frt"; then
+- FCFLAGS="-O0 -g"
+-
+- elif test x"${FC_ACT}" = x"mpifrt"; then
+- FCFLAGS="-O0 -g"
++ elif test x"${FC_ACT}" = x"mpifrtpx" -o x"${FC_ACT}" = x"mpifrt"; then
++ FCFLAGS_KERNELS_NONBOND=" -O0 -g -Kocl -Kopenmp -Hs -Hu -Ha -Nlst=t -Koptmsg=2"
+
+ fi
+ else
+@@ -804,16 +771,16 @@ else
+ CFLAGS="-O3 -fastsse -m64 -Mflushz -pc 64 -mcmodel=medium -Msmartalloc=huge"
+
+ elif test x"${CC_ACT}" = x"fccpx"; then
+- CFLAGS="-m -Kvisimpact -Kocl -Kswp"
++ CFLAGS="-Kvisimpact -Kocl -Kswp"
+
+ elif test x"${CC_ACT}" = x"mpifccpx"; then
+- CFLAGS="-m -Kvisimpact -Kocl -Kswp"
++ CFLAGS="-Kvisimpact -Kocl -Kswp"
+
+ elif test x"${CC_ACT}" = x"fcc"; then
+- CFLAGS="-m -Am -Kfast"
++ CFLAGS="-Am -Kfast"
+
+ elif test x"${CC_ACT}" = x"mpifcc"; then
+- CFLAGS="-m -Am -Kfast"
++ CFLAGS="-Am -Kfast"
+
+ fi
+
+@@ -833,16 +800,16 @@ else
+ CFLAGS="-fastsse -m64 -Mflushz -pc 64 -mcmodel=medium -Msmartalloc=huge"
+
+ elif test x"${CC_ACT}" = x"fccpx"; then
+- CFLAGS="-m -Kocl"
++ CFLAGS=" -Kocl"
+
+ elif test x"${CC_ACT}" = x"mpifccpx"; then
+- CFLAGS="-m -Kocl"
++ CFLAGS=" -Kocl"
+
+ elif test x"${CC_ACT}" = x"fcc"; then
+- CFLAGS="-m -Am -Kfast"
++ CFLAGS=" -Am -Kfast"
+
+ elif test x"${CC_ACT}" = x"mpifcc"; then
+- CFLAGS="-m -Am -Kfast"
++ CFLAGS=" -Am -Kfast"
+
+ fi
+
+@@ -865,16 +832,16 @@ else
+ CFLAGS="-g -fastsse -m64 -Mflushz -pc 64 -mcmodel=medium -Msmartalloc=huge"
+
+ elif test x"${CC_ACT}" = x"fccpx"; then
+- CFLAGS="-g -m -Kocl"
++ CFLAGS="-g -Kocl"
+
+ elif test x"${CC_ACT}" = x"mpifccpx"; then
+- CFLAGS="-g -m -Kocl"
++ CFLAGS="-g -Kocl"
+
+ elif test x"${CC_ACT}" = x"fcc"; then
+- CFLAGS="-g -m -Am -Kfast"
++ CFLAGS="-g -Am -Kfast"
+
+ elif test x"${CC_ACT}" = x"mpifcc"; then
+- CFLAGS="-g -m -Am -Kfast"
++ CFLAGS="-g -Am -Kfast"
+
+ fi
+
+@@ -928,17 +895,11 @@ if test -z "${LDFLAGS}"; then
+ LDFLAGS=""
+ #LDFLAGS="-march=native -fuse-linker-plugin"
+
+- elif test x"${FC_ACT}" = x"frtpx"; then
+- LDFLAGS="-SSL2 -Kparallel -Nfjomplib"
+-
+- elif test x"${FC_ACT}" = x"mpifrtpx"; then
+- LDFLAGS="-SSL2BLAMP -Kparallel -Nfjomplib"
+-
+- elif test x"${FC_ACT}" = x"frt"; then
+- LDFLAGS="-KSPARC64VII,V9FMADD -SSL2"
++ elif test x"${FC_ACT}" = x"frtpx" -o x"${FC_ACT}" = x"frt"; then
++ LDFLAGS="-Kparallel -Nfjomplib -Nlibomp"
+
+- elif test x"${FC_ACT}" = x"mpifrt"; then
+- LDFLAGS="-KSPARC64VII,V9FMADD -SSL2"
++ elif test x"${FC_ACT}" = x"mpifrtpx" -o x"${FC_ACT}" = x"mpifrt"; then
++ LDFLAGS="-Kparallel -Nfjomplib -Nlibomp"
+
+ fi
+ fi
+@@ -973,10 +934,13 @@ AC_SUBST(PPFLAGS)
+
+ # USEKCOMP
+ AM_CONDITIONAL(USEKCOMP, test x"${FC_ACT}" = x"frtpx" -o \
+- x"${FC_ACT}" = x"mpifrtpx")
++ x"${FC_ACT}" = x"mpifrtpx" -o \
++ x"${FC_ACT}" = x"frt" -o \
++ x"${FC_ACT}" = x"mpifrt")
+
+ # KCOMP preprocess macro
+-if test x"${FC_ACT}" = x"frtpx" -o x"${FC_ACT}" = x"mpifrtpx"; then
++if test x"${FC_ACT}" = x"frtpx" -o x"${FC_ACT}" = x"mpifrtpx" -o \
++ x"${FC_ACT}" = x"frt" -o x"${FC_ACT}" = x"mpifrt"; then
+ AC_DEFINE(KCOMP, 1, [defined if K-computer compiler is used.])
+ DEFINED_VARIABLES+=" -DKCOMP"
+ fi
+@@ -1049,13 +1013,13 @@ if test x"${IS_RICC}" == x"yes"; then
+ if test -n "${RICC_FCFLAGS}"; then
+ FCFLAGS=${RICC_FCFLAGS}
+ else
+- FCFLAGS="-pc -m -omp"
++ FCFLAGS="-pc -omp"
+ fi
+
+ if test -n "${RICC_CFLAGS}"; then
+ CFLAGS=${RICC_CFLAGS}
+ else
+- CFLAGS="-pc -m -omp"
++ CFLAGS="-pc -omp"
+ fi
+
+ if test -n "${RICC_PPFLAGS}"; then
diff --git a/var/spack/repos/builtin/packages/genesis/package.py b/var/spack/repos/builtin/packages/genesis/package.py
new file mode 100644
index 0000000000..3711fa4e9f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/genesis/package.py
@@ -0,0 +1,112 @@
+# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+
+from spack import *
+
+
+class Genesis(AutotoolsPackage, CudaPackage):
+ """GENESIS is a Molecular dynamics and modeling software
+ for bimolecular systems such as proteins, lipids, glycans,
+ and their complexes.
+ """
+
+ homepage = "https://www.r-ccs.riken.jp/labs/cbrt/"
+ url = "https://www.r-ccs.riken.jp/labs/cbrt/wp-content/uploads/2020/09/genesis-1.5.1.tar.bz2"
+ git = "https://github.com/genesis-release-r-ccs/genesis-2.0.git"
+
+ version("master", branch="master")
+ version(
+ "1.5.1",
+ sha256="62a453a573c36779484b4ffed2dfa56ea03dfe1308d631b33ef03f733259b3ac",
+ url="https://www.r-ccs.riken.jp/labs/cbrt/wp-content/uploads/2020/09/genesis-1.5.1.tar.bz2",
+ )
+
+ resource(
+ when="@1.5.1",
+ name="user_guide",
+ url="https://www.r-ccs.riken.jp/labs/cbrt/wp-content/uploads/2019/10/GENESIS-1.4.0.pdf",
+ sha256="da2c3f8bfa1e93adb992d3cfce09fb45d8d447a94f9a4f884ac834ea7279b9c7",
+ expand=False,
+ placement="doc",
+ )
+
+ variant("openmp", default=True, description="Enable OpenMP.")
+ variant("single", default=False, description="Enable single precision.")
+ variant("hmdisk", default=False, description="Enable huge molecule on hard disk.")
+
+ conflicts("%apple-clang", when="+openmp")
+
+ depends_on("autoconf", type="build", when="@1.5.1 %fj")
+ depends_on("autoconf", type="build", when="@master")
+ depends_on("automake", type="build", when="@1.5.1 %fj")
+ depends_on("automake", type="build", when="@master")
+ depends_on("libtool", type="build", when="@1.5.1 %fj")
+ depends_on("libtool", type="build", when="@master")
+ depends_on("m4", type="build", when="@1.5.1 %fj")
+ depends_on("m4", type="build", when="@master")
+
+ depends_on("mpi", type=("build", "run"))
+ depends_on("lapack")
+ depends_on("python@2.6.9:2.8.0", type=("build", "run"), when="@master")
+
+ patch("fj_compiler.patch", when="@master %fj")
+ patch("fj_compiler_1.5.1.patch", when="@1.5.1 %fj")
+
+ parallel = False
+
+ @property
+ def force_autoreconf(self):
+ # Run autoreconf due to build system patch
+ return self.spec.satisfies("@1.5.1 %fj")
+
+ def configure_args(self):
+ spec = self.spec
+ options = []
+ options.extend(self.enable_or_disable("openmp"))
+ options.extend(self.enable_or_disable("single"))
+ options.extend(self.enable_or_disable("hmdisk"))
+ if "+cuda" in spec:
+ options.append("--enable-gpu")
+ options.append("--with-cuda=%s" % spec["cuda"].prefix)
+ else:
+ options.append("--disable-gpu")
+ if spec.target == "a64fx" and self.spec.satisfies("@master %fj"):
+ options.append("--host=Fugaku")
+ return options
+
+ def setup_build_environment(self, env):
+ env.set("FC", self.spec["mpi"].mpifc, force=True)
+ env.set("F77", self.spec["mpi"].mpif77, force=True)
+ env.set("CC", self.spec["mpi"].mpicc, force=True)
+ env.set("CXX", self.spec["mpi"].mpicxx, force=True)
+ env.set("LAPACK_LIBS", self.spec["lapack"].libs.ld_flags)
+ if "+cuda" in self.spec:
+ cuda_arch = self.spec.variants["cuda_arch"].value
+ cuda_gencode = " ".join(self.cuda_flags(cuda_arch))
+ env.set("NVCCFLAGS", cuda_gencode)
+
+ def install(self, spec, prefix):
+ make("install")
+ install_tree("doc", prefix.share.doc)
+
+ @run_after("install")
+ def cache_test_sources(self):
+ if self.spec.satisfies("@master"):
+ self.cache_extra_test_sources(["tests"])
+
+ def test(self):
+ if self.spec.satisfies("@master"):
+ exe_name = self.spec["python"].command.path
+ test_name = join_path(
+ self.install_test_root, "tests", "regression_test", "test.py"
+ )
+ bin_name = join_path(self.prefix.bin, "spdyn")
+ opts = [
+ test_name,
+ self.spec["mpi"].prefix.bin.mpirun + " -np 8 " + bin_name,
+ ]
+ env["OMP_NUM_THREADS"] = "1"
+ self.run_test(exe_name, options=opts, expected="Passed 53 / 53")