From 89d01012eb51899d2ea1d6afc9c1d2bc0b6a2e71 Mon Sep 17 00:00:00 2001 From: Terry McGUinness Date: Sat, 22 Feb 2025 01:45:16 -0500 Subject: [PATCH 1/9] fixed misspelling of launch --- ci/platforms/config.gaeac6 | 2 +- ci/platforms/config.hera | 2 +- ci/platforms/config.hercules | 2 +- ci/platforms/config.orion | 2 +- ci/scripts/utils/launch_java_agent.sh | 8 ++++---- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ci/platforms/config.gaeac6 b/ci/platforms/config.gaeac6 index bda69c6a98d..9975af81d11 100644 --- a/ci/platforms/config.gaeac6 +++ b/ci/platforms/config.gaeac6 @@ -7,7 +7,7 @@ export ICSDIR_ROOT=/gpfs/f6/bil-fire8/world-shared/global/glopara/data/ICSDIR export GFS_BASH_CI_ROOT=${GFS_CI_ROOT}/GFS_BASH_CI # Jenkins directories -export JENKINS_AGENT_LANUCH_DIR=${GFS_CI_ROOT}/Jenkins/agent +export JENKINS_AGENT_LAUNCH_DIR=${GFS_CI_ROOT}/Jenkins/agent export JENKINS_WORK_DIR=${GFS_CI_ROOT}/Jenkins/workspace # CTest functional test directories for pre stagged input data diff --git a/ci/platforms/config.hera b/ci/platforms/config.hera index cf0ca640e8a..40ab3eb591f 100644 --- a/ci/platforms/config.hera +++ b/ci/platforms/config.hera @@ -4,7 +4,7 @@ export GFS_CI_ROOT=/scratch1/NCEPDEV/global/glopara/GFS_CI_CD export ICSDIR_ROOT=/scratch1/NCEPDEV/global/glopara/data/ICSDIR # Jenkins directories -export JENKINS_AGENT_LANUCH_DIR=${GFS_CI_ROOT}/Jenkins/agent +export JENKINS_AGENT_LAUNCH_DIR=${GFS_CI_ROOT}/Jenkins/agent export JENKINS_WORK_DIR=${GFS_CI_ROOT}/Jenkins/workspace # JENKINS custom_workspace directory where CI jobs are run # /scratch1/NCEPDEV/global/glopara/CI diff --git a/ci/platforms/config.hercules b/ci/platforms/config.hercules index 4e729d3afba..edd58aab6ac 100644 --- a/ci/platforms/config.hercules +++ b/ci/platforms/config.hercules @@ -4,7 +4,7 @@ export GFS_CI_ROOT=/work2/noaa/stmp/GFS_CI_ROOT/HERCULES export ICSDIR_ROOT=/work/noaa/global/glopara/data/ICSDIR # Jenkins directories -export JENKINS_AGENT_LANUCH_DIR=/home/role-nems/GFS_CI_ROOT_JENKINS/AGENT_mterry +export JENKINS_AGENT_LAUNCH_DIR=/home/role-nems/GFS_CI_ROOT_JENKINS/AGENT_mterry export JENKINS_WORK_DIR=/home/role-nems/GFS_CI_ROOT_JENKINS # CTest functional test directories for pre stagged input data diff --git a/ci/platforms/config.orion b/ci/platforms/config.orion index 04c8d1c08c6..880546908e6 100644 --- a/ci/platforms/config.orion +++ b/ci/platforms/config.orion @@ -4,7 +4,7 @@ export GFS_CI_ROOT=/work2/noaa/stmp/GFS_CI_ROOT/ORION export ICSDIR_ROOT=/work/noaa/global/glopara/data/ICSDIR # Jenkins directories -export JENKINS_AGENT_LANUCH_DIR=/home/role-nems/GFS_CI_ROOT_JENKINS/AGENT_mterry +export JENKINS_AGENT_LAUNCH_DIR=/home/role-nems/GFS_CI_ROOT_JENKINS/AGENT_mterry export JENKINS_WORK_DIR=/home/role-nems/GFS_CI_ROOT_JENKINS # CI BASH test directories diff --git a/ci/scripts/utils/launch_java_agent.sh b/ci/scripts/utils/launch_java_agent.sh index 003695d9d81..91e43caded3 100755 --- a/ci/scripts/utils/launch_java_agent.sh +++ b/ci/scripts/utils/launch_java_agent.sh @@ -89,7 +89,7 @@ module use "${HOMEGFS_}/modulefiles" module load "module_gwsetup.${MACHINE_ID}" source "${HOMEGFS_}/ci/platforms/config.${MACHINE_ID}" -JAVA_HOME="${JENKINS_AGENT_LANUCH_DIR}/JAVA/jdk-17.0.10" +JAVA_HOME="${JENKINS_AGENT_LAUNCH_DIR}/JAVA/jdk-17.0.10" if [[ ! -d "${JAVA_HOME}" ]]; then JAVA_HOME=/usr/lib/jvm/jre-17 if [[ ! -d "${JAVA_HOME}" ]]; then @@ -117,13 +117,13 @@ if [[ "${check_token}" != *"*****"* ]]; then fi echo "gh authenticating with emcbot TOKEN ok" -if [[ -d "${JENKINS_AGENT_LANUCH_DIR}" ]]; then - echo "Jenkins Agent Lanuch Directory: ${JENKINS_AGENT_LANUCH_DIR}" +if [[ -d "${JENKINS_AGENT_LAUNCH_DIR}" ]]; then + echo "Jenkins Agent Lanuch Directory: ${JENKINS_AGENT_LAUNCH_DIR}" else echo "ERROR: Jenkins Agent Lanuch Directory not found. Exiting with error." exit 1 fi -cd "${JENKINS_AGENT_LANUCH_DIR}" +cd "${JENKINS_AGENT_LAUNCH_DIR}" echo "Entered directory ${PWD}" if ! [[ -f agent.jar ]]; then From aa68c2ba1a1059291b2c351a21bc723bc847b8f2 Mon Sep 17 00:00:00 2001 From: Terry McGUinness Date: Sat, 22 Feb 2025 02:12:39 -0500 Subject: [PATCH 2/9] updated hercules for role account and biefed up the internal documentation --- ci/platforms/config.gaeac6 | 14 ++++++++++---- ci/platforms/config.hera | 7 ++++++- ci/platforms/config.hercules | 15 +++++++++++---- 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/ci/platforms/config.gaeac6 b/ci/platforms/config.gaeac6 index 9975af81d11..3fbdfc90240 100644 --- a/ci/platforms/config.gaeac6 +++ b/ci/platforms/config.gaeac6 @@ -1,18 +1,24 @@ #!/usr/bin/bash +# Main CI root directory export GFS_CI_ROOT=/ncrc/proj/nggps_emc/${USER}/GFS_CI_CD +# ICSDIR root directory used on the create_experment.py command line export ICSDIR_ROOT=/gpfs/f6/bil-fire8/world-shared/global/glopara/data/ICSDIR -# CI BASH test directories -export GFS_BASH_CI_ROOT=${GFS_CI_ROOT}/GFS_BASH_CI - -# Jenkins directories +# JENKINS launch directory for agent export JENKINS_AGENT_LAUNCH_DIR=${GFS_CI_ROOT}/Jenkins/agent +# JENKINS internal working directories for CI jobs (not for users use) export JENKINS_WORK_DIR=${GFS_CI_ROOT}/Jenkins/workspace +# NOTE: JENKINS custom_workspace directory where CI jobs are run +# /gpfs/f6/drsa-precip3/proj-shared/global/CI +# is defined in the Jenkinsfile # CTest functional test directories for pre stagged input data export STAGED_TESTS_DIR=${GFS_CI_ROOT}/STAGED_TESTS_DIR +# CI BASH test directories +export GFS_BASH_CI_ROOT=${GFS_CI_ROOT}/GFS_BASH_CI + export HPC_ACCOUNT=drsa-precip3 export max_concurrent_cases=5 export max_concurrent_pr=4 diff --git a/ci/platforms/config.hera b/ci/platforms/config.hera index 40ab3eb591f..04f1ba81e41 100644 --- a/ci/platforms/config.hera +++ b/ci/platforms/config.hera @@ -1,13 +1,17 @@ #!/usr/bin/bash +# Main CI root directory export GFS_CI_ROOT=/scratch1/NCEPDEV/global/glopara/GFS_CI_CD +# ICSDIR root directory used on the create_experment.py command line export ICSDIR_ROOT=/scratch1/NCEPDEV/global/glopara/data/ICSDIR -# Jenkins directories +# JENKINS launch directory for agent export JENKINS_AGENT_LAUNCH_DIR=${GFS_CI_ROOT}/Jenkins/agent +# JENKINS internal working directories for CI jobs (not for users use) export JENKINS_WORK_DIR=${GFS_CI_ROOT}/Jenkins/workspace # JENKINS custom_workspace directory where CI jobs are run # /scratch1/NCEPDEV/global/glopara/CI +# is defined in the Jenkinsfile # CTest functional test directories for pre stagged input data export STAGED_TESTS_DIR=${GFS_CI_ROOT}/STAGED_TESTS_DIR @@ -15,6 +19,7 @@ export STAGED_TESTS_DIR=${GFS_CI_ROOT}/STAGED_TESTS_DIR # CI BASH test directories export GFS_BASH_CI_ROOT=${GFS_CI_ROOT}/GFS_BASH_CI +# HPC account which overides the default account export HPC_ACCOUNT=fv3-cpu export max_concurrent_cases=5 export max_concurrent_pr=4 diff --git a/ci/platforms/config.hercules b/ci/platforms/config.hercules index edd58aab6ac..afd388d6f52 100644 --- a/ci/platforms/config.hercules +++ b/ci/platforms/config.hercules @@ -1,11 +1,17 @@ #!/usr/bin/bash -export GFS_CI_ROOT=/work2/noaa/stmp/GFS_CI_ROOT/HERCULES +# Main CI root directory +export GFS_CI_ROOT=/work2/noaa/global/${USER}/GFS_CI_CD/HERCULES +# ICSDIR root directory used on the create_experment.py command line export ICSDIR_ROOT=/work/noaa/global/glopara/data/ICSDIR -# Jenkins directories -export JENKINS_AGENT_LAUNCH_DIR=/home/role-nems/GFS_CI_ROOT_JENKINS/AGENT_mterry -export JENKINS_WORK_DIR=/home/role-nems/GFS_CI_ROOT_JENKINS +# JENKINS launch directory for agent +export JENKINS_AGENT_LAUNCH_DIR=${GFS_CI_ROOT}/Jenkins/agent +# JENKINS internal working directories for CI jobs (not for users use) +export JENKINS_WORK_DIR=${GFS_CI_ROOT}/Jenkins/workspace +# NOTE: JENKINS custom_workspace directory where CI jobs are run +# /work2/noaa/global/role-global/GFS_CI_CD/HERCULES/CI +# is defined in the Jenkinsfile # CTest functional test directories for pre stagged input data export STAGED_TESTS_DIR=${GFS_CI_ROOT}/STAGED_TESTS_DIR @@ -13,6 +19,7 @@ export STAGED_TESTS_DIR=${GFS_CI_ROOT}/STAGED_TESTS_DIR # CI BASH test directories export GFS_BASH_CI_ROOT=${GFS_CI_ROOT}/GFS_BASH_CI +# HPC account which overides the default account export HPC_ACCOUNT=fv3-cpu export max_concurrent_cases=5 export max_concurrent_pr=4 From 8cbb38c059a52342c982a9b8d7baf63c1d30dd1d Mon Sep 17 00:00:00 2001 From: Terry McGUinness Date: Sat, 22 Feb 2025 02:28:10 -0500 Subject: [PATCH 3/9] updated path to custome working directory for running CI with Jenkins on Hercules role account --- ci/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/Jenkinsfile b/ci/Jenkinsfile index 5069bb18be0..50c7503f3eb 100644 --- a/ci/Jenkinsfile +++ b/ci/Jenkinsfile @@ -6,7 +6,7 @@ def CI_CASES = '' def GH = 'none' // Location of the custom workspaces for each machine in the CI system. They are persistent for each iteration of the PR. def NodeName = [hera: 'Hera-EMC', orion: 'Orion-EMC', hercules: 'Hercules-EMC', gaea: 'Gaea', gaeac6: 'Gaeac6-EMC'] -def custom_workspace = [hera: '/scratch1/NCEPDEV/global/glopara/CI', orion: '/work2/noaa/stmp/CI/ORION', hercules: '/work2/noaa/global/CI/HERCULES', gaea: '/gpfs/f5/epic/proj-shared/global/CI', gaeac6: '/gpfs/f6/drsa-precip3/proj-shared/global/CI'] +def custom_workspace = [hera: '/scratch1/NCEPDEV/global/glopara/CI', orion: '/work2/noaa/stmp/CI/ORION', hercules: '/work2/noaa/global/role-global/GFS_CI_CD/HERCULES/CI', gaea: '/gpfs/f5/epic/proj-shared/global/CI', gaeac6: '/gpfs/f6/drsa-precip3/proj-shared/global/CI'] def repo_url = 'git@github.com:NOAA-EMC/global-workflow.git' def STATUS = 'Passed' From bc6da1346b05fc0990078b950d4a9c52514921da Mon Sep 17 00:00:00 2001 From: Terry McGUinness Date: Sat, 22 Feb 2025 02:40:55 -0500 Subject: [PATCH 4/9] fixed more misspellings of lauch --- ci/scripts/utils/launch_java_agent.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/scripts/utils/launch_java_agent.sh b/ci/scripts/utils/launch_java_agent.sh index 91e43caded3..6fda758c677 100755 --- a/ci/scripts/utils/launch_java_agent.sh +++ b/ci/scripts/utils/launch_java_agent.sh @@ -81,7 +81,7 @@ case ${MACHINE_ID} in exit 1;; esac -LOG=lanuched_agent-$(date +%Y%m%d%M).log +LOG=launched_agent-$(date +%Y%m%d%M).log rm -f "${LOG}" HOMEgfs="${HOMEGFS_}" source "${HOMEGFS_}/ush/module-setup.sh" @@ -118,9 +118,9 @@ fi echo "gh authenticating with emcbot TOKEN ok" if [[ -d "${JENKINS_AGENT_LAUNCH_DIR}" ]]; then - echo "Jenkins Agent Lanuch Directory: ${JENKINS_AGENT_LAUNCH_DIR}" + echo "Jenkins Agent Launch Directory: ${JENKINS_AGENT_LAUNCH_DIR}" else - echo "ERROR: Jenkins Agent Lanuch Directory not found. Exiting with error." + echo "ERROR: Jenkins Agent Launch Directory not found. Exiting with error." exit 1 fi cd "${JENKINS_AGENT_LAUNCH_DIR}" From dad7ff3ef5c54c48ad71d8533866ce192b8d51d3 Mon Sep 17 00:00:00 2001 From: Terry McGuinness Date: Fri, 7 Mar 2025 11:49:43 -0600 Subject: [PATCH 5/9] moving PTMP to global for now until stmp is added to the role account --- workflow/hosts/hercules.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflow/hosts/hercules.yaml b/workflow/hosts/hercules.yaml index 518756b66aa..f80cb370c8c 100644 --- a/workflow/hosts/hercules.yaml +++ b/workflow/hosts/hercules.yaml @@ -5,8 +5,8 @@ BASE_IC: '/work/noaa/global/glopara/data/ICSDIR' PACKAGEROOT: '/work/noaa/global/glopara/nwpara' COMINsyn: '/work/noaa/global/glopara/com/gfs/prod/syndat' HOMEDIR: '/work/noaa/global/${USER}' -STMP: '/work/noaa/stmp/${USER}/HERCULES' -PTMP: '/work/noaa/stmp/${USER}/HERCULES' +STMP: '/work2/noaa/global/${USER}/HERCULES' +PTMP: '/work2/noaa/global/${USER}/HERCULES' NOSCRUB: $HOMEDIR SCHEDULER: slurm ACCOUNT: fv3-cpu From 0c8a2a23f19c3bdfccdb69a80466bf2048e2b834 Mon Sep 17 00:00:00 2001 From: global Role-Account Date: Fri, 7 Mar 2025 12:13:58 -0600 Subject: [PATCH 6/9] add echo for JENKINS_WORK_DIR being used --- ci/scripts/utils/launch_java_agent.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/scripts/utils/launch_java_agent.sh b/ci/scripts/utils/launch_java_agent.sh index 6fda758c677..a4da13b227f 100755 --- a/ci/scripts/utils/launch_java_agent.sh +++ b/ci/scripts/utils/launch_java_agent.sh @@ -163,7 +163,7 @@ check_node_online() { } lauch_agent () { - echo "Launching Jenkins Agent on ${host}" + echo "Launching Jenkins Agent on ${host} using internal workspace ${JENKINS_WORK_DIR}" command="nohup ${JAVA} -jar agent.jar -jnlpUrl ${controller_url}/computer/${MACHINE_ID^}-EMC/jenkins-agent.jnlp -secret @jenkins-secret-file -workDir ${JENKINS_WORK_DIR}" echo -e "Launching Jenkins Agent on ${host} with the command:\n${command}" >& "${LOG}" ${command} >> "${LOG}" 2>&1 & From 35d296c32515738d8db6a6b8dd5acc4c2be4aee8 Mon Sep 17 00:00:00 2001 From: Terry McGUinness Date: Sat, 22 Feb 2025 10:28:22 -0500 Subject: [PATCH 7/9] moved HOMEDIR go work2 on Hercules because role account can not write to work --- .github/workflows/ci_unit_tests.yaml | 3 +++ workflow/hosts/hercules.yaml | 2 +- workflow/setup_xml.py | 35 +++++++++++++++++++++++++++- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_unit_tests.yaml b/.github/workflows/ci_unit_tests.yaml index 0ccaaeae05a..a5900aad049 100644 --- a/.github/workflows/ci_unit_tests.yaml +++ b/.github/workflows/ci_unit_tests.yaml @@ -46,6 +46,9 @@ jobs: shell: bash run: | sudo mkdir -p /scratch1/NCEPDEV + sudo mkdir -p /scratch1/NCEPDEV/stmp2 + sudo mkdir -p /scratch1/NCEPDEV/stmp4 + sudo mkdir -p /scratch1/NCEPDEV/global cd $GITHUB_WORKSPACE/sorc git submodule update --init -j 9 ./link_workflow.sh diff --git a/workflow/hosts/hercules.yaml b/workflow/hosts/hercules.yaml index f80cb370c8c..45097135d49 100644 --- a/workflow/hosts/hercules.yaml +++ b/workflow/hosts/hercules.yaml @@ -4,7 +4,7 @@ BASE_DATA: '/work/noaa/global/glopara/data' BASE_IC: '/work/noaa/global/glopara/data/ICSDIR' PACKAGEROOT: '/work/noaa/global/glopara/nwpara' COMINsyn: '/work/noaa/global/glopara/com/gfs/prod/syndat' -HOMEDIR: '/work/noaa/global/${USER}' +HOMEDIR: '/work2/noaa/global/${USER}/HERCULES' STMP: '/work2/noaa/global/${USER}/HERCULES' PTMP: '/work2/noaa/global/${USER}/HERCULES' NOSCRUB: $HOMEDIR diff --git a/workflow/setup_xml.py b/workflow/setup_xml.py index a66e4922a37..dd61f011023 100755 --- a/workflow/setup_xml.py +++ b/workflow/setup_xml.py @@ -48,6 +48,33 @@ def check_expdir(cmd_expdir, cfg_expdir): print(f' input arg: --expdir = {cmd_expdir}') raise ValueError('Abort!') +def check_dir_writable(dirPath): + if os.path.isdir(dirPath): + if os.access(dirPath, os.W_OK): + print(f'{dirPath} is writable!') + return True + else: + raise PermissionError(f"{dirPath} is not writable. Please change its permission mode as writable.") + return False + elif os.path.isfile(dirPath): + raise NotADirectoryError(f'{dirPath} is a file instead of a directory') + return False + else: # Find the nearest parent directory that already exists + test_parent = os.path.dirname(dirPath) + if len(test_parent) == 0: + raise Exception(f'Could not find a parent directory of {dirPath}') + return False + while test_parent: + if os.path.exists(test_parent): + # Call check_dir_writable on the parent + return check_dir_writable(test_parent) + test_parent = os.path.dirname(test_parent) + if len(test_parent) == 0: + break + if len(test_parent) == 0: + raise Exception(f'Could not find a parent directory of {test_parent}') + return False + def main(*argv): @@ -63,6 +90,12 @@ def main(*argv): check_expdir(user_inputs.expdir, base['EXPDIR']) + # Check if "HOMEDIR","STMP","PTMP" dirrctories are writable + dirKeys = ["HOMEDIR","STMP","PTMP"] + for dk in dirKeys: + print(f'{dk}:') + check_dir_writable(base[dk]) + net = base['NET'] mode = base['MODE'] @@ -76,4 +109,4 @@ def main(*argv): if __name__ == '__main__': - main() + main() \ No newline at end of file From 4a50565a6ee196e5eb047c684705834854e39369 Mon Sep 17 00:00:00 2001 From: Terry McGUinness Date: Sat, 22 Feb 2025 11:44:54 -0500 Subject: [PATCH 8/9] make NCEPDEV dir writable in runners for ci tests --- .github/workflows/ci_unit_tests.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci_unit_tests.yaml b/.github/workflows/ci_unit_tests.yaml index a5900aad049..43ec49d7798 100644 --- a/.github/workflows/ci_unit_tests.yaml +++ b/.github/workflows/ci_unit_tests.yaml @@ -49,6 +49,7 @@ jobs: sudo mkdir -p /scratch1/NCEPDEV/stmp2 sudo mkdir -p /scratch1/NCEPDEV/stmp4 sudo mkdir -p /scratch1/NCEPDEV/global + sudo chmod -R a+w /scratch1/NCEPDEV cd $GITHUB_WORKSPACE/sorc git submodule update --init -j 9 ./link_workflow.sh From 227a8275b6f92fac68426faa56d83c5accb05d9d Mon Sep 17 00:00:00 2001 From: Terry McGUinness Date: Mon, 10 Mar 2025 14:44:12 -0400 Subject: [PATCH 9/9] removing test of ci test updates --- .github/workflows/ci_unit_tests.yaml | 4 ---- workflow/setup_xml.py | 35 +--------------------------- 2 files changed, 1 insertion(+), 38 deletions(-) diff --git a/.github/workflows/ci_unit_tests.yaml b/.github/workflows/ci_unit_tests.yaml index 43ec49d7798..0ccaaeae05a 100644 --- a/.github/workflows/ci_unit_tests.yaml +++ b/.github/workflows/ci_unit_tests.yaml @@ -46,10 +46,6 @@ jobs: shell: bash run: | sudo mkdir -p /scratch1/NCEPDEV - sudo mkdir -p /scratch1/NCEPDEV/stmp2 - sudo mkdir -p /scratch1/NCEPDEV/stmp4 - sudo mkdir -p /scratch1/NCEPDEV/global - sudo chmod -R a+w /scratch1/NCEPDEV cd $GITHUB_WORKSPACE/sorc git submodule update --init -j 9 ./link_workflow.sh diff --git a/workflow/setup_xml.py b/workflow/setup_xml.py index dd61f011023..a66e4922a37 100755 --- a/workflow/setup_xml.py +++ b/workflow/setup_xml.py @@ -48,33 +48,6 @@ def check_expdir(cmd_expdir, cfg_expdir): print(f' input arg: --expdir = {cmd_expdir}') raise ValueError('Abort!') -def check_dir_writable(dirPath): - if os.path.isdir(dirPath): - if os.access(dirPath, os.W_OK): - print(f'{dirPath} is writable!') - return True - else: - raise PermissionError(f"{dirPath} is not writable. Please change its permission mode as writable.") - return False - elif os.path.isfile(dirPath): - raise NotADirectoryError(f'{dirPath} is a file instead of a directory') - return False - else: # Find the nearest parent directory that already exists - test_parent = os.path.dirname(dirPath) - if len(test_parent) == 0: - raise Exception(f'Could not find a parent directory of {dirPath}') - return False - while test_parent: - if os.path.exists(test_parent): - # Call check_dir_writable on the parent - return check_dir_writable(test_parent) - test_parent = os.path.dirname(test_parent) - if len(test_parent) == 0: - break - if len(test_parent) == 0: - raise Exception(f'Could not find a parent directory of {test_parent}') - return False - def main(*argv): @@ -90,12 +63,6 @@ def main(*argv): check_expdir(user_inputs.expdir, base['EXPDIR']) - # Check if "HOMEDIR","STMP","PTMP" dirrctories are writable - dirKeys = ["HOMEDIR","STMP","PTMP"] - for dk in dirKeys: - print(f'{dk}:') - check_dir_writable(base[dk]) - net = base['NET'] mode = base['MODE'] @@ -109,4 +76,4 @@ def main(*argv): if __name__ == '__main__': - main() \ No newline at end of file + main()