Skip to content

Commit

Permalink
Merge pull request #7699 from arielzn/20190220141404_new_pr_GlobalArr…
Browse files Browse the repository at this point in the history
…ays57

{chem,lib}[intel/2018b] GlobalArrays v5.7, OpenMolcas v18.09
  • Loading branch information
Micket committed Jul 23, 2019
2 parents 10ac892 + a2e43a2 commit 07d30de
Show file tree
Hide file tree
Showing 5 changed files with 313 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This file is an EasyBuild reciPY as per https://github.com/easybuilders/easybuild

easyblock = 'ConfigureMake'
name = 'GlobalArrays'
version = '5.7'

homepage = 'http://hpc.pnl.gov/globalarrays'
description = "Global Arrays (GA) is a Partitioned Global Address Space (PGAS) programming model"

toolchain = {'name': 'intel', 'version': '2018b'}
toolchainopts = {'usempi': True}

source_urls = ['https://github.com/GlobalArrays/ga/releases/download/']
sources = ['v%(version)s/ga-%(version)s.tar.gz']

# patch for bugs on v5.7 causing errors on NWChem
patches = [
'GlobalArrays-v5.7_ga_diag_std.patch', # fix bug ga_diag_std https://github.com/GlobalArrays/ga/pull/101
'GlobalArrays-v5.7-intel-2018b-MKL_issue.patch', # fix MKL issue https://github.com/GlobalArrays/ga/pull/122
]

checksums = [
'3ed1ab47adfda7bceb7beca12fc05a2e1631732f0e55bbaf9036dad4e3da4774',
'8049543e6442e13acb54cb4afd9a6ad78102864b2ef138ad9f4b1a45bd0666bb', # GlobalArrays-v5.7_ga_diag_std.patch
'e5b9fff47d471b3552b167b82153f8f1fd6406c52e39a11b693cb9c4bf12645e', # GlobalArrays-v5.7-intel-2018b-MKL_issue.patch
]

configopts = ' --with-mpi --enable-i8'
configopts += ' --with-blas8="-L$EBROOTIMKL/mkl/lib/intel64 -lmkl_sequential -lmkl_intel_ilp64"'
configopts += ' --with-scalapack8="-L$EBROOTIMKL/mkl/lib/intel64 -lmkl_sequential -lmkl_scalapack_ilp64"'

# select armci network as (Comex) MPI-1 two-sided
configopts += ' --with-mpi-ts'

sanity_check_paths = {
'files': ['bin/adjust.x', 'bin/collisions.x', 'bin/ga-config', 'lib/libarmci.a', 'lib/libcomex.a', 'lib/libga.a'],
'dirs': ['include'],
}

moduleclass = 'lib'
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# fix for MKL error "PDSTEDC parameter number 10 had an illegal value"
# (github.com/GlobalArrays/ga/pull/122)
diff --git a/global/src/scalapack.F b/global/src/scalapack.F
index 74ef1a9..cd80884 100644
--- a/global/src/scalapack.F
+++ b/global/src/scalapack.F
@@ -3030,6 +3030,7 @@ c
integer alen, blen
integer block_dims_A(2),block_dims_B(2),blocks(2)
integer gridA(2), gridB(2)
+ double precision mywork
logical use_direct

external pdlamch,iceil,indxg2p
@@ -3201,20 +3202,16 @@ c
c
c
liwork4=liwork
-#if 0
lcwork4=-1
- call pdsyevd(jobz, uplo,
- 1 n, dbl_mb(adrA), one4, one4, descA,
- 1 eval, dbl_mb(adrB), one4, one4,
- 2 descB, dbl_mb(adrcwork), lcwork4,
- 2 dum, liwork4, info)
- lcwork=dum
-#else
-
- lcwork = MAX( 1+6*N+2*NP*NQ,
- = 3*N + MAX( NB*( NP+1 ), 3*NB ))+ 2*N
- lcwork=max(lcwork,16384)
-#endif
+ call pdsyevd(jobz, uplo,
+ 1 n, dbl_mb(adrA), one4, one4, descA,
+ 1 eval, dbl_mb(adrB), one4, one4,
+ 2 descB, mywork, lcwork4,
+ 2 int_mb(adriwork), liwork4, info)
+ lcwork = MAX( 1+6*N+2*NP*NQ,
+ = 3*N + MAX( NB*( NP+1 ), 3*NB ))+ 2*N
+ lcwork=max(lcwork,16384)
+ lcwork=max(int(mywork),lcwork)

