diff --git a/maestrowf/datastructures/core/study.py b/maestrowf/datastructures/core/study.py index 9dd9dbab5..835efe6bd 100644 --- a/maestrowf/datastructures/core/study.py +++ b/maestrowf/datastructures/core/study.py @@ -392,7 +392,7 @@ def configure_study(self, submission_attempts=1, restart_limit=1, use_tmp, hash_ws ) - def _stage_parameterized(self, dag): + def _stage(self, dag): """ Set up the ExecutionGraph of a parameterized study. @@ -795,11 +795,4 @@ def stage(self): dag.add_description(**self.description) dag.log_description() - # We have two cases: - # 1. Parameterized workflows - # 2. A linear, execute as specified workflow - # NOTE: This scheme could be how we handle derived use cases. - if self.parameters: - return self._out_path, self._stage_parameterized(dag) - else: - return self._out_path, self._stage_linear(dag) + return self._out_path, self._stage(dag) diff --git a/samples/lulesh/lulesh_sample1_macosx_linear.yaml b/samples/lulesh/lulesh_sample1_macosx_linear.yaml new file mode 100644 index 000000000..b11ae8ee2 --- /dev/null +++ b/samples/lulesh/lulesh_sample1_macosx_linear.yaml @@ -0,0 +1,70 @@ +description: + name: lulesh sample1 + description: A sample LULESH study that downloads, builds, and runs a parameter study of varying problem sizes and iterations. + +env: + variables: + OUTPUT_PATH: ./sample_output/lulesh + SIZE: 10 + ITERATIONS: 20 + TRIAL: 1 + + labels: + outfile: SIZE.$(SIZE).ITER.$(ITERATIONS).log + + dependencies: + git: + - name: LULESH + path: $(OUTPUT_PATH) + url: https://github.com/LLNL/LULESH.git + +study: + - name: make-lulesh + description: Build the serial version of LULESH. + run: + cmd: | + cd $(LULESH) + sed -i "" 's/^CXX = $(MPICXX)/CXX = $(SERCXX)/' ./Makefile + sed -i "" 's/^CXXFLAGS = -g -O3 -fopenmp/#CXXFLAGS = -g -O3 -fopenmp/' ./Makefile + sed -i "" 's/^#LDFLAGS = -g -O3/LDFLAGS = -g -O3/' ./Makefile + sed -i "" 's/^LDFLAGS = -g -O3 -fopenmp/#LDFLAGS = -g -O3 -fopenmp/' ./Makefile + sed -i "" 's/^#CXXFLAGS = -g -O3 -I/CXXFLAGS = -g -O3 -I/' ./Makefile + make clean + make + depends: [] + + - name: run-lulesh + description: Run LULESH. + run: + cmd: | + $(LULESH)/lulesh2.0 -s $(SIZE) -i $(ITERATIONS) -p > $(outfile) + depends: [make-lulesh] + + - name: post-process-lulesh + description: Post process all LULESH results. + run: + cmd: | + echo "Unparameterized step with Parameter Independent dependencies." >> out.log + echo $(run-lulesh.workspace) > out.log + ls $(run-lulesh.workspace) > ls.log + depends: [run-lulesh] + + - name: post-process-lulesh-trials + description: Post process all LULESH results. + run: + cmd: | + echo "Parameterized step that has Parameter Independent dependencies" >> out.log + echo "TRIAL = $(TRIAL)" >> out.log + echo $(run-lulesh.workspace) >> out.log + ls $(run-lulesh.workspace) > out.log + depends: [run-lulesh] + + - name: post-process-lulesh-size + description: Post process all LULESH results. + run: + cmd: | + echo "Parameterized step that has Parameter Independent dependencies" >> out.log + echo "SIZE = $(SIZE)" >> out.log + echo $(run-lulesh.workspace) >> out.log + ls $(run-lulesh.workspace) | grep SIZE.$(SIZE) >> out.log + depends: [run-lulesh] diff --git a/samples/lulesh/lulesh_sample1_unix_linear.yaml b/samples/lulesh/lulesh_sample1_unix_linear.yaml new file mode 100644 index 000000000..0c65aa97b --- /dev/null +++ b/samples/lulesh/lulesh_sample1_unix_linear.yaml @@ -0,0 +1,70 @@ +description: + name: lulesh sample1 + description: A sample LULESH study that downloads, builds, and runs a parameter study of varying problem sizes and iterations. + +env: + variables: + OUTPUT_PATH: ./sample_output/lulesh + SIZE: 10 + ITERATIONS: 20 + TRIAL: 1 + + labels: + outfile: SIZE.$(SIZE).ITER.$(ITERATIONS).log + + dependencies: + git: + - name: LULESH + path: $(OUTPUT_PATH) + url: https://github.com/LLNL/LULESH.git + +study: + - name: make-lulesh + description: Build the serial version of LULESH. + run: + cmd: | + cd $(LULESH) + sed -i 's/^CXX = $(MPICXX)/CXX = $(SERCXX)/' ./Makefile + sed -i 's/^CXXFLAGS = -g -O3 -fopenmp/#CXXFLAGS = -g -O3 -fopenmp/' ./Makefile + sed -i 's/^#LDFLAGS = -g -O3/LDFLAGS = -g -O3/' ./Makefile + sed -i 's/^LDFLAGS = -g -O3 -fopenmp/#LDFLAGS = -g -O3 -fopenmp/' ./Makefile + sed -i 's/^#CXXFLAGS = -g -O3 -I/CXXFLAGS = -g -O3 -I/' ./Makefile + make clean + make + depends: [] + + - name: run-lulesh + description: Run LULESH. + run: + cmd: | + $(LULESH)/lulesh2.0 -s $(SIZE) -i $(ITERATIONS) -p > $(outfile) + depends: [make-lulesh] + + - name: post-process-lulesh + description: Post process all LULESH results. + run: + cmd: | + echo "Unparameterized step with Parameter Independent dependencies." >> out.log + echo $(run-lulesh.workspace) > out.log + ls $(run-lulesh.workspace) > ls.log + depends: [run-lulesh] + + - name: post-process-lulesh-trials + description: Post process all LULESH results. + run: + cmd: | + echo "Parameterized step that has Parameter Independent dependencies" >> out.log + echo "TRIAL = $(TRIAL)" >> out.log + echo $(run-lulesh.workspace) >> out.log + ls $(run-lulesh.workspace) > out.log + depends: [run-lulesh] + + - name: post-process-lulesh-size + description: Post process all LULESH results. + run: + cmd: | + echo "Parameterized step that has Parameter Independent dependencies" >> out.log + echo "SIZE = $(SIZE)" >> out.log + echo $(run-lulesh.workspace) >> out.log + ls $(run-lulesh.workspace) | grep SIZE.$(SIZE) >> out.log + depends: [run-lulesh] diff --git a/setup.py b/setup.py index 00be8d2ea..e60797640 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup(name='maestrowf', description='A tool and library for specifying and conducting general ' 'workflows.', - version='1.1.4dev1.0', + version='1.1.4dev1.1', author='Francesco Di Natale', author_email='dinatale3@llnl.gov', url='https://github.com/llnl/maestrowf',