commit bbf8eb631ab1cdb417ee97d64345a2ad28f89835 Author: Matthias Date: Tue Apr 11 15:48:26 2017 +0200 Initial commit. diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100755 index 0000000..f1c6781 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,118 @@ +cmake_minimum_required(VERSION 2.8) +project(wfr-examples C CXX) + + +# Compiler flags +set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -DNDEBUG -Wall") +set(CMAKE_C_FLAGS_DEBUG "-O0 -g3 -DNDEBUG -Wall") + +# Find WFR-libraries +if (NOT WFR_FOUND) + if (NOT WFR_DIR) + set(WFR_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../WFR-lib/dist") + endif() + find_package(WFR REQUIRED) +endif() + +# Find IWIR2WFR compiler +if (NOT IWIR2WFR_FOUND) + if (NOT IWIR2WFR_DIR) + set(IWIR2WFR_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../IWIR2WFRcompiler/dist") + endif() + find_package(IWIR2WFR REQUIRED) +endif() + +# We need OpenMP +FIND_PACKAGE(OpenMP) +if(OPENMP_FOUND) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") +endif() + +# Where to install the output +get_directory_property(hasParent PARENT_DIRECTORY) +if (NOT hasParent) + if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/dist") + endif() +endif() + +# Setup include dir +include_directories(${WFR_INCLUDE_DIR}) + +# Enable C++11 support +ADD_DEFINITIONS( -std=c++11 ) + +# +# Convenience function for setting up individual unit-tests +# +function(add_wfr_example name add_inc) + file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${name}/wfr) + add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${name}/wfr/${name}.cpp ${CMAKE_CURRENT_BINARY_DIR}/${name}/wfr/${name}.h + COMMAND ${IWIR2WFR_EXE} -i ${CMAKE_CURRENT_SOURCE_DIR}/src/${name}/wfr/${name}.iwir -o ${CMAKE_CURRENT_BINARY_DIR}/${name}/wfr/${name} -skipmain -printir -repoconfig ${CMAKE_CURRENT_SOURCE_DIR}/src/${name}/wfr/repo/${name}.properties + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${name}/wfr + ) + add_definitions("-pg -g3") + add_executable(${name}-wfr.bin ${CMAKE_CURRENT_BINARY_DIR}/${name}/wfr/${name}.cpp ${ARGN}) + target_include_directories(${name}-wfr.bin PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/${name}/wfr ${add_inc}) + target_link_libraries(${name}-wfr.bin ${WFR_LIBRARIES}) + add_dependencies(${name}-wfr.bin wfr_lib) # Otherwise we would have race conditions when compiling the parent project with -j + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${name}/wfr/${name}.cpp ${CMAKE_CURRENT_BINARY_DIR}/${name}/wfr/${name}.h DESTINATION ${CMAKE_INSTALL_PREFIX}/examples/${name}/wfr) + install(TARGETS ${name}-wfr.bin DESTINATION ${CMAKE_INSTALL_PREFIX}/examples/${name}/wfr) +endfunction() + +function(add_omp_example name add_inc) + add_executable(${name}-omp.bin ${CMAKE_CURRENT_SOURCE_DIR}/src/${name}/openmp/${name}.cpp ${ARGN}) + target_include_directories(${name}-omp.bin PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/${name}/openmp ${add_inc}) + target_link_libraries(${name}-omp.bin ${WFR_LIBRARIES}) + add_dependencies(${name}-omp.bin wfr_lib) # Otherwise we would have race conditions when compiling the parent project with -j + install(TARGETS ${name}-omp.bin DESTINATION ${CMAKE_INSTALL_PREFIX}/examples/${name}/openmp) +endfunction() + +# +# Setup individual examples +# +add_wfr_example(montage-pegasus "") +add_omp_example(montage-pegasus "") + +add_wfr_example(povray "") +add_omp_example(povray "") + +add_wfr_example(raincloud "") +add_omp_example(raincloud "") + + +add_wfr_example(raincloud.test01 "") + +add_wfr_example(raincloud.transformed "") + +add_wfr_example(sparselu-for "") +add_omp_example(sparselu-for "") + +add_wfr_example(sparselu-for-trans01 "") + +add_wfr_example(sparselu-while "") +add_omp_example(sparselu-while "") + +add_wfr_example(starrs-merge "") +add_omp_example(starrs-merge "") + +add_wfr_example(nested_for_01 "") +add_wfr_example(nested_for_02 "") +add_wfr_example(nested_for_02b "") +add_wfr_example(nested_for_02c "") +add_wfr_example(nested_for_02d "") +add_wfr_example(nested_for_03 "") +add_wfr_example(nested_for_04 "") + +add_wfr_example(unrolling_for_01 "") +add_wfr_example(unrolling_for_02 "") + + +add_wfr_example(meteoag01 "") +add_wfr_example(meteoag02 "") +add_wfr_example(meteoag03 "") + +add_wfr_example(blast01 "") +add_wfr_example(blast02 "") + diff --git a/CMakeLists.txt.orig b/CMakeLists.txt.orig new file mode 100755 index 0000000..e7ae120 --- /dev/null +++ b/CMakeLists.txt.orig @@ -0,0 +1,109 @@ +cmake_minimum_required(VERSION 2.8) +project(wfr-examples C CXX) + + +# Compiler flags +set(CMAKE_CXX_FLAGS_DEBUG "-O3 -g3 -pg -DNDEBUG -Wall") +set(CMAKE_C_FLAGS_DEBUG "-O3 -g3 -pg -DNDEBUG -Wall") + +# Find WFR-libraries +if (NOT WFR_FOUND) + if (NOT WFR_DIR) + set(WFR_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../WFR-lib/dist") + endif() + find_package(WFR REQUIRED) +endif() + +# Find IWIR2WFR compiler +if (NOT IWIR2WFR_FOUND) + if (NOT IWIR2WFR_DIR) + set(IWIR2WFR_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../IWIR2WFRcompiler/dist") + endif() + find_package(IWIR2WFR REQUIRED) +endif() + +# We need OpenMP +FIND_PACKAGE(OpenMP) +if(OPENMP_FOUND) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") +endif() + +# Where to install the output +get_directory_property(hasParent PARENT_DIRECTORY) +if (NOT hasParent) + if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/dist") + endif() +endif() + +# Setup include dir +include_directories(${WFR_INCLUDE_DIR}) + +# Enable C++11 support +ADD_DEFINITIONS( -std=c++11 ) + +# +# Convenience function for setting up individual unit-tests +# +function(add_wfr_example name add_inc) + file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${name}/wfr) + add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${name}/wfr/${name}.cpp ${CMAKE_CURRENT_BINARY_DIR}/${name}/wfr/${name}.h + COMMAND ${IWIR2WFR_EXE} -i ${CMAKE_CURRENT_SOURCE_DIR}/src/${name}/wfr/${name}.iwir -o ${CMAKE_CURRENT_BINARY_DIR}/${name}/wfr/${name} -skipmain -printir -repoconfig ${CMAKE_CURRENT_SOURCE_DIR}/src/${name}/wfr/repo/${name}.properties + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${name}/wfr + ) + add_definitions("-pg -g3") + add_executable(${name}-wfr.bin ${CMAKE_CURRENT_BINARY_DIR}/${name}/wfr/${name}.cpp ${ARGN}) + target_include_directories(${name}-wfr.bin PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/${name}/wfr ${add_inc}) + target_link_libraries(${name}-wfr.bin ${WFR_LIBRARIES}) + add_dependencies(${name}-wfr.bin wfr_lib) # Otherwise we would have race conditions when compiling the parent project with -j + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${name}/wfr/${name}.cpp ${CMAKE_CURRENT_BINARY_DIR}/${name}/wfr/${name}.h DESTINATION ${CMAKE_INSTALL_PREFIX}/examples/${name}/wfr) + install(TARGETS ${name}-wfr.bin DESTINATION ${CMAKE_INSTALL_PREFIX}/examples/${name}/wfr) +endfunction() + +function(add_omp_example name add_inc) + add_executable(${name}-omp.bin ${CMAKE_CURRENT_SOURCE_DIR}/src/${name}/openmp/${name}.cpp ${ARGN}) + target_include_directories(${name}-omp.bin PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/${name}/openmp ${add_inc}) + target_link_libraries(${name}-omp.bin ${WFR_LIBRARIES}) + add_dependencies(${name}-omp.bin wfr_lib) # Otherwise we would have race conditions when compiling the parent project with -j + install(TARGETS ${name}-omp.bin DESTINATION ${CMAKE_INSTALL_PREFIX}/examples/${name}/openmp) +endfunction() + +# +# Setup individual examples +# +add_wfr_example(montage-pegasus "") +add_omp_example(montage-pegasus "") + +add_wfr_example(povray "") +add_omp_example(povray "") + +add_wfr_example(raincloud "") +add_omp_example(raincloud "") + + +add_wfr_example(raincloud.test01 "") + +add_wfr_example(raincloud.transformed "") + +add_wfr_example(sparselu-for "") +add_omp_example(sparselu-for "") + +add_wfr_example(sparselu-while "") +add_omp_example(sparselu-while "") + +add_wfr_example(starrs-merge "") +add_omp_example(starrs-merge "") + +add_wfr_example(nested_for_01 "") +add_wfr_example(nested_for_02 "") +add_wfr_example(nested_for_02b "") +add_wfr_example(nested_for_02c "") +add_wfr_example(nested_for_02d "") +add_wfr_example(nested_for_03 "") +add_wfr_example(nested_for_04 "") + +add_wfr_example(unrolling_for_01 "") +add_wfr_example(unrolling_for_02 "") + + diff --git a/bin/clear.sh b/bin/clear.sh new file mode 100755 index 0000000..ddd877b --- /dev/null +++ b/bin/clear.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +rm -rf default* *.png *.dot wfr_wdir* diff --git a/bin/dot2png.sh b/bin/dot2png.sh new file mode 100755 index 0000000..3afa9b3 --- /dev/null +++ b/bin/dot2png.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +for i in *.dot; do + echo "Creating $i.png" + dot -Tpng $i > $i.png +done + diff --git a/data/.directory b/data/.directory new file mode 100755 index 0000000..a9bc069 --- /dev/null +++ b/data/.directory @@ -0,0 +1,4 @@ +[Dolphin] +Timestamp=2015,2,11,11,19,2 +Version=3 +ViewMode=1 diff --git a/data/montage-pegasus-nofiles.tar.gz b/data/montage-pegasus-nofiles.tar.gz new file mode 100755 index 0000000..2a8e1bc Binary files /dev/null and b/data/montage-pegasus-nofiles.tar.gz differ diff --git a/data/montage-pegasus-swift.tar.gz b/data/montage-pegasus-swift.tar.gz new file mode 100755 index 0000000..ec35b56 Binary files /dev/null and b/data/montage-pegasus-swift.tar.gz differ diff --git a/data/montage-pegasus.tar.gz b/data/montage-pegasus.tar.gz new file mode 100755 index 0000000..7b471f5 Binary files /dev/null and b/data/montage-pegasus.tar.gz differ diff --git a/data/povray-dummy.tar.gz b/data/povray-dummy.tar.gz new file mode 100755 index 0000000..24d75f8 Binary files /dev/null and b/data/povray-dummy.tar.gz differ diff --git a/data/povray-swift.tar.gz b/data/povray-swift.tar.gz new file mode 100755 index 0000000..274c4a9 Binary files /dev/null and b/data/povray-swift.tar.gz differ diff --git a/data/povray.tar.gz b/data/povray.tar.gz new file mode 100755 index 0000000..d1e024b Binary files /dev/null and b/data/povray.tar.gz differ diff --git a/data/raincloud-dummy.tar.gz b/data/raincloud-dummy.tar.gz new file mode 100755 index 0000000..63915db Binary files /dev/null and b/data/raincloud-dummy.tar.gz differ diff --git a/data/raincloud-swift.tar.gz b/data/raincloud-swift.tar.gz new file mode 100755 index 0000000..50abd02 Binary files /dev/null and b/data/raincloud-swift.tar.gz differ diff --git a/data/sparselu-dummy-swift.tar.gz b/data/sparselu-dummy-swift.tar.gz new file mode 100755 index 0000000..e0f003d Binary files /dev/null and b/data/sparselu-dummy-swift.tar.gz differ diff --git a/data/sparselu-dummy.tar.gz b/data/sparselu-dummy.tar.gz new file mode 100755 index 0000000..eb48713 Binary files /dev/null and b/data/sparselu-dummy.tar.gz differ diff --git a/data/starrs-merge-swift.tar.gz b/data/starrs-merge-swift.tar.gz new file mode 100755 index 0000000..c989106 Binary files /dev/null and b/data/starrs-merge-swift.tar.gz differ diff --git a/data/starrs-merge.tar.gz b/data/starrs-merge.tar.gz new file mode 100755 index 0000000..cf002ad Binary files /dev/null and b/data/starrs-merge.tar.gz differ diff --git a/src/.directory b/src/.directory new file mode 100644 index 0000000..a0e276d --- /dev/null +++ b/src/.directory @@ -0,0 +1,4 @@ +[Dolphin] +Timestamp=2016,11,14,13,29,44 +Version=3 +ViewMode=2 diff --git a/src/blast01/wfr/blast01.iwir b/src/blast01/wfr/blast01.iwir new file mode 100644 index 0000000..4005def --- /dev/null +++ b/src/blast01/wfr/blast01.iwir @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/blast01/wfr/repo/blast/cat_files.code b/src/blast01/wfr/repo/blast/cat_files.code new file mode 100644 index 0000000..c315a32 --- /dev/null +++ b/src/blast01/wfr/repo/blast/cat_files.code @@ -0,0 +1,5 @@ + + auto sleeptime = sin->input.getSize(); // per file the original code roughly needed 0.7 ms (let's round that to 1 ms). + std::this_thread::sleep_for(std::chrono::milliseconds((long int)sleeptime)); + sout->output.setValue("cat_output.file"); + \ No newline at end of file diff --git a/src/blast01/wfr/repo/blast/cat_files.properties b/src/blast01/wfr/repo/blast/cat_files.properties new file mode 100644 index 0000000..f39c850 --- /dev/null +++ b/src/blast01/wfr/repo/blast/cat_files.properties @@ -0,0 +1,3 @@ +name=cat_files +entries=1 +entry.0=cat_files.code diff --git a/src/blast01/wfr/repo/blast/distributed_script.code b/src/blast01/wfr/repo/blast/distributed_script.code new file mode 100644 index 0000000..70c6d47 --- /dev/null +++ b/src/blast01/wfr/repo/blast/distributed_script.code @@ -0,0 +1,6 @@ + + EXECUTE_SIMULATION_MODE + sout->output.setValue("output.file"); + sout->error.setValue("error.file"); + sout->total.setValue("total.file"); + \ No newline at end of file diff --git a/src/blast01/wfr/repo/blast/distributed_script.properties b/src/blast01/wfr/repo/blast/distributed_script.properties new file mode 100644 index 0000000..d29bed2 --- /dev/null +++ b/src/blast01/wfr/repo/blast/distributed_script.properties @@ -0,0 +1,3 @@ +name=distributed_script +entries=1 +entry.0=distributed_script.code \ No newline at end of file diff --git a/src/blast01/wfr/repo/blast/finish_job.code b/src/blast01/wfr/repo/blast/finish_job.code new file mode 100644 index 0000000..c8fae64 --- /dev/null +++ b/src/blast01/wfr/repo/blast/finish_job.code @@ -0,0 +1,4 @@ + + EXECUTE_SIMULATION_MODE + sout->result.setValue("result.file"); + \ No newline at end of file diff --git a/src/blast01/wfr/repo/blast/finish_job.properties b/src/blast01/wfr/repo/blast/finish_job.properties new file mode 100644 index 0000000..3ee041e --- /dev/null +++ b/src/blast01/wfr/repo/blast/finish_job.properties @@ -0,0 +1,3 @@ +name=finish_job +entries=1 +entry.0=finish_job.code diff --git a/src/blast01/wfr/repo/blast/includes.code b/src/blast01/wfr/repo/blast/includes.code new file mode 100755 index 0000000..ea1a2da --- /dev/null +++ b/src/blast01/wfr/repo/blast/includes.code @@ -0,0 +1,2 @@ +#include +#include \ No newline at end of file diff --git a/src/blast01/wfr/repo/blast/split_inputs.code b/src/blast01/wfr/repo/blast/split_inputs.code new file mode 100644 index 0000000..e8cb12b --- /dev/null +++ b/src/blast01/wfr/repo/blast/split_inputs.code @@ -0,0 +1,7 @@ + + EXECUTE_SIMULATION_MODE + for (long i = 0; i < sin->chunk_count.getValue(); ++i) { + sout->input_chunks.setEntryValue(i, "input_chunk"); + } + sout->input_chunks.setFinalised(true); + \ No newline at end of file diff --git a/src/blast01/wfr/repo/blast/split_inputs.properties b/src/blast01/wfr/repo/blast/split_inputs.properties new file mode 100644 index 0000000..81d9168 --- /dev/null +++ b/src/blast01/wfr/repo/blast/split_inputs.properties @@ -0,0 +1,3 @@ +name=split_inputs +entries=1 +entry.0=split_inputs.code diff --git a/src/blast01/wfr/repo/blast/wfInput.code b/src/blast01/wfr/repo/blast/wfInput.code new file mode 100755 index 0000000..226d9c5 --- /dev/null +++ b/src/blast01/wfr/repo/blast/wfInput.code @@ -0,0 +1,23 @@ + + long chunkCount = 10; + bool isHelp = false; + boost::program_options::options_description opts("MeteoAG Options"); + opts.add_options() + ("help", "Print help message.") + ("inputchunks", boost::program_options::value(), "Number of input chunks."); + boost::program_options::variables_map vm; + auto parsed = boost::program_options::command_line_parser(argc, argv).options(opts).allow_unregistered().run(); + boost::program_options::store(parsed, vm); + boost::program_options::notify(vm); + if (vm.count("help")) { + std::cerr << opts << std::endl; + isHelp = true; + } else { + if (vm.count("inputchunks")) { + chunkCount = vm["inputchunks"].as(); + } + std::cerr << "inputChunks = " << chunkCount << std::endl; + } + wfInput.input_file.setValue("input_file"); + wfInput.chunk_count.setValue(chunkCount); + \ No newline at end of file diff --git a/src/blast01/wfr/repo/blast/wfOutput.code b/src/blast01/wfr/repo/blast/wfOutput.code new file mode 100755 index 0000000..e69de29 diff --git a/src/blast01/wfr/repo/blast01.properties b/src/blast01/wfr/repo/blast01.properties new file mode 100644 index 0000000..beabd8e --- /dev/null +++ b/src/blast01/wfr/repo/blast01.properties @@ -0,0 +1,9 @@ + +wfinput=blast/wfInput.code +wfoutput=blast/wfOutput.code +includes=blast/includes.code + +atomicTask.0=blast/split_inputs.properties +atomicTask.1=blast/distributed_script.properties +atomicTask.2=blast/cat_files.properties +atomicTask.3=blast/finish_job.properties diff --git a/src/blast02/wfr/blast02.iwir b/src/blast02/wfr/blast02.iwir new file mode 100644 index 0000000..f8097c7 --- /dev/null +++ b/src/blast02/wfr/blast02.iwir @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/blast02/wfr/repo/blast/cat_files.code b/src/blast02/wfr/repo/blast/cat_files.code new file mode 100644 index 0000000..c315a32 --- /dev/null +++ b/src/blast02/wfr/repo/blast/cat_files.code @@ -0,0 +1,5 @@ + + auto sleeptime = sin->input.getSize(); // per file the original code roughly needed 0.7 ms (let's round that to 1 ms). + std::this_thread::sleep_for(std::chrono::milliseconds((long int)sleeptime)); + sout->output.setValue("cat_output.file"); + \ No newline at end of file diff --git a/src/blast02/wfr/repo/blast/cat_files.properties b/src/blast02/wfr/repo/blast/cat_files.properties new file mode 100644 index 0000000..f39c850 --- /dev/null +++ b/src/blast02/wfr/repo/blast/cat_files.properties @@ -0,0 +1,3 @@ +name=cat_files +entries=1 +entry.0=cat_files.code diff --git a/src/blast02/wfr/repo/blast/distributed_script.code b/src/blast02/wfr/repo/blast/distributed_script.code new file mode 100644 index 0000000..70c6d47 --- /dev/null +++ b/src/blast02/wfr/repo/blast/distributed_script.code @@ -0,0 +1,6 @@ + + EXECUTE_SIMULATION_MODE + sout->output.setValue("output.file"); + sout->error.setValue("error.file"); + sout->total.setValue("total.file"); + \ No newline at end of file diff --git a/src/blast02/wfr/repo/blast/distributed_script.properties b/src/blast02/wfr/repo/blast/distributed_script.properties new file mode 100644 index 0000000..d29bed2 --- /dev/null +++ b/src/blast02/wfr/repo/blast/distributed_script.properties @@ -0,0 +1,3 @@ +name=distributed_script +entries=1 +entry.0=distributed_script.code \ No newline at end of file diff --git a/src/blast02/wfr/repo/blast/finish_job.code b/src/blast02/wfr/repo/blast/finish_job.code new file mode 100644 index 0000000..c8fae64 --- /dev/null +++ b/src/blast02/wfr/repo/blast/finish_job.code @@ -0,0 +1,4 @@ + + EXECUTE_SIMULATION_MODE + sout->result.setValue("result.file"); + \ No newline at end of file diff --git a/src/blast02/wfr/repo/blast/finish_job.properties b/src/blast02/wfr/repo/blast/finish_job.properties new file mode 100644 index 0000000..3ee041e --- /dev/null +++ b/src/blast02/wfr/repo/blast/finish_job.properties @@ -0,0 +1,3 @@ +name=finish_job +entries=1 +entry.0=finish_job.code diff --git a/src/blast02/wfr/repo/blast/helper01.code b/src/blast02/wfr/repo/blast/helper01.code new file mode 100644 index 0000000..0256889 --- /dev/null +++ b/src/blast02/wfr/repo/blast/helper01.code @@ -0,0 +1,6 @@ + + for (long i = 0; i < sin->input_chunks.getSize()/(sin->parallelReductions.getValue()+1); ++i) { + sout->output.setEntryValue(i, sin->input_chunks.getEntryValue(i)); + } + sout->output.setFinalised(true); + \ No newline at end of file diff --git a/src/blast02/wfr/repo/blast/helper01.properties b/src/blast02/wfr/repo/blast/helper01.properties new file mode 100644 index 0000000..f17d1cb --- /dev/null +++ b/src/blast02/wfr/repo/blast/helper01.properties @@ -0,0 +1,3 @@ +name=helper01 +entries=1 +entry.0=helper01.code diff --git a/src/blast02/wfr/repo/blast/includes.code b/src/blast02/wfr/repo/blast/includes.code new file mode 100755 index 0000000..ea1a2da --- /dev/null +++ b/src/blast02/wfr/repo/blast/includes.code @@ -0,0 +1,2 @@ +#include +#include \ No newline at end of file diff --git a/src/blast02/wfr/repo/blast/split_inputs.code b/src/blast02/wfr/repo/blast/split_inputs.code new file mode 100644 index 0000000..e8cb12b --- /dev/null +++ b/src/blast02/wfr/repo/blast/split_inputs.code @@ -0,0 +1,7 @@ + + EXECUTE_SIMULATION_MODE + for (long i = 0; i < sin->chunk_count.getValue(); ++i) { + sout->input_chunks.setEntryValue(i, "input_chunk"); + } + sout->input_chunks.setFinalised(true); + \ No newline at end of file diff --git a/src/blast02/wfr/repo/blast/split_inputs.properties b/src/blast02/wfr/repo/blast/split_inputs.properties new file mode 100644 index 0000000..81d9168 --- /dev/null +++ b/src/blast02/wfr/repo/blast/split_inputs.properties @@ -0,0 +1,3 @@ +name=split_inputs +entries=1 +entry.0=split_inputs.code diff --git a/src/blast02/wfr/repo/blast/wfInput.code b/src/blast02/wfr/repo/blast/wfInput.code new file mode 100755 index 0000000..d41821e --- /dev/null +++ b/src/blast02/wfr/repo/blast/wfInput.code @@ -0,0 +1,30 @@ + + long chunkCount = 10; + long parallelreductions = 10; + bool isHelp = false; + boost::program_options::options_description opts("MeteoAG Options"); + opts.add_options() + ("help", "Print help message.") + ("inputchunks", boost::program_options::value(), "Number of input chunks.") + ("parallelreductions", boost::program_options::value(), "Number of parallel reductions."); + boost::program_options::variables_map vm; + auto parsed = boost::program_options::command_line_parser(argc, argv).options(opts).allow_unregistered().run(); + boost::program_options::store(parsed, vm); + boost::program_options::notify(vm); + if (vm.count("help")) { + std::cerr << opts << std::endl; + isHelp = true; + } else { + if (vm.count("inputchunks")) { + chunkCount = vm["inputchunks"].as(); + } + if (vm.count("parallelreductions")) { + parallelreductions = vm["parallelreductions"].as(); + } + std::cerr << "inputChunks = " << chunkCount << std::endl; + std::cerr << "parallelreductions = " << parallelreductions << std::endl; + } + wfInput.input_file.setValue("input_file"); + wfInput.chunk_count.setValue(chunkCount); + wfInput.parallelReductions.setValue(parallelreductions); + \ No newline at end of file diff --git a/src/blast02/wfr/repo/blast/wfOutput.code b/src/blast02/wfr/repo/blast/wfOutput.code new file mode 100755 index 0000000..e69de29 diff --git a/src/blast02/wfr/repo/blast02.properties b/src/blast02/wfr/repo/blast02.properties new file mode 100644 index 0000000..1c12649 --- /dev/null +++ b/src/blast02/wfr/repo/blast02.properties @@ -0,0 +1,10 @@ + +wfinput=blast/wfInput.code +wfoutput=blast/wfOutput.code +includes=blast/includes.code + +atomicTask.0=blast/split_inputs.properties +atomicTask.1=blast/distributed_script.properties +atomicTask.2=blast/cat_files.properties +atomicTask.3=blast/finish_job.properties +atomicTask.4=blast/helper01.properties diff --git a/src/meteoag01/wfr/meteoag01.iwir b/src/meteoag01/wfr/meteoag01.iwir new file mode 100644 index 0000000..f91c120 --- /dev/null +++ b/src/meteoag01/wfr/meteoag01.iwir @@ -0,0 +1,168 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + if_condition = true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/meteoag01/wfr/repo/meteoag/case_init.code b/src/meteoag01/wfr/repo/meteoag/case_init.code new file mode 100644 index 0000000..3921a66 --- /dev/null +++ b/src/meteoag01/wfr/repo/meteoag/case_init.code @@ -0,0 +1,3 @@ + + sout->output.setValue(sin->input); + \ No newline at end of file diff --git a/src/meteoag01/wfr/repo/meteoag/case_init.properties b/src/meteoag01/wfr/repo/meteoag/case_init.properties new file mode 100644 index 0000000..2b61ded --- /dev/null +++ b/src/meteoag01/wfr/repo/meteoag/case_init.properties @@ -0,0 +1,3 @@ +name=case_init +entries=1 +entry.0=case_init.code diff --git a/src/meteoag01/wfr/repo/meteoag/includes.code b/src/meteoag01/wfr/repo/meteoag/includes.code new file mode 100755 index 0000000..4f2676a --- /dev/null +++ b/src/meteoag01/wfr/repo/meteoag/includes.code @@ -0,0 +1 @@ +#include \ No newline at end of file diff --git a/src/meteoag01/wfr/repo/meteoag/rams_hist.code b/src/meteoag01/wfr/repo/meteoag/rams_hist.code new file mode 100644 index 0000000..3921a66 --- /dev/null +++ b/src/meteoag01/wfr/repo/meteoag/rams_hist.code @@ -0,0 +1,3 @@ + + sout->output.setValue(sin->input); + \ No newline at end of file diff --git a/src/meteoag01/wfr/repo/meteoag/rams_hist.properties b/src/meteoag01/wfr/repo/meteoag/rams_hist.properties new file mode 100644 index 0000000..4905f61 --- /dev/null +++ b/src/meteoag01/wfr/repo/meteoag/rams_hist.properties @@ -0,0 +1,3 @@ +name=rams_hist +entries=1 +entry.0=rams_hist.code \ No newline at end of file diff --git a/src/meteoag01/wfr/repo/meteoag/rams_init.code b/src/meteoag01/wfr/repo/meteoag/rams_init.code new file mode 100644 index 0000000..3921a66 --- /dev/null +++ b/src/meteoag01/wfr/repo/meteoag/rams_init.code @@ -0,0 +1,3 @@ + + sout->output.setValue(sin->input); + \ No newline at end of file diff --git a/src/meteoag01/wfr/repo/meteoag/rams_init.properties b/src/meteoag01/wfr/repo/meteoag/rams_init.properties new file mode 100644 index 0000000..6b6f864 --- /dev/null +++ b/src/meteoag01/wfr/repo/meteoag/rams_init.properties @@ -0,0 +1,3 @@ +name=rams_init +entries=1 +entry.0=rams_init.code diff --git a/src/meteoag01/wfr/repo/meteoag/rams_makevfile.code b/src/meteoag01/wfr/repo/meteoag/rams_makevfile.code new file mode 100644 index 0000000..3921a66 --- /dev/null +++ b/src/meteoag01/wfr/repo/meteoag/rams_makevfile.code @@ -0,0 +1,3 @@ + + sout->output.setValue(sin->input); + \ No newline at end of file diff --git a/src/meteoag01/wfr/repo/meteoag/rams_makevfile.properties b/src/meteoag01/wfr/repo/meteoag/rams_makevfile.properties new file mode 100644 index 0000000..e489296 --- /dev/null +++ b/src/meteoag01/wfr/repo/meteoag/rams_makevfile.properties @@ -0,0 +1,3 @@ +name=rams_makevfile +entries=1 +entry.0=rams_makevfile.code diff --git a/src/meteoag01/wfr/repo/meteoag/raver.code b/src/meteoag01/wfr/repo/meteoag/raver.code new file mode 100644 index 0000000..3921a66 --- /dev/null +++ b/src/meteoag01/wfr/repo/meteoag/raver.code @@ -0,0 +1,3 @@ + + sout->output.setValue(sin->input); + \ No newline at end of file diff --git a/src/meteoag01/wfr/repo/meteoag/raver.properties b/src/meteoag01/wfr/repo/meteoag/raver.properties new file mode 100644 index 0000000..dc7ba76 --- /dev/null +++ b/src/meteoag01/wfr/repo/meteoag/raver.properties @@ -0,0 +1,3 @@ +name=raver +entries=1 +entry.0=raver.code diff --git a/src/meteoag01/wfr/repo/meteoag/revu_compare.code b/src/meteoag01/wfr/repo/meteoag/revu_compare.code new file mode 100644 index 0000000..3921a66 --- /dev/null +++ b/src/meteoag01/wfr/repo/meteoag/revu_compare.code @@ -0,0 +1,3 @@ + + sout->output.setValue(sin->input); + \ No newline at end of file diff --git a/src/meteoag01/wfr/repo/meteoag/revu_compare.properties b/src/meteoag01/wfr/repo/meteoag/revu_compare.properties new file mode 100644 index 0000000..d830dcd --- /dev/null +++ b/src/meteoag01/wfr/repo/meteoag/revu_compare.properties @@ -0,0 +1,3 @@ +name=revu_compare +entries=1 +entry.0=revu_compare.code diff --git a/src/meteoag01/wfr/repo/meteoag/revu_dump.code b/src/meteoag01/wfr/repo/meteoag/revu_dump.code new file mode 100644 index 0000000..3921a66 --- /dev/null +++ b/src/meteoag01/wfr/repo/meteoag/revu_dump.code @@ -0,0 +1,3 @@ + + sout->output.setValue(sin->input); + \ No newline at end of file diff --git a/src/meteoag01/wfr/repo/meteoag/revu_dump.properties b/src/meteoag01/wfr/repo/meteoag/revu_dump.properties new file mode 100644 index 0000000..52214e1 --- /dev/null +++ b/src/meteoag01/wfr/repo/meteoag/revu_dump.properties @@ -0,0 +1,3 @@ +name=revu_dump +entries=1 +entry.0=revu_dump.code diff --git a/src/meteoag01/wfr/repo/meteoag/simulation_init.code b/src/meteoag01/wfr/repo/meteoag/simulation_init.code new file mode 100644 index 0000000..76b3c18 --- /dev/null +++ b/src/meteoag01/wfr/repo/meteoag/simulation_init.code @@ -0,0 +1,6 @@ + + for (long i = 0; i < sin->chunk_count.getValue(); ++i) { + sout->input_chunks.setEntryValue(i, "input_chunk"); + } + sout->input_chunks.setFinalised(true); + \ No newline at end of file diff --git a/src/meteoag01/wfr/repo/meteoag/simulation_init.properties b/src/meteoag01/wfr/repo/meteoag/simulation_init.properties new file mode 100644 index 0000000..08d025d --- /dev/null +++ b/src/meteoag01/wfr/repo/meteoag/simulation_init.properties @@ -0,0 +1,3 @@ +name=simulation_init +entries=1 +entry.0=simulation_init.code diff --git a/src/meteoag01/wfr/repo/meteoag/wfInput.code b/src/meteoag01/wfr/repo/meteoag/wfInput.code new file mode 100755 index 0000000..c638358 --- /dev/null +++ b/src/meteoag01/wfr/repo/meteoag/wfInput.code @@ -0,0 +1,38 @@ + + std::string inputFile = "input.file"; + long chunkCount = 10; + long pForIterations = 10; + bool ifCondition = true; + bool isHelp = false; + boost::program_options::options_description opts("MeteoAG Options"); + opts.add_options() + ("help", "Print help message.") + ("inputchunks", boost::program_options::value(), "Number of input chunks.") + ("pforiterations", boost::program_options::value(), "Number of pFor iterations.") + ("ifcondition", boost::program_options::value(), "If condition."); + boost::program_options::variables_map vm; + auto parsed = boost::program_options::command_line_parser(argc, argv).options(opts).allow_unregistered().run(); + boost::program_options::store(parsed, vm); + boost::program_options::notify(vm); + if (vm.count("help")) { + std::cerr << opts << std::endl; + isHelp = true; + } else { + if (vm.count("inputchunks")) { + chunkCount = vm["inputchunks"].as(); + } + if (vm.count("pforiterations")) { + pForIterations = vm["pforiterations"].as(); + } + if (vm.count("ifcondition")) { + ifCondition = vm["ifcondition"].as(); + } + std::cerr << "inputChunks = " << chunkCount << std::endl; + std::cerr << "pForIterations = " << pForIterations << std::endl; + std::cerr << "IfCondition = " << ifCondition << std::endl; + } + wfInput.input_file.setValue("input_file"); + wfInput.chunk_count.setValue(chunkCount); + wfInput.pForIterations.setValue(pForIterations); + wfInput.if_condition.setValue(ifCondition); + \ No newline at end of file diff --git a/src/meteoag01/wfr/repo/meteoag/wfOutput.code b/src/meteoag01/wfr/repo/meteoag/wfOutput.code new file mode 100755 index 0000000..e69de29 diff --git a/src/meteoag01/wfr/repo/meteoag01.properties b/src/meteoag01/wfr/repo/meteoag01.properties new file mode 100644 index 0000000..e7ab95e --- /dev/null +++ b/src/meteoag01/wfr/repo/meteoag01.properties @@ -0,0 +1,13 @@ + +wfinput=meteoag/wfInput.code +wfoutput=meteoag/wfOutput.code +includes=meteoag/includes.code + +atomicTask.0=meteoag/simulation_init.properties +atomicTask.1=meteoag/case_init.properties +atomicTask.2=meteoag/rams_makevfile.properties +atomicTask.3=meteoag/rams_init.properties +atomicTask.4=meteoag/revu_compare.properties +atomicTask.5=meteoag/raver.properties +atomicTask.6=meteoag/rams_hist.properties +atomicTask.7=meteoag/revu_dump.properties diff --git a/src/meteoag02/wfr/meteoag02.iwir b/src/meteoag02/wfr/meteoag02.iwir new file mode 100644 index 0000000..daac56f --- /dev/null +++ b/src/meteoag02/wfr/meteoag02.iwir @@ -0,0 +1,256 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + if_condition = true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/meteoag02/wfr/repo/meteoag/case_init.code b/src/meteoag02/wfr/repo/meteoag/case_init.code new file mode 100644 index 0000000..3921a66 --- /dev/null +++ b/src/meteoag02/wfr/repo/meteoag/case_init.code @@ -0,0 +1,3 @@ + + sout->output.setValue(sin->input); + \ No newline at end of file diff --git a/src/meteoag02/wfr/repo/meteoag/case_init.properties b/src/meteoag02/wfr/repo/meteoag/case_init.properties new file mode 100644 index 0000000..2b61ded --- /dev/null +++ b/src/meteoag02/wfr/repo/meteoag/case_init.properties @@ -0,0 +1,3 @@ +name=case_init +entries=1 +entry.0=case_init.code diff --git a/src/meteoag02/wfr/repo/meteoag/includes.code b/src/meteoag02/wfr/repo/meteoag/includes.code new file mode 100755 index 0000000..4f2676a --- /dev/null +++ b/src/meteoag02/wfr/repo/meteoag/includes.code @@ -0,0 +1 @@ +#include \ No newline at end of file diff --git a/src/meteoag02/wfr/repo/meteoag/rams_hist.code b/src/meteoag02/wfr/repo/meteoag/rams_hist.code new file mode 100644 index 0000000..3921a66 --- /dev/null +++ b/src/meteoag02/wfr/repo/meteoag/rams_hist.code @@ -0,0 +1,3 @@ + + sout->output.setValue(sin->input); + \ No newline at end of file diff --git a/src/meteoag02/wfr/repo/meteoag/rams_hist.properties b/src/meteoag02/wfr/repo/meteoag/rams_hist.properties new file mode 100644 index 0000000..4905f61 --- /dev/null +++ b/src/meteoag02/wfr/repo/meteoag/rams_hist.properties @@ -0,0 +1,3 @@ +name=rams_hist +entries=1 +entry.0=rams_hist.code \ No newline at end of file diff --git a/src/meteoag02/wfr/repo/meteoag/rams_init.code b/src/meteoag02/wfr/repo/meteoag/rams_init.code new file mode 100644 index 0000000..3921a66 --- /dev/null +++ b/src/meteoag02/wfr/repo/meteoag/rams_init.code @@ -0,0 +1,3 @@ + + sout->output.setValue(sin->input); + \ No newline at end of file diff --git a/src/meteoag02/wfr/repo/meteoag/rams_init.properties b/src/meteoag02/wfr/repo/meteoag/rams_init.properties new file mode 100644 index 0000000..6b6f864 --- /dev/null +++ b/src/meteoag02/wfr/repo/meteoag/rams_init.properties @@ -0,0 +1,3 @@ +name=rams_init +entries=1 +entry.0=rams_init.code diff --git a/src/meteoag02/wfr/repo/meteoag/rams_makevfile.code b/src/meteoag02/wfr/repo/meteoag/rams_makevfile.code new file mode 100644 index 0000000..3921a66 --- /dev/null +++ b/src/meteoag02/wfr/repo/meteoag/rams_makevfile.code @@ -0,0 +1,3 @@ + + sout->output.setValue(sin->input); + \ No newline at end of file diff --git a/src/meteoag02/wfr/repo/meteoag/rams_makevfile.properties b/src/meteoag02/wfr/repo/meteoag/rams_makevfile.properties new file mode 100644 index 0000000..e489296 --- /dev/null +++ b/src/meteoag02/wfr/repo/meteoag/rams_makevfile.properties @@ -0,0 +1,3 @@ +name=rams_makevfile +entries=1 +entry.0=rams_makevfile.code diff --git a/src/meteoag02/wfr/repo/meteoag/raver.code b/src/meteoag02/wfr/repo/meteoag/raver.code new file mode 100644 index 0000000..3921a66 --- /dev/null +++ b/src/meteoag02/wfr/repo/meteoag/raver.code @@ -0,0 +1,3 @@ + + sout->output.setValue(sin->input); + \ No newline at end of file diff --git a/src/meteoag02/wfr/repo/meteoag/raver.properties b/src/meteoag02/wfr/repo/meteoag/raver.properties new file mode 100644 index 0000000..dc7ba76 --- /dev/null +++ b/src/meteoag02/wfr/repo/meteoag/raver.properties @@ -0,0 +1,3 @@ +name=raver +entries=1 +entry.0=raver.code diff --git a/src/meteoag02/wfr/repo/meteoag/revu_compare.code b/src/meteoag02/wfr/repo/meteoag/revu_compare.code new file mode 100644 index 0000000..3921a66 --- /dev/null +++ b/src/meteoag02/wfr/repo/meteoag/revu_compare.code @@ -0,0 +1,3 @@ + + sout->output.setValue(sin->input); + \ No newline at end of file diff --git a/src/meteoag02/wfr/repo/meteoag/revu_compare.properties b/src/meteoag02/wfr/repo/meteoag/revu_compare.properties new file mode 100644 index 0000000..d830dcd --- /dev/null +++ b/src/meteoag02/wfr/repo/meteoag/revu_compare.properties @@ -0,0 +1,3 @@ +name=revu_compare +entries=1 +entry.0=revu_compare.code diff --git a/src/meteoag02/wfr/repo/meteoag/revu_dump.code b/src/meteoag02/wfr/repo/meteoag/revu_dump.code new file mode 100644 index 0000000..3921a66 --- /dev/null +++ b/src/meteoag02/wfr/repo/meteoag/revu_dump.code @@ -0,0 +1,3 @@ + + sout->output.setValue(sin->input); + \ No newline at end of file diff --git a/src/meteoag02/wfr/repo/meteoag/revu_dump.properties b/src/meteoag02/wfr/repo/meteoag/revu_dump.properties new file mode 100644 index 0000000..52214e1 --- /dev/null +++ b/src/meteoag02/wfr/repo/meteoag/revu_dump.properties @@ -0,0 +1,3 @@ +name=revu_dump +entries=1 +entry.0=revu_dump.code diff --git a/src/meteoag02/wfr/repo/meteoag/simulation_init.code b/src/meteoag02/wfr/repo/meteoag/simulation_init.code new file mode 100644 index 0000000..76b3c18 --- /dev/null +++ b/src/meteoag02/wfr/repo/meteoag/simulation_init.code @@ -0,0 +1,6 @@ + + for (long i = 0; i < sin->chunk_count.getValue(); ++i) { + sout->input_chunks.setEntryValue(i, "input_chunk"); + } + sout->input_chunks.setFinalised(true); + \ No newline at end of file diff --git a/src/meteoag02/wfr/repo/meteoag/simulation_init.properties b/src/meteoag02/wfr/repo/meteoag/simulation_init.properties new file mode 100644 index 0000000..08d025d --- /dev/null +++ b/src/meteoag02/wfr/repo/meteoag/simulation_init.properties @@ -0,0 +1,3 @@ +name=simulation_init +entries=1 +entry.0=simulation_init.code diff --git a/src/meteoag02/wfr/repo/meteoag/wfInput.code b/src/meteoag02/wfr/repo/meteoag/wfInput.code new file mode 100755 index 0000000..c638358 --- /dev/null +++ b/src/meteoag02/wfr/repo/meteoag/wfInput.code @@ -0,0 +1,38 @@ + + std::string inputFile = "input.file"; + long chunkCount = 10; + long pForIterations = 10; + bool ifCondition = true; + bool isHelp = false; + boost::program_options::options_description opts("MeteoAG Options"); + opts.add_options() + ("help", "Print help message.") + ("inputchunks", boost::program_options::value(), "Number of input chunks.") + ("pforiterations", boost::program_options::value(), "Number of pFor iterations.") + ("ifcondition", boost::program_options::value(), "If condition."); + boost::program_options::variables_map vm; + auto parsed = boost::program_options::command_line_parser(argc, argv).options(opts).allow_unregistered().run(); + boost::program_options::store(parsed, vm); + boost::program_options::notify(vm); + if (vm.count("help")) { + std::cerr << opts << std::endl; + isHelp = true; + } else { + if (vm.count("inputchunks")) { + chunkCount = vm["inputchunks"].as(); + } + if (vm.count("pforiterations")) { + pForIterations = vm["pforiterations"].as(); + } + if (vm.count("ifcondition")) { + ifCondition = vm["ifcondition"].as(); + } + std::cerr << "inputChunks = " << chunkCount << std::endl; + std::cerr << "pForIterations = " << pForIterations << std::endl; + std::cerr << "IfCondition = " << ifCondition << std::endl; + } + wfInput.input_file.setValue("input_file"); + wfInput.chunk_count.setValue(chunkCount); + wfInput.pForIterations.setValue(pForIterations); + wfInput.if_condition.setValue(ifCondition); + \ No newline at end of file diff --git a/src/meteoag02/wfr/repo/meteoag/wfOutput.code b/src/meteoag02/wfr/repo/meteoag/wfOutput.code new file mode 100755 index 0000000..e69de29 diff --git a/src/meteoag02/wfr/repo/meteoag02.properties b/src/meteoag02/wfr/repo/meteoag02.properties new file mode 100644 index 0000000..e7ab95e --- /dev/null +++ b/src/meteoag02/wfr/repo/meteoag02.properties @@ -0,0 +1,13 @@ + +wfinput=meteoag/wfInput.code +wfoutput=meteoag/wfOutput.code +includes=meteoag/includes.code + +atomicTask.0=meteoag/simulation_init.properties +atomicTask.1=meteoag/case_init.properties +atomicTask.2=meteoag/rams_makevfile.properties +atomicTask.3=meteoag/rams_init.properties +atomicTask.4=meteoag/revu_compare.properties +atomicTask.5=meteoag/raver.properties +atomicTask.6=meteoag/rams_hist.properties +atomicTask.7=meteoag/revu_dump.properties diff --git a/src/meteoag03/wfr/meteoag03.iwir b/src/meteoag03/wfr/meteoag03.iwir new file mode 100644 index 0000000..b1f0400 --- /dev/null +++ b/src/meteoag03/wfr/meteoag03.iwir @@ -0,0 +1,1811 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + if_condition = true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/meteoag03/wfr/repo/meteoag/case_init.code b/src/meteoag03/wfr/repo/meteoag/case_init.code new file mode 100644 index 0000000..3921a66 --- /dev/null +++ b/src/meteoag03/wfr/repo/meteoag/case_init.code @@ -0,0 +1,3 @@ + + sout->output.setValue(sin->input); + \ No newline at end of file diff --git a/src/meteoag03/wfr/repo/meteoag/case_init.properties b/src/meteoag03/wfr/repo/meteoag/case_init.properties new file mode 100644 index 0000000..2b61ded --- /dev/null +++ b/src/meteoag03/wfr/repo/meteoag/case_init.properties @@ -0,0 +1,3 @@ +name=case_init +entries=1 +entry.0=case_init.code diff --git a/src/meteoag03/wfr/repo/meteoag/helper01.code b/src/meteoag03/wfr/repo/meteoag/helper01.code new file mode 100644 index 0000000..33cba49 --- /dev/null +++ b/src/meteoag03/wfr/repo/meteoag/helper01.code @@ -0,0 +1,3 @@ + + sout->pForEachIterations.setValue((sin->chunk_count.getValue()/10) - 1); + \ No newline at end of file diff --git a/src/meteoag03/wfr/repo/meteoag/helper01.properties b/src/meteoag03/wfr/repo/meteoag/helper01.properties new file mode 100644 index 0000000..ea9823f --- /dev/null +++ b/src/meteoag03/wfr/repo/meteoag/helper01.properties @@ -0,0 +1,4 @@ + +name=helper01 +entries=1 +entry.0=helper01.code diff --git a/src/meteoag03/wfr/repo/meteoag/helper02.code b/src/meteoag03/wfr/repo/meteoag/helper02.code new file mode 100644 index 0000000..3167e5e --- /dev/null +++ b/src/meteoag03/wfr/repo/meteoag/helper02.code @@ -0,0 +1,12 @@ + + sout->input01.setValue(sin->input_chunks.getEntryValue(sin->counter.getValue() * 10)); + sout->input02.setValue(sin->input_chunks.getEntryValue(sin->counter.getValue() * 10 + 1)); + sout->input03.setValue(sin->input_chunks.getEntryValue(sin->counter.getValue() * 10 + 2)); + sout->input04.setValue(sin->input_chunks.getEntryValue(sin->counter.getValue() * 10 + 3)); + sout->input05.setValue(sin->input_chunks.getEntryValue(sin->counter.getValue() * 10 + 4)); + sout->input06.setValue(sin->input_chunks.getEntryValue(sin->counter.getValue() * 10 + 5)); + sout->input07.setValue(sin->input_chunks.getEntryValue(sin->counter.getValue() * 10 + 6)); + sout->input08.setValue(sin->input_chunks.getEntryValue(sin->counter.getValue() * 10 + 7)); + sout->input09.setValue(sin->input_chunks.getEntryValue(sin->counter.getValue() * 10 + 8)); + sout->input10.setValue(sin->input_chunks.getEntryValue(sin->counter.getValue() * 10 + 9)); + \ No newline at end of file diff --git a/src/meteoag03/wfr/repo/meteoag/helper02.properties b/src/meteoag03/wfr/repo/meteoag/helper02.properties new file mode 100644 index 0000000..9b0ae23 --- /dev/null +++ b/src/meteoag03/wfr/repo/meteoag/helper02.properties @@ -0,0 +1,4 @@ + +name=helper02 +entries=1 +entry.0=helper02.code diff --git a/src/meteoag03/wfr/repo/meteoag/helper03.code b/src/meteoag03/wfr/repo/meteoag/helper03.code new file mode 100644 index 0000000..64af95b --- /dev/null +++ b/src/meteoag03/wfr/repo/meteoag/helper03.code @@ -0,0 +1,34 @@ + + long i = 0; + for ( auto& o : sin->output01.getValue()) { + sout->output.setEntryValue(i++, o.getValue()); + } + for ( auto& o : sin->output02.getValue()) { + sout->output.setEntryValue(i++, o.getValue()); + } + for ( auto& o : sin->output03.getValue()) { + sout->output.setEntryValue(i++, o.getValue()); + } + for ( auto& o : sin->output04.getValue()) { + sout->output.setEntryValue(i++, o.getValue()); + } + for ( auto& o : sin->output05.getValue()) { + sout->output.setEntryValue(i++, o.getValue()); + } + for ( auto& o : sin->output06.getValue()) { + sout->output.setEntryValue(i++, o.getValue()); + } + for ( auto& o : sin->output07.getValue()) { + sout->output.setEntryValue(i++, o.getValue()); + } + for ( auto& o : sin->output08.getValue()) { + sout->output.setEntryValue(i++, o.getValue()); + } + for ( auto& o : sin->output09.getValue()) { + sout->output.setEntryValue(i++, o.getValue()); + } + for ( auto& o : sin->output10.getValue()) { + sout->output.setEntryValue(i++, o.getValue()); + } + sout->output.setFinalised(true); + \ No newline at end of file diff --git a/src/meteoag03/wfr/repo/meteoag/helper03.properties b/src/meteoag03/wfr/repo/meteoag/helper03.properties new file mode 100644 index 0000000..0ac8c41 --- /dev/null +++ b/src/meteoag03/wfr/repo/meteoag/helper03.properties @@ -0,0 +1,4 @@ + +name=helper03 +entries=1 +entry.0=helper03.code diff --git a/src/meteoag03/wfr/repo/meteoag/includes.code b/src/meteoag03/wfr/repo/meteoag/includes.code new file mode 100755 index 0000000..4f2676a --- /dev/null +++ b/src/meteoag03/wfr/repo/meteoag/includes.code @@ -0,0 +1 @@ +#include \ No newline at end of file diff --git a/src/meteoag03/wfr/repo/meteoag/rams_hist.code b/src/meteoag03/wfr/repo/meteoag/rams_hist.code new file mode 100644 index 0000000..3921a66 --- /dev/null +++ b/src/meteoag03/wfr/repo/meteoag/rams_hist.code @@ -0,0 +1,3 @@ + + sout->output.setValue(sin->input); + \ No newline at end of file diff --git a/src/meteoag03/wfr/repo/meteoag/rams_hist.properties b/src/meteoag03/wfr/repo/meteoag/rams_hist.properties new file mode 100644 index 0000000..4905f61 --- /dev/null +++ b/src/meteoag03/wfr/repo/meteoag/rams_hist.properties @@ -0,0 +1,3 @@ +name=rams_hist +entries=1 +entry.0=rams_hist.code \ No newline at end of file diff --git a/src/meteoag03/wfr/repo/meteoag/rams_init.code b/src/meteoag03/wfr/repo/meteoag/rams_init.code new file mode 100644 index 0000000..3921a66 --- /dev/null +++ b/src/meteoag03/wfr/repo/meteoag/rams_init.code @@ -0,0 +1,3 @@ + + sout->output.setValue(sin->input); + \ No newline at end of file diff --git a/src/meteoag03/wfr/repo/meteoag/rams_init.properties b/src/meteoag03/wfr/repo/meteoag/rams_init.properties new file mode 100644 index 0000000..6b6f864 --- /dev/null +++ b/src/meteoag03/wfr/repo/meteoag/rams_init.properties @@ -0,0 +1,3 @@ +name=rams_init +entries=1 +entry.0=rams_init.code diff --git a/src/meteoag03/wfr/repo/meteoag/rams_makevfile.code b/src/meteoag03/wfr/repo/meteoag/rams_makevfile.code new file mode 100644 index 0000000..3921a66 --- /dev/null +++ b/src/meteoag03/wfr/repo/meteoag/rams_makevfile.code @@ -0,0 +1,3 @@ + + sout->output.setValue(sin->input); + \ No newline at end of file diff --git a/src/meteoag03/wfr/repo/meteoag/rams_makevfile.properties b/src/meteoag03/wfr/repo/meteoag/rams_makevfile.properties new file mode 100644 index 0000000..e489296 --- /dev/null +++ b/src/meteoag03/wfr/repo/meteoag/rams_makevfile.properties @@ -0,0 +1,3 @@ +name=rams_makevfile +entries=1 +entry.0=rams_makevfile.code diff --git a/src/meteoag03/wfr/repo/meteoag/raver.code b/src/meteoag03/wfr/repo/meteoag/raver.code new file mode 100644 index 0000000..3921a66 --- /dev/null +++ b/src/meteoag03/wfr/repo/meteoag/raver.code @@ -0,0 +1,3 @@ + + sout->output.setValue(sin->input); + \ No newline at end of file diff --git a/src/meteoag03/wfr/repo/meteoag/raver.properties b/src/meteoag03/wfr/repo/meteoag/raver.properties new file mode 100644 index 0000000..dc7ba76 --- /dev/null +++ b/src/meteoag03/wfr/repo/meteoag/raver.properties @@ -0,0 +1,3 @@ +name=raver +entries=1 +entry.0=raver.code diff --git a/src/meteoag03/wfr/repo/meteoag/revu_compare.code b/src/meteoag03/wfr/repo/meteoag/revu_compare.code new file mode 100644 index 0000000..3921a66 --- /dev/null +++ b/src/meteoag03/wfr/repo/meteoag/revu_compare.code @@ -0,0 +1,3 @@ + + sout->output.setValue(sin->input); + \ No newline at end of file diff --git a/src/meteoag03/wfr/repo/meteoag/revu_compare.properties b/src/meteoag03/wfr/repo/meteoag/revu_compare.properties new file mode 100644 index 0000000..d830dcd --- /dev/null +++ b/src/meteoag03/wfr/repo/meteoag/revu_compare.properties @@ -0,0 +1,3 @@ +name=revu_compare +entries=1 +entry.0=revu_compare.code diff --git a/src/meteoag03/wfr/repo/meteoag/revu_dump.code b/src/meteoag03/wfr/repo/meteoag/revu_dump.code new file mode 100644 index 0000000..3921a66 --- /dev/null +++ b/src/meteoag03/wfr/repo/meteoag/revu_dump.code @@ -0,0 +1,3 @@ + + sout->output.setValue(sin->input); + \ No newline at end of file diff --git a/src/meteoag03/wfr/repo/meteoag/revu_dump.properties b/src/meteoag03/wfr/repo/meteoag/revu_dump.properties new file mode 100644 index 0000000..52214e1 --- /dev/null +++ b/src/meteoag03/wfr/repo/meteoag/revu_dump.properties @@ -0,0 +1,3 @@ +name=revu_dump +entries=1 +entry.0=revu_dump.code diff --git a/src/meteoag03/wfr/repo/meteoag/simulation_init.code b/src/meteoag03/wfr/repo/meteoag/simulation_init.code new file mode 100644 index 0000000..76b3c18 --- /dev/null +++ b/src/meteoag03/wfr/repo/meteoag/simulation_init.code @@ -0,0 +1,6 @@ + + for (long i = 0; i < sin->chunk_count.getValue(); ++i) { + sout->input_chunks.setEntryValue(i, "input_chunk"); + } + sout->input_chunks.setFinalised(true); + \ No newline at end of file diff --git a/src/meteoag03/wfr/repo/meteoag/simulation_init.properties b/src/meteoag03/wfr/repo/meteoag/simulation_init.properties new file mode 100644 index 0000000..08d025d --- /dev/null +++ b/src/meteoag03/wfr/repo/meteoag/simulation_init.properties @@ -0,0 +1,3 @@ +name=simulation_init +entries=1 +entry.0=simulation_init.code diff --git a/src/meteoag03/wfr/repo/meteoag/wfInput.code b/src/meteoag03/wfr/repo/meteoag/wfInput.code new file mode 100755 index 0000000..c638358 --- /dev/null +++ b/src/meteoag03/wfr/repo/meteoag/wfInput.code @@ -0,0 +1,38 @@ + + std::string inputFile = "input.file"; + long chunkCount = 10; + long pForIterations = 10; + bool ifCondition = true; + bool isHelp = false; + boost::program_options::options_description opts("MeteoAG Options"); + opts.add_options() + ("help", "Print help message.") + ("inputchunks", boost::program_options::value(), "Number of input chunks.") + ("pforiterations", boost::program_options::value(), "Number of pFor iterations.") + ("ifcondition", boost::program_options::value(), "If condition."); + boost::program_options::variables_map vm; + auto parsed = boost::program_options::command_line_parser(argc, argv).options(opts).allow_unregistered().run(); + boost::program_options::store(parsed, vm); + boost::program_options::notify(vm); + if (vm.count("help")) { + std::cerr << opts << std::endl; + isHelp = true; + } else { + if (vm.count("inputchunks")) { + chunkCount = vm["inputchunks"].as(); + } + if (vm.count("pforiterations")) { + pForIterations = vm["pforiterations"].as(); + } + if (vm.count("ifcondition")) { + ifCondition = vm["ifcondition"].as(); + } + std::cerr << "inputChunks = " << chunkCount << std::endl; + std::cerr << "pForIterations = " << pForIterations << std::endl; + std::cerr << "IfCondition = " << ifCondition << std::endl; + } + wfInput.input_file.setValue("input_file"); + wfInput.chunk_count.setValue(chunkCount); + wfInput.pForIterations.setValue(pForIterations); + wfInput.if_condition.setValue(ifCondition); + \ No newline at end of file diff --git a/src/meteoag03/wfr/repo/meteoag/wfOutput.code b/src/meteoag03/wfr/repo/meteoag/wfOutput.code new file mode 100755 index 0000000..e69de29 diff --git a/src/meteoag03/wfr/repo/meteoag03.properties b/src/meteoag03/wfr/repo/meteoag03.properties new file mode 100644 index 0000000..2dbc2a7 --- /dev/null +++ b/src/meteoag03/wfr/repo/meteoag03.properties @@ -0,0 +1,16 @@ + +wfinput=meteoag/wfInput.code +wfoutput=meteoag/wfOutput.code +includes=meteoag/includes.code + +atomicTask.0=meteoag/simulation_init.properties +atomicTask.1=meteoag/case_init.properties +atomicTask.2=meteoag/rams_makevfile.properties +atomicTask.3=meteoag/rams_init.properties +atomicTask.4=meteoag/revu_compare.properties +atomicTask.5=meteoag/raver.properties +atomicTask.6=meteoag/rams_hist.properties +atomicTask.7=meteoag/revu_dump.properties +atomicTask.8=meteoag/helper01.properties +atomicTask.9=meteoag/helper02.properties +atomicTask.10=meteoag/helper03.properties diff --git a/src/montage-pegasus/askalon/montage-pegasus.agwl.template b/src/montage-pegasus/askalon/montage-pegasus.agwl.template new file mode 100755 index 0000000..b55b678 --- /dev/null +++ b/src/montage-pegasus/askalon/montage-pegasus.agwl.template @@ -0,0 +1,489 @@ + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + multiple + + + + + FileSystem + File + none + multiple + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + + + + FileSystem + File + none + single + + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + + + + + FileSystem + File + none + multiple + + + + + FileSystem + File + none + multiple + + + + + + + + Memory + integer + none + single + + + + + + + + FileSystem + File + none + multiple + + + + + FileSystem + File + none + multiple + + + + + FileSystem + File + none + multiple + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + + + + + FileSystem + File + none + multiple + + + + + FileSystem + File + none + multiple + + + + + + + + + FileSystem + File + none + multiple + + + + + FileSystem + File + none + multiple + + + + + FileSystem + File + none + single + + + + + + + FileSystem + File + none + single + + + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + + + FileSystem + File + none + single + + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + + + + + FileSystem + File + none + multiple + + + + + FileSystem + File + none + multiple + + + + + + + + + FileSystem + File + none + multiple + + + + + FileSystem + File + none + multiple + + + + + FileSystem + File + none + single + + + + + + + FileSystem + File + none + single + + + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + + + FileSystem + File + none + single + + + + + + + + + FileSystem + File + none + single + + + + + + + FileSystem + File + none + single + + + + + + + + + FileSystem + File + none + single + + + + diff --git a/src/montage-pegasus/askalon/montage-pegasus.gwdd b/src/montage-pegasus/askalon/montage-pegasus.gwdd new file mode 100755 index 0000000..1a66a52 --- /dev/null +++ b/src/montage-pegasus/askalon/montage-pegasus.gwdd @@ -0,0 +1,104 @@ + +application = montage +montage.environment = ssh + + +DELIM = AND +montage.type = wfr-experiments +montage.domain = wfr-experiments + + +montage.activities=mProjectPP-dummy mDiffFit-dummy mConcatFit-dummy mBgModel-dummy mBackground-dummy mImgTbl-dummy \ + mAdd-dummy mShrink-dummy mJpeg-dummy + +montage.accessPaths=localhost:/home/matthias/ifigner-experiments/montage-dummy/montage-pegasus + + + + +mProjectPP-dummy.executable=mProjectPP-dummy.sh +mProjectPP-dummy.usage=p2mass-atlas.fits p2mass-atlas-area.fits +mProjectPP-dummy.inports=region.hdr region.hdr agwl:file AND \ + 2mass-atlas.fits 2mass-atlas.fits agwl:file +mProjectPP-dummy.outports=p2mass-atlas.fits p2mass-atlas.fits agwl:file AND \ + p2mass-atlas-area.fits p2mass-atlas-area.fits agwl:file + + + +mDiffFit-dummy.executable=mDiffFit-dummy.sh +mDiffFit-dummy.usage=diff.txt fit.txt +mDiffFit-dummy.inports=p2mass-atlas.fits p2mass-atlas.fits agwl:file AND \ + p2mass-atlas-area.fits 2mass-atlas-area.fits agwl:file AND \ + indices indices agwl:collection +mDiffFit-dummy.outports=diff.txt diff.txt agwl:file AND \ + fit.txt fit.txt agwl:file + + + + +mConcatFit-dummy.executable=mConcatFit-dummy.sh +mConcatFit-dummy.usage= +mConcatFit-dummy.inports=diff.txt diff.txt agwl:collection AND \ + fit.txt fit.txt agwl:collection AND \ + fits_list.tbl fits_list.tbl agwl:file +mConcatFit-dummy.outports=fits.tbl fits.tbl agwl:file + + + + +mBgModel-dummy.executable=mBgModel-dummy.sh +mBgModel-dummy.usage= +mBgModel-dummy.inports=fits.tbl fits.tbl agwl:file AND \ + pimages.tbl pimages.tbl agwl:file +mBgModel-dummy.outports=corrections.tbl corrections.tbl agwl:file + + + + +mBackground-dummy.executable=mBackground-dummy.sh +mBackground-dummy.usage=c2mass-atlas.fits c2mass-atlas-area.fits +mBackground-dummy.inports=p2mass-atlas.fits p2mass-atlas.fits agwl:file AND \ + p2mass-atlas-area.fits p2mass-atlas-area.fits agwl:file AND \ + corrections.tbl corrections.tbl agwl:file +mBackground-dummy.outports=c2mass-atlas.fits c2mass-atlas.fits agwl:file AND \ + c2mass-atlas-area.fits c2mass-atlas-area.fits agwl:file + + + + +mImgTbl-dummy.executable=mImgTbl-dummy.sh +mImgTbl-dummy.usage= +mImgTbl-dummy.inports=c2mass-atlas.fits c2mass-atlas.fits agwl:collection AND \ + c2mass-atlas-area.fits c2mass-atlas-area.fits agwl:collection AND \ + cimages.tbl cimages.tbl agwl:file +mImgTbl-dummy.outports=newcimages.tbl newcimages.tbl agwl:file + + + + +mAdd-dummy.executable=mAdd-dummy.sh +mAdd-dummy.usage= +mAdd-dummy.inports=region.hdr region.hdr agwl:file AND \ + newcimages.tbl newcimages.tbl agwl:file +mAdd-dummy.outports=mosaic.fits mosaic.fits agwl:file AND \ + mosaic-area.fits mosaic-area.fits agwl:file + + + + +mShrink-dummy.executable=mShrink-dummy.sh +mShrink-dummy.usage= +mShrink-dummy.inports=mosaic.fits mosaic.fits agwl:file AND \ + mosaic-area.fits mosaic-area.fits agwl:file +mShrink-dummy.outports=shrunken.fits shrunken.fits agwl:file + + + + +mJpeg-dummy.executable=mJpeg-dummy.sh +mJpeg-dummy.usage= +mJpeg-dummy.inports=shrunken.fits shrunken.fits agwl:file +mJpeg-dummy.outports=shrunken.jpg shrunken.jpg agwl:file + + + diff --git a/src/montage-pegasus/askalon/montage-pegasus.teuta b/src/montage-pegasus/askalon/montage-pegasus.teuta new file mode 100755 index 0000000..5518f74 --- /dev/null +++ b/src/montage-pegasus/askalon/montage-pegasus.teuta @@ -0,0 +1,1069 @@ + + + + + controlflow + + + + + + + + + + controlflow + + + + + + + + + + expansionregion + parallelforeach + + + + + + + + + + FileSystem + File + none + multiple + + + + + FileSystem + File + none + multiple + + + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + + + + controlflow + + + + + + + + + + controlflow + + + + + + + + + + controlflow + + + + + + + + + + expansionregion + parallelforeach + + + + + + + + + + FileSystem + File + none + multiple + + + + + FileSystem + File + none + multiple + + + + + + + + + Memory + integer + none + single + + + + + + + + initialnode + + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + multiple + + + + + FileSystem + File + none + multiple + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + + + + action + activity + + + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + + + FileSystem + File + none + single + + + + + + + + controlflow + + + + + + + + + + controlflow + + + + + + + + + + action + activity + + + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + + + + controlflow + + + + + + + + + + controlflow + + + + + + + + + + action + activity + + + + + + + + + FileSystem + File + none + multiple + + + + + FileSystem + File + none + multiple + + + + + FileSystem + File + none + single + + + + + + + FileSystem + File + none + single + + + + + + + + controlflow + + + + + + + + + + controlflow + + + + + + + + + + action + activity + + + + + + + + + FileSystem + File + none + single + + + + + + + FileSystem + File + none + single + + + + + + + + expansionregion + parallelforeach + + + + + + + + + + FileSystem + File + none + multiple + + + + + FileSystem + File + none + multiple + + + + + + + + + FileSystem + File + none + single + + + + + + + + controlflow + + + + + + + + + + controlflow + + + + + + + + + + activityfinalnode + + + + + + FileSystem + File + none + single + + + + + + + action + activity + + + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + + + + action + activity + + + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + + + + action + activity + + + + + + + + + FileSystem + File + none + multiple + + + + + FileSystem + File + none + multiple + + + + + FileSystem + File + none + single + + + + + + + FileSystem + File + none + single + + + + + + + + controlflow + + + + + + + + + + controlflow + + + + + + + + + + controlflow + + + + + + + + + + action + activity + + + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + + + FileSystem + File + none + single + + + + + + + + action + activity + + + + + + + + + FileSystem + File + none + multiple + + + + + FileSystem + File + none + multiple + + + + + FileSystem + File + none + multiple + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + + + + + + + 30 + 30 + 225 + 15 + ffffc0 + + + 150 + 135 + 165 + 75 + ffcc99 + + + 120 + 45 + 180 + 120 + ffffc0 + + + 300 + 135 + 90 + 240 + ffcc99 + + + 120 + 45 + 180 + 285 + ffffc0 + + + 120 + 45 + 180 + 405 + ffffc0 + + + 120 + 45 + 180 + 480 + ffffc0 + + + 450 + 135 + 15 + 555 + ffcc99 + + + 120 + 45 + 180 + 585 + ffffc0 + + + 120 + 45 + 180 + 720 + ffffc0 + + + 120 + 45 + 180 + 795 + ffffc0 + + + 120 + 45 + 180 + 870 + ffffc0 + + + 120 + 45 + 180 + 945 + ffffc0 + + + 30 + 30 + 225 + 1020 + ffffc0 + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + diff --git a/src/montage-pegasus/openmp/montage-pegasus.cpp b/src/montage-pegasus/openmp/montage-pegasus.cpp new file mode 100755 index 0000000..36785e9 --- /dev/null +++ b/src/montage-pegasus/openmp/montage-pegasus.cpp @@ -0,0 +1,144 @@ +#include +#include +#include +#include +#include + + +void mProjectPP(int id, std::string regionhdr, std::string _2mass_atlas_fits, std::string& p2massOutFile, std::string& p2massAreaOutFile) { + char wdir[256]; + snprintf(wdir, 256, "wfr_ppp_%d_workdir", id); + char cmd[2048]; + snprintf(cmd, 2048, "rm -rf %s && mkdir %s && cd %s && ../mProjectPP-dummy.sh p2mass-atlas.fits p2mass-atlas-area.fits", wdir, wdir, wdir); + int ret = system(cmd); + p2massOutFile = std::string(wdir) + std::string("/p2mass-atlas.fits"); + p2massAreaOutFile = std::string(wdir) + std::string("/p2mass-atlas-area.fits"); +} + +void mDiffFit(int id, std::vector p2mass_atlas_fits, std::vector p2mass_atlas_area_fits, std::vector indices, std::string reagion_hdr, std::string& diff_txt_out, std::string& fit_txt_out) { + char wdir[256]; + snprintf(wdir, 256, "wfr_difffit_%d_workdir", id); + char cmd[2048]; + snprintf(cmd, 2048, "rm -rf %s && mkdir %s && cd %s && ../mDiffFit-dummy.sh diff.txt fit.txt", wdir, wdir, wdir); + int ret = system(cmd); + diff_txt_out = std::string(wdir) + std::string("/diff.txt"); + fit_txt_out = std::string(wdir) + std::string("/fit.txt"); +} + +std::string mConcatFit(std::vector diff_txts, std::vector fit_txts, std::string fitslisttlb) { + char cmd[2048]; + snprintf(cmd, 2048, "rm -rf wfr_concatfit_workdir && mkdir wfr_concatfit_workdir && cd wfr_concatfit_workdir && ../mConcatFit-dummy.sh"); + int ret = system(cmd); + return "wfr_concatfit_workdir/fits.tbl"; +} + +std::string mBgModel(std::string fits_tlb, std::string pimagestlb) { + char cmd[2048]; + snprintf(cmd, 2048, "rm -rf wfr_bgmodel_workdir && mkdir wfr_bgmodel_workdir && cd wfr_bgmodel_workdir && ../mBgModel-dummy.sh"); + int ret = system(cmd); + return "wfr_concatfit_workdir/corrections.tbl"; +} + +void mBackground(int id, std::string p2mass_atlas_fits, std::string p2mass_atlas_area_fits, std::string correctionstbl, std::string& c2mass_atlas_fits, std::string& c2mass_atlas_area_fits) { + char wdir[256]; + snprintf(wdir, 256, "wfr_background_%d_workdir", id); + char cmd[2048]; + snprintf(cmd, 2048, "rm -rf %s && mkdir %s && cd %s && ../mBackground-dummy.sh c2mass-atlas.fits c2mass-atlas-area.fits", wdir, wdir, wdir); + int ret = system(cmd); + c2mass_atlas_fits = std::string(wdir) + std::string("/c2mass-atlas.fits"); + c2mass_atlas_area_fits = std::string(wdir) + std::string("/c2mass-atlas-area.fits"); +} + +std::string mImgTbl(std::string cimages_tbl, std::vector c2mass_atlas_fits, std::vector c2mass_atlas_area_fits) { + char cmd[2048]; + snprintf(cmd, 2048, "rm -rf wfr_ImgTbl_workdir && mkdir wfr_ImgTbl_workdir && cd wfr_ImgTbl_workdir && ../mImgTbl-dummy.sh"); + int ret = system(cmd); + return "wfr_ImgTbl_workdir/newcimages.tbl"; +} + +void mAdd(std::string regionhdr, std::string newcimages_tbl, std::string& mosaicFitsOut, std::string& mosaicAreaFitsOut) { + char cmd[2048]; + snprintf(cmd, 2048, "rm -rf wfr_add_workdir && mkdir wfr_add_workdir && cd wfr_add_workdir && ../mAdd-dummy.sh"); + int ret = system(cmd); + mosaicFitsOut = "wfr_add_workdir/mosaic.fits"; + mosaicAreaFitsOut = "wfr_add_workdir/mosaic-area.fits"; +} + +std::string mShrink(std::string mosaicfits, std::string mosaicareafits) { + char cmd[2048]; + snprintf(cmd, 2048, "rm -rf wfr_shrink_workdir && mkdir wfr_shrink_workdir && cd wfr_shrink_workdir && ../mShrink-dummy.sh"); + int ret = system(cmd); + return "wfr_shrink_workdir/shrunken.fits"; +} + +std::string mJpeg(std::string shrunkenfits) { + char cmd[2048]; + snprintf(cmd, 2048, "rm -rf wfr_jpeg_workdir && mkdir wfr_jpeg_workdir && cd wfr_jpeg_workdir && ../mJpeg-dummy.sh"); + int ret = system(cmd); + return "wfr_jpeg_workdir/shrunken.jpg"; +} + + + +std::string workflow(int nrProjectPP, int nrDiffFit) { + std::string p2massOutFiles[nrProjectPP]; + std::string p2massAreaOutFiles[nrProjectPP]; + #pragma omp parallel for + for (int t = 0; t < nrProjectPP; t++) { + mProjectPP(t, "inputs/region.hdr", "inputs/2mass-atlas.fits", p2massOutFiles[t], p2massAreaOutFiles[t]); + } + std::string diffTxt[nrDiffFit]; + std::string fitTxt[nrDiffFit]; + #pragma omp parallel for + for (int t = 0; t < nrDiffFit; t++) { + mDiffFit(t, std::vector(p2massOutFiles, p2massOutFiles + nrProjectPP), std::vector(p2massAreaOutFiles, p2massAreaOutFiles + nrProjectPP), std::vector({1,2,3}), "inputs/region.hdr", diffTxt[t], fitTxt[t]); + } + std::string fits_tbl = mConcatFit(std::vector(diffTxt, diffTxt + nrDiffFit), std::vector(fitTxt, fitTxt + nrDiffFit), "inputs/fits_list.tbl"); + std::string corrections_tbl = mBgModel(fits_tbl, "inputs/pimages.tbl"); + std::string c2massOutFiles[nrProjectPP]; + std::string c2massAreaOutFiles[nrProjectPP]; + #pragma omp parallel for + for (int t = 0; t < nrProjectPP; t++) { + mBackground(t, p2massOutFiles[t], p2massAreaOutFiles[t], corrections_tbl, c2massOutFiles[t], c2massAreaOutFiles[t]); + } + std::string newcimages = mImgTbl("inputs/cimages.tbl", std::vector(c2massOutFiles, c2massOutFiles + nrProjectPP), std::vector(c2massAreaOutFiles, c2massAreaOutFiles + nrProjectPP)); + std::string mosaicFitsOut; + std::string mosaicAreaFitsOut; + mAdd("inputs/region.hdr", newcimages, mosaicFitsOut, mosaicAreaFitsOut); + std::string shrunken_fits = mShrink(mosaicFitsOut, mosaicAreaFitsOut); + std::string shrunken_jpg = mJpeg(shrunken_fits); + return shrunken_jpg; +} + + +int main(int argc, char** argv) { + int nrProjectPP = 5; + int nrDiffFit = 9; + bool isHelp = false; + boost::program_options::options_description opts("Montage Options"); + opts.add_options() + ("help", "Print help message.") + ("nrProjectPP", boost::program_options::value(), "mProjectPP count.") + ("nrDiffFit", boost::program_options::value(), "mDiffFit count."); + boost::program_options::variables_map vm; + auto parsed = boost::program_options::command_line_parser(argc, argv).options(opts).allow_unregistered().run(); + boost::program_options::store(parsed, vm); + boost::program_options::notify(vm); + if (vm.count("help")) { + std::cerr << opts << std::endl; + isHelp = true; + } else { + if (vm.count("nrProjectPP")) { + nrProjectPP = vm["nrProjectPP"].as(); + } + if (vm.count("nrDiffFit")) { + nrDiffFit = vm["nrDiffFit"].as(); + } + std::cerr << "nrProjectPP = " << nrProjectPP << std::endl; + std::cerr << "nrDiffFit = " << nrDiffFit << std::endl; + } + std::string out = workflow(nrProjectPP, nrDiffFit); + std::cout << "Out: " << out << std::endl; + return 0; +} + diff --git a/src/montage-pegasus/wfr/montage-pegasus.iwir b/src/montage-pegasus/wfr/montage-pegasus.iwir new file mode 100755 index 0000000..62921f9 --- /dev/null +++ b/src/montage-pegasus/wfr/montage-pegasus.iwir @@ -0,0 +1,202 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/montage-pegasus/wfr/repo/montage-pegasus.properties b/src/montage-pegasus/wfr/repo/montage-pegasus.properties new file mode 100755 index 0000000..939f707 --- /dev/null +++ b/src/montage-pegasus/wfr/repo/montage-pegasus.properties @@ -0,0 +1,14 @@ + +wfinput=montage-pegasus/wfInput.code +wfoutput=montage-pegasus/wfOutput.code +includes=montage-pegasus/includes.code + +atomicTask.0=montage-pegasus/mProjectPP.properties +atomicTask.1=montage-pegasus/mDiffFit.properties +atomicTask.2=montage-pegasus/mConcatFit.properties +atomicTask.3=montage-pegasus/mBgModel.properties +atomicTask.4=montage-pegasus/mBackground.properties +atomicTask.5=montage-pegasus/mImgTbl.properties +atomicTask.6=montage-pegasus/mAdd.properties +atomicTask.7=montage-pegasus/mShrink.properties +atomicTask.8=montage-pegasus/mJpeg.properties diff --git a/src/montage-pegasus/wfr/repo/montage-pegasus/includes.code b/src/montage-pegasus/wfr/repo/montage-pegasus/includes.code new file mode 100755 index 0000000..4f2676a --- /dev/null +++ b/src/montage-pegasus/wfr/repo/montage-pegasus/includes.code @@ -0,0 +1 @@ +#include \ No newline at end of file diff --git a/src/montage-pegasus/wfr/repo/montage-pegasus/mAdd.code b/src/montage-pegasus/wfr/repo/montage-pegasus/mAdd.code new file mode 100755 index 0000000..6cc5c68 --- /dev/null +++ b/src/montage-pegasus/wfr/repo/montage-pegasus/mAdd.code @@ -0,0 +1,9 @@ + boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + char cmd[2048]; + snprintf(cmd, 2048, "cd %s && ../mAdd-dummy.sh", wpath.string().c_str()); + int ret = system(cmd); + std::string file1 = wpath.string() + std::string("/mosaic.fits"); + std::string file2 = wpath.string() + std::string("/mosaic-area.fits"); + sout->mosaic_fits.setValue(file1); + sout->mosaic_area_fits.setValue(file2); + \ No newline at end of file diff --git a/src/montage-pegasus/wfr/repo/montage-pegasus/mAdd.properties b/src/montage-pegasus/wfr/repo/montage-pegasus/mAdd.properties new file mode 100755 index 0000000..1abbf07 --- /dev/null +++ b/src/montage-pegasus/wfr/repo/montage-pegasus/mAdd.properties @@ -0,0 +1,3 @@ +name=mAdd +entries=1 +entry.0=mAdd.code \ No newline at end of file diff --git a/src/montage-pegasus/wfr/repo/montage-pegasus/mBackground.code b/src/montage-pegasus/wfr/repo/montage-pegasus/mBackground.code new file mode 100755 index 0000000..5ed97e6 --- /dev/null +++ b/src/montage-pegasus/wfr/repo/montage-pegasus/mBackground.code @@ -0,0 +1,9 @@ + boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + char cmd[2048]; + snprintf(cmd, 2048, "cd %s && ../mBackground-dummy.sh c2mass-atlas.fits c2mass-atlas-area.fits", wpath.string().c_str()); + int ret = system(cmd); + std::string file1 = wpath.string() + std::string("/c2mass-atlas.fits"); + std::string file2 = wpath.string() + std::string("/c2mass-atlas-area.fits"); + sout->c2mass_atlas_fits.setValue(file1); + sout->c2mass_atlas_area_fits.setValue(file2); + \ No newline at end of file diff --git a/src/montage-pegasus/wfr/repo/montage-pegasus/mBackground.properties b/src/montage-pegasus/wfr/repo/montage-pegasus/mBackground.properties new file mode 100755 index 0000000..3a05b05 --- /dev/null +++ b/src/montage-pegasus/wfr/repo/montage-pegasus/mBackground.properties @@ -0,0 +1,3 @@ +name=mBackground +entries=1 +entry.0=mBackground.code \ No newline at end of file diff --git a/src/montage-pegasus/wfr/repo/montage-pegasus/mBgModel.code b/src/montage-pegasus/wfr/repo/montage-pegasus/mBgModel.code new file mode 100755 index 0000000..5ba30a3 --- /dev/null +++ b/src/montage-pegasus/wfr/repo/montage-pegasus/mBgModel.code @@ -0,0 +1,7 @@ + boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + char cmd[2048]; + snprintf(cmd, 2048, "cd %s && ../mBgModel-dummy.sh", wpath.string().c_str()); + int ret = system(cmd); + std::string file1 = wpath.string() + std::string("/corrections.tbl"); + sout->corrections_tbl.setValue(file1); + \ No newline at end of file diff --git a/src/montage-pegasus/wfr/repo/montage-pegasus/mBgModel.properties b/src/montage-pegasus/wfr/repo/montage-pegasus/mBgModel.properties new file mode 100755 index 0000000..660862c --- /dev/null +++ b/src/montage-pegasus/wfr/repo/montage-pegasus/mBgModel.properties @@ -0,0 +1,3 @@ +name=mBgModel +entries=1 +entry.0=mBgModel.code \ No newline at end of file diff --git a/src/montage-pegasus/wfr/repo/montage-pegasus/mConcatFit.code b/src/montage-pegasus/wfr/repo/montage-pegasus/mConcatFit.code new file mode 100755 index 0000000..85d035e --- /dev/null +++ b/src/montage-pegasus/wfr/repo/montage-pegasus/mConcatFit.code @@ -0,0 +1,7 @@ + boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + char cmd[2048]; + snprintf(cmd, 2048, "cd %s && ../mConcatFit-dummy.sh", wpath.string().c_str()); + int ret = system(cmd); + std::string file1 = wpath.string() + std::string("/fits.tbl"); + sout->fits_tlb.setValue(file1); + \ No newline at end of file diff --git a/src/montage-pegasus/wfr/repo/montage-pegasus/mConcatFit.properties b/src/montage-pegasus/wfr/repo/montage-pegasus/mConcatFit.properties new file mode 100755 index 0000000..8a7c336 --- /dev/null +++ b/src/montage-pegasus/wfr/repo/montage-pegasus/mConcatFit.properties @@ -0,0 +1,3 @@ +name=mConcatFit +entries=1 +entry.0=mConcatFit.code \ No newline at end of file diff --git a/src/montage-pegasus/wfr/repo/montage-pegasus/mDiffFit.code b/src/montage-pegasus/wfr/repo/montage-pegasus/mDiffFit.code new file mode 100755 index 0000000..d3beb02 --- /dev/null +++ b/src/montage-pegasus/wfr/repo/montage-pegasus/mDiffFit.code @@ -0,0 +1,9 @@ + boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + char cmd[2048]; + snprintf(cmd, 2048, "cd %s && ../mDiffFit-dummy.sh diff.txt fit.txt", wpath.string().c_str()); + int ret = system(cmd); + std::string file1 = wpath.string() + std::string("/diff.txt"); + std::string file2 = wpath.string() + std::string("/fit.txt"); + sout->diff_txt.setValue(file1); + sout->fit_txt.setValue(file2); + \ No newline at end of file diff --git a/src/montage-pegasus/wfr/repo/montage-pegasus/mDiffFit.properties b/src/montage-pegasus/wfr/repo/montage-pegasus/mDiffFit.properties new file mode 100755 index 0000000..a23f911 --- /dev/null +++ b/src/montage-pegasus/wfr/repo/montage-pegasus/mDiffFit.properties @@ -0,0 +1,3 @@ +name=mDiffFit +entries=1 +entry.0=mDiffFit.code \ No newline at end of file diff --git a/src/montage-pegasus/wfr/repo/montage-pegasus/mImgTbl.code b/src/montage-pegasus/wfr/repo/montage-pegasus/mImgTbl.code new file mode 100755 index 0000000..e75dfef --- /dev/null +++ b/src/montage-pegasus/wfr/repo/montage-pegasus/mImgTbl.code @@ -0,0 +1,7 @@ + boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + char cmd[2048]; + snprintf(cmd, 2048, "cd %s && ../mImgTbl-dummy.sh", wpath.string().c_str()); + int ret = system(cmd); + std::string file1 = wpath.string() + std::string("/newcimages.tbl"); + sout->newcimages_tbl.setValue(file1); + \ No newline at end of file diff --git a/src/montage-pegasus/wfr/repo/montage-pegasus/mImgTbl.properties b/src/montage-pegasus/wfr/repo/montage-pegasus/mImgTbl.properties new file mode 100755 index 0000000..c815d7a --- /dev/null +++ b/src/montage-pegasus/wfr/repo/montage-pegasus/mImgTbl.properties @@ -0,0 +1,3 @@ +name=mImgTbl +entries=1 +entry.0=mImgTbl.code \ No newline at end of file diff --git a/src/montage-pegasus/wfr/repo/montage-pegasus/mJpeg.code b/src/montage-pegasus/wfr/repo/montage-pegasus/mJpeg.code new file mode 100755 index 0000000..e4d5db9 --- /dev/null +++ b/src/montage-pegasus/wfr/repo/montage-pegasus/mJpeg.code @@ -0,0 +1,7 @@ + boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + char cmd[2048]; + snprintf(cmd, 2048, "cd %s && ../mJpeg-dummy.sh", wpath.string().c_str()); + int ret = system(cmd); + std::string file1 = wpath.string() + std::string("/shrunken.jpg"); + sout->shrunken_jpg.setValue(file1); + \ No newline at end of file diff --git a/src/montage-pegasus/wfr/repo/montage-pegasus/mJpeg.properties b/src/montage-pegasus/wfr/repo/montage-pegasus/mJpeg.properties new file mode 100755 index 0000000..73329ab --- /dev/null +++ b/src/montage-pegasus/wfr/repo/montage-pegasus/mJpeg.properties @@ -0,0 +1,3 @@ +name=mJpeg +entries=1 +entry.0=mJpeg.code \ No newline at end of file diff --git a/src/montage-pegasus/wfr/repo/montage-pegasus/mProjectPP.code b/src/montage-pegasus/wfr/repo/montage-pegasus/mProjectPP.code new file mode 100755 index 0000000..e47d358 --- /dev/null +++ b/src/montage-pegasus/wfr/repo/montage-pegasus/mProjectPP.code @@ -0,0 +1,9 @@ + boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + char cmd[2048]; + snprintf(cmd, 2048, "cd %s && ../mProjectPP-dummy.sh p2mass-atlas.fits p2mass-atlas-area.fits", wpath.string().c_str()); + int ret = system(cmd); + std::string file1 = wpath.string() + std::string("/p2mass-atlas.fits"); + std::string file2 = wpath.string() + std::string("/p2mass-atlas-area.fits"); + sout->p2mass_atlas_fits.setValue(file1); + sout->p2mass_atlas_area_fits.setValue(file2); + \ No newline at end of file diff --git a/src/montage-pegasus/wfr/repo/montage-pegasus/mProjectPP.properties b/src/montage-pegasus/wfr/repo/montage-pegasus/mProjectPP.properties new file mode 100755 index 0000000..a914ffe --- /dev/null +++ b/src/montage-pegasus/wfr/repo/montage-pegasus/mProjectPP.properties @@ -0,0 +1,3 @@ +name=mProjectPP +entries=1 +entry.0=mProjectPP.code \ No newline at end of file diff --git a/src/montage-pegasus/wfr/repo/montage-pegasus/mShrink.code b/src/montage-pegasus/wfr/repo/montage-pegasus/mShrink.code new file mode 100755 index 0000000..b6cbc71 --- /dev/null +++ b/src/montage-pegasus/wfr/repo/montage-pegasus/mShrink.code @@ -0,0 +1,7 @@ + boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + char cmd[2048]; + snprintf(cmd, 2048, "cd %s && ../mShrink-dummy.sh", wpath.string().c_str()); + int ret = system(cmd); + std::string file1 = wpath.string() + std::string("/shrunken.fits"); + sout->shrunken_fits.setValue(file1); + \ No newline at end of file diff --git a/src/montage-pegasus/wfr/repo/montage-pegasus/mShrink.properties b/src/montage-pegasus/wfr/repo/montage-pegasus/mShrink.properties new file mode 100755 index 0000000..6e9b17c --- /dev/null +++ b/src/montage-pegasus/wfr/repo/montage-pegasus/mShrink.properties @@ -0,0 +1,3 @@ +name=mShrink +entries=1 +entry.0=mShrink.code \ No newline at end of file diff --git a/src/montage-pegasus/wfr/repo/montage-pegasus/wfInput.code b/src/montage-pegasus/wfr/repo/montage-pegasus/wfInput.code new file mode 100755 index 0000000..4ed3c86 --- /dev/null +++ b/src/montage-pegasus/wfr/repo/montage-pegasus/wfInput.code @@ -0,0 +1,45 @@ + long nr_projectPP = 5; + long nr_diffFit = 9; + bool isHelp = false; + boost::program_options::options_description opts("Montage Options"); + opts.add_options() + ("help", "Print help message.") + ("nrProjectPP", boost::program_options::value(), "Total number of mProjectPP activities.") + ("nrDiffFit", boost::program_options::value(), "Total number of mDiffFit activities."); + boost::program_options::variables_map vm; + auto parsed = boost::program_options::command_line_parser(argc, argv).options(opts).allow_unregistered().run(); + boost::program_options::store(parsed, vm); + boost::program_options::notify(vm); + if (vm.count("help")) { + std::cerr << opts << std::endl; + isHelp = true; + } else { + if (vm.count("nrProjectPP")) { + nr_projectPP = vm["nrProjectPP"].as(); + } + if (vm.count("nrDiffFit")) { + nr_diffFit = vm["nrDiffFit"].as(); + } + std::cerr << "nrProjectPP = " << nr_projectPP << std::endl; + std::cerr << "nrDiffFit = " << nr_diffFit << std::endl; + } + wfInput.region_hdr.setValue("region.hdr"); + wfInput.fits_list_tbl.setValue("fits-list.tlb"); + wfInput.pimages_tbl.setValue("pimages.tbl"); + wfInput.cimages_tbl.setValue("cimages.tlb"); + wfInput._2mass_atlas_fits.init(nr_projectPP); + for (long t = 0; t < nr_projectPP; t++) { + wfInput._2mass_atlas_fits.setEntryValue(t, "2mass-atlas.fits"); + } + wfInput._2mass_atlas_fits.setFinalised(true); + wfInput.mDiffFitIndices.init(nr_diffFit); + for (long t = 0; t < nr_diffFit; t++) { + wfr::lwd::iwir_collection tmp; + tmp.init(2); + tmp.setEntryValue(0, 0); + tmp.setEntryValue(1,1); + tmp.setFinalised(true); + wfInput.mDiffFitIndices.setEntryValue(t, tmp); + } + wfInput.mDiffFitIndices.setFinalised(true); + \ No newline at end of file diff --git a/src/montage-pegasus/wfr/repo/montage-pegasus/wfOutput.code b/src/montage-pegasus/wfr/repo/montage-pegasus/wfOutput.code new file mode 100755 index 0000000..87d13d2 --- /dev/null +++ b/src/montage-pegasus/wfr/repo/montage-pegasus/wfOutput.code @@ -0,0 +1,2 @@ + std::cout << "Final Result: " << wfOutput.shrunken_jpg.getValue() << std::endl; + \ No newline at end of file diff --git a/src/nested_for_01/wfr/nested_for_01.iwir b/src/nested_for_01/wfr/nested_for_01.iwir new file mode 100644 index 0000000..e5ee50d --- /dev/null +++ b/src/nested_for_01/wfr/nested_for_01.iwir @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/nested_for_01/wfr/repo/nested_for_01.properties b/src/nested_for_01/wfr/repo/nested_for_01.properties new file mode 100755 index 0000000..98ee3c6 --- /dev/null +++ b/src/nested_for_01/wfr/repo/nested_for_01.properties @@ -0,0 +1,7 @@ + +wfinput=nested_for_01/wfInput.code +wfoutput=nested_for_01/wfOutput.code +includes=nested_for_01/includes.code + +atomicTask.0=nested_for_01/AtomicTask01.properties + diff --git a/src/nested_for_01/wfr/repo/nested_for_01/AtomicTask01.code b/src/nested_for_01/wfr/repo/nested_for_01/AtomicTask01.code new file mode 100755 index 0000000..c2f7b8d --- /dev/null +++ b/src/nested_for_01/wfr/repo/nested_for_01/AtomicTask01.code @@ -0,0 +1,3 @@ + + sout->outport01.setValue(sin->inport01.getValue()); + \ No newline at end of file diff --git a/src/nested_for_01/wfr/repo/nested_for_01/AtomicTask01.properties b/src/nested_for_01/wfr/repo/nested_for_01/AtomicTask01.properties new file mode 100755 index 0000000..d0012b9 --- /dev/null +++ b/src/nested_for_01/wfr/repo/nested_for_01/AtomicTask01.properties @@ -0,0 +1,4 @@ + +name=AtomicTask01 +entries=1 +entry.0=AtomicTask01.code diff --git a/src/nested_for_01/wfr/repo/nested_for_01/includes.code b/src/nested_for_01/wfr/repo/nested_for_01/includes.code new file mode 100755 index 0000000..f6300c7 --- /dev/null +++ b/src/nested_for_01/wfr/repo/nested_for_01/includes.code @@ -0,0 +1,2 @@ +#include +#include \ No newline at end of file diff --git a/src/nested_for_01/wfr/repo/nested_for_01/wfInput.code b/src/nested_for_01/wfr/repo/nested_for_01/wfInput.code new file mode 100755 index 0000000..0a9f0b1 --- /dev/null +++ b/src/nested_for_01/wfr/repo/nested_for_01/wfInput.code @@ -0,0 +1,31 @@ + + long counter01 = 10; + long counter02 = 10; + long invalue01 = 10; + bool isHelp = false; + boost::program_options::options_description opts("nested_for Options"); + opts.add_options() + ("help", "Print help message.") + ("counter01", boost::program_options::value(), "counter01.") + ("counter02", boost::program_options::value(), "counter02."); + boost::program_options::variables_map vm; + auto parsed = boost::program_options::command_line_parser(argc, argv).options(opts).allow_unregistered().run(); + boost::program_options::store(parsed, vm); + boost::program_options::notify(vm); + if (vm.count("help")) { + std::cerr << opts << std::endl; + isHelp = true; + } else { + if (vm.count("counter01")) { + counter01 = vm["counter01"].as(); + } + if (vm.count("counter02")) { + counter02 = vm["counter02"].as(); + } + std::cerr << "counter01 = " << counter01 << std::endl; + std::cerr << "counter02 = " << counter02 << std::endl; + } + wfInput.inport01.setValue(invalue01); + wfInput.counter01.setValue(counter01); + wfInput.counter02.setValue(counter02); + \ No newline at end of file diff --git a/src/nested_for_01/wfr/repo/nested_for_01/wfOutput.code b/src/nested_for_01/wfr/repo/nested_for_01/wfOutput.code new file mode 100755 index 0000000..e69de29 diff --git a/src/nested_for_02/wfr/nested_for_02.iwir b/src/nested_for_02/wfr/nested_for_02.iwir new file mode 100644 index 0000000..925021d --- /dev/null +++ b/src/nested_for_02/wfr/nested_for_02.iwir @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/nested_for_02/wfr/repo/nested_for_02.properties b/src/nested_for_02/wfr/repo/nested_for_02.properties new file mode 100755 index 0000000..44a16df --- /dev/null +++ b/src/nested_for_02/wfr/repo/nested_for_02.properties @@ -0,0 +1,7 @@ + +wfinput=nested_for_02/wfInput.code +wfoutput=nested_for_02/wfOutput.code +includes=nested_for_02/includes.code + +atomicTask.0=nested_for_02/AtomicTask01.properties + diff --git a/src/nested_for_02/wfr/repo/nested_for_02/AtomicTask01.code b/src/nested_for_02/wfr/repo/nested_for_02/AtomicTask01.code new file mode 100755 index 0000000..c2f7b8d --- /dev/null +++ b/src/nested_for_02/wfr/repo/nested_for_02/AtomicTask01.code @@ -0,0 +1,3 @@ + + sout->outport01.setValue(sin->inport01.getValue()); + \ No newline at end of file diff --git a/src/nested_for_02/wfr/repo/nested_for_02/AtomicTask01.properties b/src/nested_for_02/wfr/repo/nested_for_02/AtomicTask01.properties new file mode 100755 index 0000000..d0012b9 --- /dev/null +++ b/src/nested_for_02/wfr/repo/nested_for_02/AtomicTask01.properties @@ -0,0 +1,4 @@ + +name=AtomicTask01 +entries=1 +entry.0=AtomicTask01.code diff --git a/src/nested_for_02/wfr/repo/nested_for_02/includes.code b/src/nested_for_02/wfr/repo/nested_for_02/includes.code new file mode 100755 index 0000000..f6300c7 --- /dev/null +++ b/src/nested_for_02/wfr/repo/nested_for_02/includes.code @@ -0,0 +1,2 @@ +#include +#include \ No newline at end of file diff --git a/src/nested_for_02/wfr/repo/nested_for_02/wfInput.code b/src/nested_for_02/wfr/repo/nested_for_02/wfInput.code new file mode 100755 index 0000000..0a9f0b1 --- /dev/null +++ b/src/nested_for_02/wfr/repo/nested_for_02/wfInput.code @@ -0,0 +1,31 @@ + + long counter01 = 10; + long counter02 = 10; + long invalue01 = 10; + bool isHelp = false; + boost::program_options::options_description opts("nested_for Options"); + opts.add_options() + ("help", "Print help message.") + ("counter01", boost::program_options::value(), "counter01.") + ("counter02", boost::program_options::value(), "counter02."); + boost::program_options::variables_map vm; + auto parsed = boost::program_options::command_line_parser(argc, argv).options(opts).allow_unregistered().run(); + boost::program_options::store(parsed, vm); + boost::program_options::notify(vm); + if (vm.count("help")) { + std::cerr << opts << std::endl; + isHelp = true; + } else { + if (vm.count("counter01")) { + counter01 = vm["counter01"].as(); + } + if (vm.count("counter02")) { + counter02 = vm["counter02"].as(); + } + std::cerr << "counter01 = " << counter01 << std::endl; + std::cerr << "counter02 = " << counter02 << std::endl; + } + wfInput.inport01.setValue(invalue01); + wfInput.counter01.setValue(counter01); + wfInput.counter02.setValue(counter02); + \ No newline at end of file diff --git a/src/nested_for_02/wfr/repo/nested_for_02/wfOutput.code b/src/nested_for_02/wfr/repo/nested_for_02/wfOutput.code new file mode 100755 index 0000000..e69de29 diff --git a/src/nested_for_02b/wfr/nested_for_02b.iwir b/src/nested_for_02b/wfr/nested_for_02b.iwir new file mode 100644 index 0000000..9d16b08 --- /dev/null +++ b/src/nested_for_02b/wfr/nested_for_02b.iwir @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/nested_for_02b/wfr/repo/nested_for_02/AtomicTask01.code b/src/nested_for_02b/wfr/repo/nested_for_02/AtomicTask01.code new file mode 100755 index 0000000..ead31d3 --- /dev/null +++ b/src/nested_for_02b/wfr/repo/nested_for_02/AtomicTask01.code @@ -0,0 +1,4 @@ + + std::string outval = std::to_string(sin->counter01.getValue()) + "." + std::to_string(sin->counter02.getValue()); + sout->outport01.setValue(outval); + \ No newline at end of file diff --git a/src/nested_for_02b/wfr/repo/nested_for_02/AtomicTask01.properties b/src/nested_for_02b/wfr/repo/nested_for_02/AtomicTask01.properties new file mode 100755 index 0000000..d0012b9 --- /dev/null +++ b/src/nested_for_02b/wfr/repo/nested_for_02/AtomicTask01.properties @@ -0,0 +1,4 @@ + +name=AtomicTask01 +entries=1 +entry.0=AtomicTask01.code diff --git a/src/nested_for_02b/wfr/repo/nested_for_02/includes.code b/src/nested_for_02b/wfr/repo/nested_for_02/includes.code new file mode 100755 index 0000000..f6300c7 --- /dev/null +++ b/src/nested_for_02b/wfr/repo/nested_for_02/includes.code @@ -0,0 +1,2 @@ +#include +#include \ No newline at end of file diff --git a/src/nested_for_02b/wfr/repo/nested_for_02/wfInput.code b/src/nested_for_02b/wfr/repo/nested_for_02/wfInput.code new file mode 100755 index 0000000..0a9f0b1 --- /dev/null +++ b/src/nested_for_02b/wfr/repo/nested_for_02/wfInput.code @@ -0,0 +1,31 @@ + + long counter01 = 10; + long counter02 = 10; + long invalue01 = 10; + bool isHelp = false; + boost::program_options::options_description opts("nested_for Options"); + opts.add_options() + ("help", "Print help message.") + ("counter01", boost::program_options::value(), "counter01.") + ("counter02", boost::program_options::value(), "counter02."); + boost::program_options::variables_map vm; + auto parsed = boost::program_options::command_line_parser(argc, argv).options(opts).allow_unregistered().run(); + boost::program_options::store(parsed, vm); + boost::program_options::notify(vm); + if (vm.count("help")) { + std::cerr << opts << std::endl; + isHelp = true; + } else { + if (vm.count("counter01")) { + counter01 = vm["counter01"].as(); + } + if (vm.count("counter02")) { + counter02 = vm["counter02"].as(); + } + std::cerr << "counter01 = " << counter01 << std::endl; + std::cerr << "counter02 = " << counter02 << std::endl; + } + wfInput.inport01.setValue(invalue01); + wfInput.counter01.setValue(counter01); + wfInput.counter02.setValue(counter02); + \ No newline at end of file diff --git a/src/nested_for_02b/wfr/repo/nested_for_02/wfOutput.code b/src/nested_for_02b/wfr/repo/nested_for_02/wfOutput.code new file mode 100755 index 0000000..f60b378 --- /dev/null +++ b/src/nested_for_02b/wfr/repo/nested_for_02/wfOutput.code @@ -0,0 +1,17 @@ + + std::cout << "OutPort01-size: " << wfOutput.outport01.getSize() << std::endl; + //std::cout << "OutPort01: "; + unsigned i = 0; + for (unsigned t1 = 1; t1 <= counter01; t1++) { + for (unsigned t2 = 1; t2 <= counter02; t2++) { + std::string val = std::to_string(t1) + std::string(".") + std::to_string(t2); + std::string outval = wfOutput.outport01.getEntryValue(i++); + //std::cout << outval << ", "; + if (val.compare(outval) != 0) { + std::cout << std::endl << "ERROR: Wrong value!" << std::endl; + exit(0); + } + } + } + //std::cout << std::endl; + \ No newline at end of file diff --git a/src/nested_for_02b/wfr/repo/nested_for_02b.properties b/src/nested_for_02b/wfr/repo/nested_for_02b.properties new file mode 100755 index 0000000..44a16df --- /dev/null +++ b/src/nested_for_02b/wfr/repo/nested_for_02b.properties @@ -0,0 +1,7 @@ + +wfinput=nested_for_02/wfInput.code +wfoutput=nested_for_02/wfOutput.code +includes=nested_for_02/includes.code + +atomicTask.0=nested_for_02/AtomicTask01.properties + diff --git a/src/nested_for_02c/wfr/nested_for_02c.iwir b/src/nested_for_02c/wfr/nested_for_02c.iwir new file mode 100644 index 0000000..f068f52 --- /dev/null +++ b/src/nested_for_02c/wfr/nested_for_02c.iwir @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/nested_for_02c/wfr/repo/nested_for_02/AtomicTask01.code b/src/nested_for_02c/wfr/repo/nested_for_02/AtomicTask01.code new file mode 100755 index 0000000..2647551 --- /dev/null +++ b/src/nested_for_02c/wfr/repo/nested_for_02/AtomicTask01.code @@ -0,0 +1,4 @@ + + std::string outval = std::to_string(sin->counter01.getValue()); + sout->outport01.setValue(outval); + \ No newline at end of file diff --git a/src/nested_for_02c/wfr/repo/nested_for_02/AtomicTask01.properties b/src/nested_for_02c/wfr/repo/nested_for_02/AtomicTask01.properties new file mode 100755 index 0000000..d0012b9 --- /dev/null +++ b/src/nested_for_02c/wfr/repo/nested_for_02/AtomicTask01.properties @@ -0,0 +1,4 @@ + +name=AtomicTask01 +entries=1 +entry.0=AtomicTask01.code diff --git a/src/nested_for_02c/wfr/repo/nested_for_02/FixCounter01.code b/src/nested_for_02c/wfr/repo/nested_for_02/FixCounter01.code new file mode 100755 index 0000000..7a1bb98 --- /dev/null +++ b/src/nested_for_02c/wfr/repo/nested_for_02/FixCounter01.code @@ -0,0 +1,3 @@ + + sout->outport01.setValue(sin->counter01.getValue() * 1000 + sin->counter02.getValue()); + \ No newline at end of file diff --git a/src/nested_for_02c/wfr/repo/nested_for_02/FixCounter01.properties b/src/nested_for_02c/wfr/repo/nested_for_02/FixCounter01.properties new file mode 100755 index 0000000..f897d05 --- /dev/null +++ b/src/nested_for_02c/wfr/repo/nested_for_02/FixCounter01.properties @@ -0,0 +1,4 @@ + +name=FixCounter01 +entries=1 +entry.0=FixCounter01.code diff --git a/src/nested_for_02c/wfr/repo/nested_for_02/includes.code b/src/nested_for_02c/wfr/repo/nested_for_02/includes.code new file mode 100755 index 0000000..f6300c7 --- /dev/null +++ b/src/nested_for_02c/wfr/repo/nested_for_02/includes.code @@ -0,0 +1,2 @@ +#include +#include \ No newline at end of file diff --git a/src/nested_for_02c/wfr/repo/nested_for_02/wfInput.code b/src/nested_for_02c/wfr/repo/nested_for_02/wfInput.code new file mode 100755 index 0000000..0a9f0b1 --- /dev/null +++ b/src/nested_for_02c/wfr/repo/nested_for_02/wfInput.code @@ -0,0 +1,31 @@ + + long counter01 = 10; + long counter02 = 10; + long invalue01 = 10; + bool isHelp = false; + boost::program_options::options_description opts("nested_for Options"); + opts.add_options() + ("help", "Print help message.") + ("counter01", boost::program_options::value(), "counter01.") + ("counter02", boost::program_options::value(), "counter02."); + boost::program_options::variables_map vm; + auto parsed = boost::program_options::command_line_parser(argc, argv).options(opts).allow_unregistered().run(); + boost::program_options::store(parsed, vm); + boost::program_options::notify(vm); + if (vm.count("help")) { + std::cerr << opts << std::endl; + isHelp = true; + } else { + if (vm.count("counter01")) { + counter01 = vm["counter01"].as(); + } + if (vm.count("counter02")) { + counter02 = vm["counter02"].as(); + } + std::cerr << "counter01 = " << counter01 << std::endl; + std::cerr << "counter02 = " << counter02 << std::endl; + } + wfInput.inport01.setValue(invalue01); + wfInput.counter01.setValue(counter01); + wfInput.counter02.setValue(counter02); + \ No newline at end of file diff --git a/src/nested_for_02c/wfr/repo/nested_for_02/wfOutput.code b/src/nested_for_02c/wfr/repo/nested_for_02/wfOutput.code new file mode 100755 index 0000000..f60b378 --- /dev/null +++ b/src/nested_for_02c/wfr/repo/nested_for_02/wfOutput.code @@ -0,0 +1,17 @@ + + std::cout << "OutPort01-size: " << wfOutput.outport01.getSize() << std::endl; + //std::cout << "OutPort01: "; + unsigned i = 0; + for (unsigned t1 = 1; t1 <= counter01; t1++) { + for (unsigned t2 = 1; t2 <= counter02; t2++) { + std::string val = std::to_string(t1) + std::string(".") + std::to_string(t2); + std::string outval = wfOutput.outport01.getEntryValue(i++); + //std::cout << outval << ", "; + if (val.compare(outval) != 0) { + std::cout << std::endl << "ERROR: Wrong value!" << std::endl; + exit(0); + } + } + } + //std::cout << std::endl; + \ No newline at end of file diff --git a/src/nested_for_02c/wfr/repo/nested_for_02c.properties b/src/nested_for_02c/wfr/repo/nested_for_02c.properties new file mode 100755 index 0000000..6cdc743 --- /dev/null +++ b/src/nested_for_02c/wfr/repo/nested_for_02c.properties @@ -0,0 +1,8 @@ + +wfinput=nested_for_02/wfInput.code +wfoutput=nested_for_02/wfOutput.code +includes=nested_for_02/includes.code + +atomicTask.0=nested_for_02/AtomicTask01.properties +atomicTask.1=nested_for_02/FixCounter01.properties + diff --git a/src/nested_for_02d/wfr/nested_for_02d.iwir b/src/nested_for_02d/wfr/nested_for_02d.iwir new file mode 100644 index 0000000..be26ed2 --- /dev/null +++ b/src/nested_for_02d/wfr/nested_for_02d.iwir @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/nested_for_02d/wfr/repo/nested_for_02/AtomicTask01.code b/src/nested_for_02d/wfr/repo/nested_for_02/AtomicTask01.code new file mode 100755 index 0000000..2647551 --- /dev/null +++ b/src/nested_for_02d/wfr/repo/nested_for_02/AtomicTask01.code @@ -0,0 +1,4 @@ + + std::string outval = std::to_string(sin->counter01.getValue()); + sout->outport01.setValue(outval); + \ No newline at end of file diff --git a/src/nested_for_02d/wfr/repo/nested_for_02/AtomicTask01.properties b/src/nested_for_02d/wfr/repo/nested_for_02/AtomicTask01.properties new file mode 100755 index 0000000..d0012b9 --- /dev/null +++ b/src/nested_for_02d/wfr/repo/nested_for_02/AtomicTask01.properties @@ -0,0 +1,4 @@ + +name=AtomicTask01 +entries=1 +entry.0=AtomicTask01.code diff --git a/src/nested_for_02d/wfr/repo/nested_for_02/FixCounter01.code b/src/nested_for_02d/wfr/repo/nested_for_02/FixCounter01.code new file mode 100755 index 0000000..7a1bb98 --- /dev/null +++ b/src/nested_for_02d/wfr/repo/nested_for_02/FixCounter01.code @@ -0,0 +1,3 @@ + + sout->outport01.setValue(sin->counter01.getValue() * 1000 + sin->counter02.getValue()); + \ No newline at end of file diff --git a/src/nested_for_02d/wfr/repo/nested_for_02/FixCounter01.properties b/src/nested_for_02d/wfr/repo/nested_for_02/FixCounter01.properties new file mode 100755 index 0000000..f897d05 --- /dev/null +++ b/src/nested_for_02d/wfr/repo/nested_for_02/FixCounter01.properties @@ -0,0 +1,4 @@ + +name=FixCounter01 +entries=1 +entry.0=FixCounter01.code diff --git a/src/nested_for_02d/wfr/repo/nested_for_02/includes.code b/src/nested_for_02d/wfr/repo/nested_for_02/includes.code new file mode 100755 index 0000000..f6300c7 --- /dev/null +++ b/src/nested_for_02d/wfr/repo/nested_for_02/includes.code @@ -0,0 +1,2 @@ +#include +#include \ No newline at end of file diff --git a/src/nested_for_02d/wfr/repo/nested_for_02/wfInput.code b/src/nested_for_02d/wfr/repo/nested_for_02/wfInput.code new file mode 100755 index 0000000..0a9f0b1 --- /dev/null +++ b/src/nested_for_02d/wfr/repo/nested_for_02/wfInput.code @@ -0,0 +1,31 @@ + + long counter01 = 10; + long counter02 = 10; + long invalue01 = 10; + bool isHelp = false; + boost::program_options::options_description opts("nested_for Options"); + opts.add_options() + ("help", "Print help message.") + ("counter01", boost::program_options::value(), "counter01.") + ("counter02", boost::program_options::value(), "counter02."); + boost::program_options::variables_map vm; + auto parsed = boost::program_options::command_line_parser(argc, argv).options(opts).allow_unregistered().run(); + boost::program_options::store(parsed, vm); + boost::program_options::notify(vm); + if (vm.count("help")) { + std::cerr << opts << std::endl; + isHelp = true; + } else { + if (vm.count("counter01")) { + counter01 = vm["counter01"].as(); + } + if (vm.count("counter02")) { + counter02 = vm["counter02"].as(); + } + std::cerr << "counter01 = " << counter01 << std::endl; + std::cerr << "counter02 = " << counter02 << std::endl; + } + wfInput.inport01.setValue(invalue01); + wfInput.counter01.setValue(counter01); + wfInput.counter02.setValue(counter02); + \ No newline at end of file diff --git a/src/nested_for_02d/wfr/repo/nested_for_02/wfOutput.code b/src/nested_for_02d/wfr/repo/nested_for_02/wfOutput.code new file mode 100755 index 0000000..f60b378 --- /dev/null +++ b/src/nested_for_02d/wfr/repo/nested_for_02/wfOutput.code @@ -0,0 +1,17 @@ + + std::cout << "OutPort01-size: " << wfOutput.outport01.getSize() << std::endl; + //std::cout << "OutPort01: "; + unsigned i = 0; + for (unsigned t1 = 1; t1 <= counter01; t1++) { + for (unsigned t2 = 1; t2 <= counter02; t2++) { + std::string val = std::to_string(t1) + std::string(".") + std::to_string(t2); + std::string outval = wfOutput.outport01.getEntryValue(i++); + //std::cout << outval << ", "; + if (val.compare(outval) != 0) { + std::cout << std::endl << "ERROR: Wrong value!" << std::endl; + exit(0); + } + } + } + //std::cout << std::endl; + \ No newline at end of file diff --git a/src/nested_for_02d/wfr/repo/nested_for_02d.properties b/src/nested_for_02d/wfr/repo/nested_for_02d.properties new file mode 100755 index 0000000..6cdc743 --- /dev/null +++ b/src/nested_for_02d/wfr/repo/nested_for_02d.properties @@ -0,0 +1,8 @@ + +wfinput=nested_for_02/wfInput.code +wfoutput=nested_for_02/wfOutput.code +includes=nested_for_02/includes.code + +atomicTask.0=nested_for_02/AtomicTask01.properties +atomicTask.1=nested_for_02/FixCounter01.properties + diff --git a/src/nested_for_03/wfr/nested_for_03.iwir b/src/nested_for_03/wfr/nested_for_03.iwir new file mode 100644 index 0000000..7217c0e --- /dev/null +++ b/src/nested_for_03/wfr/nested_for_03.iwir @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/nested_for_03/wfr/repo/nested_for_03.properties b/src/nested_for_03/wfr/repo/nested_for_03.properties new file mode 100755 index 0000000..3b04a33 --- /dev/null +++ b/src/nested_for_03/wfr/repo/nested_for_03.properties @@ -0,0 +1,7 @@ + +wfinput=nested_for_03/wfInput.code +wfoutput=nested_for_03/wfOutput.code +includes=nested_for_03/includes.code + +atomicTask.0=nested_for_03/AtomicTask01.properties + diff --git a/src/nested_for_03/wfr/repo/nested_for_03/AtomicTask01.code b/src/nested_for_03/wfr/repo/nested_for_03/AtomicTask01.code new file mode 100755 index 0000000..c2f7b8d --- /dev/null +++ b/src/nested_for_03/wfr/repo/nested_for_03/AtomicTask01.code @@ -0,0 +1,3 @@ + + sout->outport01.setValue(sin->inport01.getValue()); + \ No newline at end of file diff --git a/src/nested_for_03/wfr/repo/nested_for_03/AtomicTask01.properties b/src/nested_for_03/wfr/repo/nested_for_03/AtomicTask01.properties new file mode 100755 index 0000000..d0012b9 --- /dev/null +++ b/src/nested_for_03/wfr/repo/nested_for_03/AtomicTask01.properties @@ -0,0 +1,4 @@ + +name=AtomicTask01 +entries=1 +entry.0=AtomicTask01.code diff --git a/src/nested_for_03/wfr/repo/nested_for_03/includes.code b/src/nested_for_03/wfr/repo/nested_for_03/includes.code new file mode 100755 index 0000000..f6300c7 --- /dev/null +++ b/src/nested_for_03/wfr/repo/nested_for_03/includes.code @@ -0,0 +1,2 @@ +#include +#include \ No newline at end of file diff --git a/src/nested_for_03/wfr/repo/nested_for_03/wfInput.code b/src/nested_for_03/wfr/repo/nested_for_03/wfInput.code new file mode 100755 index 0000000..0a9f0b1 --- /dev/null +++ b/src/nested_for_03/wfr/repo/nested_for_03/wfInput.code @@ -0,0 +1,31 @@ + + long counter01 = 10; + long counter02 = 10; + long invalue01 = 10; + bool isHelp = false; + boost::program_options::options_description opts("nested_for Options"); + opts.add_options() + ("help", "Print help message.") + ("counter01", boost::program_options::value(), "counter01.") + ("counter02", boost::program_options::value(), "counter02."); + boost::program_options::variables_map vm; + auto parsed = boost::program_options::command_line_parser(argc, argv).options(opts).allow_unregistered().run(); + boost::program_options::store(parsed, vm); + boost::program_options::notify(vm); + if (vm.count("help")) { + std::cerr << opts << std::endl; + isHelp = true; + } else { + if (vm.count("counter01")) { + counter01 = vm["counter01"].as(); + } + if (vm.count("counter02")) { + counter02 = vm["counter02"].as(); + } + std::cerr << "counter01 = " << counter01 << std::endl; + std::cerr << "counter02 = " << counter02 << std::endl; + } + wfInput.inport01.setValue(invalue01); + wfInput.counter01.setValue(counter01); + wfInput.counter02.setValue(counter02); + \ No newline at end of file diff --git a/src/nested_for_03/wfr/repo/nested_for_03/wfOutput.code b/src/nested_for_03/wfr/repo/nested_for_03/wfOutput.code new file mode 100755 index 0000000..e69de29 diff --git a/src/nested_for_04/wfr/nested_for_04.iwir b/src/nested_for_04/wfr/nested_for_04.iwir new file mode 100644 index 0000000..549c3ac --- /dev/null +++ b/src/nested_for_04/wfr/nested_for_04.iwir @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/nested_for_04/wfr/repo/nested_for_04.properties b/src/nested_for_04/wfr/repo/nested_for_04.properties new file mode 100755 index 0000000..4ea4c51 --- /dev/null +++ b/src/nested_for_04/wfr/repo/nested_for_04.properties @@ -0,0 +1,7 @@ + +wfinput=nested_for_04/wfInput.code +wfoutput=nested_for_04/wfOutput.code +includes=nested_for_04/includes.code + +atomicTask.0=nested_for_04/AtomicTask01.properties + diff --git a/src/nested_for_04/wfr/repo/nested_for_04/AtomicTask01.code b/src/nested_for_04/wfr/repo/nested_for_04/AtomicTask01.code new file mode 100755 index 0000000..c2f7b8d --- /dev/null +++ b/src/nested_for_04/wfr/repo/nested_for_04/AtomicTask01.code @@ -0,0 +1,3 @@ + + sout->outport01.setValue(sin->inport01.getValue()); + \ No newline at end of file diff --git a/src/nested_for_04/wfr/repo/nested_for_04/AtomicTask01.properties b/src/nested_for_04/wfr/repo/nested_for_04/AtomicTask01.properties new file mode 100755 index 0000000..d0012b9 --- /dev/null +++ b/src/nested_for_04/wfr/repo/nested_for_04/AtomicTask01.properties @@ -0,0 +1,4 @@ + +name=AtomicTask01 +entries=1 +entry.0=AtomicTask01.code diff --git a/src/nested_for_04/wfr/repo/nested_for_04/includes.code b/src/nested_for_04/wfr/repo/nested_for_04/includes.code new file mode 100755 index 0000000..f6300c7 --- /dev/null +++ b/src/nested_for_04/wfr/repo/nested_for_04/includes.code @@ -0,0 +1,2 @@ +#include +#include \ No newline at end of file diff --git a/src/nested_for_04/wfr/repo/nested_for_04/wfInput.code b/src/nested_for_04/wfr/repo/nested_for_04/wfInput.code new file mode 100755 index 0000000..c3f7b59 --- /dev/null +++ b/src/nested_for_04/wfr/repo/nested_for_04/wfInput.code @@ -0,0 +1,30 @@ + + long counter01 = 10; + long counter02 = 10; + long invalue01 = 10; + bool isHelp = false; + boost::program_options::options_description opts("nested_for Options"); + opts.add_options() + ("help", "Print help message.") + ("counter01", boost::program_options::value(), "counter01.") + ("counter02", boost::program_options::value(), "counter02."); + boost::program_options::variables_map vm; + auto parsed = boost::program_options::command_line_parser(argc, argv).options(opts).allow_unregistered().run(); + boost::program_options::store(parsed, vm); + boost::program_options::notify(vm); + if (vm.count("help")) { + std::cerr << opts << std::endl; + isHelp = true; + } else { + if (vm.count("counter01")) { + counter01 = vm["counter01"].as(); + } + if (vm.count("counter02")) { + counter02 = vm["counter02"].as(); + } + std::cerr << "counter01 = " << counter01 << std::endl; + std::cerr << "counter02 = " << counter02 << std::endl; + } + wfInput.inport01.setValue(invalue01); + wfInput.counter01.setValue(counter01 * counter02); + \ No newline at end of file diff --git a/src/nested_for_04/wfr/repo/nested_for_04/wfOutput.code b/src/nested_for_04/wfr/repo/nested_for_04/wfOutput.code new file mode 100755 index 0000000..e69de29 diff --git a/src/povray/askalon/povray.agwl.template b/src/povray/askalon/povray.agwl.template new file mode 100755 index 0000000..0df0f3a --- /dev/null +++ b/src/povray/askalon/povray.agwl.template @@ -0,0 +1,179 @@ + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + Memory + integer + none + single + + + + + Memory + integer + none + single + + + + + Memory + string + none + single + + + + + + + + Memory + integer + none + single + + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + Memory + integer + none + single + + + + + Memory + integer + none + single + + + + + Memory + integer + none + single + + + + + + + FileSystem + File + none + multiple + + + + + + + + + FileSystem + File + none + multiple + + + + + + + + + FileSystem + File + none + multiple + + + + + Memory + string + none + single + + + + + + + FileSystem + File + none + single + + + + + + + + + FileSystem + File + none + single + + + + diff --git a/src/povray/askalon/povray.gwdd b/src/povray/askalon/povray.gwdd new file mode 100755 index 0000000..21b15e8 --- /dev/null +++ b/src/povray/askalon/povray.gwdd @@ -0,0 +1,35 @@ + +application = povray +povray.environment = ssh + + +DELIM = AND +povray.type = wfr-experiments +povray.domain = wfr-experiments + + +povray.activities=Render-dummy Convert-dummy + +povray.accessPaths=localhost:/home/matthias/ifigner-experiments/povray-dummy/povray-dummy + + + + +Render-dummy.executable=render_dummy.sh +Render-dummy.usage=[startFrame] [numFrames] +Render-dummy.inports=iniFile povray.ini agwl:file AND \ + povFile povray.pov agwl:file AND \ + argFile povray.args agwl:file AND \ + startFrame startFrame xs:integer AND \ + numFrames numFrames xs:integer AND \ + totalFrames numFrames xs:integer +Render-dummy.outports=frames ^.*\\.png$ agwl:collection + + + +Convert-dummy.executable=convert_dummy.sh +Convert-dummy.usage=[outFileName] +Convert-dummy.inports=frames frames agwl:collection AND \ + outFileName outFileName xs:string +Convert-dummy.outports=outFile outFile agwl:file + diff --git a/src/povray/askalon/povray.teuta b/src/povray/askalon/povray.teuta new file mode 100755 index 0000000..7c4feb5 --- /dev/null +++ b/src/povray/askalon/povray.teuta @@ -0,0 +1,367 @@ + + + + + action + activity + + + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + Memory + integer + none + single + + + + + Memory + integer + none + single + + + + + Memory + integer + none + single + + + + + + + FileSystem + File + none + multiple + + + + + + + + controlflow + + + + + + + + + + action + activity + + + + + + + + + FileSystem + File + none + multiple + + + + + Memory + string + none + single + + + + + + + FileSystem + File + none + single + + + + + + + + activityfinalnode + + + + + + FileSystem + File + none + single + + + + + + + controlflow + + + + + + + + + + loopnode + parallelfor + + + + + + + + + + FileSystem + File + none + multiple + + + + + + Memory + integer + none + single + + + + + + + controlflow + + + + + + + + + + controlflow + + + + + + + + + + controlflow + + + + + + + + + + initialnode + + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + Memory + integer + none + single + + + + + Memory + integer + none + single + + + + + Memory + string + none + single + + + + + + + + + + + 30 + 30 + 75 + 15 + ffffc0 + + + 150 + 135 + 15 + 75 + ffcc99 + + + 120 + 45 + 30 + 105 + ffffc0 + + + 120 + 45 + 30 + 240 + ffffc0 + + + 30 + 30 + 75 + 315 + ffffc0 + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + diff --git a/src/povray/openmp/povray.cpp b/src/povray/openmp/povray.cpp new file mode 100755 index 0000000..ead4a8e --- /dev/null +++ b/src/povray/openmp/povray.cpp @@ -0,0 +1,73 @@ +#include +#include +#include +#include +#include + + + +std::vector render(int id, int startFrame, int numFrames) { + std::vector retval; + boost::format dirFormat("wfr_rdir_%1%"); + dirFormat % id; + boost::format cmdFormat("rm -rf %1% && mkdir %1% && cd %1% && ../render_dummy.sh %2% %3%"); + cmdFormat % dirFormat.str() % startFrame % numFrames; + int ret = system(cmdFormat.str().c_str()); + boost::format frameFormat("%1$d"); + for (int t = startFrame; t < startFrame + numFrames; t++) { + frameFormat % t; + std::string file = dirFormat.str() + "/frame" + frameFormat.str() + ".png"; + retval.push_back(file); + } + return retval; +} + +std::string convert(std::vector frames[], std::string outfilename) { + boost::format cmdFormat("rm -rf wfr_cdir && mkdir wfr_cdir && cd wfr_cdir && ../convert_dummy.sh %1%"); + cmdFormat % outfilename; + int ret = system(cmdFormat.str().c_str()); + return std::string("wfr_cdir/") + outfilename; +} + + +std::string workflow(int activities, int framesPerActivity) { + std::vector frames[activities]; + #pragma omp parallel for + for (int t = 0; t < activities; t++) { + frames[t] = render(t, framesPerActivity*t, framesPerActivity); + } + return convert(frames, "finalMovie.gif"); +} + + +int main(int argc, char** argv) { + long activities = 400; + long framesPerActivity = 1; + bool isHelp = false; + std::string movieFile; + boost::program_options::options_description opts("Povray Options"); + opts.add_options() + ("help", "Print help message.") + ("activities", boost::program_options::value(), "Number of activities.") + ("framesPerActivity", boost::program_options::value(), "Frames per activity."); + boost::program_options::variables_map vm; + auto parsed = boost::program_options::command_line_parser(argc, argv).options(opts).allow_unregistered().run(); + boost::program_options::store(parsed, vm); + boost::program_options::notify(vm); + if (vm.count("help")) { + std::cerr << opts << std::endl; + isHelp = true; + } else { + if (vm.count("activities")) { + activities = vm["activities"].as(); + } + if (vm.count("framesPerActivity")) { + framesPerActivity = vm["framesPerActivity"].as(); + } + std::cerr << "activities = " << activities << std::endl; + std::cerr << "framesPerActivity = " << framesPerActivity << std::endl; + } + std::string finalMovie = workflow(activities, framesPerActivity); + return 0; +} + diff --git a/src/povray/wfr/povray.iwir b/src/povray/wfr/povray.iwir new file mode 100755 index 0000000..78259d0 --- /dev/null +++ b/src/povray/wfr/povray.iwir @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/povray/wfr/repo/povray.properties b/src/povray/wfr/repo/povray.properties new file mode 100755 index 0000000..705322e --- /dev/null +++ b/src/povray/wfr/repo/povray.properties @@ -0,0 +1,8 @@ + +wfinput=povray/wfInput.code +wfoutput=povray/wfOutput.code +includes=povray/includes.code + +atomicTask.0=povray/Render.properties +atomicTask.1=povray/Convert.properties + diff --git a/src/povray/wfr/repo/povray/Convert.code b/src/povray/wfr/repo/povray/Convert.code new file mode 100755 index 0000000..460d296 --- /dev/null +++ b/src/povray/wfr/repo/povray/Convert.code @@ -0,0 +1,8 @@ + boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + boost::format cmdFormat("cd %1% && ../convert_dummy.sh %2%"); + cmdFormat % wpath.string() % sin->outFileName.getValue(); + int ret = system(cmdFormat.str().c_str()); + boost::filesystem::path outPath(wpath); + outPath/=sin->outFileName.getValue(); + sout->outFile.setValue(boost::filesystem::canonical(outPath).string()); + \ No newline at end of file diff --git a/src/povray/wfr/repo/povray/Convert.properties b/src/povray/wfr/repo/povray/Convert.properties new file mode 100755 index 0000000..6c08adb --- /dev/null +++ b/src/povray/wfr/repo/povray/Convert.properties @@ -0,0 +1,4 @@ + +name=Convert +entries=1 +entry.0=Convert.code diff --git a/src/povray/wfr/repo/povray/Render.code b/src/povray/wfr/repo/povray/Render.code new file mode 100755 index 0000000..de5b048 --- /dev/null +++ b/src/povray/wfr/repo/povray/Render.code @@ -0,0 +1,18 @@ + boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + boost::format cmdFormat("cd %1% && ../render_dummy.sh %2% %3%"); + cmdFormat % wpath.string() % sin->startFrame.getValue() % sin->numFrames.getValue(); + int ret = system(cmdFormat.str().c_str()); + boost::filesystem::path prefix = boost::filesystem::canonical(wpath); + prefix /= std::string("frame"); + sout->frames.init(sin->numFrames.getValue()); + boost::format frameFormat("%1$d"); + wfr::wfr_id_t i = 0; + for (long t = sin->startFrame.getValue(); t < sin->startFrame.getValue() + sin->numFrames.getValue(); t++) { + frameFormat % t; + boost::filesystem::path frame = prefix; + frame += frameFormat.str(); + frame += std::string(".png"); + sout->frames.setEntryValue(i++, frame.string()); + } + sout->frames.setFinalised(true); + \ No newline at end of file diff --git a/src/povray/wfr/repo/povray/Render.properties b/src/povray/wfr/repo/povray/Render.properties new file mode 100755 index 0000000..bf53d5a --- /dev/null +++ b/src/povray/wfr/repo/povray/Render.properties @@ -0,0 +1,4 @@ + +name=Render +entries=1 +entry.0=Render.code diff --git a/src/povray/wfr/repo/povray/includes.code b/src/povray/wfr/repo/povray/includes.code new file mode 100755 index 0000000..f6300c7 --- /dev/null +++ b/src/povray/wfr/repo/povray/includes.code @@ -0,0 +1,2 @@ +#include +#include \ No newline at end of file diff --git a/src/povray/wfr/repo/povray/wfInput.code b/src/povray/wfr/repo/povray/wfInput.code new file mode 100755 index 0000000..e53ba8c --- /dev/null +++ b/src/povray/wfr/repo/povray/wfInput.code @@ -0,0 +1,55 @@ + long totalFrames = 400; + long framesPerActivity = 10; + std::string povFile = "inputdata/scherk.pov"; + std::string iniFile = "inputdata/scherk.ini"; + std::string argFile = "inputdata/scherk.args"; + std::string movieFile = "finalMovie.gif"; + bool isHelp = false; + boost::program_options::options_description opts("Povray Options"); + opts.add_options() + ("help", "Print help message.") + ("totalFrames", boost::program_options::value(), "Total frames.") + ("framesPerActivity", boost::program_options::value(), "Frames per activity.") + ("povFile", boost::program_options::value(), "Pov file.") + ("iniFile", boost::program_options::value(), "Ini file.") + ("argFile", boost::program_options::value(), "Args file.") + ("movieFile", boost::program_options::value(), "Output file."); + boost::program_options::variables_map vm; + auto parsed = boost::program_options::command_line_parser(argc, argv).options(opts).allow_unregistered().run(); + boost::program_options::store(parsed, vm); + boost::program_options::notify(vm); + if (vm.count("help")) { + std::cerr << opts << std::endl; + isHelp = true; + } else { + if (vm.count("totalFrames")) { + totalFrames = vm["totalFrames"].as(); + } + if (vm.count("framesPerActivity")) { + framesPerActivity = vm["framesPerActivity"].as(); + } + if (vm.count("povFile")) { + povFile = vm["povFile"].as(); + } + if (vm.count("iniFile")) { + iniFile = vm["iniFile"].as(); + } + if (vm.count("argFile")) { + argFile = vm["argFile"].as(); + } + if (vm.count("movieFile")) { + movieFile = vm["movieFile"].as(); + } + std::cerr << "totalFrames = " << totalFrames << std::endl; + std::cerr << "framesPerActivity = " << framesPerActivity << std::endl; + std::cerr << "povFile = " << povFile << std::endl; + std::cerr << "iniFile = " << iniFile << std::endl; + std::cerr << "argFile = " << argFile << std::endl; + std::cerr << "movieFile = " << movieFile << std::endl; + } + wfInput.iniFile.setValue(iniFile); + wfInput.povFile.setValue(povFile); + wfInput.argFile.setValue(argFile); + wfInput.totalFrames.setValue(totalFrames); + wfInput.framesPerActivity.setValue(framesPerActivity); + wfInput.movieName.setValue(movieFile); \ No newline at end of file diff --git a/src/povray/wfr/repo/povray/wfOutput.code b/src/povray/wfr/repo/povray/wfOutput.code new file mode 100755 index 0000000..e69de29 diff --git a/src/raincloud.test01/wfr/.directory b/src/raincloud.test01/wfr/.directory new file mode 100644 index 0000000..abfefc4 --- /dev/null +++ b/src/raincloud.test01/wfr/.directory @@ -0,0 +1,4 @@ +[Dolphin] +Timestamp=2016,11,14,13,29,47 +Version=3 +ViewMode=1 diff --git a/src/raincloud.test01/wfr/backup b/src/raincloud.test01/wfr/backup new file mode 100644 index 0000000..e1a1cdc --- /dev/null +++ b/src/raincloud.test01/wfr/backup @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/raincloud.test01/wfr/raincloud.iwir.orig b/src/raincloud.test01/wfr/raincloud.iwir.orig new file mode 100755 index 0000000..f393c22 --- /dev/null +++ b/src/raincloud.test01/wfr/raincloud.iwir.orig @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + (cond_decisionPostProcessSingle = true) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cond_decisionPostProcessFinal = true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/raincloud.test01/wfr/raincloud.test01.iwir b/src/raincloud.test01/wfr/raincloud.test01.iwir new file mode 100755 index 0000000..da8329a --- /dev/null +++ b/src/raincloud.test01/wfr/raincloud.test01.iwir @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/raincloud.test01/wfr/raincloud.test01.iwir.if01 b/src/raincloud.test01/wfr/raincloud.test01.iwir.if01 new file mode 100755 index 0000000..cb1ab70 --- /dev/null +++ b/src/raincloud.test01/wfr/raincloud.test01.iwir.if01 @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + loopCounter > 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/raincloud.test01/wfr/raincloud.test01.iwir.if02 b/src/raincloud.test01/wfr/raincloud.test01.iwir.if02 new file mode 100755 index 0000000..1de6d6a --- /dev/null +++ b/src/raincloud.test01/wfr/raincloud.test01.iwir.if02 @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + loopCounter > 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + loopCounter > 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/raincloud.test01/wfr/raincloud.test01.iwir.xml b/src/raincloud.test01/wfr/raincloud.test01.iwir.xml new file mode 100755 index 0000000..2b61074 --- /dev/null +++ b/src/raincloud.test01/wfr/raincloud.test01.iwir.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/raincloud.test01/wfr/repo/raincloud.test01.properties b/src/raincloud.test01/wfr/repo/raincloud.test01.properties new file mode 100755 index 0000000..6f7655a --- /dev/null +++ b/src/raincloud.test01/wfr/repo/raincloud.test01.properties @@ -0,0 +1,18 @@ + +wfinput=raincloud/wfInput.code +wfoutput=raincloud/wfOutput.code +includes=raincloud/includes.code + +atomicTask.0=raincloud/linearModel.properties +atomicTask.1=raincloud/postProcessFinal.properties +atomicTask.2=raincloud/postProcessSingle.properties +atomicTask.3=raincloud/prepareLM.properties +atomicTask.4=raincloud/helper01.properties +atomicTask.5=raincloud/helper02.properties +atomicTask.6=raincloud/helper03.properties +atomicTask.7=raincloud/helper04.properties +atomicTask.8=raincloud/helper05.properties +atomicTask.9=raincloud/helper06.properties +atomicTask.10=raincloud/task01.properties +atomicTask.11=raincloud/reduce01.properties + diff --git a/src/raincloud.test01/wfr/repo/raincloud/helper01.code b/src/raincloud.test01/wfr/repo/raincloud/helper01.code new file mode 100644 index 0000000..edc8e54 --- /dev/null +++ b/src/raincloud.test01/wfr/repo/raincloud/helper01.code @@ -0,0 +1 @@ +sout->PLMTar.setValue(sin->PLMTars.getEntryValue(sin->index.getValue()-1)); \ No newline at end of file diff --git a/src/raincloud.test01/wfr/repo/raincloud/helper01.properties b/src/raincloud.test01/wfr/repo/raincloud/helper01.properties new file mode 100644 index 0000000..ea9823f --- /dev/null +++ b/src/raincloud.test01/wfr/repo/raincloud/helper01.properties @@ -0,0 +1,4 @@ + +name=helper01 +entries=1 +entry.0=helper01.code diff --git a/src/raincloud.test01/wfr/repo/raincloud/helper02.code b/src/raincloud.test01/wfr/repo/raincloud/helper02.code new file mode 100644 index 0000000..67d20bd --- /dev/null +++ b/src/raincloud.test01/wfr/repo/raincloud/helper02.code @@ -0,0 +1 @@ +sout->NewNGroup.setValue(sin->NGroup.getValue()/10); \ No newline at end of file diff --git a/src/raincloud.test01/wfr/repo/raincloud/helper02.properties b/src/raincloud.test01/wfr/repo/raincloud/helper02.properties new file mode 100644 index 0000000..9b0ae23 --- /dev/null +++ b/src/raincloud.test01/wfr/repo/raincloud/helper02.properties @@ -0,0 +1,4 @@ + +name=helper02 +entries=1 +entry.0=helper02.code diff --git a/src/raincloud.test01/wfr/repo/raincloud/helper03.code b/src/raincloud.test01/wfr/repo/raincloud/helper03.code new file mode 100644 index 0000000..7109129 --- /dev/null +++ b/src/raincloud.test01/wfr/repo/raincloud/helper03.code @@ -0,0 +1,12 @@ + + auto i = (sin->index.getValue()-1)*10; + sout->PLMTar0.setValue(sin->PLMTars.getEntryValue(i)); + sout->PLMTar1.setValue(sin->PLMTars.getEntryValue(i+1)); + sout->PLMTar2.setValue(sin->PLMTars.getEntryValue(i+2)); + sout->PLMTar3.setValue(sin->PLMTars.getEntryValue(i+3)); + sout->PLMTar4.setValue(sin->PLMTars.getEntryValue(i+4)); + sout->PLMTar5.setValue(sin->PLMTars.getEntryValue(i+5)); + sout->PLMTar6.setValue(sin->PLMTars.getEntryValue(i+6)); + sout->PLMTar7.setValue(sin->PLMTars.getEntryValue(i+7)); + sout->PLMTar8.setValue(sin->PLMTars.getEntryValue(i+8)); + sout->PLMTar9.setValue(sin->PLMTars.getEntryValue(i+9)); \ No newline at end of file diff --git a/src/raincloud.test01/wfr/repo/raincloud/helper03.properties b/src/raincloud.test01/wfr/repo/raincloud/helper03.properties new file mode 100644 index 0000000..0ac8c41 --- /dev/null +++ b/src/raincloud.test01/wfr/repo/raincloud/helper03.properties @@ -0,0 +1,4 @@ + +name=helper03 +entries=1 +entry.0=helper03.code diff --git a/src/raincloud.test01/wfr/repo/raincloud/helper04.code b/src/raincloud.test01/wfr/repo/raincloud/helper04.code new file mode 100644 index 0000000..7e6da32 --- /dev/null +++ b/src/raincloud.test01/wfr/repo/raincloud/helper04.code @@ -0,0 +1,11 @@ +sout->PPSTars.setEntryValue(0, sin->PPSTar0.getValue()); +sout->PPSTars.setEntryValue(1, sin->PPSTar1.getValue()); +sout->PPSTars.setEntryValue(2, sin->PPSTar2.getValue()); +sout->PPSTars.setEntryValue(3, sin->PPSTar3.getValue()); +sout->PPSTars.setEntryValue(4, sin->PPSTar4.getValue()); +sout->PPSTars.setEntryValue(5, sin->PPSTar5.getValue()); +sout->PPSTars.setEntryValue(6, sin->PPSTar6.getValue()); +sout->PPSTars.setEntryValue(7, sin->PPSTar7.getValue()); +sout->PPSTars.setEntryValue(8, sin->PPSTar8.getValue()); +sout->PPSTars.setEntryValue(9, sin->PPSTar9.getValue()); +sout->PPSTars.setFinalised(true); \ No newline at end of file diff --git a/src/raincloud.test01/wfr/repo/raincloud/helper04.properties b/src/raincloud.test01/wfr/repo/raincloud/helper04.properties new file mode 100644 index 0000000..2229dfe --- /dev/null +++ b/src/raincloud.test01/wfr/repo/raincloud/helper04.properties @@ -0,0 +1,4 @@ + +name=helper04 +entries=1 +entry.0=helper04.code diff --git a/src/raincloud.test01/wfr/repo/raincloud/helper05.code b/src/raincloud.test01/wfr/repo/raincloud/helper05.code new file mode 100644 index 0000000..6a17110 --- /dev/null +++ b/src/raincloud.test01/wfr/repo/raincloud/helper05.code @@ -0,0 +1,4 @@ + + auto tmp01 = std::sqrt(sin->NGroup.getValue()/10); + sout->innerLoopIterCount.setValue(tmp01); + sout->outerLoopIterCount.setValue(tmp01); \ No newline at end of file diff --git a/src/raincloud.test01/wfr/repo/raincloud/helper05.properties b/src/raincloud.test01/wfr/repo/raincloud/helper05.properties new file mode 100644 index 0000000..64ef05c --- /dev/null +++ b/src/raincloud.test01/wfr/repo/raincloud/helper05.properties @@ -0,0 +1,4 @@ + +name=helper05 +entries=1 +entry.0=helper05.code diff --git a/src/raincloud.test01/wfr/repo/raincloud/helper06.code b/src/raincloud.test01/wfr/repo/raincloud/helper06.code new file mode 100644 index 0000000..4f033d2 --- /dev/null +++ b/src/raincloud.test01/wfr/repo/raincloud/helper06.code @@ -0,0 +1,12 @@ + + auto i = (sin->index1.getValue()-1)*10; + sout->PLMTar0.setValue(sin->PLMTars.getEntryValue(i)); + sout->PLMTar1.setValue(sin->PLMTars.getEntryValue(i+1)); + sout->PLMTar2.setValue(sin->PLMTars.getEntryValue(i+2)); + sout->PLMTar3.setValue(sin->PLMTars.getEntryValue(i+3)); + sout->PLMTar4.setValue(sin->PLMTars.getEntryValue(i+4)); + sout->PLMTar5.setValue(sin->PLMTars.getEntryValue(i+5)); + sout->PLMTar6.setValue(sin->PLMTars.getEntryValue(i+6)); + sout->PLMTar7.setValue(sin->PLMTars.getEntryValue(i+7)); + sout->PLMTar8.setValue(sin->PLMTars.getEntryValue(i+8)); + sout->PLMTar9.setValue(sin->PLMTars.getEntryValue(i+9)); \ No newline at end of file diff --git a/src/raincloud.test01/wfr/repo/raincloud/helper06.properties b/src/raincloud.test01/wfr/repo/raincloud/helper06.properties new file mode 100644 index 0000000..cee80dc --- /dev/null +++ b/src/raincloud.test01/wfr/repo/raincloud/helper06.properties @@ -0,0 +1,4 @@ + +name=helper06 +entries=1 +entry.0=helper06.code diff --git a/src/raincloud.test01/wfr/repo/raincloud/includes.code b/src/raincloud.test01/wfr/repo/raincloud/includes.code new file mode 100755 index 0000000..4f2676a --- /dev/null +++ b/src/raincloud.test01/wfr/repo/raincloud/includes.code @@ -0,0 +1 @@ +#include \ No newline at end of file diff --git a/src/raincloud.test01/wfr/repo/raincloud/linearModel.code b/src/raincloud.test01/wfr/repo/raincloud/linearModel.code new file mode 100755 index 0000000..852a261 --- /dev/null +++ b/src/raincloud.test01/wfr/repo/raincloud/linearModel.code @@ -0,0 +1,14 @@ + /*boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + char cmd[2048]; + snprintf(cmd, 2048, "cd %s && ../linearModelDummy.sh %d", wpath.string().c_str(), WFR_SELF_GETITERATIONID()); + int ret = system(cmd); + char file1[1024]; + snprintf(file1, 1024, "%s/LMout_g.tar.gz", wpath.string().c_str()); + sout->LMTar.setValue(std::string(file1)); + char file2[1024]; + snprintf(file2, 1024, "%s/out.txt", wpath.string().c_str()); + sout->outfile.setValue(std::string(file2));*/ + + sout->LMTar.setValue(std::string("file1")); + sout->outfile.setValue(std::string("file2")); + \ No newline at end of file diff --git a/src/raincloud.test01/wfr/repo/raincloud/linearModel.properties b/src/raincloud.test01/wfr/repo/raincloud/linearModel.properties new file mode 100755 index 0000000..575cb1d --- /dev/null +++ b/src/raincloud.test01/wfr/repo/raincloud/linearModel.properties @@ -0,0 +1,4 @@ + +name=linearModel +entries=1 +entry.0=linearModel.code diff --git a/src/raincloud.test01/wfr/repo/raincloud/postProcessFinal.code b/src/raincloud.test01/wfr/repo/raincloud/postProcessFinal.code new file mode 100755 index 0000000..091f489 --- /dev/null +++ b/src/raincloud.test01/wfr/repo/raincloud/postProcessFinal.code @@ -0,0 +1,10 @@ + /*boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + char cmd[2048]; + snprintf(cmd, 2048, "cd %s && ../postProcessFinalDummy.sh", wpath.string().c_str()); + int ret = system(cmd); + char file1[1024]; + snprintf(file1, 1024, "%s/FINAL.tar.gz", wpath.string().c_str()); + sout->finalTar.setValue(file1);*/ + + sout->finalTar.setValue("file1"); + \ No newline at end of file diff --git a/src/raincloud.test01/wfr/repo/raincloud/postProcessFinal.properties b/src/raincloud.test01/wfr/repo/raincloud/postProcessFinal.properties new file mode 100755 index 0000000..6a2dcce --- /dev/null +++ b/src/raincloud.test01/wfr/repo/raincloud/postProcessFinal.properties @@ -0,0 +1,4 @@ + +name=postProcessFinal +entries=1 +entry.0=postProcessFinal.code diff --git a/src/raincloud.test01/wfr/repo/raincloud/postProcessSingle.code b/src/raincloud.test01/wfr/repo/raincloud/postProcessSingle.code new file mode 100755 index 0000000..3715ed4 --- /dev/null +++ b/src/raincloud.test01/wfr/repo/raincloud/postProcessSingle.code @@ -0,0 +1,10 @@ + /*auto lmtar = sin->LMTar.getValue(); + boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + char cmd[2048]; + snprintf(cmd, 2048, "cd %s && ../postProcessSingleDummy.sh %d", wpath.string().c_str(), WFR_SELF_GETITERATIONID()); + int ret = system(cmd); + char file1[1024]; + snprintf(file1, 1024, "%s/PPSout_g.tar.gz", wpath.string().c_str()); + sout->finalTar.setValue(file1);*/ + + sout->PPSTar.setValue("file1"); \ No newline at end of file diff --git a/src/raincloud.test01/wfr/repo/raincloud/postProcessSingle.properties b/src/raincloud.test01/wfr/repo/raincloud/postProcessSingle.properties new file mode 100755 index 0000000..1aa9db0 --- /dev/null +++ b/src/raincloud.test01/wfr/repo/raincloud/postProcessSingle.properties @@ -0,0 +1,4 @@ + +name=postProcessSingle +entries=1 +entry.0=postProcessSingle.code diff --git a/src/raincloud.test01/wfr/repo/raincloud/prepareLM.code b/src/raincloud.test01/wfr/repo/raincloud/prepareLM.code new file mode 100755 index 0000000..f475219 --- /dev/null +++ b/src/raincloud.test01/wfr/repo/raincloud/prepareLM.code @@ -0,0 +1,5 @@ + for (int t = 0; t < sin->NGroup.getValue(); t++) { + sout->PLMlistTars.setEntryValue(t, std::string("file")); + } + sout->PLMlistTars.setFinalised(true); + \ No newline at end of file diff --git a/src/raincloud.test01/wfr/repo/raincloud/prepareLM.properties b/src/raincloud.test01/wfr/repo/raincloud/prepareLM.properties new file mode 100755 index 0000000..93bd76e --- /dev/null +++ b/src/raincloud.test01/wfr/repo/raincloud/prepareLM.properties @@ -0,0 +1,4 @@ + +name=prepareLM +entries=1 +entry.0=prepareLM.code diff --git a/src/raincloud.test01/wfr/repo/raincloud/reduce01.code b/src/raincloud.test01/wfr/repo/raincloud/reduce01.code new file mode 100644 index 0000000..680c79a --- /dev/null +++ b/src/raincloud.test01/wfr/repo/raincloud/reduce01.code @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/src/raincloud.test01/wfr/repo/raincloud/reduce01.properties b/src/raincloud.test01/wfr/repo/raincloud/reduce01.properties new file mode 100644 index 0000000..5175e09 --- /dev/null +++ b/src/raincloud.test01/wfr/repo/raincloud/reduce01.properties @@ -0,0 +1,4 @@ + +name=reduce01 +entries=1 +entry.0=reduce01.code diff --git a/src/raincloud.test01/wfr/repo/raincloud/task01.code b/src/raincloud.test01/wfr/repo/raincloud/task01.code new file mode 100644 index 0000000..f7c84d4 --- /dev/null +++ b/src/raincloud.test01/wfr/repo/raincloud/task01.code @@ -0,0 +1,3 @@ + + sout->output.setValue(sin->loopCounter.getValue()); + \ No newline at end of file diff --git a/src/raincloud.test01/wfr/repo/raincloud/task01.properties b/src/raincloud.test01/wfr/repo/raincloud/task01.properties new file mode 100644 index 0000000..0a50c36 --- /dev/null +++ b/src/raincloud.test01/wfr/repo/raincloud/task01.properties @@ -0,0 +1,4 @@ + +name=task01 +entries=1 +entry.0=task01.code diff --git a/src/raincloud.test01/wfr/repo/raincloud/wfInput.code b/src/raincloud.test01/wfr/repo/raincloud/wfInput.code new file mode 100755 index 0000000..39ff57e --- /dev/null +++ b/src/raincloud.test01/wfr/repo/raincloud/wfInput.code @@ -0,0 +1,76 @@ + std::string var1 = "0:2500:12000"; + long fac1 = 1; + std::string var2 = "250:10:310"; + long fac2 = 1; + long ngroup = 8; + bool decisionPostProcessFinal = true; + bool decisionPostProcessSingle = true; + std::string topo = "input/Topography.tar.gz"; + std::string datain = "input/DataIN.tar.gz"; + bool isHelp = false; + boost::program_options::options_description opts("Raincloud Options"); + opts.add_options() + ("help", "Print help message.") + ("var1", boost::program_options::value(), "Var1 parameter.") + ("fac1", boost::program_options::value(), "Fac1 parameter.") + ("var2", boost::program_options::value(), "Var2 parameter.") + ("fac2", boost::program_options::value(), "Fac2 parameter.") + ("ngroup", boost::program_options::value(), "NGroup parameter.") + ("decisionPostProcessFinal", boost::program_options::value(), "DecisionPostProcessFinal parameter.") + ("decisionPostProcessSingle", boost::program_options::value(), "DecisionPostProcessSingle parameter.") + ("topo", boost::program_options::value(), "Topography file.") + ("datain", boost::program_options::value(), "DataIN file."); + boost::program_options::variables_map vm; + auto parsed = boost::program_options::command_line_parser(argc, argv).options(opts).allow_unregistered().run(); + boost::program_options::store(parsed, vm); + boost::program_options::notify(vm); + if (vm.count("help")) { + std::cerr << opts << std::endl; + isHelp = true; + } else { + if (vm.count("var1")) { + var1 = vm["var1"].as(); + } + if (vm.count("fac1")) { + fac1 = vm["fac1"].as(); + } + if (vm.count("var2")) { + var2 = vm["var2"].as(); + } + if (vm.count("fac2")) { + fac2 = vm["fac2"].as(); + } + if (vm.count("ngroup")) { + ngroup = vm["ngroup"].as(); + } + if (vm.count("decisionPostProcessFinal")) { + decisionPostProcessFinal = vm["decisionPostProcessFinal"].as(); + } + if (vm.count("decisionPostProcessSingle")) { + decisionPostProcessSingle = vm["decisionPostProcessSingle"].as(); + } + if (vm.count("topo")) { + topo = vm["topo"].as(); + } + if (vm.count("datain")) { + datain = vm["datain"].as(); + } + std::cerr << "var1 = " << var1 << std::endl; + std::cerr << "fac1 = " << fac1 << std::endl; + std::cerr << "var2 = " << var2 << std::endl; + std::cerr << "fac2 = " << fac2 << std::endl; + std::cerr << "ngroup = " << ngroup << std::endl; + std::cerr << "decisionPostProcessFinal = " << decisionPostProcessFinal << std::endl; + std::cerr << "decisionPostProcessSingle = " << decisionPostProcessSingle << std::endl; + std::cerr << "topo = " << topo << std::endl; + std::cerr << "datain = " << datain << std::endl; + } + wfInput.Var1.setValue(var1); + wfInput.Fac1.setValue(fac1); + wfInput.Var2.setValue(var2); + wfInput.Fac2.setValue(fac2); + wfInput.NGroup.setValue(ngroup); + wfInput.decisionPostProcessFinal.setValue(decisionPostProcessFinal); + wfInput.decisionPostProcessSingle.setValue(decisionPostProcessSingle); + wfInput.topo.setValue(topo); + wfInput.datain.setValue(datain); \ No newline at end of file diff --git a/src/raincloud.test01/wfr/repo/raincloud/wfOutput.code b/src/raincloud.test01/wfr/repo/raincloud/wfOutput.code new file mode 100755 index 0000000..916facf --- /dev/null +++ b/src/raincloud.test01/wfr/repo/raincloud/wfOutput.code @@ -0,0 +1,9 @@ + std::cout << "\nFinalTars:\n==========\n"; + for (unsigned t = 0; t < wfOutput.finalTars.getSize(); t++) { + std::cout << wfOutput.finalTars.getEntryValue(t) << std::endl; + } + std::cout << "\nOutFiles:\n==========\n"; + for (unsigned t = 0; t < wfOutput.outfiles.getSize(); t++) { + std::cout << wfOutput.outfiles.getEntryValue(t) << std::endl; + } + \ No newline at end of file diff --git a/src/raincloud.transformed/wfr/raincloud.transformed.iwir b/src/raincloud.transformed/wfr/raincloud.transformed.iwir new file mode 100644 index 0000000..c8b1b6c --- /dev/null +++ b/src/raincloud.transformed/wfr/raincloud.transformed.iwir @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + (condDecisionPostProcessSingle = true) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + condDecisionPostProcessFinal = true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/raincloud.transformed/wfr/repo/raincloud.transformed.properties b/src/raincloud.transformed/wfr/repo/raincloud.transformed.properties new file mode 100755 index 0000000..58bc59d --- /dev/null +++ b/src/raincloud.transformed/wfr/repo/raincloud.transformed.properties @@ -0,0 +1,10 @@ + +wfinput=raincloud/wfInput.code +wfoutput=raincloud/wfOutput.code +includes=raincloud/includes.code + +atomicTask.0=raincloud/linearModel.properties +atomicTask.1=raincloud/postProcessFinal.properties +atomicTask.2=raincloud/postProcessSingle.properties +atomicTask.3=raincloud/prepareLM.properties + diff --git a/src/raincloud.transformed/wfr/repo/raincloud/includes.code b/src/raincloud.transformed/wfr/repo/raincloud/includes.code new file mode 100755 index 0000000..4f2676a --- /dev/null +++ b/src/raincloud.transformed/wfr/repo/raincloud/includes.code @@ -0,0 +1 @@ +#include \ No newline at end of file diff --git a/src/raincloud.transformed/wfr/repo/raincloud/linearModel.code b/src/raincloud.transformed/wfr/repo/raincloud/linearModel.code new file mode 100755 index 0000000..852a261 --- /dev/null +++ b/src/raincloud.transformed/wfr/repo/raincloud/linearModel.code @@ -0,0 +1,14 @@ + /*boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + char cmd[2048]; + snprintf(cmd, 2048, "cd %s && ../linearModelDummy.sh %d", wpath.string().c_str(), WFR_SELF_GETITERATIONID()); + int ret = system(cmd); + char file1[1024]; + snprintf(file1, 1024, "%s/LMout_g.tar.gz", wpath.string().c_str()); + sout->LMTar.setValue(std::string(file1)); + char file2[1024]; + snprintf(file2, 1024, "%s/out.txt", wpath.string().c_str()); + sout->outfile.setValue(std::string(file2));*/ + + sout->LMTar.setValue(std::string("file1")); + sout->outfile.setValue(std::string("file2")); + \ No newline at end of file diff --git a/src/raincloud.transformed/wfr/repo/raincloud/linearModel.properties b/src/raincloud.transformed/wfr/repo/raincloud/linearModel.properties new file mode 100755 index 0000000..575cb1d --- /dev/null +++ b/src/raincloud.transformed/wfr/repo/raincloud/linearModel.properties @@ -0,0 +1,4 @@ + +name=linearModel +entries=1 +entry.0=linearModel.code diff --git a/src/raincloud.transformed/wfr/repo/raincloud/postProcessFinal.code b/src/raincloud.transformed/wfr/repo/raincloud/postProcessFinal.code new file mode 100755 index 0000000..091f489 --- /dev/null +++ b/src/raincloud.transformed/wfr/repo/raincloud/postProcessFinal.code @@ -0,0 +1,10 @@ + /*boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + char cmd[2048]; + snprintf(cmd, 2048, "cd %s && ../postProcessFinalDummy.sh", wpath.string().c_str()); + int ret = system(cmd); + char file1[1024]; + snprintf(file1, 1024, "%s/FINAL.tar.gz", wpath.string().c_str()); + sout->finalTar.setValue(file1);*/ + + sout->finalTar.setValue("file1"); + \ No newline at end of file diff --git a/src/raincloud.transformed/wfr/repo/raincloud/postProcessFinal.properties b/src/raincloud.transformed/wfr/repo/raincloud/postProcessFinal.properties new file mode 100755 index 0000000..6a2dcce --- /dev/null +++ b/src/raincloud.transformed/wfr/repo/raincloud/postProcessFinal.properties @@ -0,0 +1,4 @@ + +name=postProcessFinal +entries=1 +entry.0=postProcessFinal.code diff --git a/src/raincloud.transformed/wfr/repo/raincloud/postProcessSingle.code b/src/raincloud.transformed/wfr/repo/raincloud/postProcessSingle.code new file mode 100755 index 0000000..3715ed4 --- /dev/null +++ b/src/raincloud.transformed/wfr/repo/raincloud/postProcessSingle.code @@ -0,0 +1,10 @@ + /*auto lmtar = sin->LMTar.getValue(); + boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + char cmd[2048]; + snprintf(cmd, 2048, "cd %s && ../postProcessSingleDummy.sh %d", wpath.string().c_str(), WFR_SELF_GETITERATIONID()); + int ret = system(cmd); + char file1[1024]; + snprintf(file1, 1024, "%s/PPSout_g.tar.gz", wpath.string().c_str()); + sout->finalTar.setValue(file1);*/ + + sout->PPSTar.setValue("file1"); \ No newline at end of file diff --git a/src/raincloud.transformed/wfr/repo/raincloud/postProcessSingle.properties b/src/raincloud.transformed/wfr/repo/raincloud/postProcessSingle.properties new file mode 100755 index 0000000..1aa9db0 --- /dev/null +++ b/src/raincloud.transformed/wfr/repo/raincloud/postProcessSingle.properties @@ -0,0 +1,4 @@ + +name=postProcessSingle +entries=1 +entry.0=postProcessSingle.code diff --git a/src/raincloud.transformed/wfr/repo/raincloud/prepareLM.code b/src/raincloud.transformed/wfr/repo/raincloud/prepareLM.code new file mode 100755 index 0000000..04b09db --- /dev/null +++ b/src/raincloud.transformed/wfr/repo/raincloud/prepareLM.code @@ -0,0 +1,17 @@ + /*boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + char cmd[2048]; + snprintf(cmd, 2048, "cd %s && ../prepareLMDummy.sh %d", wpath.string().c_str(), sin->NGroup.getValue()); + printf("%s\n", cmd); + int ret = system(cmd); + for (int t = 0; t < sin->NGroup.getValue(); t++) { + char file[1024]; + snprintf(file, 1024, "%s/PLMout_g_uid%d.tar.gz", wpath.string().c_str(), t+1); + sout->PLMlistTars.setEntryValue(t, std::string(file)); + } + sout->PLMlistTars.setFinalised(true);*/ + + for (int t = 0; t < sin->NGroup.getValue(); t++) { + sout->PLMlistTars.setEntryValue(t, std::string("file")); + } + sout->PLMlistTars.setFinalised(true); + \ No newline at end of file diff --git a/src/raincloud.transformed/wfr/repo/raincloud/prepareLM.properties b/src/raincloud.transformed/wfr/repo/raincloud/prepareLM.properties new file mode 100755 index 0000000..93bd76e --- /dev/null +++ b/src/raincloud.transformed/wfr/repo/raincloud/prepareLM.properties @@ -0,0 +1,4 @@ + +name=prepareLM +entries=1 +entry.0=prepareLM.code diff --git a/src/raincloud.transformed/wfr/repo/raincloud/wfInput.code b/src/raincloud.transformed/wfr/repo/raincloud/wfInput.code new file mode 100755 index 0000000..39ff57e --- /dev/null +++ b/src/raincloud.transformed/wfr/repo/raincloud/wfInput.code @@ -0,0 +1,76 @@ + std::string var1 = "0:2500:12000"; + long fac1 = 1; + std::string var2 = "250:10:310"; + long fac2 = 1; + long ngroup = 8; + bool decisionPostProcessFinal = true; + bool decisionPostProcessSingle = true; + std::string topo = "input/Topography.tar.gz"; + std::string datain = "input/DataIN.tar.gz"; + bool isHelp = false; + boost::program_options::options_description opts("Raincloud Options"); + opts.add_options() + ("help", "Print help message.") + ("var1", boost::program_options::value(), "Var1 parameter.") + ("fac1", boost::program_options::value(), "Fac1 parameter.") + ("var2", boost::program_options::value(), "Var2 parameter.") + ("fac2", boost::program_options::value(), "Fac2 parameter.") + ("ngroup", boost::program_options::value(), "NGroup parameter.") + ("decisionPostProcessFinal", boost::program_options::value(), "DecisionPostProcessFinal parameter.") + ("decisionPostProcessSingle", boost::program_options::value(), "DecisionPostProcessSingle parameter.") + ("topo", boost::program_options::value(), "Topography file.") + ("datain", boost::program_options::value(), "DataIN file."); + boost::program_options::variables_map vm; + auto parsed = boost::program_options::command_line_parser(argc, argv).options(opts).allow_unregistered().run(); + boost::program_options::store(parsed, vm); + boost::program_options::notify(vm); + if (vm.count("help")) { + std::cerr << opts << std::endl; + isHelp = true; + } else { + if (vm.count("var1")) { + var1 = vm["var1"].as(); + } + if (vm.count("fac1")) { + fac1 = vm["fac1"].as(); + } + if (vm.count("var2")) { + var2 = vm["var2"].as(); + } + if (vm.count("fac2")) { + fac2 = vm["fac2"].as(); + } + if (vm.count("ngroup")) { + ngroup = vm["ngroup"].as(); + } + if (vm.count("decisionPostProcessFinal")) { + decisionPostProcessFinal = vm["decisionPostProcessFinal"].as(); + } + if (vm.count("decisionPostProcessSingle")) { + decisionPostProcessSingle = vm["decisionPostProcessSingle"].as(); + } + if (vm.count("topo")) { + topo = vm["topo"].as(); + } + if (vm.count("datain")) { + datain = vm["datain"].as(); + } + std::cerr << "var1 = " << var1 << std::endl; + std::cerr << "fac1 = " << fac1 << std::endl; + std::cerr << "var2 = " << var2 << std::endl; + std::cerr << "fac2 = " << fac2 << std::endl; + std::cerr << "ngroup = " << ngroup << std::endl; + std::cerr << "decisionPostProcessFinal = " << decisionPostProcessFinal << std::endl; + std::cerr << "decisionPostProcessSingle = " << decisionPostProcessSingle << std::endl; + std::cerr << "topo = " << topo << std::endl; + std::cerr << "datain = " << datain << std::endl; + } + wfInput.Var1.setValue(var1); + wfInput.Fac1.setValue(fac1); + wfInput.Var2.setValue(var2); + wfInput.Fac2.setValue(fac2); + wfInput.NGroup.setValue(ngroup); + wfInput.decisionPostProcessFinal.setValue(decisionPostProcessFinal); + wfInput.decisionPostProcessSingle.setValue(decisionPostProcessSingle); + wfInput.topo.setValue(topo); + wfInput.datain.setValue(datain); \ No newline at end of file diff --git a/src/raincloud.transformed/wfr/repo/raincloud/wfOutput.code b/src/raincloud.transformed/wfr/repo/raincloud/wfOutput.code new file mode 100755 index 0000000..916facf --- /dev/null +++ b/src/raincloud.transformed/wfr/repo/raincloud/wfOutput.code @@ -0,0 +1,9 @@ + std::cout << "\nFinalTars:\n==========\n"; + for (unsigned t = 0; t < wfOutput.finalTars.getSize(); t++) { + std::cout << wfOutput.finalTars.getEntryValue(t) << std::endl; + } + std::cout << "\nOutFiles:\n==========\n"; + for (unsigned t = 0; t < wfOutput.outfiles.getSize(); t++) { + std::cout << wfOutput.outfiles.getEntryValue(t) << std::endl; + } + \ No newline at end of file diff --git a/src/raincloud/askalon/raincloud.agwl.template b/src/raincloud/askalon/raincloud.agwl.template new file mode 100755 index 0000000..5aa711f --- /dev/null +++ b/src/raincloud/askalon/raincloud.agwl.template @@ -0,0 +1,305 @@ + + + + + + Memory + boolean + none + single + + + + + Memory + boolean + none + single + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + Memory + integer + none + single + + + + + Memory + string + none + single + + + + + Memory + integer + none + single + + + + + Memory + string + none + single + + + + + Memory + integer + none + single + + + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + Memory + integer + none + single + + + + + Memory + string + none + single + + + + + Memory + integer + none + single + + + + + Memory + string + none + single + + + + + Memory + integer + none + single + + + + + + + FileSystem + File + none + multiple + + + + + + + + FileSystem + File + none + single + + + + + + + + FileSystem + File + none + single + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + + ( Raincloud/decisionPostProcessSingle = true ) + + + + + + FileSystem + File + none + single + + + + + + + FileSystem + File + none + single + + + + + + + + + + FileSystem + File + none + single + + + + + + + + + FileSystem + File + none + multiple + + + + + FileSystem + File + none + multiple + + + + + + + + + + + + + + FileSystem + File + none + multiple + + + + + + + FileSystem + File + none + single + + + + + + + + + + FileSystem + File + none + multiple + + + + + + + + + FileSystem + File + none + multiple + + + + + FileSystem + File + none + multiple + + + + diff --git a/src/raincloud/askalon/raincloud.gwdd b/src/raincloud/askalon/raincloud.gwdd new file mode 100755 index 0000000..109ab29 --- /dev/null +++ b/src/raincloud/askalon/raincloud.gwdd @@ -0,0 +1,51 @@ + +application = raincloud +raincloud.environment = ssh + + +DELIM = AND +raincloud.type = wfr-experiments +raincloud.domain = wfr-experiments + + +raincloud.activities=prepareLM-dummy linearModel-dummy postProcessSingle-dummy postProcessFinal-dummy + +raincloud.accessPaths=localhost:/home/matthias/ifigner-experiments/raincloud-dummy/raincloud-dummy + + + + +prepareLM-dummy.executable=prepareLMDummy.sh +prepareLM-dummy.usage=[NGroup] +prepareLM-dummy.inports=topo Topography.tar.gz agwl:file AND \ + datain DataIN.tar.gz agwl:file AND \ + NGroup xxx xs:integer AND \ + VAR1 xxx xs:string AND \ + FAC1 xxx xs:integer AND \ + VAR2 xxx xs:string AND \ + FAC2 xxx xs:integer +prepareLM-dummy.outports=PLMlistTars ^PLMout_g_uid[0-9]+[.]tar[.]gz$ agwl:collection + + + +linearModel-dummy.executable=linearModelDummy.sh +linearModel-dummy.usage=0 +linearModel-dummy.inports=PLMTar PLMout_g.tar.gz agwl:file +linearModel-dummy.outports=LMTar 0_LMout_g.tar.gz agwl:file AND \ + outfile 0_out.txt agwl:file + + + +postProcessSingle-dummy.executable=postProcessSingleDummy.sh +postProcessSingle-dummy.usage=0 +postProcessSingle-dummy.inports=LMTar LMout_g.tar.gz agwl:file +postProcessSingle-dummy.outports=PPSTar 0_PPSout_g.tar.gz agwl:file + + + +postProcessFinal-dummy.executable=postProcessFinalDummy.sh +postProcessFinal-dummy.usage= +postProcessFinal-dummy.inports=PPSlistTars PPSlistTars agwl:collection +postProcessFinal-dummy.outports=finalTar FINAL.tar.gz agwl:file + + diff --git a/src/raincloud/askalon/raincloud.teuta b/src/raincloud/askalon/raincloud.teuta new file mode 100755 index 0000000..c36ddce --- /dev/null +++ b/src/raincloud/askalon/raincloud.teuta @@ -0,0 +1,799 @@ + + + + + controlflow + + + + + + + + + + action + activity + + + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + Memory + integer + none + single + + + + + Memory + string + none + single + + + + + Memory + integer + none + single + + + + + Memory + string + none + single + + + + + Memory + integer + none + single + + + + + + + FileSystem + File + none + multiple + + + + + + + + controlflow + + + + + + + + + + expansionregion + parallelforeach + + + + + + + + + + FileSystem + File + none + multiple + + + + + FileSystem + File + none + multiple + + + + + + + + + FileSystem + File + none + single + + + + + + + + initialnode + + + + + + + + Memory + boolean + none + single + + + + + Memory + boolean + none + single + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + Memory + integer + none + single + + + + + Memory + string + none + single + + + + + Memory + integer + none + single + + + + + Memory + string + none + single + + + + + Memory + integer + none + single + + + + + + + + controlflow + + + + + + + + + + action + activity + + + + + + + + + FileSystem + File + none + single + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + + + + decisionnode + + + + + + + + + + + + + + Memory + integer + none + single + + + + + + controlflow + + + + + + + + + + controlflow + + + + + + + + + + controlflow + + + + + + + + + + action + activity + + + + + + + + + FileSystem + File + none + multiple + + + + + + + FileSystem + File + none + single + + + + + + + + mergenode + + + + + + FileSystem + File + none + single + + + + + + + action + activity + + + + + + + + + FileSystem + File + none + single + + + + + + + FileSystem + File + none + single + + + + + + + + controlflow + + + + + + + + + + controlflow + + + + + + + + + + activityfinalnode + + + + + + FileSystem + File + none + multiple + + + + + FileSystem + File + none + multiple + + + + + + + controlflow + + + + + + + + + + decisionnode + + + + + + + ( Raincloud/decisionPostProcessSingle = true ) + + + + + Memory + integer + none + single + + + + + + controlflow + + + + + + + + + + controlflow + + + + + + + + + + controlflow + + + + + + + + + + controlflow + + + + + + + + + + controlflow + + + + + + + + + + controlflow + + + + + + + + + + controlflow + + + + + + + + + + mergenode + + + + + + FileSystem + File + none + multiple + + + + + + + controlflow + + + + + + + + + + + + + 30 + 30 + 165 + 30 + ffffc0 + + + 120 + 45 + 120 + 75 + ffffc0 + + + 330 + 330 + 15 + 150 + ffcc99 + + + 120 + 45 + 120 + 180 + ffffc0 + + + 30 + 30 + 165 + 255 + ffffc0 + + + 120 + 45 + 30 + 315 + ffffc0 + + + 30 + 30 + 165 + 390 + ffffc0 + + + 30 + 30 + 165 + 510 + ffffc0 + + + 120 + 45 + 30 + 570 + ffffc0 + + + 30 + 30 + 165 + 645 + ffffc0 + + + 30 + 30 + 165 + 705 + ffffc0 + + + + + Orthogonal + 1.0 + 000000 + + + + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + + Orthogonal + 1.0 + 000000 + + + + + + + diff --git a/src/raincloud/openmp/raincloud.cpp b/src/raincloud/openmp/raincloud.cpp new file mode 100755 index 0000000..02797ee --- /dev/null +++ b/src/raincloud/openmp/raincloud.cpp @@ -0,0 +1,112 @@ +#include +#include +#include +#include +#include + + + +std::vector prepareLM(uint64_t ngroup) { + std::vector retval; + char cmd[2048]; + snprintf(cmd, 2048, "rm -rf wfr_plm_workdir && mkdir wfr_plm_workdir && cd wfr_plm_workdir && ../prepareLMDummy.sh %d", ngroup); + int ret = system(cmd); + for (int t = 0; t < ngroup; t++) { + char file[1024]; + snprintf(file, 1024, "wfr_plm_workdir/PLMout_g_uid%d.tar.gz", t+1); + retval.push_back(std::string(file)); + } + return retval; +} + +void linearModel(std::string infile, int id, std::string& outfile1, std::string& outfile2) { + char cmd[2048]; + snprintf(cmd, 2048, "rm -rf wfr_lm_workdir_%d && mkdir wfr_lm_workdir_%d && cd wfr_lm_workdir_%d && ../linearModelDummy.sh %d", id, id, id, id); + int ret = system(cmd); + char file1[1024]; + snprintf(file1, 1024, "wfr_lm_workdir_%d/LMout_g.tar.gz", id); + outfile1 = std::string(file1); + char file2[1024]; + snprintf(file2, 1024, "wfr_lm_workdir_%d/out.txt", id); + outfile2 = std::string(file2); +} + +std::string postProcessSingle(int id, std::string infile) { + char cmd[2048]; + snprintf(cmd, 2048, "rm -rf wfr_pps_workdir_%d && mkdir wfr_pps_workdir_%d && cd wfr_pps_workdir_%d && ../postProcessSingleDummy.sh %d", id, id, id, id); + int ret = system(cmd); + char file1[1024]; + snprintf(file1, 1024, "wfr_pps_workdir_%d/PPSout_g.tar.gz", id); + return std::string(file1); +} + +std::string postProcessFinal() { + char cmd[2048]; + snprintf(cmd, 2048, "rm -rf wfr_ppf_workdir && mkdir wfr_ppf_workdir && cd wfr_ppf_workdir && ../postProcessFinalDummy.sh"); + int ret = system(cmd); + return std::string("wfr_ppf_workdir/std::string"); +} + + + +std::string workflow(int ngroup, bool isPPS, bool isPPF) { + auto plmTars = prepareLM(ngroup); + int tmax = plmTars.size(); + #pragma omp parallel for + for (int t = 0; t < tmax; t++) { + std::string file1; + std::string file2; + linearModel(plmTars.at(t), t, file1, file2); + if (isPPS) { + postProcessSingle(t, file1); + } + } + std::string retval("bla"); + if (isPPF) { + retval = postProcessFinal(); + } + return retval; +} + + + +int main(int argc, char** argv) { + long ngroup = 8; + bool decisionPostProcessFinal = true; + bool decisionPostProcessSingle = true; + bool isHelp = false; + boost::program_options::options_description opts("Raincloud Options"); + opts.add_options() + ("help", "Print help message.") + ("ngroup", boost::program_options::value(), "NGroup parameter.") + ("decisionPostProcessFinal", boost::program_options::value(), "DecisionPostProcessFinal parameter.") + ("decisionPostProcessSingle", boost::program_options::value(), "DecisionPostProcessSingle parameter."); + boost::program_options::variables_map vm; + auto parsed = boost::program_options::command_line_parser(argc, argv).options(opts).allow_unregistered().run(); + boost::program_options::store(parsed, vm); + boost::program_options::notify(vm); + if (vm.count("help")) { + std::cerr << opts << std::endl; + isHelp = true; + } else { + if (vm.count("ngroup")) { + ngroup = vm["ngroup"].as(); + } + if (vm.count("decisionPostProcessFinal")) { + decisionPostProcessFinal = vm["decisionPostProcessFinal"].as(); + } + if (vm.count("decisionPostProcessSingle")) { + decisionPostProcessSingle = vm["decisionPostProcessSingle"].as(); + } + std::cerr << "ngroup = " << ngroup << std::endl; + std::cerr << "decisionPostProcessFinal = " << decisionPostProcessFinal << std::endl; + std::cerr << "decisionPostProcessSingle = " << decisionPostProcessSingle << std::endl; + } + std::string out = workflow(ngroup, decisionPostProcessSingle, decisionPostProcessFinal); + std::cout << "Out: " << out << std::endl; + return 0; +} + + + + diff --git a/src/raincloud/wfr/raincloud.iwir b/src/raincloud/wfr/raincloud.iwir new file mode 100755 index 0000000..f393c22 --- /dev/null +++ b/src/raincloud/wfr/raincloud.iwir @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + (cond_decisionPostProcessSingle = true) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cond_decisionPostProcessFinal = true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/raincloud/wfr/raincloud.iwir.orig b/src/raincloud/wfr/raincloud.iwir.orig new file mode 100755 index 0000000..f393c22 --- /dev/null +++ b/src/raincloud/wfr/raincloud.iwir.orig @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + (cond_decisionPostProcessSingle = true) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cond_decisionPostProcessFinal = true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/raincloud/wfr/raincloud.iwir.trans b/src/raincloud/wfr/raincloud.iwir.trans new file mode 100755 index 0000000..0e489c8 --- /dev/null +++ b/src/raincloud/wfr/raincloud.iwir.trans @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ( cond_decisionPostProcessSingle = true ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cond_decisionPostProcessFinal = true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/raincloud/wfr/raincloud.transformed.iwir b/src/raincloud/wfr/raincloud.transformed.iwir new file mode 100644 index 0000000..63be11c --- /dev/null +++ b/src/raincloud/wfr/raincloud.transformed.iwir @@ -0,0 +1,169 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + (condDecisionPostProcessSingle = true) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + (condDecisionPostProcessFinal = true) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/raincloud/wfr/repo/raincloud.properties b/src/raincloud/wfr/repo/raincloud.properties new file mode 100755 index 0000000..58bc59d --- /dev/null +++ b/src/raincloud/wfr/repo/raincloud.properties @@ -0,0 +1,10 @@ + +wfinput=raincloud/wfInput.code +wfoutput=raincloud/wfOutput.code +includes=raincloud/includes.code + +atomicTask.0=raincloud/linearModel.properties +atomicTask.1=raincloud/postProcessFinal.properties +atomicTask.2=raincloud/postProcessSingle.properties +atomicTask.3=raincloud/prepareLM.properties + diff --git a/src/raincloud/wfr/repo/raincloud/includes.code b/src/raincloud/wfr/repo/raincloud/includes.code new file mode 100755 index 0000000..4f2676a --- /dev/null +++ b/src/raincloud/wfr/repo/raincloud/includes.code @@ -0,0 +1 @@ +#include \ No newline at end of file diff --git a/src/raincloud/wfr/repo/raincloud/linearModel.code b/src/raincloud/wfr/repo/raincloud/linearModel.code new file mode 100755 index 0000000..852a261 --- /dev/null +++ b/src/raincloud/wfr/repo/raincloud/linearModel.code @@ -0,0 +1,14 @@ + /*boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + char cmd[2048]; + snprintf(cmd, 2048, "cd %s && ../linearModelDummy.sh %d", wpath.string().c_str(), WFR_SELF_GETITERATIONID()); + int ret = system(cmd); + char file1[1024]; + snprintf(file1, 1024, "%s/LMout_g.tar.gz", wpath.string().c_str()); + sout->LMTar.setValue(std::string(file1)); + char file2[1024]; + snprintf(file2, 1024, "%s/out.txt", wpath.string().c_str()); + sout->outfile.setValue(std::string(file2));*/ + + sout->LMTar.setValue(std::string("file1")); + sout->outfile.setValue(std::string("file2")); + \ No newline at end of file diff --git a/src/raincloud/wfr/repo/raincloud/linearModel.properties b/src/raincloud/wfr/repo/raincloud/linearModel.properties new file mode 100755 index 0000000..575cb1d --- /dev/null +++ b/src/raincloud/wfr/repo/raincloud/linearModel.properties @@ -0,0 +1,4 @@ + +name=linearModel +entries=1 +entry.0=linearModel.code diff --git a/src/raincloud/wfr/repo/raincloud/postProcessFinal.code b/src/raincloud/wfr/repo/raincloud/postProcessFinal.code new file mode 100755 index 0000000..091f489 --- /dev/null +++ b/src/raincloud/wfr/repo/raincloud/postProcessFinal.code @@ -0,0 +1,10 @@ + /*boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + char cmd[2048]; + snprintf(cmd, 2048, "cd %s && ../postProcessFinalDummy.sh", wpath.string().c_str()); + int ret = system(cmd); + char file1[1024]; + snprintf(file1, 1024, "%s/FINAL.tar.gz", wpath.string().c_str()); + sout->finalTar.setValue(file1);*/ + + sout->finalTar.setValue("file1"); + \ No newline at end of file diff --git a/src/raincloud/wfr/repo/raincloud/postProcessFinal.properties b/src/raincloud/wfr/repo/raincloud/postProcessFinal.properties new file mode 100755 index 0000000..6a2dcce --- /dev/null +++ b/src/raincloud/wfr/repo/raincloud/postProcessFinal.properties @@ -0,0 +1,4 @@ + +name=postProcessFinal +entries=1 +entry.0=postProcessFinal.code diff --git a/src/raincloud/wfr/repo/raincloud/postProcessSingle.code b/src/raincloud/wfr/repo/raincloud/postProcessSingle.code new file mode 100755 index 0000000..3715ed4 --- /dev/null +++ b/src/raincloud/wfr/repo/raincloud/postProcessSingle.code @@ -0,0 +1,10 @@ + /*auto lmtar = sin->LMTar.getValue(); + boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + char cmd[2048]; + snprintf(cmd, 2048, "cd %s && ../postProcessSingleDummy.sh %d", wpath.string().c_str(), WFR_SELF_GETITERATIONID()); + int ret = system(cmd); + char file1[1024]; + snprintf(file1, 1024, "%s/PPSout_g.tar.gz", wpath.string().c_str()); + sout->finalTar.setValue(file1);*/ + + sout->PPSTar.setValue("file1"); \ No newline at end of file diff --git a/src/raincloud/wfr/repo/raincloud/postProcessSingle.properties b/src/raincloud/wfr/repo/raincloud/postProcessSingle.properties new file mode 100755 index 0000000..1aa9db0 --- /dev/null +++ b/src/raincloud/wfr/repo/raincloud/postProcessSingle.properties @@ -0,0 +1,4 @@ + +name=postProcessSingle +entries=1 +entry.0=postProcessSingle.code diff --git a/src/raincloud/wfr/repo/raincloud/prepareLM.code b/src/raincloud/wfr/repo/raincloud/prepareLM.code new file mode 100755 index 0000000..04b09db --- /dev/null +++ b/src/raincloud/wfr/repo/raincloud/prepareLM.code @@ -0,0 +1,17 @@ + /*boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + char cmd[2048]; + snprintf(cmd, 2048, "cd %s && ../prepareLMDummy.sh %d", wpath.string().c_str(), sin->NGroup.getValue()); + printf("%s\n", cmd); + int ret = system(cmd); + for (int t = 0; t < sin->NGroup.getValue(); t++) { + char file[1024]; + snprintf(file, 1024, "%s/PLMout_g_uid%d.tar.gz", wpath.string().c_str(), t+1); + sout->PLMlistTars.setEntryValue(t, std::string(file)); + } + sout->PLMlistTars.setFinalised(true);*/ + + for (int t = 0; t < sin->NGroup.getValue(); t++) { + sout->PLMlistTars.setEntryValue(t, std::string("file")); + } + sout->PLMlistTars.setFinalised(true); + \ No newline at end of file diff --git a/src/raincloud/wfr/repo/raincloud/prepareLM.properties b/src/raincloud/wfr/repo/raincloud/prepareLM.properties new file mode 100755 index 0000000..93bd76e --- /dev/null +++ b/src/raincloud/wfr/repo/raincloud/prepareLM.properties @@ -0,0 +1,4 @@ + +name=prepareLM +entries=1 +entry.0=prepareLM.code diff --git a/src/raincloud/wfr/repo/raincloud/wfInput.code b/src/raincloud/wfr/repo/raincloud/wfInput.code new file mode 100755 index 0000000..39ff57e --- /dev/null +++ b/src/raincloud/wfr/repo/raincloud/wfInput.code @@ -0,0 +1,76 @@ + std::string var1 = "0:2500:12000"; + long fac1 = 1; + std::string var2 = "250:10:310"; + long fac2 = 1; + long ngroup = 8; + bool decisionPostProcessFinal = true; + bool decisionPostProcessSingle = true; + std::string topo = "input/Topography.tar.gz"; + std::string datain = "input/DataIN.tar.gz"; + bool isHelp = false; + boost::program_options::options_description opts("Raincloud Options"); + opts.add_options() + ("help", "Print help message.") + ("var1", boost::program_options::value(), "Var1 parameter.") + ("fac1", boost::program_options::value(), "Fac1 parameter.") + ("var2", boost::program_options::value(), "Var2 parameter.") + ("fac2", boost::program_options::value(), "Fac2 parameter.") + ("ngroup", boost::program_options::value(), "NGroup parameter.") + ("decisionPostProcessFinal", boost::program_options::value(), "DecisionPostProcessFinal parameter.") + ("decisionPostProcessSingle", boost::program_options::value(), "DecisionPostProcessSingle parameter.") + ("topo", boost::program_options::value(), "Topography file.") + ("datain", boost::program_options::value(), "DataIN file."); + boost::program_options::variables_map vm; + auto parsed = boost::program_options::command_line_parser(argc, argv).options(opts).allow_unregistered().run(); + boost::program_options::store(parsed, vm); + boost::program_options::notify(vm); + if (vm.count("help")) { + std::cerr << opts << std::endl; + isHelp = true; + } else { + if (vm.count("var1")) { + var1 = vm["var1"].as(); + } + if (vm.count("fac1")) { + fac1 = vm["fac1"].as(); + } + if (vm.count("var2")) { + var2 = vm["var2"].as(); + } + if (vm.count("fac2")) { + fac2 = vm["fac2"].as(); + } + if (vm.count("ngroup")) { + ngroup = vm["ngroup"].as(); + } + if (vm.count("decisionPostProcessFinal")) { + decisionPostProcessFinal = vm["decisionPostProcessFinal"].as(); + } + if (vm.count("decisionPostProcessSingle")) { + decisionPostProcessSingle = vm["decisionPostProcessSingle"].as(); + } + if (vm.count("topo")) { + topo = vm["topo"].as(); + } + if (vm.count("datain")) { + datain = vm["datain"].as(); + } + std::cerr << "var1 = " << var1 << std::endl; + std::cerr << "fac1 = " << fac1 << std::endl; + std::cerr << "var2 = " << var2 << std::endl; + std::cerr << "fac2 = " << fac2 << std::endl; + std::cerr << "ngroup = " << ngroup << std::endl; + std::cerr << "decisionPostProcessFinal = " << decisionPostProcessFinal << std::endl; + std::cerr << "decisionPostProcessSingle = " << decisionPostProcessSingle << std::endl; + std::cerr << "topo = " << topo << std::endl; + std::cerr << "datain = " << datain << std::endl; + } + wfInput.Var1.setValue(var1); + wfInput.Fac1.setValue(fac1); + wfInput.Var2.setValue(var2); + wfInput.Fac2.setValue(fac2); + wfInput.NGroup.setValue(ngroup); + wfInput.decisionPostProcessFinal.setValue(decisionPostProcessFinal); + wfInput.decisionPostProcessSingle.setValue(decisionPostProcessSingle); + wfInput.topo.setValue(topo); + wfInput.datain.setValue(datain); \ No newline at end of file diff --git a/src/raincloud/wfr/repo/raincloud/wfOutput.code b/src/raincloud/wfr/repo/raincloud/wfOutput.code new file mode 100755 index 0000000..916facf --- /dev/null +++ b/src/raincloud/wfr/repo/raincloud/wfOutput.code @@ -0,0 +1,9 @@ + std::cout << "\nFinalTars:\n==========\n"; + for (unsigned t = 0; t < wfOutput.finalTars.getSize(); t++) { + std::cout << wfOutput.finalTars.getEntryValue(t) << std::endl; + } + std::cout << "\nOutFiles:\n==========\n"; + for (unsigned t = 0; t < wfOutput.outfiles.getSize(); t++) { + std::cout << wfOutput.outfiles.getEntryValue(t) << std::endl; + } + \ No newline at end of file diff --git a/src/sparselu-for-trans01/wfr/repo/sparselu-for-trans01.properties b/src/sparselu-for-trans01/wfr/repo/sparselu-for-trans01.properties new file mode 100755 index 0000000..52be0a1 --- /dev/null +++ b/src/sparselu-for-trans01/wfr/repo/sparselu-for-trans01.properties @@ -0,0 +1,10 @@ + +wfinput=sparselu-for/wfInput.code +wfoutput=sparselu-for/wfOutput.code +includes=sparselu-for/includes.code + +atomicTask.0=sparselu-for/lu0.properties +atomicTask.1=sparselu-for/fwd.properties +atomicTask.2=sparselu-for/bmod.properties +atomicTask.3=sparselu-for/bdiv.properties + diff --git a/src/sparselu-for-trans01/wfr/repo/sparselu-for/bdiv.code b/src/sparselu-for-trans01/wfr/repo/sparselu-for/bdiv.code new file mode 100755 index 0000000..4eda043 --- /dev/null +++ b/src/sparselu-for-trans01/wfr/repo/sparselu-for/bdiv.code @@ -0,0 +1,11 @@ + /*boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + boost::format cmdFormat("cd %1% && ../bdiv.sh bdiv.out"); + cmdFormat % wpath.string(); + int ret = system(cmdFormat.str().c_str()); + boost::filesystem::path outFile = boost::filesystem::canonical(wpath); + outFile /= std::string("bdiv.out"); + sout->bdivOut.setValue(outFile.string());*/ + + EXECUTE_SIMULATION_MODE; + sout->bdivOut.setValue("bdiv.out"); + \ No newline at end of file diff --git a/src/sparselu-for-trans01/wfr/repo/sparselu-for/bdiv.properties b/src/sparselu-for-trans01/wfr/repo/sparselu-for/bdiv.properties new file mode 100755 index 0000000..0190605 --- /dev/null +++ b/src/sparselu-for-trans01/wfr/repo/sparselu-for/bdiv.properties @@ -0,0 +1,4 @@ +name=bdiv +entries=1 +entry.0=bdiv.code +entrymetadata.0={{"exectime.cpusocket0", "12"}, {"exectime.cpusocket1", "3"}, {"exectime.cpusocket2", "9"}, {"exectime.cpusocket3", "2"}} diff --git a/src/sparselu-for-trans01/wfr/repo/sparselu-for/bmod.code b/src/sparselu-for-trans01/wfr/repo/sparselu-for/bmod.code new file mode 100755 index 0000000..1c7f4a1 --- /dev/null +++ b/src/sparselu-for-trans01/wfr/repo/sparselu-for/bmod.code @@ -0,0 +1,11 @@ + /*boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + boost::format cmdFormat("cd %1% && ../bmod.sh bmod.out"); + cmdFormat % wpath.string(); + int ret = system(cmdFormat.str().c_str()); + boost::filesystem::path outFile = boost::filesystem::canonical(wpath); + outFile /= std::string("bmod.out"); + sout->bmodOut.setValue(outFile.string());*/ + + EXECUTE_SIMULATION_MODE; + sout->bmodOut.setValue("bmod.out"); + \ No newline at end of file diff --git a/src/sparselu-for-trans01/wfr/repo/sparselu-for/bmod.properties b/src/sparselu-for-trans01/wfr/repo/sparselu-for/bmod.properties new file mode 100755 index 0000000..9623a9f --- /dev/null +++ b/src/sparselu-for-trans01/wfr/repo/sparselu-for/bmod.properties @@ -0,0 +1,4 @@ +name=bmod +entries=1 +entry.0=bmod.code +entrymetadata.0={{"exectime.cpusocket0", "1"}, {"exectime.cpusocket1", "5"}, {"exectime.cpusocket2", "3"}, {"exectime.cpusocket3", "7"}} diff --git a/src/sparselu-for-trans01/wfr/repo/sparselu-for/fwd.code b/src/sparselu-for-trans01/wfr/repo/sparselu-for/fwd.code new file mode 100755 index 0000000..6c7e3c7 --- /dev/null +++ b/src/sparselu-for-trans01/wfr/repo/sparselu-for/fwd.code @@ -0,0 +1,11 @@ + /*boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + boost::format cmdFormat("cd %1% && ../fwd.sh fwd.out"); + cmdFormat % wpath.string(); + int ret = system(cmdFormat.str().c_str()); + boost::filesystem::path outFile = boost::filesystem::canonical(wpath); + outFile /= std::string("fwd.out"); + sout->fwdOut.setValue(outFile.string());*/ + + EXECUTE_SIMULATION_MODE; + sout->fwdOut.setValue("fdw.out"); + \ No newline at end of file diff --git a/src/sparselu-for-trans01/wfr/repo/sparselu-for/fwd.properties b/src/sparselu-for-trans01/wfr/repo/sparselu-for/fwd.properties new file mode 100755 index 0000000..d4f097b --- /dev/null +++ b/src/sparselu-for-trans01/wfr/repo/sparselu-for/fwd.properties @@ -0,0 +1,4 @@ +name=fwd +entries=1 +entry.0=fwd.code +entrymetadata.0={{"exectime.cpusocket0", "2"}, {"exectime.cpusocket1", "12"}, {"exectime.cpusocket2", "4"}, {"exectime.cpusocket3", "11"}} diff --git a/src/sparselu-for-trans01/wfr/repo/sparselu-for/includes.code b/src/sparselu-for-trans01/wfr/repo/sparselu-for/includes.code new file mode 100755 index 0000000..f68c36f --- /dev/null +++ b/src/sparselu-for-trans01/wfr/repo/sparselu-for/includes.code @@ -0,0 +1,2 @@ +#include +#include \ No newline at end of file diff --git a/src/sparselu-for-trans01/wfr/repo/sparselu-for/lu0.code b/src/sparselu-for-trans01/wfr/repo/sparselu-for/lu0.code new file mode 100755 index 0000000..2cc77d1 --- /dev/null +++ b/src/sparselu-for-trans01/wfr/repo/sparselu-for/lu0.code @@ -0,0 +1,11 @@ + /*boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + boost::format cmdFormat("cd %1% && ../lu0.sh lu0.out"); + cmdFormat % wpath.string(); + int ret = system(cmdFormat.str().c_str()); + boost::filesystem::path outFile = boost::filesystem::canonical(wpath); + outFile /= std::string("lu0.out"); + sout->lu0Out.setValue(outFile.string());*/ + + EXECUTE_SIMULATION_MODE; + sout->lu0Out.setValue("lu0.out"); + \ No newline at end of file diff --git a/src/sparselu-for-trans01/wfr/repo/sparselu-for/lu0.properties b/src/sparselu-for-trans01/wfr/repo/sparselu-for/lu0.properties new file mode 100755 index 0000000..dd1ea42 --- /dev/null +++ b/src/sparselu-for-trans01/wfr/repo/sparselu-for/lu0.properties @@ -0,0 +1,4 @@ +name=lu0 +entries=1 +entry.0=lu0.code +entrymetadata.0={{"exectime.cpusocket0", "4"}, {"exectime.cpusocket1", "2"}, {"exectime.cpusocket2", "5"}, {"exectime.cpusocket3", "8"}} diff --git a/src/sparselu-for-trans01/wfr/repo/sparselu-for/wfInput.code b/src/sparselu-for-trans01/wfr/repo/sparselu-for/wfInput.code new file mode 100755 index 0000000..8775b89 --- /dev/null +++ b/src/sparselu-for-trans01/wfr/repo/sparselu-for/wfInput.code @@ -0,0 +1,28 @@ + long forCounter = 2; + long pforCounter = 2; + bool isHelp = false; + boost::program_options::options_description opts("Sparselu-For Options"); + opts.add_options() + ("help", "Print help message.") + ("forCounter", boost::program_options::value(), "for iterations.") + ("pforCounter", boost::program_options::value(), "pfor iterations."); + boost::program_options::variables_map vm; + auto parsed = boost::program_options::command_line_parser(argc, argv).options(opts).allow_unregistered().run(); + boost::program_options::store(parsed, vm); + boost::program_options::notify(vm); + if (vm.count("help")) { + std::cerr << opts << std::endl; + isHelp = true; + } else { + if (vm.count("forCounter")) { + forCounter = vm["forCounter"].as(); + } + if (vm.count("pforCounter")) { + pforCounter = vm["pforCounter"].as(); + } + std::cerr << "forCounter = " << forCounter << std::endl; + std::cerr << "pforCounter = " << pforCounter << std::endl; + } + wfInput.lu0In.setValue("inputs/lu0_in"); + wfInput.forCounter.setValue(forCounter); + wfInput.pforCounter.setValue(pforCounter); \ No newline at end of file diff --git a/src/sparselu-for-trans01/wfr/repo/sparselu-for/wfOutput.code b/src/sparselu-for-trans01/wfr/repo/sparselu-for/wfOutput.code new file mode 100755 index 0000000..e69de29 diff --git a/src/sparselu-for-trans01/wfr/sparselu-for-trans01.iwir b/src/sparselu-for-trans01/wfr/sparselu-for-trans01.iwir new file mode 100755 index 0000000..a68ad0a --- /dev/null +++ b/src/sparselu-for-trans01/wfr/sparselu-for-trans01.iwir @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/sparselu-for/askalon/sparselu-for.agwl.template b/src/sparselu-for/askalon/sparselu-for.agwl.template new file mode 100755 index 0000000..14d4e6f --- /dev/null +++ b/src/sparselu-for/askalon/sparselu-for.agwl.template @@ -0,0 +1,234 @@ + + + + + + Memory + integer + none + single + + + + + Memory + integer + none + single + + + + + FileSystem + File + none + single + + + + + + + + Memory + integer + none + single + + + + + + + + + FileSystem + File + none + single + + + + + + + FileSystem + File + none + single + + + + + + + + Memory + integer + none + single + + + + + + + + FileSystem + File + none + single + + + + + + + FileSystem + File + none + single + + + + + + + + + FileSystem + File + none + multiple + + + + + + + + Memory + integer + none + single + + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + multiple + + + + + + + FileSystem + File + none + single + + + + + + + + + FileSystem + File + none + multiple + + + + + + + + Memory + integer + none + single + + + + + + + + FileSystem + File + none + multiple + + + + + FileSystem + File + none + single + + + + + + + FileSystem + File + none + single + + + + + + + + + FileSystem + File + none + multiple + + + + + + + + + FileSystem + File + none + multiple + + + + + + + + + FileSystem + File + none + multiple + + + + diff --git a/src/sparselu-for/askalon/sparselu-for.gwdd b/src/sparselu-for/askalon/sparselu-for.gwdd new file mode 100755 index 0000000..938cb39 --- /dev/null +++ b/src/sparselu-for/askalon/sparselu-for.gwdd @@ -0,0 +1,46 @@ + +application = sparselu-for +sparselu-for.environment = ssh + + +DELIM = AND +sparselu-for.type = wfr-experiments +sparselu-for.domain = wfr-experiments + + +sparselu-for.activities=lu0-dummy fwd-dummy bdiv-dummy bmod-dummy + +sparselu-for.accessPaths=localhost:/home/matthias/ifigner-experiments/sparcelu-for/sparselu-dummy + + + + +lu0-dummy.executable=lu0.sh +lu0-dummy.usage=lu0Out +lu0-dummy.inports=lu0In lu0In agwl:file +lu0-dummy.outports=lu0Out lu0Out agwl:file + + + +fwd-dummy.executable=fwd.sh +fwd-dummy.usage=fwdOut +fwd-dummy.inports=fwdIn fwdIn agwl:file +fwd-dummy.outports=fwdOut fwdOut agwl:file + + + +bdiv-dummy.executable=bdiv.sh +bdiv-dummy.usage=bdivOut +bdiv-dummy.inports=bdivIn bdivIn agwl:file AND \ + fwdOuts fwdOuts agwl:collection +bdiv-dummy.outports=bdivOut bdivOut agwl:file + + + +bmod-dummy.executable=bmod.sh +bmod-dummy.usage=bmodOut +bmod-dummy.inports=bmodIn bmodIn agwl:file AND \ + bdivOuts bdivOuts agwl:collection +bmod-dummy.outports=bmodOut bmodOut agwl:file + + diff --git a/src/sparselu-for/openmp/sparselu-for.cpp b/src/sparselu-for/openmp/sparselu-for.cpp new file mode 100755 index 0000000..2359213 --- /dev/null +++ b/src/sparselu-for/openmp/sparselu-for.cpp @@ -0,0 +1,107 @@ +#include +#include +#include +#include +#include + + + +std::string lu0() { + boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder("lu0"); + boost::format cmdFormat("cd %1% && ../lu0.sh lu0.out"); + cmdFormat % wpath.string(); + int ret = system(cmdFormat.str().c_str()); + boost::filesystem::path outFile = boost::filesystem::canonical(wpath); + outFile /= std::string("lu0.out"); + return outFile.string(); +} + + +std::string fwd(std::string lu0_out) { + boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder("fwd"); + boost::format cmdFormat("cd %1% && ../fwd.sh fwd.out"); + cmdFormat % wpath.string(); + int ret = system(cmdFormat.str().c_str()); + boost::filesystem::path outFile = boost::filesystem::canonical(wpath); + outFile /= std::string("fwd.out"); + return outFile.string(); +} + + +std::string bdiv(std::string fwd_outs[]) { + boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder("bdiv"); + boost::format cmdFormat("cd %1% && ../bdiv.sh bdiv.out"); + cmdFormat % wpath.string(); + int ret = system(cmdFormat.str().c_str()); + boost::filesystem::path outFile = boost::filesystem::canonical(wpath); + outFile /= std::string("bdiv.out"); + return outFile.string(); +} + + +std::string bmod(std::string bdiv_outs[]) { + boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder("bmod"); + boost::format cmdFormat("cd %1% && ../bmod.sh bmod.out"); + cmdFormat % wpath.string(); + int ret = system(cmdFormat.str().c_str()); + boost::filesystem::path outFile = boost::filesystem::canonical(wpath); + outFile /= std::string("bmod.out"); + return outFile.string(); +} + + +void workflow(long forCounter, long pforCounter) { + for (int i = 0; i < forCounter; i++) { + std::string lu0_out = lu0(); + std::string fwd_outs[pforCounter]; + #pragma omp parallel for + for (int j = 0; j < pforCounter; j++) { + fwd_outs[j] = fwd(lu0_out); + } + std::string bdiv_outs[pforCounter]; + #pragma omp parallel for + for (int j = 0; j < pforCounter; j++) { + bdiv_outs[j] = bdiv(fwd_outs); + } + std::string bmod_outs[pforCounter]; + #pragma omp parallel for + for (int j = 0; j < pforCounter; j++) { + bmod_outs[j] = bmod(bdiv_outs); + } + } +} + + +int main(int argc, char** argv) { + + // Fill workflow input struct + long forCounter = 2; + long pforCounter = 2; + bool isHelp = false; + boost::program_options::options_description opts("Sparselu-For Options"); + opts.add_options() + ("help", "Print help message.") + ("forCounter", boost::program_options::value(), "for iterations.") + ("pforCounter", boost::program_options::value(), "pfor iterations."); + boost::program_options::variables_map vm; + auto parsed = boost::program_options::command_line_parser(argc, argv).options(opts).allow_unregistered().run(); + boost::program_options::store(parsed, vm); + boost::program_options::notify(vm); + if (vm.count("help")) { + std::cerr << opts << std::endl; + isHelp = true; + exit(0); + } else { + if (vm.count("forCounter")) { + forCounter = vm["forCounter"].as(); + } + if (vm.count("pforCounter")) { + pforCounter = vm["pforCounter"].as(); + } + std::cerr << "forCounter = " << forCounter << std::endl; + std::cerr << "pforCounter = " << pforCounter << std::endl; + } + workflow(forCounter, pforCounter); + + return 0; +} diff --git a/src/sparselu-for/wfr/repo/sparselu-for.properties b/src/sparselu-for/wfr/repo/sparselu-for.properties new file mode 100755 index 0000000..52be0a1 --- /dev/null +++ b/src/sparselu-for/wfr/repo/sparselu-for.properties @@ -0,0 +1,10 @@ + +wfinput=sparselu-for/wfInput.code +wfoutput=sparselu-for/wfOutput.code +includes=sparselu-for/includes.code + +atomicTask.0=sparselu-for/lu0.properties +atomicTask.1=sparselu-for/fwd.properties +atomicTask.2=sparselu-for/bmod.properties +atomicTask.3=sparselu-for/bdiv.properties + diff --git a/src/sparselu-for/wfr/repo/sparselu-for/bdiv.code b/src/sparselu-for/wfr/repo/sparselu-for/bdiv.code new file mode 100755 index 0000000..4eda043 --- /dev/null +++ b/src/sparselu-for/wfr/repo/sparselu-for/bdiv.code @@ -0,0 +1,11 @@ + /*boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + boost::format cmdFormat("cd %1% && ../bdiv.sh bdiv.out"); + cmdFormat % wpath.string(); + int ret = system(cmdFormat.str().c_str()); + boost::filesystem::path outFile = boost::filesystem::canonical(wpath); + outFile /= std::string("bdiv.out"); + sout->bdivOut.setValue(outFile.string());*/ + + EXECUTE_SIMULATION_MODE; + sout->bdivOut.setValue("bdiv.out"); + \ No newline at end of file diff --git a/src/sparselu-for/wfr/repo/sparselu-for/bdiv.properties b/src/sparselu-for/wfr/repo/sparselu-for/bdiv.properties new file mode 100755 index 0000000..0190605 --- /dev/null +++ b/src/sparselu-for/wfr/repo/sparselu-for/bdiv.properties @@ -0,0 +1,4 @@ +name=bdiv +entries=1 +entry.0=bdiv.code +entrymetadata.0={{"exectime.cpusocket0", "12"}, {"exectime.cpusocket1", "3"}, {"exectime.cpusocket2", "9"}, {"exectime.cpusocket3", "2"}} diff --git a/src/sparselu-for/wfr/repo/sparselu-for/bmod.code b/src/sparselu-for/wfr/repo/sparselu-for/bmod.code new file mode 100755 index 0000000..1c7f4a1 --- /dev/null +++ b/src/sparselu-for/wfr/repo/sparselu-for/bmod.code @@ -0,0 +1,11 @@ + /*boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + boost::format cmdFormat("cd %1% && ../bmod.sh bmod.out"); + cmdFormat % wpath.string(); + int ret = system(cmdFormat.str().c_str()); + boost::filesystem::path outFile = boost::filesystem::canonical(wpath); + outFile /= std::string("bmod.out"); + sout->bmodOut.setValue(outFile.string());*/ + + EXECUTE_SIMULATION_MODE; + sout->bmodOut.setValue("bmod.out"); + \ No newline at end of file diff --git a/src/sparselu-for/wfr/repo/sparselu-for/bmod.properties b/src/sparselu-for/wfr/repo/sparselu-for/bmod.properties new file mode 100755 index 0000000..9623a9f --- /dev/null +++ b/src/sparselu-for/wfr/repo/sparselu-for/bmod.properties @@ -0,0 +1,4 @@ +name=bmod +entries=1 +entry.0=bmod.code +entrymetadata.0={{"exectime.cpusocket0", "1"}, {"exectime.cpusocket1", "5"}, {"exectime.cpusocket2", "3"}, {"exectime.cpusocket3", "7"}} diff --git a/src/sparselu-for/wfr/repo/sparselu-for/fwd.code b/src/sparselu-for/wfr/repo/sparselu-for/fwd.code new file mode 100755 index 0000000..6c7e3c7 --- /dev/null +++ b/src/sparselu-for/wfr/repo/sparselu-for/fwd.code @@ -0,0 +1,11 @@ + /*boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + boost::format cmdFormat("cd %1% && ../fwd.sh fwd.out"); + cmdFormat % wpath.string(); + int ret = system(cmdFormat.str().c_str()); + boost::filesystem::path outFile = boost::filesystem::canonical(wpath); + outFile /= std::string("fwd.out"); + sout->fwdOut.setValue(outFile.string());*/ + + EXECUTE_SIMULATION_MODE; + sout->fwdOut.setValue("fdw.out"); + \ No newline at end of file diff --git a/src/sparselu-for/wfr/repo/sparselu-for/fwd.properties b/src/sparselu-for/wfr/repo/sparselu-for/fwd.properties new file mode 100755 index 0000000..d4f097b --- /dev/null +++ b/src/sparselu-for/wfr/repo/sparselu-for/fwd.properties @@ -0,0 +1,4 @@ +name=fwd +entries=1 +entry.0=fwd.code +entrymetadata.0={{"exectime.cpusocket0", "2"}, {"exectime.cpusocket1", "12"}, {"exectime.cpusocket2", "4"}, {"exectime.cpusocket3", "11"}} diff --git a/src/sparselu-for/wfr/repo/sparselu-for/includes.code b/src/sparselu-for/wfr/repo/sparselu-for/includes.code new file mode 100755 index 0000000..f68c36f --- /dev/null +++ b/src/sparselu-for/wfr/repo/sparselu-for/includes.code @@ -0,0 +1,2 @@ +#include +#include \ No newline at end of file diff --git a/src/sparselu-for/wfr/repo/sparselu-for/lu0.code b/src/sparselu-for/wfr/repo/sparselu-for/lu0.code new file mode 100755 index 0000000..2cc77d1 --- /dev/null +++ b/src/sparselu-for/wfr/repo/sparselu-for/lu0.code @@ -0,0 +1,11 @@ + /*boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + boost::format cmdFormat("cd %1% && ../lu0.sh lu0.out"); + cmdFormat % wpath.string(); + int ret = system(cmdFormat.str().c_str()); + boost::filesystem::path outFile = boost::filesystem::canonical(wpath); + outFile /= std::string("lu0.out"); + sout->lu0Out.setValue(outFile.string());*/ + + EXECUTE_SIMULATION_MODE; + sout->lu0Out.setValue("lu0.out"); + \ No newline at end of file diff --git a/src/sparselu-for/wfr/repo/sparselu-for/lu0.properties b/src/sparselu-for/wfr/repo/sparselu-for/lu0.properties new file mode 100755 index 0000000..dd1ea42 --- /dev/null +++ b/src/sparselu-for/wfr/repo/sparselu-for/lu0.properties @@ -0,0 +1,4 @@ +name=lu0 +entries=1 +entry.0=lu0.code +entrymetadata.0={{"exectime.cpusocket0", "4"}, {"exectime.cpusocket1", "2"}, {"exectime.cpusocket2", "5"}, {"exectime.cpusocket3", "8"}} diff --git a/src/sparselu-for/wfr/repo/sparselu-for/wfInput.code b/src/sparselu-for/wfr/repo/sparselu-for/wfInput.code new file mode 100755 index 0000000..8775b89 --- /dev/null +++ b/src/sparselu-for/wfr/repo/sparselu-for/wfInput.code @@ -0,0 +1,28 @@ + long forCounter = 2; + long pforCounter = 2; + bool isHelp = false; + boost::program_options::options_description opts("Sparselu-For Options"); + opts.add_options() + ("help", "Print help message.") + ("forCounter", boost::program_options::value(), "for iterations.") + ("pforCounter", boost::program_options::value(), "pfor iterations."); + boost::program_options::variables_map vm; + auto parsed = boost::program_options::command_line_parser(argc, argv).options(opts).allow_unregistered().run(); + boost::program_options::store(parsed, vm); + boost::program_options::notify(vm); + if (vm.count("help")) { + std::cerr << opts << std::endl; + isHelp = true; + } else { + if (vm.count("forCounter")) { + forCounter = vm["forCounter"].as(); + } + if (vm.count("pforCounter")) { + pforCounter = vm["pforCounter"].as(); + } + std::cerr << "forCounter = " << forCounter << std::endl; + std::cerr << "pforCounter = " << pforCounter << std::endl; + } + wfInput.lu0In.setValue("inputs/lu0_in"); + wfInput.forCounter.setValue(forCounter); + wfInput.pforCounter.setValue(pforCounter); \ No newline at end of file diff --git a/src/sparselu-for/wfr/repo/sparselu-for/wfOutput.code b/src/sparselu-for/wfr/repo/sparselu-for/wfOutput.code new file mode 100755 index 0000000..e69de29 diff --git a/src/sparselu-for/wfr/sparselu-for.iwir b/src/sparselu-for/wfr/sparselu-for.iwir new file mode 100755 index 0000000..a1870fa --- /dev/null +++ b/src/sparselu-for/wfr/sparselu-for.iwir @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/sparselu-while/openmp/sparselu-while.cpp b/src/sparselu-while/openmp/sparselu-while.cpp new file mode 100755 index 0000000..562b5e1 --- /dev/null +++ b/src/sparselu-while/openmp/sparselu-while.cpp @@ -0,0 +1,109 @@ +#include +#include +#include +#include +#include + + + +std::string lu0() { + boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder("lu0"); + boost::format cmdFormat("cd %1% && ../lu0.sh lu0.out"); + cmdFormat % wpath.string(); + int ret = system(cmdFormat.str().c_str()); + boost::filesystem::path outFile = boost::filesystem::canonical(wpath); + outFile /= std::string("lu0.out"); + return outFile.string(); +} + + +std::string fwd(std::string lu0_out) { + boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder("fwd"); + boost::format cmdFormat("cd %1% && ../fwd.sh fwd.out"); + cmdFormat % wpath.string(); + int ret = system(cmdFormat.str().c_str()); + boost::filesystem::path outFile = boost::filesystem::canonical(wpath); + outFile /= std::string("fwd.out"); + return outFile.string(); +} + + +std::string bdiv(std::string fwd_outs[]) { + boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder("bdiv"); + boost::format cmdFormat("cd %1% && ../bdiv.sh bdiv.out"); + cmdFormat % wpath.string(); + int ret = system(cmdFormat.str().c_str()); + boost::filesystem::path outFile = boost::filesystem::canonical(wpath); + outFile /= std::string("bdiv.out"); + return outFile.string(); +} + + +std::string bmod(std::string bdiv_outs[]) { + boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder("bmod"); + boost::format cmdFormat("cd %1% && ../bmod.sh bmod.out"); + cmdFormat % wpath.string(); + int ret = system(cmdFormat.str().c_str()); + boost::filesystem::path outFile = boost::filesystem::canonical(wpath); + outFile /= std::string("bmod.out"); + return outFile.string(); +} + + +void workflow(long forCounter, long pforCounter) { + int i = 0; + while (i < forCounter) { + i++; + std::string lu0_out = lu0(); + std::string fwd_outs[pforCounter]; + #pragma omp parallel for + for (int j = 0; j < pforCounter; j++) { + fwd_outs[j] = fwd(lu0_out); + } + std::string bdiv_outs[pforCounter]; + #pragma omp parallel for + for (int j = 0; j < pforCounter; j++) { + bdiv_outs[j] = bdiv(fwd_outs); + } + std::string bmod_outs[pforCounter]; + #pragma omp parallel for + for (int j = 0; j < pforCounter; j++) { + bmod_outs[j] = bmod(bdiv_outs); + } + } +} + + +int main(int argc, char** argv) { + + // Fill workflow input struct + long forCounter = 2; + long pforCounter = 2; + bool isHelp = false; + boost::program_options::options_description opts("Sparselu-For Options"); + opts.add_options() + ("help", "Print help message.") + ("forCounter", boost::program_options::value(), "while iterations.") + ("pforCounter", boost::program_options::value(), "pfor iterations."); + boost::program_options::variables_map vm; + auto parsed = boost::program_options::command_line_parser(argc, argv).options(opts).allow_unregistered().run(); + boost::program_options::store(parsed, vm); + boost::program_options::notify(vm); + if (vm.count("help")) { + std::cerr << opts << std::endl; + isHelp = true; + exit(0); + } else { + if (vm.count("forCounter")) { + forCounter = vm["forCounter"].as(); + } + if (vm.count("pforCounter")) { + pforCounter = vm["pforCounter"].as(); + } + std::cerr << "forCounter = " << forCounter << std::endl; + std::cerr << "pforCounter = " << pforCounter << std::endl; + } + workflow(forCounter, pforCounter); + + return 0; +} diff --git a/src/sparselu-while/wfr/repo/sparselu-while.properties b/src/sparselu-while/wfr/repo/sparselu-while.properties new file mode 100755 index 0000000..16984f3 --- /dev/null +++ b/src/sparselu-while/wfr/repo/sparselu-while.properties @@ -0,0 +1,10 @@ + +wfinput=sparselu-while/wfInput.code +wfoutput=sparselu-while/wfOutput.code +includes=sparselu-while/includes.code + +atomicTask.0=sparselu-while/lu0.properties +atomicTask.1=sparselu-while/fwd.properties +atomicTask.2=sparselu-while/bmod.properties +atomicTask.3=sparselu-while/bdiv.properties + diff --git a/src/sparselu-while/wfr/repo/sparselu-while/bdiv.code b/src/sparselu-while/wfr/repo/sparselu-while/bdiv.code new file mode 100755 index 0000000..cbd9e1a --- /dev/null +++ b/src/sparselu-while/wfr/repo/sparselu-while/bdiv.code @@ -0,0 +1,8 @@ + boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + boost::format cmdFormat("cd %1% && ../bdiv.sh bdiv.out"); + cmdFormat % wpath.string(); + int ret = system(cmdFormat.str().c_str()); + boost::filesystem::path outFile = boost::filesystem::canonical(wpath); + outFile /= std::string("bdiv.out"); + sout->bdivOut.setValue(outFile.string()); + \ No newline at end of file diff --git a/src/sparselu-while/wfr/repo/sparselu-while/bdiv.properties b/src/sparselu-while/wfr/repo/sparselu-while/bdiv.properties new file mode 100755 index 0000000..69f5d2e --- /dev/null +++ b/src/sparselu-while/wfr/repo/sparselu-while/bdiv.properties @@ -0,0 +1,3 @@ +name=bdiv +entries=1 +entry.0=bdiv.code diff --git a/src/sparselu-while/wfr/repo/sparselu-while/bmod.code b/src/sparselu-while/wfr/repo/sparselu-while/bmod.code new file mode 100755 index 0000000..9bd5693 --- /dev/null +++ b/src/sparselu-while/wfr/repo/sparselu-while/bmod.code @@ -0,0 +1,8 @@ + boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + boost::format cmdFormat("cd %1% && ../bmod.sh bmod.out"); + cmdFormat % wpath.string(); + int ret = system(cmdFormat.str().c_str()); + boost::filesystem::path outFile = boost::filesystem::canonical(wpath); + outFile /= std::string("bmod.out"); + sout->bmodOut.setValue(outFile.string()); + \ No newline at end of file diff --git a/src/sparselu-while/wfr/repo/sparselu-while/bmod.properties b/src/sparselu-while/wfr/repo/sparselu-while/bmod.properties new file mode 100755 index 0000000..2e099a2 --- /dev/null +++ b/src/sparselu-while/wfr/repo/sparselu-while/bmod.properties @@ -0,0 +1,3 @@ +name=bmod +entries=1 +entry.0=bmod.code diff --git a/src/sparselu-while/wfr/repo/sparselu-while/fwd.code b/src/sparselu-while/wfr/repo/sparselu-while/fwd.code new file mode 100755 index 0000000..2116292 --- /dev/null +++ b/src/sparselu-while/wfr/repo/sparselu-while/fwd.code @@ -0,0 +1,8 @@ + boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + boost::format cmdFormat("cd %1% && ../fwd.sh fwd.out"); + cmdFormat % wpath.string(); + int ret = system(cmdFormat.str().c_str()); + boost::filesystem::path outFile = boost::filesystem::canonical(wpath); + outFile /= std::string("fwd.out"); + sout->fwdOut.setValue(outFile.string()); + \ No newline at end of file diff --git a/src/sparselu-while/wfr/repo/sparselu-while/fwd.properties b/src/sparselu-while/wfr/repo/sparselu-while/fwd.properties new file mode 100755 index 0000000..57d1916 --- /dev/null +++ b/src/sparselu-while/wfr/repo/sparselu-while/fwd.properties @@ -0,0 +1,3 @@ +name=fwd +entries=1 +entry.0=fwd.code diff --git a/src/sparselu-while/wfr/repo/sparselu-while/includes.code b/src/sparselu-while/wfr/repo/sparselu-while/includes.code new file mode 100755 index 0000000..f68c36f --- /dev/null +++ b/src/sparselu-while/wfr/repo/sparselu-while/includes.code @@ -0,0 +1,2 @@ +#include +#include \ No newline at end of file diff --git a/src/sparselu-while/wfr/repo/sparselu-while/lu0.code b/src/sparselu-while/wfr/repo/sparselu-while/lu0.code new file mode 100755 index 0000000..4a9d892 --- /dev/null +++ b/src/sparselu-while/wfr/repo/sparselu-while/lu0.code @@ -0,0 +1,9 @@ + boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + boost::format cmdFormat("cd %1% && ../lu0.sh lu0.out"); + cmdFormat % wpath.string(); + int ret = system(cmdFormat.str().c_str()); + boost::filesystem::path outFile = boost::filesystem::canonical(wpath); + outFile /= std::string("lu0.out"); + sout->lu0Out.setValue(outFile.string()); + sout->newWhileCounter.setValue(sin->whileCounter.getValue() + 1); + \ No newline at end of file diff --git a/src/sparselu-while/wfr/repo/sparselu-while/lu0.properties b/src/sparselu-while/wfr/repo/sparselu-while/lu0.properties new file mode 100755 index 0000000..0d996d9 --- /dev/null +++ b/src/sparselu-while/wfr/repo/sparselu-while/lu0.properties @@ -0,0 +1,3 @@ +name=lu0 +entries=1 +entry.0=lu0.code diff --git a/src/sparselu-while/wfr/repo/sparselu-while/wfInput.code b/src/sparselu-while/wfr/repo/sparselu-while/wfInput.code new file mode 100755 index 0000000..1ba94ea --- /dev/null +++ b/src/sparselu-while/wfr/repo/sparselu-while/wfInput.code @@ -0,0 +1,29 @@ + long forCounter = 2; + long pforCounter = 2; + bool isHelp = false; + boost::program_options::options_description opts("Sparselu-For Options"); + opts.add_options() + ("help", "Print help message.") + ("forCounter", boost::program_options::value(), "while iterations.") + ("pforCounter", boost::program_options::value(), "pfor iterations."); + boost::program_options::variables_map vm; + auto parsed = boost::program_options::command_line_parser(argc, argv).options(opts).allow_unregistered().run(); + boost::program_options::store(parsed, vm); + boost::program_options::notify(vm); + if (vm.count("help")) { + std::cerr << opts << std::endl; + isHelp = true; + } else { + if (vm.count("forCounter")) { + forCounter = vm["forCounter"].as(); + } + if (vm.count("pforCounter")) { + pforCounter = vm["pforCounter"].as(); + } + std::cerr << "forCounter = " << forCounter << std::endl; + std::cerr << "pforCounter = " << pforCounter << std::endl; + } + wfInput.lu0In.setValue("inputs/lu0_in"); + wfInput.forCounter.setValue(forCounter); + wfInput.pforCounter.setValue(pforCounter); + wfInput.whileCounter.setValue(0); \ No newline at end of file diff --git a/src/sparselu-while/wfr/repo/sparselu-while/wfOutput.code b/src/sparselu-while/wfr/repo/sparselu-while/wfOutput.code new file mode 100755 index 0000000..e69de29 diff --git a/src/sparselu-while/wfr/sparselu-while.iwir b/src/sparselu-while/wfr/sparselu-while.iwir new file mode 100755 index 0000000..a4ce078 --- /dev/null +++ b/src/sparselu-while/wfr/sparselu-while.iwir @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + whileCounter < forCounter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/starrs-merge/askalon/starrs-merge.agwl b/src/starrs-merge/askalon/starrs-merge.agwl new file mode 100755 index 0000000..d0342a6 --- /dev/null +++ b/src/starrs-merge/askalon/starrs-merge.agwl @@ -0,0 +1,229 @@ + + + + + + FileSystem + File + none + multiple + + + + + FileSystem + File + none + multiple + + + + + FileSystem + File + none + multiple + + + + + Memory + integer + none + single + + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + Memory + integer + none + single + + + + + + + FileSystem + File + none + multiple + + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + + + FileSystem + File + none + single + + + + + + + + + FileSystem + File + none + multiple + + + + + + + + + FileSystem + File + none + multiple + + + + + + + FileSystem + File + none + single + + + + + + + + + FileSystem + File + none + multiple + + + + + + + + + FileSystem + File + none + multiple + + + + + + + Memory + integer + none + single + + + + + + + + + Memory + integer + none + single + + + + diff --git a/src/starrs-merge/askalon/starrs-merge.agwl.template b/src/starrs-merge/askalon/starrs-merge.agwl.template new file mode 100755 index 0000000..938fd37 --- /dev/null +++ b/src/starrs-merge/askalon/starrs-merge.agwl.template @@ -0,0 +1,229 @@ + + + + + + FileSystem + File + none + multiple + + + + + FileSystem + File + none + multiple + + + + + FileSystem + File + none + multiple + + + + + Memory + integer + none + single + + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + Memory + integer + none + single + + + + + + + FileSystem + File + none + multiple + + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + + + + FileSystem + File + none + single + + + + + FileSystem + File + none + single + + + + + + + FileSystem + File + none + single + + + + + + + + + FileSystem + File + none + multiple + + + + + + + + + FileSystem + File + none + multiple + + + + + + + FileSystem + File + none + single + + + + + + + + + FileSystem + File + none + multiple + + + + + + + + + FileSystem + File + none + multiple + + + + + + + Memory + integer + none + single + + + + + + + + + Memory + integer + none + single + + + + diff --git a/src/starrs-merge/askalon/starrs-merge.gwdd b/src/starrs-merge/askalon/starrs-merge.gwdd new file mode 100755 index 0000000..d1f8a08 --- /dev/null +++ b/src/starrs-merge/askalon/starrs-merge.gwdd @@ -0,0 +1,47 @@ + +application = starrs-merge +starrs-merge.environment = ssh + + +DELIM = AND +starrs-merge.type = wfr-experiments +starrs-merge.domain = wfr-experiments + + +starrs-merge.activities=LoadDB-dummy MergeDB-dummy ValidateMerge-dummy UpdateDB-dummy + +starrs-merge.accessPaths=localhost:/home/matthias/ifigner-experiments/starrs-merge/starrs-merge + + + + +LoadDB-dummy.executable=preprocess.sh +LoadDB-dummy.usage=bla [mergeActivityCount] +LoadDB-dummy.inports=loaddb_in1 loaddb_in1 agwl:file AND \ + loaddb_in2 loaddb_in2 agwl:file AND \ + mergeActivityCount xxx xs:integer +LoadDB-dummy.outports=merge_in1 ^merge.*.in1.dat$ agwl:collection + + + +MergeDB-dummy.executable=mergedb.sh +MergeDB-dummy.usage=merge_out +MergeDB-dummy.inports=merge_in1 merge_in1 agwl:file AND \ + merge_in2 merge_in2 agwl:file +MergeDB-dummy.outports=merge_out merge_out agwl:file + + + +ValidateMerge-dummy.executable=validatemerge.sh +ValidateMerge-dummy.usage=validate_out +ValidateMerge-dummy.inports=merge_outs merge_outs agwl:collection +ValidateMerge-dummy.outports=validate_out validate_out agwl:file + + + +UpdateDB-dummy.executable=updatedb.sh +UpdateDB-dummy.usage= +UpdateDB-dummy.inports=validate_outs validate_outs agwl:collection +UpdateDB-dummy.outports=exit_code 0 xs:integer + + diff --git a/src/starrs-merge/openmp/starrs-merge.cpp b/src/starrs-merge/openmp/starrs-merge.cpp new file mode 100755 index 0000000..fbfc12c --- /dev/null +++ b/src/starrs-merge/openmp/starrs-merge.cpp @@ -0,0 +1,110 @@ +#include +#include +#include +#include +#include + + +std::vector loadDB(std::string loaddb_in1, std::string loaddb_in2, int id, int mergedbCount) { + std::vector retval; + char cmd[2048]; + snprintf(cmd, 2048, "rm -rf wfr_loaddb_%d_workdir && mkdir wfr_loaddb_%d_workdir && cd wfr_loaddb_%d_workdir && ../preprocess.sh %d %d", id, id, id, id, mergedbCount); + int ret = system(cmd); + for (int t = 0; t < mergedbCount; t++) { + char file[1024]; + snprintf(file, 1024, "wfr_loaddb_workdir/merge.%d.%d.in1.dat", id, t+1); + retval.push_back(std::string(file)); + } + return retval; +} + + +std::string mergeDB(std::string in1, std::string in2, int id1, int id2) { + char wdir[256]; + snprintf(wdir, 256, "wfr_mergedb_%d_%d_workdir", id1, id2); + char cmd[2048]; + snprintf(cmd, 2048, "rm -rf %s && mkdir %s && cd %s && ../mergedb.sh merge.%d.%d.out", wdir, wdir, wdir, id1, id2); + int ret = system(cmd); + char file1[1024]; + snprintf(file1, 1024, "%s/merge.%d.%d.out", wdir, id1, id2); + return std::string(file1); +} + + +std::string validateMerge(std::string *merge_outs, int merge_size, int id) { + char wdir[256]; + snprintf(wdir, 256, "wfr_validate_%d_workdir", id); + char cmd[2048]; + snprintf(cmd, 2048, "rm -rf %s && mkdir %s && cd %s && ../validatemerge.sh validate.%d.out", wdir, wdir, wdir, id); + int ret = system(cmd); + char file1[1024]; + snprintf(file1, 1024, "%s/validate.%d.out", wdir, id); + return std::string(file1); +} + +void updateDB(std::string *validate_outs, int validate_size) { + char wdir[256] = "wfr_update_workdir"; + char cmd[2048]; + snprintf(cmd, 2048, "rm -rf %s && mkdir %s && cd %s && ../updatedb.sh", wdir, wdir, wdir); + int ret = system(cmd); +} + + + + +void workflow(int level1Count, int level2Count) { + std::string validate_outs[level1Count]; + #pragma omp parallel + { + #pragma omp for + for (int t = 0; t < level1Count; t++) { + std::vector merge_ins = loadDB("inputs/loaddb_in1", "inputs/loaddb_in2", t, level2Count); + std::string merge_outs[level2Count]; + #pragma omp parallel + { + #pragma omp for + for (int j = 0; j < level2Count; j++) { + merge_outs[j] = mergeDB(merge_ins.at(j), "inputs/merge_in2", t, j); + } + } + validate_outs[t] = validateMerge(merge_outs, level2Count, t); + } + } + updateDB(validate_outs, level1Count); +} + + + + + +int main(int argc, char** argv) { + int level1Count = 2; + int level2Count = 3; + bool isHelp = false; + boost::program_options::options_description opts("STARRS-Merge Options"); + opts.add_options() + ("help", "Print help message.") + ("loadDBCount", boost::program_options::value(), "Total number of loadDB activities.") + ("mergeDBCount", boost::program_options::value(), "Number of mergeDB activities per loadDB branch."); + boost::program_options::variables_map vm; + auto parsed = boost::program_options::command_line_parser(argc, argv).options(opts).allow_unregistered().run(); + boost::program_options::store(parsed, vm); + boost::program_options::notify(vm); + if (vm.count("help")) { + std::cerr << opts << std::endl; + isHelp = true; + } else { + if (vm.count("loadDBCount")) { + level1Count = vm["loadDBCount"].as(); + } + if (vm.count("mergeDBCount")) { + level2Count = vm["mergeDBCount"].as(); + } + std::cerr << "loadDBCount = " << level1Count << std::endl; + std::cerr << "mergeDBCount = " << level2Count << std::endl; + } + workflow(level1Count, level2Count); + std::cout << "Finished" << std::endl; + return 0; +} + diff --git a/src/starrs-merge/wfr/repo/starrs-merge.properties b/src/starrs-merge/wfr/repo/starrs-merge.properties new file mode 100755 index 0000000..1acc15d --- /dev/null +++ b/src/starrs-merge/wfr/repo/starrs-merge.properties @@ -0,0 +1,9 @@ + +wfinput=starrs-merge/wfInput.code +wfoutput=starrs-merge/wfOutput.code +includes=starrs-merge/includes.code + +atomicTask.0=starrs-merge/LoadDB.properties +atomicTask.1=starrs-merge/MergeDB.properties +atomicTask.2=starrs-merge/ValidateMerge.properties +atomicTask.3=starrs-merge/UpdateDB.properties \ No newline at end of file diff --git a/src/starrs-merge/wfr/repo/starrs-merge/LoadDB.code b/src/starrs-merge/wfr/repo/starrs-merge/LoadDB.code new file mode 100755 index 0000000..35b4a37 --- /dev/null +++ b/src/starrs-merge/wfr/repo/starrs-merge/LoadDB.code @@ -0,0 +1,12 @@ + boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + char cmd[2048]; + snprintf(cmd, 2048, "cd %s && ../preprocess.sh %d %d", wpath.string().c_str(), WFR_SELF_GETITERATIONID(), sin->mergeActivityCount.getValue()); + int ret = system(cmd); + + for (int t = 0; t < sin->mergeActivityCount.getValue(); t++) { + char tmp[1024]; + snprintf(tmp, 1024, "merge.%d.%d.in1.dat", WFR_SELF_GETITERATIONID(), t+1); + sout->merge_in1.setEntryValue(t, std::string(tmp)); + } + sout->merge_in1.setFinalised(true); + \ No newline at end of file diff --git a/src/starrs-merge/wfr/repo/starrs-merge/LoadDB.properties b/src/starrs-merge/wfr/repo/starrs-merge/LoadDB.properties new file mode 100755 index 0000000..541f07e --- /dev/null +++ b/src/starrs-merge/wfr/repo/starrs-merge/LoadDB.properties @@ -0,0 +1,3 @@ +name=LoadDB +entries=1 +entry.0=LoadDB.code diff --git a/src/starrs-merge/wfr/repo/starrs-merge/MergeDB.code b/src/starrs-merge/wfr/repo/starrs-merge/MergeDB.code new file mode 100755 index 0000000..e8aff58 --- /dev/null +++ b/src/starrs-merge/wfr/repo/starrs-merge/MergeDB.code @@ -0,0 +1,7 @@ + boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + char cmd[2048]; + snprintf(cmd, 2048, "cd %s && ../mergedb.sh mergedb.out", wpath.string().c_str()); + int ret = system(cmd); + std::string file1 = wpath.string() + std::string("/v"); + sout->merge_out.setValue(file1); + \ No newline at end of file diff --git a/src/starrs-merge/wfr/repo/starrs-merge/MergeDB.properties b/src/starrs-merge/wfr/repo/starrs-merge/MergeDB.properties new file mode 100755 index 0000000..5ab65ee --- /dev/null +++ b/src/starrs-merge/wfr/repo/starrs-merge/MergeDB.properties @@ -0,0 +1,3 @@ +name=MergeDB +entries=1 +entry.0=MergeDB.code diff --git a/src/starrs-merge/wfr/repo/starrs-merge/UpdateDB.code b/src/starrs-merge/wfr/repo/starrs-merge/UpdateDB.code new file mode 100755 index 0000000..ac74c1c --- /dev/null +++ b/src/starrs-merge/wfr/repo/starrs-merge/UpdateDB.code @@ -0,0 +1,2 @@ + // Here there are only files consumed, not produced. + \ No newline at end of file diff --git a/src/starrs-merge/wfr/repo/starrs-merge/UpdateDB.properties b/src/starrs-merge/wfr/repo/starrs-merge/UpdateDB.properties new file mode 100755 index 0000000..67f9958 --- /dev/null +++ b/src/starrs-merge/wfr/repo/starrs-merge/UpdateDB.properties @@ -0,0 +1,3 @@ +name=UpdateDB +entries=1 +entry.0=UpdateDB.code diff --git a/src/starrs-merge/wfr/repo/starrs-merge/ValidateMerge.code b/src/starrs-merge/wfr/repo/starrs-merge/ValidateMerge.code new file mode 100755 index 0000000..3a7b5f9 --- /dev/null +++ b/src/starrs-merge/wfr/repo/starrs-merge/ValidateMerge.code @@ -0,0 +1,7 @@ + boost::filesystem::path wpath = wfr::filesystem::createWorkingFolder(instance); + char cmd[2048]; + snprintf(cmd, 2048, "cd %s && ../validatemerge.sh validate.out", wpath.string().c_str()); + int ret = system(cmd); + std::string file1 = wpath.string() + std::string("/validate.out"); + sout->validate_out.setValue(file1); + \ No newline at end of file diff --git a/src/starrs-merge/wfr/repo/starrs-merge/ValidateMerge.properties b/src/starrs-merge/wfr/repo/starrs-merge/ValidateMerge.properties new file mode 100755 index 0000000..2fec904 --- /dev/null +++ b/src/starrs-merge/wfr/repo/starrs-merge/ValidateMerge.properties @@ -0,0 +1,3 @@ +name=ValidateMerge +entries=1 +entry.0=ValidateMerge.code diff --git a/src/starrs-merge/wfr/repo/starrs-merge/includes.code b/src/starrs-merge/wfr/repo/starrs-merge/includes.code new file mode 100755 index 0000000..405028c --- /dev/null +++ b/src/starrs-merge/wfr/repo/starrs-merge/includes.code @@ -0,0 +1 @@ +#include diff --git a/src/starrs-merge/wfr/repo/starrs-merge/wfInput.code b/src/starrs-merge/wfr/repo/starrs-merge/wfInput.code new file mode 100755 index 0000000..d27d191 --- /dev/null +++ b/src/starrs-merge/wfr/repo/starrs-merge/wfInput.code @@ -0,0 +1,44 @@ + long level1Count = 2; + long level2Count = 3;bool isHelp = false; + boost::program_options::options_description opts("STARRS-Merge Options"); + opts.add_options() + ("help", "Print help message.") + ("loadDBCount", boost::program_options::value(), "Total number of loadDB activities.") + ("mergeDBCount", boost::program_options::value(), "Number of mergeDB activities per loadDB branch."); + boost::program_options::variables_map vm; + auto parsed = boost::program_options::command_line_parser(argc, argv).options(opts).allow_unregistered().run(); + boost::program_options::store(parsed, vm); + boost::program_options::notify(vm); + if (vm.count("help")) { + std::cerr << opts << std::endl; + isHelp = true; + } else { + if (vm.count("loadDBCount")) { + level1Count = vm["loadDBCount"].as(); + } + if (vm.count("mergeDBCount")) { + level2Count = vm["mergeDBCount"].as(); + } + std::cerr << "loadDBCount = " << level1Count << std::endl; + std::cerr << "mergeDBCount = " << level2Count << std::endl; + } + + wfInput.loaddb_in1.init(level1Count); + wfInput.loaddb_in2.init(level1Count); + wfInput.merge_in2.init(level1Count); + for (int t = 0; t < level1Count; t++) { + wfInput.loaddb_in1.setEntryValue(t, "inputs/loaddb_in1"); + wfInput.loaddb_in2.setEntryValue(t, "inputs/loaddb_in2"); + wfr::lwd::iwir_collection tmp; + tmp.init(level2Count); + for (int t2 = 0; t2 < level2Count; t2++) { + tmp.setEntryValue(t2, "inputs/merge_in2"); + } + tmp.setFinalised(true); + wfInput.merge_in2.setEntryValue(t, tmp); + } + wfInput.loaddb_in1.setFinalised(true); + wfInput.loaddb_in2.setFinalised(true); + wfInput.merge_in2.setFinalised(true); + wfInput.mergeActivityCount.setValue(level2Count); + \ No newline at end of file diff --git a/src/starrs-merge/wfr/repo/starrs-merge/wfOutput.code b/src/starrs-merge/wfr/repo/starrs-merge/wfOutput.code new file mode 100755 index 0000000..e69de29 diff --git a/src/starrs-merge/wfr/starrs-merge.iwir b/src/starrs-merge/wfr/starrs-merge.iwir new file mode 100755 index 0000000..f05a19c --- /dev/null +++ b/src/starrs-merge/wfr/starrs-merge.iwir @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/unrolling_for_01/wfr/repo/unrolling_for/AtomicTask01.code b/src/unrolling_for_01/wfr/repo/unrolling_for/AtomicTask01.code new file mode 100755 index 0000000..ee77573 --- /dev/null +++ b/src/unrolling_for_01/wfr/repo/unrolling_for/AtomicTask01.code @@ -0,0 +1,3 @@ + + sout->outport01.setValue(sin->counter01.getValue() + 1); + \ No newline at end of file diff --git a/src/unrolling_for_01/wfr/repo/unrolling_for/AtomicTask01.properties b/src/unrolling_for_01/wfr/repo/unrolling_for/AtomicTask01.properties new file mode 100755 index 0000000..d0012b9 --- /dev/null +++ b/src/unrolling_for_01/wfr/repo/unrolling_for/AtomicTask01.properties @@ -0,0 +1,4 @@ + +name=AtomicTask01 +entries=1 +entry.0=AtomicTask01.code diff --git a/src/unrolling_for_01/wfr/repo/unrolling_for/includes.code b/src/unrolling_for_01/wfr/repo/unrolling_for/includes.code new file mode 100755 index 0000000..f6300c7 --- /dev/null +++ b/src/unrolling_for_01/wfr/repo/unrolling_for/includes.code @@ -0,0 +1,2 @@ +#include +#include \ No newline at end of file diff --git a/src/unrolling_for_01/wfr/repo/unrolling_for/wfInput.code b/src/unrolling_for_01/wfr/repo/unrolling_for/wfInput.code new file mode 100755 index 0000000..10115bd --- /dev/null +++ b/src/unrolling_for_01/wfr/repo/unrolling_for/wfInput.code @@ -0,0 +1,24 @@ + + long counter01 = 10; + long invalue01 = 0; + bool isHelp = false; + boost::program_options::options_description opts("unrolling_for Options"); + opts.add_options() + ("help", "Print help message.") + ("counter01", boost::program_options::value(), "counter01."); + boost::program_options::variables_map vm; + auto parsed = boost::program_options::command_line_parser(argc, argv).options(opts).allow_unregistered().run(); + boost::program_options::store(parsed, vm); + boost::program_options::notify(vm); + if (vm.count("help")) { + std::cerr << opts << std::endl; + isHelp = true; + } else { + if (vm.count("counter01")) { + counter01 = vm["counter01"].as(); + } + std::cerr << "counter01 = " << counter01 << std::endl; + } + wfInput.inport01.setValue(invalue01); + wfInput.counter01.setValue(counter01); + \ No newline at end of file diff --git a/src/unrolling_for_01/wfr/repo/unrolling_for/wfOutput.code b/src/unrolling_for_01/wfr/repo/unrolling_for/wfOutput.code new file mode 100755 index 0000000..cbb5122 --- /dev/null +++ b/src/unrolling_for_01/wfr/repo/unrolling_for/wfOutput.code @@ -0,0 +1,3 @@ + + std::cout << wfOutput.outport01.getValue() << std::endl; + \ No newline at end of file diff --git a/src/unrolling_for_01/wfr/repo/unrolling_for_01.properties b/src/unrolling_for_01/wfr/repo/unrolling_for_01.properties new file mode 100755 index 0000000..493ce4e --- /dev/null +++ b/src/unrolling_for_01/wfr/repo/unrolling_for_01.properties @@ -0,0 +1,7 @@ + +wfinput=unrolling_for/wfInput.code +wfoutput=unrolling_for/wfOutput.code +includes=unrolling_for/includes.code + +atomicTask.0=unrolling_for/AtomicTask01.properties + diff --git a/src/unrolling_for_01/wfr/unrolling_for_01.iwir b/src/unrolling_for_01/wfr/unrolling_for_01.iwir new file mode 100644 index 0000000..1aadfb8 --- /dev/null +++ b/src/unrolling_for_01/wfr/unrolling_for_01.iwir @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/unrolling_for_02/wfr/repo/unrolling_for/AtomicTask01.code b/src/unrolling_for_02/wfr/repo/unrolling_for/AtomicTask01.code new file mode 100755 index 0000000..ee77573 --- /dev/null +++ b/src/unrolling_for_02/wfr/repo/unrolling_for/AtomicTask01.code @@ -0,0 +1,3 @@ + + sout->outport01.setValue(sin->counter01.getValue() + 1); + \ No newline at end of file diff --git a/src/unrolling_for_02/wfr/repo/unrolling_for/AtomicTask01.properties b/src/unrolling_for_02/wfr/repo/unrolling_for/AtomicTask01.properties new file mode 100755 index 0000000..d0012b9 --- /dev/null +++ b/src/unrolling_for_02/wfr/repo/unrolling_for/AtomicTask01.properties @@ -0,0 +1,4 @@ + +name=AtomicTask01 +entries=1 +entry.0=AtomicTask01.code diff --git a/src/unrolling_for_02/wfr/repo/unrolling_for/includes.code b/src/unrolling_for_02/wfr/repo/unrolling_for/includes.code new file mode 100755 index 0000000..f6300c7 --- /dev/null +++ b/src/unrolling_for_02/wfr/repo/unrolling_for/includes.code @@ -0,0 +1,2 @@ +#include +#include \ No newline at end of file diff --git a/src/unrolling_for_02/wfr/repo/unrolling_for/wfInput.code b/src/unrolling_for_02/wfr/repo/unrolling_for/wfInput.code new file mode 100755 index 0000000..10115bd --- /dev/null +++ b/src/unrolling_for_02/wfr/repo/unrolling_for/wfInput.code @@ -0,0 +1,24 @@ + + long counter01 = 10; + long invalue01 = 0; + bool isHelp = false; + boost::program_options::options_description opts("unrolling_for Options"); + opts.add_options() + ("help", "Print help message.") + ("counter01", boost::program_options::value(), "counter01."); + boost::program_options::variables_map vm; + auto parsed = boost::program_options::command_line_parser(argc, argv).options(opts).allow_unregistered().run(); + boost::program_options::store(parsed, vm); + boost::program_options::notify(vm); + if (vm.count("help")) { + std::cerr << opts << std::endl; + isHelp = true; + } else { + if (vm.count("counter01")) { + counter01 = vm["counter01"].as(); + } + std::cerr << "counter01 = " << counter01 << std::endl; + } + wfInput.inport01.setValue(invalue01); + wfInput.counter01.setValue(counter01); + \ No newline at end of file diff --git a/src/unrolling_for_02/wfr/repo/unrolling_for/wfOutput.code b/src/unrolling_for_02/wfr/repo/unrolling_for/wfOutput.code new file mode 100755 index 0000000..cbb5122 --- /dev/null +++ b/src/unrolling_for_02/wfr/repo/unrolling_for/wfOutput.code @@ -0,0 +1,3 @@ + + std::cout << wfOutput.outport01.getValue() << std::endl; + \ No newline at end of file diff --git a/src/unrolling_for_02/wfr/repo/unrolling_for_02.properties b/src/unrolling_for_02/wfr/repo/unrolling_for_02.properties new file mode 100755 index 0000000..493ce4e --- /dev/null +++ b/src/unrolling_for_02/wfr/repo/unrolling_for_02.properties @@ -0,0 +1,7 @@ + +wfinput=unrolling_for/wfInput.code +wfoutput=unrolling_for/wfOutput.code +includes=unrolling_for/includes.code + +atomicTask.0=unrolling_for/AtomicTask01.properties + diff --git a/src/unrolling_for_02/wfr/unrolling_for_02.iwir b/src/unrolling_for_02/wfr/unrolling_for_02.iwir new file mode 100644 index 0000000..c6964c7 --- /dev/null +++ b/src/unrolling_for_02/wfr/unrolling_for_02.iwir @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file