From 7b5944d6b1e7d08577aaf0bc6c71830bdeae1cfd Mon Sep 17 00:00:00 2001 From: <> Date: Wed, 16 Oct 2024 05:03:40 +0000 Subject: [PATCH] Deployed 38adb6a with MkDocs version: 1.6.1 --- index.html | 8 ++++++++ search/search_index.json | 2 +- stylesheets/extra.css | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index b004a6f..1e61f1f 100644 --- a/index.html +++ b/index.html @@ -676,6 +676,14 @@
Launch it with the command source submit.sh
What does it do :
source submit.sh
source
and not bash
"},{"location":"#apsim-hpc","title":"APSIM-HPC","text":"
Deploy APSIM (Agricultural Production Systems sIMulator - https://www.apsim.info/) on high performance computing clusters.
"},{"location":"#1-apptainer-build","title":"1. Apptainer build","text":"
Building the APSIM container
git clone https://github.com/nesi/APSIM-HPC.git\ncd APSIM-HPC/01-apptainer-build\n./updateversion-and-build.sh\n
./updateversion-and-build.sh
Your browser does not support the video tag.
"},{"location":"#2-setup-the-working-directory","title":"2. Setup the working directory","text":"Structure/Content of the working directory
APSIM requires Weather files ( .met), Template to create the config files, CSV files with soil,file,database names and soil library .apsimx files to be on the same working directory.
\u251c\u2500\u2500 1.met\n\u251c\u2500\u2500 2.met\n\u251c\u2500\u2500 3.met\n\u251c\u2500\u2500 another_soilapsim_library.apsimx\n\u251c\u2500\u2500 ExampleConfigTemplate.txt\n\u251c\u2500\u2500 fileanddbnames.csv\n\u251c\u2500\u2500 my_master_soilapsim_library.apsimx\n\u2514\u2500\u2500 soilnames.csv\n
"},{"location":"#3-update-workflow-files-for-current-simulation","title":"3. Update Workflow files for current simulation","text":"Please make sure to edit the files within the cloned repository without changing the repository directory structure or filenames. Final submission script relies on the existing structure and names to populate the working directory with runtime scripts.
"},{"location":"#03-generate-config-filesgenerate_apsim_configsr","title":"03-generate-config-files/generate_apsim_configs.R
","text":"08-snakemake/Snakefile_1
step. Latter process the config files and create the corresponding .apsimx files ( plus the .db placeholder files). It can not be done in parallel due to https://github.com/nesi/APSIM-HPC/issues/31. update 03-generate-config-files/generate_apsim_configs.R
First file to be edited is 03-generate-config-files/generate_apsim_configs.R
which will be used to generate the config.txt files
6 SoilNames <- as.vector(unlist(read.csv(\"soilnames.csv\"))) ##List of soil names that must exist in the Soil Library .apsimx file (most likely supplied by experienced APSIM user)\n\n8 ConfigTemplate <- \"ExampleConfigTemplate.txt\" ##Base config file\n\n11 SoilLibrary <- \"my_master_soilapsim_library.apsimx\" ###Change name to the soil library you are using\n
3
, change the value of nSets
on line 8787 SplitConfigFilesIntoSets(list.files(pattern = \"ConfigFile.txt$\"), nSets = 3)\n
"},{"location":"#08-snakemakesnakefile_1","title":"08-snakemake/Snakefile_1
","text":"update 08-snakemake/Snakefile_1
config
blockapptainer_bind
- We recommend binding the full filesystem. \"apptainer_bind\": \"/agr/scratch,/agr/persist\"
\"apptainer_bind\": \"/nesi/project,/nesi/nobackup,/opt/nesi\"
\"excluded_txt_files\"
is the name of the template config which will excluded during the processing. Otherwise, it will create a .apsimx and a place holder .db file for itself 4 config = {\n 5 \"apptainer_bind\": \"/full/filesystem\",\n 6 \"apptainer_image\": \"/path/to/container/image/version.aimg\",\n 7 \"excluded_txt_files\": [\"ExampleConfigTemplate.txt\"],\n 8 \"max_consecutive_failures\": 10,\n 9 \"slurm_logdir\": \"slurmlogs\"\n 10 }\n
28 time = \"16:00:00\"\n
"},{"location":"#08-snakemakesnakefile_2","title":"08-snakemake/Snakefile_2
","text":"time =
varibale as needed.update 08-snakemake/Snakefile_2
config
block\"excluded_apsimx_files\"
is/are the name/s of the soil library .apsimx files which will excluded during the processing. Otherwise, it will create a .db file/s for those 5 config = {\n 6 \"apptainer_bind\": \"/full/filesystem\",\n 7 \"apptainer_image\": \"/path/to/container/image/version.aimg\",\n 8 \"excluded_apsimx_files\": [\"my_master_soilapsim_library.apsimx\", \"another_soilapsim_library.apsimx\"],\n 9 \"slurm_logdir\": \"slurmlogs\",\n 10 \"size_threshold\": 1 * 1024 * 1024 # 1MB in bytes\n 11 }\n
"},{"location":"#4-submit-the-workflow-to-scheduler","title":"4. Submit the workflow to Scheduler","text":"Assumptions and pre-requisites
03-generate-config-files/generate_apsim_configs.R
, 08-snakemake/Snakefile_1
and 08-snakemake/Snakefile_2
were updated with names of the template files,etc. submit.sh
and amend to reflect the changes. Launch it with the command source submit.sh
What does it do :
Reason for usingsource
and not bash
This is do with cd /working/directory
command within the submit.sh
script
When you run a script using bash script.sh
, the script is executed in a new subshell. This means:
cd
commands) only affect this subshell. Runtime for one sample across varying number of CPUs: This is for the second phase of the workflow which creates the .db files from .apxims files (08-snakemake/Snakefile_2
)
"},{"location":"#apsim-hpc","title":"APSIM-HPC","text":"
Deploy APSIM (Agricultural Production Systems sIMulator - https://www.apsim.info/) on high performance computing clusters.
"},{"location":"#1-apptainer-build","title":"1. Apptainer build","text":"
Building the APSIM container
git clone https://github.com/nesi/APSIM-HPC.git\ncd APSIM-HPC/01-apptainer-build\n./updateversion-and-build.sh\n
./updateversion-and-build.sh
Your browser does not support the video tag.
"},{"location":"#2-setup-the-working-directory","title":"2. Setup the working directory","text":"Structure/Content of the working directory
APSIM requires Weather files ( .met), Template to create the config files, CSV files with soil,file,database names and soil library .apsimx files to be on the same working directory.
\u251c\u2500\u2500 1.met\n\u251c\u2500\u2500 2.met\n\u251c\u2500\u2500 3.met\n\u251c\u2500\u2500 another_soilapsim_library.apsimx\n\u251c\u2500\u2500 ExampleConfigTemplate.txt\n\u251c\u2500\u2500 fileanddbnames.csv\n\u251c\u2500\u2500 my_master_soilapsim_library.apsimx\n\u2514\u2500\u2500 soilnames.csv\n
"},{"location":"#3-update-workflow-files-for-current-simulation","title":"3. Update Workflow files for current simulation","text":"Please make sure to edit the files within the cloned repository without changing the repository directory structure or filenames. Final submission script relies on the existing structure and names to populate the working directory with runtime scripts.
"},{"location":"#03-generate-config-filesgenerate_apsim_configsr","title":"03-generate-config-files/generate_apsim_configs.R
","text":"08-snakemake/Snakefile_1
step. Latter process the config files and create the corresponding .apsimx files ( plus the .db placeholder files). It can not be done in parallel due to https://github.com/nesi/APSIM-HPC/issues/31. update 03-generate-config-files/generate_apsim_configs.R
First file to be edited is 03-generate-config-files/generate_apsim_configs.R
which will be used to generate the config.txt files
6 SoilNames <- as.vector(unlist(read.csv(\"soilnames.csv\"))) ##List of soil names that must exist in the Soil Library .apsimx file (most likely supplied by experienced APSIM user)\n\n8 ConfigTemplate <- \"ExampleConfigTemplate.txt\" ##Base config file\n\n11 SoilLibrary <- \"my_master_soilapsim_library.apsimx\" ###Change name to the soil library you are using\n
3
, change the value of nSets
on line 8787 SplitConfigFilesIntoSets(list.files(pattern = \"ConfigFile.txt$\"), nSets = 3)\n
"},{"location":"#08-snakemakesnakefile_1","title":"08-snakemake/Snakefile_1
","text":"update 08-snakemake/Snakefile_1
config
blockapptainer_bind
- We recommend binding the full filesystem. \"apptainer_bind\": \"/agr/scratch,/agr/persist\"
\"apptainer_bind\": \"/nesi/project,/nesi/nobackup,/opt/nesi\"
\"excluded_txt_files\"
is the name of the template config which will excluded during the processing. Otherwise, it will create a .apsimx and a place holder .db file for itself 4 config = {\n 5 \"apptainer_bind\": \"/full/filesystem\",\n 6 \"apptainer_image\": \"/path/to/container/image/version.aimg\",\n 7 \"excluded_txt_files\": [\"ExampleConfigTemplate.txt\"],\n 8 \"max_consecutive_failures\": 10,\n 9 \"slurm_logdir\": \"slurmlogs\"\n 10 }\n
28 time = \"16:00:00\"\n
"},{"location":"#08-snakemakesnakefile_2","title":"08-snakemake/Snakefile_2
","text":"time =
varibale as needed.update 08-snakemake/Snakefile_2
config
block\"excluded_apsimx_files\"
is/are the name/s of the soil library .apsimx files which will excluded during the processing. Otherwise, it will create a .db file/s for those 5 config = {\n 6 \"apptainer_bind\": \"/full/filesystem\",\n 7 \"apptainer_image\": \"/path/to/container/image/version.aimg\",\n 8 \"excluded_apsimx_files\": [\"my_master_soilapsim_library.apsimx\", \"another_soilapsim_library.apsimx\"],\n 9 \"slurm_logdir\": \"slurmlogs\",\n 10 \"size_threshold\": 1 * 1024 * 1024 # 1MB in bytes\n 11 }\n
"},{"location":"#4-submit-the-workflow-to-scheduler","title":"4. Submit the workflow to Scheduler","text":"Assumptions and pre-requisites
03-generate-config-files/generate_apsim_configs.R
, 08-snakemake/Snakefile_1
and 08-snakemake/Snakefile_2
were updated with names of the template files,etc. submit.sh
and amend to reflect the changes. Launch it with the command source submit.sh
What does it do :
source submit.sh
Your browser does not support the video tag.
Reason for usingsource
and not bash
This is do with cd /working/directory
command within the submit.sh
script
When you run a script using bash script.sh
, the script is executed in a new subshell. This means:
cd
commands) only affect this subshell. Runtime for one sample across varying number of CPUs: This is for the second phase of the workflow which creates the .db files from .apxims files (08-snakemake/Snakefile_2
)