Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
easybuild-repository-public-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DEEP-SEA
easybuild-repository-public-release
Commits
ebd30860
Commit
ebd30860
authored
1 year ago
by
Thomas Mueller
Browse files
Options
Downloads
Patches
Plain Diff
updated for open source MIT version of CPMD
parent
cdb34c35
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Custom_EasyBlocks/cpmd.py
+21
-11
21 additions, 11 deletions
Custom_EasyBlocks/cpmd.py
with
21 additions
and
11 deletions
Custom_EasyBlocks/cpmd.py
+
21
−
11
View file @
ebd30860
...
...
@@ -36,7 +36,8 @@ EasyBuild support for building and installing CPMD, implemented as an easyblock
#the pseudo-fix is to remove installdir/obj as postinstallcmds from the easyconfig file
#the documentation was missing and is now added in a somewhat weird procedure
#to the builddir and subsequently copied to the installdir/doc via postinstallcmds from the easyconfig file
#the hybrid MPI/OMP version can solely installed through the openmp toolchain option
#the hybrid version is installed via prefix_opt = '-omp -DEST=' independent of toolchain options in easyconfig file
#
#the cuda implementation is ignored
#
...
...
@@ -68,6 +69,7 @@ class EB_CPMD(ConfigureMake):
"""
Custom easyconfig parameters for CPMD.
"""
extra_vars
=
{
'
base_configuration
'
:
[
None
,
"
Base configuration from which to start (file name)
"
,
CUSTOM
],
'
MIT
'
:
[
None
,
"
Open-Source Version of CPMD (MIT licence)
"
,
CUSTOM
],
}
return
ConfigureMake
.
extra_options
(
extra_vars
)
...
...
@@ -89,7 +91,12 @@ class EB_CPMD(ConfigureMake):
config_file_candidates
=
[]
for
confdirname
in
[
"
configure
"
,
"
CONFIGURE
"
]:
config_file_prefix
=
os
.
path
.
join
(
self
.
builddir
,
"
CPMD
"
,
confdirname
)
if
self
.
cfg
[
'
MIT
'
]:
cpmdname
=
'
CPMD-%s
'
%
self
.
version
else
:
cpmdname
=
'
CPMD
'
config_file_prefix
=
os
.
path
.
join
(
self
.
builddir
,
cpmdname
,
confdirname
)
if
os
.
path
.
isdir
(
config_file_prefix
):
break
else
:
...
...
@@ -149,6 +156,8 @@ class EB_CPMD(ConfigureMake):
(
r
"
^(\s*CC=.*)
"
,
r
"
#\1
"
),
(
r
"
^(\s*FC=.*)
"
,
r
"
#\1
"
),
(
r
"
^(\s*LD)=.*
"
,
r
"
\1=
'
$(FC)
'"
),
(
r
"
-openmp
"
,
r
"
-qopenmp
"
),
(
r
"
-mkl=
"
,
r
"
-qmkl=
"
),
])
except
IOError
as
err
:
raise
EasyBuildError
(
"
Failed to patch %s: %s
"
,
selected_base_config
,
err
)
...
...
@@ -174,8 +183,8 @@ class EB_CPMD(ConfigureMake):
options
=
[
self
.
cfg
[
'
configopts
'
]]
# enable OpenMP support if desired
if
self
.
toolchain
.
options
.
get
(
'
openmp
'
,
None
)
and
LooseVersion
(
self
.
version
)
>=
LooseVersion
(
'
4.0
'
):
options
.
append
(
"
-omp
"
)
#
if self.toolchain.options.get('openmp', None) and LooseVersion(self.version) >= LooseVersion('4.0'):
#
options.append("-omp")
# This "option" has to come last as it's the chief argument, coming after
# all flags and so forth.
...
...
@@ -240,11 +249,12 @@ class EB_CPMD(ConfigureMake):
if
preproc_flag
is
None
:
preproc_flag
=
''
# do not use default='None' for CPPFLAGS
apply_regex_substitutions
(
makefile
,
[
(
r
"
^(\s*CPPFLAGS\s*=.*)
"
,
r
"
\1 {0}
"
.
format
(
os
.
getenv
(
'
CPPFLAGS
'
))),
(
r
"
^(\s*CFLAGS\s*=.*)
"
,
r
"
\1 {0}
"
.
format
(
os
.
getenv
(
'
CFLAGS
'
))),
(
r
"
^(\s*FFLAGS\s*=.*)
"
,
r
"
\1 {0}
"
.
format
(
os
.
getenv
(
'
FFLAGS
'
))),
(
r
"
^(\s*LFLAGS\s*=.*)
"
,
r
"
\1 {0}
"
.
format
(
os
.
getenv
(
'
LDFLAGS
'
))),
(
r
"
^(\s*CPPFLAGS\s*=.*)
"
,
r
"
\1 {0}
"
.
format
(
os
.
getenv
(
'
CPPFLAGS
'
,
'
'
))),
(
r
"
^(\s*CFLAGS\s*=.*)
"
,
r
"
\1 {0}
"
.
format
(
os
.
getenv
(
'
CFLAGS
'
,
'
'
))),
(
r
"
^(\s*FFLAGS\s*=.*)
"
,
r
"
\1 {0}
"
.
format
(
os
.
getenv
(
'
FFLAGS
'
,
'
'
))),
(
r
"
^(\s*LFLAGS\s*=.*)
"
,
r
"
\1 {0}
"
.
format
(
os
.
getenv
(
'
LDFLAGS
'
,
'
'
))),
# Allow to define own XFLAGS
(
r
"
# CPPFLAGS =
"
,
r
"
CPPFLAGS +=
"
),
...
...
@@ -259,14 +269,14 @@ class EB_CPMD(ConfigureMake):
])
if
self
.
toolchain
.
options
.
get
(
'
openmp
'
,
None
):
apply_regex_substitutions
(
makefile
,
[
(
r
"
^(\s*LFLAGS\s*=.*)
"
,
r
"
\1 {0} {1}
"
.
format
(
os
.
getenv
(
'
LIBLAPACK_MT
'
),
os
.
getenv
(
'
LIBBLAS_MT
'
)))
(
r
"
^(\s*LFLAGS\s*=.*)
"
,
r
"
\1 {0} {1}
"
.
format
(
os
.
getenv
(
'
LIBLAPACK_MT
'
,
'
'
),
os
.
getenv
(
'
LIBBLAS_MT
'
,
'
'
)))
])
else
:
apply_regex_substitutions
(
makefile
,
[
(
r
"
^(\s*LFLAGS\s*=.*)
"
,
r
"
\1 {0} {1}
"
.
format
(
os
.
getenv
(
'
LIBLAPACK
'
),
os
.
getenv
(
'
LIBBLAS
'
)))
(
r
"
^(\s*LFLAGS\s*=.*)
"
,
r
"
\1 {0} {1}
"
.
format
(
os
.
getenv
(
'
LIBLAPACK
'
,
'
'
),
os
.
getenv
(
'
LIBBLAS
'
,
'
'
)))
])
apply_regex_substitutions
(
makefile
,
[
(
r
"
^(\s*LFLAGS\s*=.*)
"
,
r
"
\1 {0}
"
.
format
(
os
.
getenv
(
'
LIBFFT
'
))),
(
r
"
^(\s*LFLAGS\s*=.*)
"
,
r
"
\1 {0}
"
.
format
(
os
.
getenv
(
'
LIBFFT
'
,
'
'
))),
])
if
get_software_root
(
'
imkl
'
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment