Skip to content

Commit

Permalink
#1623 Trigger psyclone on script change, minor script updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
hiker committed Jan 17, 2025
1 parent ec96efd commit faa7f4f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 19 deletions.
8 changes: 1 addition & 7 deletions tutorial/training/transformation/3.4/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
EXE = gol

TRANS ?= omp_trans.py
include ../common.mk

SRC_X90 = time_step_mod.x90
Expand All @@ -17,13 +16,8 @@ $(EXE): $(OBJ)
# ------------------------
.precious: $(SRC_X90:%.x90=%.f90)

ifeq ($(TRANS), omp_trans.py)
%.f90: %.x90
%.f90: %.x90 inline_openmp.py
$(PSYCLONE) -s ./inline_openmp.py -o $*.f90 $<
else
%.f90: %.x90
$(PSYCLONE) --backend disable-validation -s ./inline_openmp.py -o $*.f90 $<
endif

%.o: %.f90
$(F90) -c $(F90FLAGS) $<
Expand Down
2 changes: 1 addition & 1 deletion tutorial/training/transformation/3.4/solution/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $(EXE): $(OBJ)
# ------------------------
.precious: $(SRC_X90:%.x90=%.f90)

%.f90: %.x90
%.f90: %.x90 inline_openmp.py
$(PSYCLONE) -s ./inline_openmp.py -o $*.f90 $<

%.o: %.f90
Expand Down
13 changes: 2 additions & 11 deletions tutorial/training/transformation/3.4/solution/inline_openmp.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -----------------------------------------------------------------------------
# BSD 3-Clause License
#
# Copyright (c) 2018-2025, Science and Technology Facilities Council
# Copyright (c) 2024-2025, Science and Technology Facilities Council
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -33,16 +33,7 @@
# -----------------------------------------------------------------------------
# Author: J. Henrichs, Bureau of Meteorology

'''A simple transformation script for the introduction of OpenMP with PSyclone.
In order to use it you must first install PSyclone. See README.md in the
top-level psyclone directory.
Once you have PSyclone installed, this script may be used by doing:
>>> psyclone -s ./omp_levels_trans.py traldf_iso.F90
This should produce a lot of output, ending with generated
Fortran.
'''
'''

from psyclone.transformations import MoveTrans, TransformationError
Expand Down

0 comments on commit faa7f4f

Please sign in to comment.