c
if(lcwork.ne.0)
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
# fixes for ga_diag_std_seq 32-bit integer interface and for pgcc
# object handling (github.com/GlobalArrays/ga/pull/101)
diff --git a/global/src/ga_diag_seq.F b/global/src/ga_diag_seq.F
index ee601729..d5653975 100644
--- a/global/src/ga_diag_seq.F
+++ b/global/src/ga_diag_seq.F
@@ -1,6 +1,11 @@
#if HAVE_CONFIG_H
# include "config.fh"
#endif
+#if (BLAS_SIZE ==4)
+#define INTGR4 integer*4
+#else
+#define INTGR4 integer*8
+#endif
c
c This file has been converted to use LAPACK circa 2011
c instead of EISPACK circa 1983 by Jeff Hammond circa 2014.
@@ -15,7 +20,7 @@ c
integer g_v ! Global matrix to return evecs
double precision evals(*) ! Local array to return evals
c
- integer n, ierr
+ integer n
#if ENABLE_EISPACK
integer l_fv1, l_fv2, l_v
MA_ACCESS_INDEX_TYPE k_fv1, k_fv2, k_v
@@ -27,6 +32,7 @@ c
integer l_a, l_s
MA_ACCESS_INDEX_TYPE k_a, k_s
integer dim1, dim2, type, me
+ INTGR4 n4,ierr
logical status
c
c
@@ -47,6 +53,7 @@ c
$ call ga_error('ga_diag_seq: nonsquare matrix ',0)

n = dim1
+ n4 = n
me = ga_nodeid()
if (me .eq. 0) then
c
@@ -87,7 +94,7 @@ c
call rsg(n, n, dbl_mb(k_a), dbl_mb(k_s), evals, 1,
$ dbl_mb(k_v), dbl_mb(k_fv1), dbl_mb(k_fv2), ierr)
#else
- call dsygv(1,'V','U',n,dbl_mb(k_a),n,dbl_mb(k_s),n,
+ call dsygv(1,'V','U',n4,dbl_mb(k_a),n,dbl_mb(k_s),n4,
$ evals,dbl_mb(k_wrk),n2, ierr)
if (ierr.ne.0)
$ call ga_error('ga_diag_seq: dsygv failed',ierr)
@@ -139,7 +146,7 @@ c
integer g_v ! Global matrix to return evecs
double precision evals(*) ! Local array to return evals
c
- integer n, ierr
+ integer n
#if ENABLE_EISPACK
integer l_fv1, l_fv2, l_v
MA_ACCESS_INDEX_TYPE k_fv1, k_fv2, k_v
@@ -151,6 +158,7 @@ c
integer l_a
MA_ACCESS_INDEX_TYPE k_a
integer dim1, dim2, type, me
+ INTGR4 n4,n2_i4,ierr
logical status
c
c
@@ -170,6 +178,7 @@ c
$ call ga_error('ga_diag_std_seq: nonsquare matrix ',0)

n = dim1
+ n4 = n
me = ga_nodeid()
if (me .eq. 0) then
c
@@ -187,6 +196,7 @@ c
#else
c LAPACK fails for n=1 without this
n2 = max(n*n,3*n-1)
+ n2_i4=n2
status=status.and.ma_push_get(MT_DBL, n2,
$ 'diag_std_seq:wrk', l_wrk, k_wrk)
#endif
@@ -205,8 +215,8 @@ c
call rs(n, n, dbl_mb(k_a), evals, 1,
$ dbl_mb(k_v), dbl_mb(k_fv1), dbl_mb(k_fv2), ierr)
#else
- call dsyev('V', 'L', n, dbl_mb(k_a), n,
- $ evals, dbl_mb(k_wrk), n2, ierr)
+ call dsyev('V', 'L', n4, dbl_mb(k_a), n4,
+ $ evals, dbl_mb(k_wrk), n2_i4, ierr)
if (ierr.ne.0)
$ call ga_error('ga_diag_std_seq: dsyev failed',ierr)
c We used to copy to preserve code symmetry with EISPACK
diff --git a/m4/ga_f2c_string.m4 b/m4/ga_f2c_string.m4
index 51914c37..addde81f 100644
--- a/m4/ga_f2c_string.m4
+++ b/m4/ga_f2c_string.m4
@@ -13,9 +13,9 @@ AC_COMPILE_IFELSE(
first_name = "John"
last_name = "Doe"
call csub(first_name, last_name)
- end]], [
+ end]], [mv conftest.$ac_objext cfortran_test.$ac_objext
ga_save_LIBS=$LIBS
- LIBS="conftest.$ac_objext $LIBS $[]_AC_LANG_PREFIX[]LIBS"
+ LIBS="cfortran_test.$ac_objext $LIBS $[]_AC_LANG_PREFIX[]LIBS"
AC_LANG_PUSH([C])
AC_RUN_IFELSE([AC_LANG_SOURCE(
[[#include <stdio.h>
@@ -62,7 +62,7 @@ int main(int argc, char **argv)
LIBS=$ga_save_LIBS],
[m4_default([$3], :)])
AC_LANG_POP([Fortran 77])
-rm -rf conftest*
+rm -rf conftest* cfortran_test.$ac_objext
])dnl


diff --git a/m4/ga_f77_check_sizeof.m4 b/m4/ga_f77_check_sizeof.m4
index 6a773d12..3ee3897f 100644
--- a/m4/ga_f77_check_sizeof.m4
+++ b/m4/ga_f77_check_sizeof.m4
@@ -10,9 +10,9 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE(
external size
$1 x(2)
call size(x(1),x(2))
- end]])], [
+ end]])], [mv conftest.$ac_objext cfortran_test.$ac_objext
ga_save_LIBS=$LIBS
- LIBS="conftest.$ac_objext $LIBS $[]_AC_LANG_PREFIX[]LIBS"
+ LIBS="cfortran_test.$ac_objext $LIBS $[]_AC_LANG_PREFIX[]LIBS"
AC_LANG_PUSH([C])
AC_RUN_IFELSE([AC_LANG_SOURCE(
[[#include <stdio.h>
@@ -44,7 +44,7 @@ int main(int argc, char **argv)
}
]])], [AS_TR_SH([$2])=`cat conftestval`])
LIBS=$ga_save_LIBS
- rm -f conftest*
+ rm -f conftest* cfortran_test*
AC_LANG_POP([C])])
AC_LANG_POP([Fortran 77])
]) # GA_F77_COMPUTE_SIZEOF
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# This file is an EasyBuild reciPY as per https://github.com/easybuilders/easybuild

