Skip to content

Commit

Permalink
Removed the pkg list as it's not used anywhere. Changed the omp
Browse files Browse the repository at this point in the history
build to make the omp target. The default is to make the serial
target. Since this branch is specific for the omp the omp switch is
always on. This could be removed to make the --omp active and then
this branch build could be merged with the main once it's ready.
  • Loading branch information
llnl-fesp committed Dec 12, 2023
1 parent 50aef70 commit 744d8b2
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
fcomp = None
parallel = 0
petsc = 0
OMP = False
omp = False

for o in optlist:
if o[0] == '-g':
Expand All @@ -48,10 +48,13 @@
petsc = 1
elif o[0] == '--omp':
os.putenv("OMP","1")
OMP = True
os.putenv("OMP","1")
OMP = True
omp = True

# This makes the --omp always on.
# Remove, or comment out, the next two lines to make
# the --omp switch active.
os.putenv("OMP","1")
omp = True


if petsc == 1 and os.getenv('PETSC_DIR') == None:
Expand Down Expand Up @@ -80,10 +83,12 @@ def run(self):
if sys.hexversion < 0x03000000:
raise SystemExit("Python versions < 3 not supported")
else:
if petsc == 0:
status = call(['make', '-f','Makefile.Forthon'])
else:
if omp:
status = call(['make', '-f','Makefile.Forthon','omp'])
elif petsc == 1:
status = call(['make', '-f', 'Makefile.PETSc'])
else:
status = call(['make', '-f','Makefile.Forthon','serial'])
if status != 0: raise SystemExit("Build failure")
build.run(self)

Expand All @@ -99,8 +104,6 @@ def run(self):
status = call(['make', '-f', 'Makefile.PETSc', 'clean'])
if status != 0: raise SystemExit("Clean failure")

uedgepkgs = ['aph', 'api', 'bbb', 'com', 'flx', 'grd', 'svr', 'wdf', 'ncl', 'ppp']


def makeobjects(pkg):
return [pkg+'_p.o', pkg+'pymodule.o']
Expand Down

0 comments on commit 744d8b2

Please sign in to comment.