e69db257480ddc4aae24ca6ae0130c9450abc362 hiram Mon Oct 28 14:07:47 2024 -0700 do not use /dev/shm as a temporary directory refs #34685 diff --git src/hg/utils/automation/doWindowMasker.pl src/hg/utils/automation/doWindowMasker.pl index c980898..b946726 100755 --- src/hg/utils/automation/doWindowMasker.pl +++ src/hg/utils/automation/doWindowMasker.pl @@ -111,40 +111,32 @@ &HgAutomate::checkCleanSlate('count', 'mask', "$runDir/windowmasker.counts"); &HgAutomate::mustMkdir($runDir); my $whatItDoes = "It does WindowMasker counts step."; my $workhorse = &HgAutomate::chooseWorkhorse(); my $bossScript = new HgRemoteScript("$runDir/doCount.csh", $workhorse, $runDir, $whatItDoes); my $tmpDir = &HgAutomate::tmpDir(); $bossScript->add(<<_EOF_ if ( -d "/data/tmp" ) then setenv TMPDIR "/data/tmp" else if ( -d "/scratch/tmp" ) then setenv TMPDIR "/scratch/tmp" else - set tmpSz = `df --output=avail -k /tmp | tail -1` - set shmSz = `df --output=avail -k /dev/shm | tail -1` - if ( "\${shmSz}" > "\${tmpSz}" ) then - mkdir -p /dev/shm/tmp - chmod 777 /dev/shm/tmp - setenv TMPDIR "/dev/shm/tmp" - else setenv TMPDIR "/tmp" endif -endif set windowMaskerDir = /cluster/bin/\$MACHTYPE set windowMasker = \$windowMaskerDir/windowmasker set fa = $db.fa set tmpDir = `mktemp -d -p \$TMPDIR doWindowMasker.XXXXXX` chmod 775 \$tmpDir set inputTwoBit = $unmaskedSeq pushd \$tmpDir twoBitToFa \$inputTwoBit \$fa \$windowMasker -mk_counts true -input \$fa -output windowmasker.counts popd cp \$tmpDir/windowmasker.counts . rm -rf \$tmpDir _EOF_ ); $bossScript->execute(); @@ -162,40 +154,32 @@ # * step: sdust [workhorse] sub doSdust { my $runDir = "$buildDir"; &HgAutomate::checkExistsUnlessDebug('mask', 'sdust', "$runDir/windowmasker.counts"); my $whatItDoes = "It does WindowMasker masking step with -sdust true."; my $workhorse = &HgAutomate::chooseWorkhorse(); my $bossScript = new HgRemoteScript("$runDir/doSdust.csh", $workhorse, $runDir, $whatItDoes); my $tmpDir = &HgAutomate::tmpDir(); $bossScript->add(<<_EOF_ if ( -d "/data/tmp" ) then setenv TMPDIR "/data/tmp" else if ( -d "/scratch/tmp" ) then setenv TMPDIR "/scratch/tmp" else - set tmpSz = `df --output=avail -k /tmp | tail -1` - set shmSz = `df --output=avail -k /dev/shm | tail -1` - if ( "\${shmSz}" > "\${tmpSz}" ) then - mkdir -p /dev/shm/tmp - chmod 777 /dev/shm/tmp - setenv TMPDIR "/dev/shm/tmp" - else setenv TMPDIR "/tmp" endif -endif set windowMaskerDir = /cluster/bin/\$MACHTYPE set windowMasker = \$windowMaskerDir/windowmasker set fa = $db.fa set tmpDir = `mktemp -d -p \$TMPDIR doWindowMasker.XXXXXX` chmod 775 \$tmpDir set inputTwoBit = $unmaskedSeq cp windowmasker.counts \$tmpDir pushd \$tmpDir twoBitToFa \$inputTwoBit \$fa \$windowMasker -ustat windowmasker.counts -sdust true -input \$fa -output windowmasker.intervals perl -wpe \'if \(s\/^\>lcl\\\|\(\.\*\)\\n\$\/\/\) { \$chr = \$1\; } \\ if \(\/^\(\\d+\) \- \(\\d+\)\/\) { \\ \$s=\$1\; \$e=\$2+1\; s\/\(\\d+\) \- \(\\d+\)\/\$chr\\t\$s\\t\$e\/\; \\ }\' windowmasker.intervals > windowmasker.sdust.bed popd