Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{chem}[intel/2018b] PSI4 1.2.1 (REVIEW) #7109

Merged
merged 9 commits into from
Nov 14, 2018
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions easybuild/easyconfigs/c/CheMPS2/CheMPS2-1.8.8-intel-2018b.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
easyblock = 'CMakeMake'

name = 'CheMPS2'
version = '1.8.8'

homepage = 'https://github.com/SebWouters/CheMPS2'
description = """CheMPS2 is a scientific library which contains a spin-adapted implementation of the
density matrix renormalization group (DMRG) for ab initio quantum chemistry."""

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

source_urls = ['https://github.com/SebWouters/CheMPS2/archive/']
sources = ['v%(version)s.tar.gz']
checksums = ['c64a0572d333c7c071c3ef59cd95eeb39abe766496cb28df184ce44bdb38f75c']

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

dependencies = [
('HDF5', '1.10.2')
]

runtest = 'test'

separate_build_dir = True

sanity_check_paths = {
'files': ['bin/chemps2', 'lib64/libchemps2.%s' % SHLIB_EXT, 'lib64/libchemps2.a'],
'dirs': ['include/chemps2']
}

moduleclass = 'chem'
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
easyblock = 'Bundle'
boegel marked this conversation as resolved.
Show resolved Hide resolved

name = 'deepdiff'
version = '3.3.0'
versionsuffix = '-Python-%(pyver)s'

homepage = 'https://deepdiff.readthedocs.io/en/latest/'
description = """DeepDiff: Deep Difference of dictionaries, iterables and almost any other object recursively."""

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

dependencies = [('Python', '2.7.15')]

boegel marked this conversation as resolved.
Show resolved Hide resolved
exts_defaultclass = 'PythonPackage'
exts_default_options = {
'download_dep_fail': True,
'use_pip': True,
}

exts_list = [
('jsonpickle', '1.0', {
'source_urls': ['https://pypi.python.org/packages/source/j/jsonpickle/'],
'checksums': ['d43ede55b3d9b5524a8e11566ea0b11c9c8109116ef6a509a1b619d2041e7397'],
}),
(name, version, {
'source_urls': ['https://pypi.python.org/packages/source/d/deepdiff/'],
'checksums': ['ecad8e16a96ffd27e8f40c9801a6ab16ec6a7e7e6e6859a7710ba4695f22702c'],
}),
]

sanity_check_paths = {
'files': [],
'dirs': ['lib/python%(pyshortver)s/site-packages']
}

modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']}

moduleclass = 'tools'
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
easyblock = 'PythonPackage'

name = 'networkx'
version = '2.2'
versionsuffix = '-Python-%(pyver)s'

homepage = 'https://pypi.python.org/pypi/networkx'
description = """NetworkX is a Python package for the creation, manipulation, and study of the structure, dynamics,
and functions of complex networks."""

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

source_urls = [PYPI_SOURCE]
sources = [SOURCE_ZIP]
checksums = ['45e56f7ab6fe81652fb4bc9f44faddb0e9025f469f602df14e3b2551c2ea5c8b']

dependencies = [('Python', '2.7.15')]

boegel marked this conversation as resolved.
Show resolved Hide resolved
use_pip = True
download_dep_fail = True

sanity_check_paths = {
'files': [],
'dirs': ['lib/python%(pyshortver)s/site-packages'],
}

moduleclass = 'tools'
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
easyblock = 'EB_PSI'

name = 'PSI4'
version = '1.2.1'
versionsuffix = '-Python-%(pyver)s'

homepage = 'http://www.psicode.org/'
description = """PSI4 is an open-source suite of ab initio quantum chemistry programs designed for
efficient, high-accuracy simulations of a variety of molecular properties. We can routinely perform
computations with more than 2500 basis functions running serially or in parallel."""

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

source_urls = ['https://github.com/psi4/psi4/archive']
sources = ['v%(version)s.tar.gz']
patches = ['PSI4-%(version)s_fix_cmake_release.patch']
checksums = [
'fbde7ee67174f7ba7b7f6f4e8117ce8b80f5fd10414577f5b0fcdbaa6c8ba020', # v1.2.1.tar.gz
'5c1027114dc1505c90c087af09c1c4cfbff5210de7fb7f9ae6a8fe60e917d614', # PSI4-1.2.1_fix_cmake_release.patch
]