easyblock = 'CMakeMake'
name = 'OpenMolcas'
version = '18.09'
versionsuffix = '-Python-%(pyver)s'

homepage = "https://gitlab.com/Molcas/OpenMolcas"
description = "OpenMolcas is a quantum chemistry software package"

toolchain = {'name': 'intel', 'version': '2018b'}
toolchainopts = {'usempi': True}

source_urls = ['https://gitlab.com/Molcas/OpenMolcas/-/archive/v%(version)s/']
sources = ["OpenMolcas-v%(version)s.tar.gz"]

# This patch avoids a forced extra copy of 'pymolcas' script
# in a local folder of the user doing the build
# The 'make install' process will already install it in
# %(installdir)s/sbin/
patches = ["OpenMolcas-pymolcas_only_in_ebprefix.patch"]

checksums = ['b4f310fb65205c865ccc6373ce9c3833a586f8ff63a71a624cf793559c9b39cf',
'56165ab4a752ef7cdbe3340c8c922fca04510e8ee2e4024ea654e6bcd83198f8']

dependencies = [
('GlobalArrays', '5.7'),
('HDF5', '1.10.2'),
('Python', '3.6.6'),
]

builddependencies = [('CMake', '3.12.1')]

separate_build_dir = True

preconfigopts = 'GAROOT=$EBROOTGLOBALARRAYS'
configopts = '-DLINALG=MKL -DMKLROOT=$EBROOTIMKL/mkl -DMPI=ON -DGA=ON -DBUILD_SHARED_LIBS=ON -DTOOLS=ON -DFDE=ON'

modextravars = {
'MOLCAS': '%(installdir)s',
'MOLCAS_DRIVER': '%(installdir)s/sbin/pymolcas',
'MOLCAS_SOURCE': '%(installdir)s',
}

sanity_check_paths = {
'files': ['lib/libmolcas.so', 'bin/alaska.exe', 'bin/casvb.exe', 'bin/cht3.exe', 'bin/espf.exe', 'bin/gateway.exe',
'bin/gugaci.exe', 'bin/last_energy.exe', 'bin/mbpt2.exe', 'bin/mcpdft.exe', 'bin/mrci.exe',
'bin/qmstat.exe', 'bin/rassi.exe', 'bin/seward.exe', 'bin/vibrot.exe', 'bin/averd.exe', 'bin/ccsdt.exe',
'bin/cpf.exe', 'bin/expbas.exe', 'bin/genano.exe', 'bin/gugadrt.exe', 'bin/localisation.exe',
'bin/mckinley.exe', 'bin/motra.exe', 'bin/numerical_gradient.exe', 'bin/quater.exe', 'bin/rpa.exe',
'bin/slapaf.exe', 'bin/caspt2.exe', 'bin/chcc.exe', 'bin/dynamix.exe', 'bin/ffpt.exe', 'bin/guessorb.exe',
'bin/guga.exe', 'bin/loprop.exe', 'bin/mclr.exe', 'bin/mpprop.exe', 'bin/parnell.exe', 'bin/rasscf.exe',
'bin/scf.exe', 'bin/surfacehop.exe', 'sbin/pymolcas', 'sbin/help_basis'],
'dirs': ['data/', 'basis_library/'],
}

moduleclass = 'chem'
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Avoid a forced copy of the 'pymolcas' script in a local path
# of the user doing the build
# 'make install' will install it using the proper prefix
# by A. Lozano (ULiege)
--- a/sbin/install_pymolcas.sh 2018-09-02 09:35:13.000000000 +0200
+++ b/sbin/install_pymolcas.sh 2019-03-11 16:53:29.224546598 +0100
@@ -116,8 +116,8 @@
echo "Is this OK? [Y/n] (will assume \"Yes\" in 25 seconds)"
while true ; do
if [ "$INTERACTIVE" = "0" ] ; then
- echo "Running in non-interactive mode, assuming \"Yes\""
- answer="Yes"
+ echo "Running in non-interactive mode, assuming \"No\""
+ answer="No"
else
read_timeout answer
fi
@@ -143,7 +143,7 @@
echo ""
echo "*** You have to put pymolcas in any directory in your PATH"
if [ "$INTERACTIVE" = "0" ] ; then
- exit 3
+ exit 0
fi
break ;;
* ) echo "Please answer yes or no"

0 comments on commit 07d30de

Please sign in to comment.