Skip to content

Commit eb81613

Browse files
committed
#487 deePDM-cpp version working (v3)
1 parent 86c81ba commit eb81613

File tree

7 files changed

+37550
-29
lines changed

7 files changed

+37550
-29
lines changed

487_DeePMD-kit/deePMD-CM.eb

Lines changed: 18 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,30 @@ name = 'DeePDM-kit'
44
version = '3.0.1'
55
# versionsuffix = '-CUDA-%(cudaver)s'
66
versionsuffix = '-CM-version'
7+
local_tf_version = '2.15.1'
78

89
homepage = 'https://github.com/deepmodeling/deepmd-kit/'
910
description = "A deep learning package for many-body potential energy representation and molecular dynamics."
1011

1112
toolchain = {'name': 'foss', 'version': '2023a'}
1213

13-
# builddependencies = [('scikit-build-core', '0.9.3')]
14-
# dependencies = [
15-
# # ('CUDA', '12.6.0', '', SYSTEM),
16-
# ('Python', '3.11.3'),
17-
# ('SciPy-bundle', '2023.07'),
18-
# ('ml_dtypes', '0.3.2'),
19-
# ('PyYAML', '6.0'),
20-
# ('h5py', '3.9.0'),
21-
# ('TensorFlow', '2.15.1'),
22-
# ('mpi4py', '3.1.4'),
23-
# # horovod
24-
# ]
25-
26-
# use_pip = True
27-
# sanity_pip_check = True
28-
29-
# exts_list = [
30-
# ('dargs', '0.4.10'),
31-
# ('wcmatch', '10.0'),
32-
# ('mendeleev', '0.20.1'),
33-
# ('array_api_compat', '1.10.0'),
34-
# ('dpdata', '0.2.21'),
35-
# ('deepmd_kit', version, {
36-
# # 'modulename': False,
37-
# # 'source_urls': ['https://github.com/Softcatala/whisper-ctranslate2/archive/'],
38-
# # 'sources': [{'download_filename': '%(version)s.tar.gz', 'filename': SOURCE_TAR_GZ}],
39-
# 'checksums': ['8a7c7b232086b8bfa7022f3a3b3f95c8c5175c33663cf8d3fd840539f2be9a49'],
40-
# }),
41-
# ]
14+
source_tmpl = 'deepmd_kit-%(version)s.tar.gz',
15+
16+
builddependencies = [('CMake', '3.26.3')]
17+
dependencies = [
18+
# ('Python', '3.11.3'),
19+
# ('SciPy-bundle', '2023.07'),
20+
# ('ml_dtypes', '0.3.2'),
21+
# ('PyYAML', '6.0'),
22+
# ('h5py', '3.9.0'),
23+
('TensorFlow', local_tf_version),
24+
# ('mpi4py', '3.1.4'),
25+
# horovod
26+
('DeePDM-kit', '3.0.1', '-TensorFlow-%s' % local_tf_version),
27+
]
28+
29+
start_dir = 'deepmd_kit-%(version)s/source',
30+
4231

4332
# sanity_check_paths = {
4433
# 'files': ['bin/%(name)s'],

487_DeePMD-kit/deePMD.eb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ builddependencies = [
4444
('hatchling', '1.18.0'),
4545
('poetry', '1.5.1'),
4646
('git', '2.41.0', '-nodocs'),
47+
('CMake', '3.26.3'),
4748
]
4849
dependencies = [
4950
# ('CUDA', '12.6.0', '', SYSTEM),
@@ -107,6 +108,12 @@ exts_list = [
107108
'preinstallopts': "module swap protobuf/3.21.9-GCCcore-12.3.0 && ",
108109
'checksums': ['10d4443c6fe31a9a4573ed6eda73b6a669dae572cf2bc43f45e9a63aaae02cff'],
109110
}),
111+
# ('deepmd_cpp', version, { # NO - can not have CMakeMake as extension
112+
# 'easyblock': 'CMakeMake',
113+
# 'source_tmpl': 'deepmd_kit-%(version)s.tar.gz',
114+
# 'start_dir': 'source',
115+
# 'checksums': ['10d4443c6fe31a9a4573ed6eda73b6a669dae572cf2bc43f45e9a63aaae02cff'],
116+
# }),
110117
]
111118

112119
# sanity_check_paths = {
@@ -118,6 +125,7 @@ sanity_check_commands = ['dp -h']
118125

119126
moduleclass = 'ai'
120127