dependencies = [
('Python', '2.7.15'),
# PCMSolver recent versions fail with recent intel compilers.
# Tried with intel/201{7,8}b, and versions 1.1.12, and 1.2.1
# See in more details: https://github.com/PCMSolver/pcmsolver/issues/159
# ('PCMSolver', '1.2.1'),
('CheMPS2', '1.8.8'),
# Tests are failing with pytest 3.9.2
('pytest', '3.8.2', versionsuffix),
('networkx', '2.2', versionsuffix),
('deepdiff', '3.3.0', versionsuffix),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hajgato Please include a commented out entry for PCMSolver, and explain why it's excluded for now.

Also, why are libxc, Libint & co not included as deps (given the updates to the easyblock in easybuilders/easybuild-easyblocks#1568)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@boegel
I did not include libxc and Libint, because those should be installed with CMake, with specific options. The current libxc and Libint are built with configure, not with CMake, plus PSI4 have specific requirements for Libint with a unified libderiv includedir, and with a different scheme of libint-max-am and libderiv-max-am1. Further compilations, that with the CMake cannot enable r12 options for Libint. As a consequence, I should use a specific version of Libint for PSI4, (which would be not compatible with a possible future version of CP2K and a new version of libxc which was built with CMake instead of the existing configure. The moment I faced this problem, the psi easyblock was already done, and I did not delete that part.
If you wish, I can make the PSI4 specific Libint and libxc easyconfigs with the -PSI4 suffix, and/or I can delete the Libint and libxc parts from the psi easyblock.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So what happens if we don't provide libxc and Libint as dependencies ourselves? Are they downloaded on the fly during the installation of PSI4? If so, that's a good reason to include them as dependencies instead imho, even if they are very specific to PSI4 (but we should try and make them a bit more generic if possible by not using PSI in the versionsuffix).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@boegel
Yes, they downloaded and built automatically. I am not sure in case of libxc that it can be replaced by a generic one, as it will clash with CP2K (see for specific include dir). Maybe in the case of Libint we can make a more generic easyconfig, but then we have to change the existing Libint with ConfigureMake to CMakeMake, and I am not sure about the consequences. As I added a comment in the psi easyblock, it is possible to use the non-CMake build versions, but then one have to provide a corresponding Find<library-name>.cmake scipts. I think this would lead too far, so we do need the -PSI4 suffixes.
The basic problem is that the pirmary PSI4 distribution is with conda, so we do have to be happy that we can still build it from source.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(especially, because configure possibilities are different in libxc with CMake and configure, not sure whats the situation in case of Libint)
I do feel that in this case the lets use all deps built by EB is just too much effort, because as a matter of fact, all extra suites should be EB build, like dkh, gdma, resp, snsmp2, etc. along with Libint, libxc, gau2grid, and pybind11) Well, this is a conswquence of a modularly built application....

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh, what a mess... OK, let's leave it as is then, and revisit later when we find time for it (yeah, right...)

]

builddependencies = [
('CMake', '3.12.1'),
# Perl needed for the ctest test suite during the installation, not for the pytest test suite after the installation
# ('Perl', '5.28.0'),
]

configopts = '-DENABLE_MPI=ON -DENABLE_PLUGINS=ON -DENABLE_XHOST=OFF '
# Install python mudule to the standard location instead of lib
configopts += '-DPYMOD_INSTALL_LIBDIR=/python%(pyshortver)s/site-packages '
# Add bundled (downloaded) packages
# -DENABLE_simint=ON does not work with intel/2018, so have to make with GCCcore
configopts += '-DENABLE_dkh=ON -DENABLE_gdma=ON -DENABLE_resp=ON -DENABLE_snsmp2=ON '

# runtest uses ctest, and some of the thests have to be manually compared
# to the reference output (those tests are marked failed)
# After installing PSI4, you can test the package using psi4 --test command. (This uses pytest framework)
# runtest = '-L smoke'
runtest = False

modextrapaths = {'PYTHONPATH': 'lib/python%(pyshortver)s/site-packages'}

moduleclass = 'chem'
81 changes: 81 additions & 0 deletions easybuild/easyconfigs/p/PSI4/PSI4-1.2.1_fix_cmake_release.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# remove CMAKE_BUILD_TYPE check (beacuse it is set to None to avoid -O3 optimization flag)
# November 02nd 2018 by B. Hajgato - (Free University Brussels - VUB)
diff --new-file -ru psi4-1.2.1.orig/cmake/autocmake_safeguards.cmake psi4-1.2.1/cmake/autocmake_safeguards.cmake
--- psi4-1.2.1.orig/cmake/autocmake_safeguards.cmake 2018-07-25 04:11:25.000000000 +0200
+++ psi4-1.2.1/cmake/autocmake_safeguards.cmake 2018-10-30 16:18:26.650251435 +0100
@@ -19,8 +19,8 @@
string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_tolower)
string(TOUPPER "${CMAKE_BUILD_TYPE}" cmake_build_type_toupper)

