Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Spack
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
eic_tools
Spack
Commits
343ad173
Commit
343ad173
authored
6 years ago
by
Dave
Committed by
Axel Huebl
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
warpx: new package (#9584)
parent
5f482b3c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
var/spack/repos/builtin/packages/warpx/package.py
+78
-0
78 additions, 0 deletions
var/spack/repos/builtin/packages/warpx/package.py
with
78 additions
and
0 deletions
var/spack/repos/builtin/packages/warpx/package.py
0 → 100644
+
78
−
0
View file @
343ad173
# Copyright 2013-2018 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
Warpx
(
MakefilePackage
):
"""
WarpX is an advanced electromagnetic Particle-In-Cell code. It supports
many features including Perfectly-Matched Layers (PML) and mesh refinement.
In addition, WarpX is a highly-parallel and highly-optimized code and
features hybrid OpenMP/MPI parallelization, advanced vectorization
techniques and load balancing capabilities.
"""
homepage
=
"
https://ecp-warpx.github.io/index.html
"
url
=
"
https://github.com/ECP-WarpX/WarpX
"
version
(
'
master
'
,
git
=
'
https://github.com/ECP-WarpX/WarpX.git
'
,
tag
=
'
master
'
)
version
(
'
dev
'
,
git
=
'
https://github.com/ECP-WarpX/WarpX.git
'
,
tag
=
'
dev
'
)
depends_on
(
'
mpi
'
,
when
=
'
+mpi
'
)
variant
(
'
dims
'
,
default
=
'
3
'
,
values
=
(
'
1
'
,
'
2
'
,
'
3
'
),
multi
=
False
,
description
=
'
Number of spatial dimensions
'
)
variant
(
'
psatd
'
,
default
=
False
,
description
=
'
Enable PSATD solver
'
)
variant
(
'
do_electrostatic
'
,
default
=
False
,
description
=
'
Include electrostatic solver
'
)
variant
(
'
debug
'
,
default
=
False
,
description
=
'
Enable debugging features
'
)
variant
(
'
tprof
'
,
default
=
False
,
description
=
'
Enable tiny profiling features
'
)
variant
(
'
openmp
'
,
default
=
True
,
description
=
'
Enable OpenMP features
'
)
resource
(
name
=
'
amrex
'
,
git
=
'
https://github.com/AMReX-Codes/amrex.git
'
,
tag
=
'
development
'
,
destination
=
'
.
'
)
resource
(
name
=
'
picsar
'
,
git
=
'
https://bitbucket.org/berkeleylab/picsar.git
'
,
tag
=
'
master
'
,
destination
=
'
.
'
)
def
edit
(
self
,
spec
,
prefix
):
comp
=
'
gcc
'
vendors
=
{
'
%gcc
'
:
'
gcc
'
,
'
%intel
'
:
'
intel
'
}
for
key
,
value
in
vendors
.
items
():
if
self
.
spec
.
satisfies
(
key
):
comp
=
value
def
torf
(
s
):
"
Returns the string TRUE or FALSE
"
return
repr
(
s
in
spec
).
upper
()
makefile
=
FileFilter
(
'
GNUmakefile
'
)
makefile
.
filter
(
'
AMREX_HOME .*
'
,
'
AMREX_HOME = amrex
'
)
makefile
.
filter
(
'
PICSAR_HOME .*
'
,
'
PICSAR_HOME = picsar
'
)
makefile
.
filter
(
'
COMP .*
'
,
'
COMP = {0}
'
.
format
(
comp
))
makefile
.
filter
(
'
DIM .*
'
,
'
DIM = {0}
'
.
format
(
int
(
spec
.
variants
[
'
dims
'
].
value
)))
makefile
.
filter
(
'
USE_PSATD .*
'
,
'
USE_PSATD = {0}
'
.
format
(
torf
(
'
+psatd
'
)))
makefile
.
filter
(
'
DO_ELECTROSTATIC .*
'
,
'
DO_ELECTROSTATIC = %s
'
%
torf
(
'
+do_electrostatic
'
))
makefile
.
filter
(
'
USE_OMP .*
'
,
'
USE_OMP = {0}
'
.
format
(
torf
(
'
+openmp
'
)))
makefile
.
filter
(
'
DEBUG .*
'
,
'
DEBUG = {0}
'
.
format
(
torf
(
'
+debug
'
)))
makefile
.
filter
(
'
TINY_PROFILE .*
'
,
'
TINY_PROFILE = {0}
'
.
format
(
torf
(
'
+tprof
'
)))
makefile
.
filter
(
'
EBASE .*
'
,
'
EBASE = warpx
'
)
def
install
(
self
,
spec
,
prefix
):
make
(
'
WarpxBinDir = {0}
'
.
format
(
prefix
.
bin
),
'
all
'
)
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