128+
# $EBROOTDEEPDMMINKIT
121129
# libtensorflow_cc.so is in $EBROOTTESORFLOW/lib/python3.11/site-packages/tensorflow/libtensorflow_cc.so.2
122130

123131
# E1: OK
Lines changed: 242 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,242 @@
1+
easyblock = 'PythonBundle'
2+
3+
name = 'DeePDM-kit'
4+
version = '3.0.1'
5+
# versionsuffix = '-CUDA-%(cudaver)s'
6+
local_tf_version = '2.15.1'
7+
versionsuffix = '-TensorFlow-%s' % local_tf_version
8+
9+
homepage = 'https://github.com/deepmodeling/deepmd-kit/'
10+
description = "A deep learning package for many-body potential energy representation and molecular dynamics."
11+
12+
toolchain = {'name': 'foss', 'version': '2023a'}
13+
14+
# DEPS:
15+
# OK scikit-build-core>=0.5,<0.11,!=0.6.0
16+
# OK 'numpy>=1.21',
17+
# OK 'scipy',
18+
# OK 'pyyaml',
19+
# ok 'dargs >= 0.4.7',
20+
# OK "h5py>=3.6.0,!=3.11.0; platform_system=='Linux' and platform_machine=='aarch64'",
21+
# ok 'wcmatch',
22+
# OK 'ml_dtypes',
23+
# ok 'mendeleev',
24+
# ok 'array-api-compat',
25+
# ok dpdata
26+
# parallel training deps:
27+
# OK? horovod - horovod_v2_kenneths_hack
28+
# OK mpi4py
29+
# ok dpdata 0.2.21 requires monty, which is not installed.
30+
# ok dargs 0.4.10 requires typeguard, which is not installed.
31+
# OK mendeleev 0.20.1 requires deprecated, which is not installed.
32+
# OK mendeleev 0.20.1 requires pydantic, which is not installed.
33+
# ok mendeleev 0.20.1 requires pyfiglet, which is not installed.
34+
# OK mendeleev 0.20.1 requires sqlalchemy, which is not installed.
35+
# ok monty 2025.1.9 requires ruamel-yaml, which is not installed.
36+
# ok wcmatch 8.5.2 requires bracex, which is not installed.
37+
# ok typeguard 4.3.0 has requirement typing-extensions>=4.10.0, but you have typing-extensions 4.9.0. -> v4.2.0
38+
# ok mendeleev 0.20.1 has requirement pydantic<3.0.0,>=2.9.2, but you have pydantic 2.5.3. -> 0.18.1
39+
# ok mendeleev 0.20.1 has requirement pyfiglet<0.9,>=0.8.post1, but you have pyfiglet 1.0.2.
40+
# ok tensorflow 2.15.1 has requirement wrapt<1.15,>=1.11.0, but you have wrapt 1.15.0.
41+
42+
builddependencies = [
43+
('scikit-build-core', '0.9.3'),
44+
('hatchling', '1.18.0'),
45+
('poetry', '1.5.1'),
46+
('git', '2.41.0', '-nodocs'),
47+
('CMake', '3.26.3'),
48+
]
49+
dependencies = [
50+
# ('CUDA', '12.6.0', '', SYSTEM),
51+
('Python', '3.11.3'),
52+
('SciPy-bundle', '2023.07'),
53+
('ml_dtypes', '0.3.2'),
54+
('PyYAML', '6.0'),
55+
('h5py', '3.9.0'),
56+
('TensorFlow', '2.15.1'),
57+
('jax', '0.4.25'),
58+
('mpi4py', '3.1.4'),
59+
('Deprecated', '1.2.14'),
60+
# ('pydantic', '2.5.3'),
61+
('SQLAlchemy','2.0.25'),
62+
('ruamel.yaml', '0.17.32'),
63+
('Horovod', '0.28.1', versionsuffix),
64+
('typing-extensions', '4.9.0'),
65+
# ('protobuf', '24.0'),
66+
67+
]
68+
69+
# https://files.pythonhosted.org/packages/5c/f5/3be09970408c89c7767ab629cf80ecbd984ef3401a534a41e332f0e75bb7/deepmd_kit-3.0.1.tar.gz
70+
components = [
71+
('deepmd', version, {
72+
'easyblock': 'PythonPackage',
73+
# 'modulename': 'deepmd',
74+
# 'source_tmpl': 'deepmd_kit-%(version)s.tar.gz',
75+
# 'source_urls': [PYPI_SOURCE],
76+
'source_urls': ['https://pypi.python.org/packages/source/d/deepmd-kit/'],
77+
'sources': ['deepmd_kit-%(version)s.tar.gz'],
78+
'preinstallopts': "module swap protobuf/3.21.9-GCCcore-12.3.0 && ",
79+
'use_pip': True,
80+
'start_dir': 'deepmd_kit-%(version)s',
81+
'checksums': ['10d4443c6fe31a9a4573ed6eda73b6a669dae572cf2bc43f45e9a63aaae02cff'],
82+
}),
83+
('deepmd_cpp', version, {
84+
'easyblock': 'CMakeMake',
85+
# 'source_tmpl': 'deepmd_kit-%(version)s.tar.gz',
86+
# 'source_urls': [PYPI_SOURCE],
87+
'source_urls': ['https://pypi.python.org/packages/source/d/deepmd-kit/'],
88+
'sources': ['deepmd_kit-%(version)s.tar.gz'],
89+
'start_dir': 'deepmd_kit-%(version)s/source',
90+
'preconfigopts': "module swap protobuf/3.21.9-GCCcore-12.3.0 && ",
91+
'configopts': '-DENABLE_TENSORFLOW=TRUE -DUSE_TF_PYTHON_LIBS=TRUE ',
92+
'prebuildopts': "module swap protobuf/3.21.9-GCCcore-12.3.0 && ",
93+
'checksums': ['10d4443c6fe31a9a4573ed6eda73b6a669dae572cf2bc43f45e9a63aaae02cff'],
94+
}),
95+
# ('OpenMM', '7.5.1', {
96+
# 'easyblock': 'CMakeMake',
97+
# 'source_urls': ['https://github.com/openmm/openmm/archive/'],
98+
# 'sources': [{'download_filename': '%(version)s.tar.gz', 'filename': SOURCE_TAR_GZ}],
99+
# 'patches': [('OpenMM-%(version)s_AlphaFold.patch', 'wrappers/python')],
100+
# 'checksums': [
101+
# 'c88d6946468a2bde2619acb834f57b859b5e114a93093cf562165612e10f4ff7', # OpenMM-7.5.1.tar.gz
102+
# '1b109dfff3af5c6aa70690bca14618612953c68840a7e64f679db7ca33c1aff6', # OpenMM-7.5.1_AlphaFold.patch
103+
# ],
104+
# 'start_dir': 'openmm-%(version)s',
105+
# 'preinstallopts': local_openmm_preinstallopts,
106+
# 'installopts': local_openmm_installopts,
107+
# }),
108+
# (name, version, {
109+
# 'easyblock': 'PythonPackage',
110+
# 'source_urls': [
111+
# 'https://github.com/deepmind/alphafold/archive/refs/tags/',
112+
# 'https://git.scicore.unibas.ch/schwede/openstructure/-/raw/%s/modules/mol/alg/src/' % local_scp_commit,
113+
# ],
114+
# 'sources': [
115+
# {
116+
# 'download_filename': 'v%(version)s.tar.gz',
117+
# 'filename': SOURCE_TAR_GZ,
118+
# },
119+
# {
120+
# 'download_filename': 'stereo_chemical_props.txt',
121+
# 'filename': 'stereo_chemical_props-%s.txt' % local_scp_commit,
122+
# 'extract_cmd': "cp %s .",
123+
# },
124+
# ],
125+
# 'patches': [
126+
# 'AlphaFold-%(version)s_fix-packages.patch',
127+
# 'AlphaFold-%(version)s_data-dep-paths.patch',
128+
# 'AlphaFold-%(version)s_n-cpu.patch',
129+
# 'AlphaFold-%(version)s_fix-scp-path.patch',
130+
# ],
131+
# 'checksums': [
132+
# '78cf443a2d9250917b05f5d40ede140ed8e8341b42fdfa54340336aca52f53f2', # v2.0.0.tar.gz
133+
# '24510899eeb49167cffedec8fa45363a4d08279c0c637a403b452f7d0ac09451', # stereo_chemical_props-7102c6.txt
134+
# '826d2d1a5d6ac52c51a60ba210e1947d5631a1e2d76f8815305b5d23f74458db', # AlphaFold-2.0.0_fix-packages.patch
135+
# '7223e297b23f90816219095696bc6453910c617add60b907a0d3e869da8733bb', # AlphaFold-2.0.0_data-dep-paths.patch
136+
# 'dfda4dd5f9aba19fe2b6eb9a0ec583d12dcefdfee8ab8803fc57ad48d582db04', # AlphaFold-2.0.0_n-cpu.patch
137+
# '83dc82a8b1c647eb7e217aef683153e98a4fc7f871a85280976c92a1bfe28f27', # AlphaFold-2.0.0_fix-scp-path.patch
138+
# ],
139+
# 'start_dir': 'alphafold-%(version)s',
140+
# 'use_pip': True,
141+
# }),
142+
]
143+
144+
use_pip = True
145+
sanity_pip_check = True
146+
147+
# local_preinstallopts = 'module swap protobuf/3.21.9-GCCcore-12.3.0 && '
148+
149+
exts_list = [
150+
('wrapt', '1.14.1', {
151+
'checksums': ['380a85cf89e0e69b7cfbe2ea9f765f004ff419f34194018a6827ac0e3edfed4d'],
152+
}),
153+
('typeguard', '4.2.0', {
154+
'checksums': ['2aeae510750fca88d0a2ceca3e86de7f71aa43b6c3e6c267737ce1f5effc4b34'],
155+
}),
156+
('dargs', '0.4.10', {
157+
'checksums': ['2b39e0a93dcd323d0affb3f54ee2c11a439084d718934df08f38692dfbadddf8'],
158+
}),
159+
('bracex', '2.5.post1', {
160+
'source_tmpl': '%(name)s-%(version)s-py3-none-any.whl',
161+
'checksums': ['13e5732fec27828d6af308628285ad358047cec36801598368cb28bc631dbaf6'],
162+
}),
163+
('wcmatch', '8.5.2', {
164+
'checksums': ['a70222b86dea82fb382dd87b73278c10756c138bd6f8f714e2183128887b9eb2'],
165+
}),
166+
('pyfiglet', '0.8.post1', {
167+
'checksums': ['c6c2321755d09267b438ec7b936825a4910fec696292139e664ca8670e103639'],
168+
}),
169+
('mendeleev', '0.18.1', {
170+
'checksums': ['a5b60bd313a5d2b404a6a250186e643663d5625c8138b3cfba829f1f4384f2a0'],
171+
}),
172+
('array_api_compat', '1.10.0', {
173+
'checksums': ['eb98056fa4993e7e98860b7a1ca73c9ae1c77f1ef95366a5ebd5dec8e6d55bad'],
174+
}),
175+
('monty', '2025.1.9', {
176+
'checksums': ['edb680b01ea1e59225cb666634b0dd2b2393eef07f3d45748445db92e1f1006d'],
177+
}),
178+
('dpdata', '0.2.21', {
179+
'checksums': ['55dcec61bdc8707fb6b3e57406fb7c07b6ccb7a0ac763a1407cc1c3222bf58b1'],
180+
}),
181+
]
182+
183+
# sanity_check_paths = {
184+
# 'files': ['bin/%(name)s'],
185+
# 'dirs': ['lib/python%(pyshortver)s/site-packages'],
186+
# }
187+
188+
sanity_check_commands = ['dp -h']
189+
190+
moduleclass = 'ai'
191+
192+
# $EBROOTDEEPDMMINKIT
193+
# libtensorflow_cc.so is in $EBROOTTESORFLOW/lib/python3.11/site-packages/tensorflow/libtensorflow_cc.so.2
194+
195+
# E2: OK
196+
# -> put hack to prebuildopts too -> OK
197+
# <- problem with build step (make of cpp component) - even with the heck it retuns this <- log4.txt
198+
# In file included from /apps/gent/RHEL8/cascadelake-ib/software/TensorFlow/2.15.1-foss-2023a/lib/python3.11/sit
199+
# e-packages/tensorflow/include/tensorflow/core/graph/default_device.h:21,
200+
# from /tmp/vsc47063/easybuild/build/DeePDMkit/3.0.1/foss-2023a-TensorFlow-2.15.1/deepmd_kit-3.
201+
# 0.1/source/api_cc/include/tf_private.h:8,
202+
# from /tmp/vsc47063/easybuild/build/DeePDMkit/3.0.1/foss-2023a-TensorFlow-2.15.1/deepmd_kit-3.
203+
# 0.1/source/api_cc/include/commonTF.h:6,
204+
# from /tmp/vsc47063/easybuild/build/DeePDMkit/3.0.1/foss-2023a-TensorFlow-2.15.1/deepmd_kit-3.
205+
# 0.1/source/api_cc/include/DataModifierTF.h:6,
206+
# from /tmp/vsc47063/easybuild/build/DeePDMkit/3.0.1/foss-2023a-TensorFlow-2.15.1/deepmd_kit-3.
207+
# 0.1/source/api_cc/src/DataModifierTF.cc:3:
208+
# f protoc which is
209+
# 17 | #error This file was generated by an older version of protoc which is
210+
# E1: OK
211+
# -> use Kenneth's hack in preinstallopts (module swap protobuf/3.21.9-GCCcore-12.3.0) -> works
212+
# ? but in tensorflow-2.15.1 there is req protobuf: protobuf==4.23.4 not 3.21.9
213+
# same problem as with horovod: https://github.com/vscentrum/vsc-software-stack/issues/390#issuecomment-2304201251
214+
# <- during pip install deepmd-kit: <- log2.txt
215+
# error This file was generated by an older version of protoc
216+
# error incompatible with your Protocol Buffer headers
217+
# error regenerate this file with a newer version of protoc.
218+
# Building CXX object op/tf/CMakeFiles/deepmd_op.dir/cmake_pch.hxx.gch
219+
# In file included from /apps/gent/RHEL8/cascadelake-ib/software/TensorFlow/2.15.1-foss-2023a/lib/python3.11/site-packages/tensorflow/include/tensorflow/core/framework/op.h:26,
220+
# from /tmp/vsc47063/easybuild/build/DeePDMkit/3.0.1/foss-2023a/deepmd_kit/deepmd_kit-3.0.1/source/op/tf/custom_op.h:9,
221+
# from /tmp/vsc47063/easybuild/build/DeePDMkit/3.0.1/foss-2023a/deepmd_kit/deepmd_kit-3.0.1/build/py37-none-linux_x86_64/op/tf/CMakeFiles/deepmd_op.dir/cmake_pch.hxx:5,
222+
# from <command-line>:
223+
# /apps/gent/RHEL8/cascadelake-ib/software/TensorFlow/2.15.1-foss-2023a/lib/python3.11/site-packages/tensorflow/include/tensorflow/core/framework/full_type.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
224+
# 17 | #error This file was generated by an older version of protoc which is
225+
# | ^~~~~
226+
# /apps/gent/RHEL8/cascadelake-ib/software/TensorFlow/2.15.1-foss-2023a/lib/python3.11/site-packages/tensorflow/include/tensorflow/core/framework/full_type.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
227+
# 18 | #error incompatible with your Protocol Buffer headers. Please
228+
# | ^~~~~
229+
# /apps/gent/RHEL8/cascadelake-ib/software/TensorFlow/2.15.1-foss-2023a/lib/python3.11/site-packages/tensorflow/include/tensorflow/core/framework/full_type.pb.h:19:2: error: #error regenerate this file with a newer version of protoc.
230+
# 19 | #error regenerate this file with a newer version of protoc.
231+
# | ^~~~~
232+
# In file included from /apps/gent/RHEL8/cascadelake-ib/software/TensorFlow/2.15.1-foss-2023a/lib/python3.11/site-packages/tensorflow/include/tensorflow/core/framework/op_def_builder.h:27,
233+
# from /apps/gent/RHEL8/cascadelake-ib/software/TensorFlow/2.15.1-foss-2023a/lib/python3.11/site-packages/tensorflow/include/tensorflow/core/framework/full_type_inference_util.h:24,
234+
# from /apps/gent/RHEL8/cascadelake-ib/software/TensorFlow/2.15.1-foss-2023a/lib/python3.11/site-packages/tensorflow/include/tensorflow/core/framework/op.h:27:
235+
# /apps/gent/RHEL8/cascadelake-ib/software/TensorFlow/2.15.1-foss-2023a/lib/python3.11/site-packages/tensorflow/include/tensorflow/core/framework/op_def.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
236+
# 17 | #error This file was generated by an older version of protoc which is
237+
# | ^~~~~
238+
# /apps/gent/RHEL8/cascadelake-ib/software/TensorFlow/2.15.1-foss-2023a/lib/python3.11/site-packages/tensorflow/include/tensorflow/core/framework/op_def.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
239+
# 18 | #error incompatible with your Protocol Buffer headers. Please
240+
# | ^~~~~
241+
# /apps/gent/RHEL8/cascadelake-ib/software/TensorFlow/2.15.1-foss-2023a/lib/python3.11/site-packages/tensorflow/include/tensorflow/core/framework/op_def.pb.h:19:2: error: #error regenerate this file with a newer version of protoc.
242+
# 19 | #error regenerate this file with a newer version of protoc.

0 commit comments

Comments
 (0)