-if(NOT cmake_build_type_tolower STREQUAL "debug" AND
- NOT cmake_build_type_tolower STREQUAL "release" AND
- NOT cmake_build_type_tolower STREQUAL "relwithdebinfo")
- message(FATAL_ERROR "Unknown build type \"${CMAKE_BUILD_TYPE}\". Allowed values are Debug, Release, RelWithDebInfo (case-insensitive).")
-endif()
+#if(NOT cmake_build_type_tolower STREQUAL "debug" AND
+# NOT cmake_build_type_tolower STREQUAL "release" AND
+# NOT cmake_build_type_tolower STREQUAL "relwithdebinfo")
+# message(FATAL_ERROR "Unknown build type \"${CMAKE_BUILD_TYPE}\". Allowed values are Debug, Release, RelWithDebInfo (case-insensitive).")
+#endif()
diff --new-file -ru psi4-1.2.1.orig/external/upstream/gau2grid/CMakeLists.txt psi4-1.2.1/external/upstream/gau2grid/CMakeLists.txt
--- psi4-1.2.1.orig/external/upstream/gau2grid/CMakeLists.txt 2018-07-25 04:11:25.000000000 +0200
+++ psi4-1.2.1/external/upstream/gau2grid/CMakeLists.txt 2018-10-30 16:36:23.558755892 +0100
@@ -16,6 +16,7 @@
GIT_REPOSITORY https://github.com/dgasmith/gau2grid
GIT_TAG v1.1.0
UPDATE_COMMAND ""
+ PATCH_COMMAND sed -e "s/debug/none/" -i cmake/autocmake_safeguards.cmake
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
diff --new-file -ru psi4-1.2.1.orig/external/upstream/libint/CMakeLists.txt psi4-1.2.1/external/upstream/libint/CMakeLists.txt
--- psi4-1.2.1.orig/external/upstream/libint/CMakeLists.txt 2018-07-25 04:11:25.000000000 +0200
+++ psi4-1.2.1/external/upstream/libint/CMakeLists.txt 2018-10-30 16:40:02.623920471 +0100
@@ -15,6 +15,7 @@
GIT_REPOSITORY https://github.com/evaleev/libint
GIT_TAG 024738c # v1.2.1+2 release-1-2-1
UPDATE_COMMAND ""
+ PATCH_COMMAND sed -e "s/debug/none/" -i cmake/autocmake_safeguards.cmake
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
--- psi4-1.2.1/external/upstream/dkh/CMakeLists.txt.orig 2018-07-25 04:11:25.000000000 +0200
+++ psi4-1.2.1/external/upstream/dkh/CMakeLists.txt 2018-10-31 12:48:38.125438986 +0100
@@ -16,6 +16,7 @@
GIT_REPOSITORY https://github.com/psi4/dkh
GIT_TAG v1.2
UPDATE_COMMAND ""
+ PATCH_COMMAND sed -e "s/debug/none/" -i cmake/autocmake_safeguards.cmake
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
--- psi4-1.2.1/external/upstream/libefp/CMakeLists.txt.orig 2018-07-25 04:11:25.000000000 +0200
+++ psi4-1.2.1/external/upstream/libefp/CMakeLists.txt 2018-10-31 12:59:04.215388286 +0100
@@ -17,6 +17,7 @@
GIT_REPOSITORY https://github.com/ilyak/libefp
GIT_TAG 15cd7ce # v1.5.0 + 10 (docs and a cmake lapack patch)
UPDATE_COMMAND ""
+ PATCH_COMMAND sed -e "s/debug/none/" -i cmake/autocmake_safeguards.cmake
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
--- psi4-1.2.1/external/upstream/gdma/CMakeLists.txt.orig 2018-07-25 04:11:25.000000000 +0200
+++ psi4-1.2.1/external/upstream/gdma/CMakeLists.txt 2018-10-31 12:49:20.773048665 +0100
@@ -16,6 +16,7 @@
GIT_REPOSITORY https://github.com/psi4/gdma
GIT_TAG 9d607d7 # v2.2.6-2-g9d607d7
UPDATE_COMMAND ""
+ PATCH_COMMAND sed -e "s/debug/none/" -i cmake/autocmake_safeguards.cmake
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
--- psi4-1.2.1/external/upstream/libxc/CMakeLists.txt.orig 2018-11-05 10:15:58.840945366 +0100
+++ psi4-1.2.1/external/upstream/libxc/CMakeLists.txt 2018-11-05 10:14:59.248068042 +0100
@@ -15,6 +15,7 @@
GIT_REPOSITORY https://github.com/psi4/libxc
GIT_TAG libxc4retweaked # v4.0 (0387b1d1) + !62 + MVS corr + 4.0.2 bump + 2 build commits = c754e28
UPDATE_COMMAND ""
+ PATCH_COMMAND sed -e "s/debug/none/" -i cmake/autocmake_safeguards.cmake
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
easyblock = 'Bundle'
boegel marked this conversation as resolved.
Show resolved Hide resolved

name = 'pytest'
version = '3.8.2'
versionsuffix = '-Python-%(pyver)s'

homepage = 'http://pytest.org'
description = """pytest: simple powerful testing with Python"""

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

dependencies = [('Python', '2.7.15')]

exts_defaultclass = 'PythonPackage'
exts_default_options = {
'download_dep_fail': True,
'use_pip': True,
}

exts_list = [
('py', '1.7.0', {
'source_urls': ['https://pypi.python.org/packages/source/p/py/'],
'checksums': ['bf92637198836372b520efcba9e020c330123be8ce527e535d185ed4b6f45694'],
}),
('attrs', '18.2.0', {
'modulename': 'attr',
'source_urls': ['https://pypi.python.org/packages/source/a/attrs/'],
'checksums': ['10cbf6e27dbce8c30807caf056c8eb50917e0eaafe86347671b57254006c3e69'],
}),
('pluggy', '0.8.0', {
'source_urls': ['https://pypi.python.org/packages/source/p/pluggy/'],
'checksums': ['447ba94990e8014ee25ec853339faf7b0fc8050cdc3289d4d71f7f410fb90095'],
}),
('atomicwrites', '1.2.1', {
'source_urls': ['https://pypi.python.org/packages/source/a/atomicwrites/'],
'checksums': ['ec9ae8adaae229e4f8446952d204a3e4b5fdd2d099f9be3aaf556120135fb3ee'],
}),
('more-itertools', '4.3.0', {
'modulename': 'more_itertools',
'source_urls': ['https://pypi.python.org/packages/source/m/more-itertools/'],
'checksums': ['c476b5d3a34e12d40130bc2f935028b5f636df8f372dc2c1c01dc19681b2039e'],
}),
('scandir', '1.9.0', {
'source_urls': ['https://pypi.python.org/packages/source/s/scandir/'],
'checksums': ['44975e209c4827fc18a3486f257154d34ec6eaec0f90fef0cca1caa482db7064'],
}),
('pathlib2', '2.3.2', {
'source_urls': ['https://pypi.python.org/packages/source/p/pathlib2/'],
'checksums': ['8eb170f8d0d61825e09a95b38be068299ddeda82f35e96c3301a8a5e7604cb83'],
}),
(name, version, {
'source_urls': ['https://pypi.python.org/packages/source/p/pytest/'],
'checksums': ['9332147e9af2dcf46cd7ceb14d5acadb6564744ddff1fe8c17f0ce60ece7d9a2'],
}),
]

sanity_check_paths = {
'files': ['bin/pytest'],
'dirs': ['lib/python%(pyshortver)s/site-packages'],
}

modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']}

moduleclass = 'tools'