-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #142 from codeplaysoftware/rod-090522
Updates to instructions for DevCloud and adding q files that are a bi…
- Loading branch information
Showing
5 changed files
with
219 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/bash | ||
#========================================== | ||
# Copyright © Intel Corporation | ||
# | ||
# SPDX-License-Identifier: MIT | ||
#========================================== | ||
# Script to submit job in Intel(R) DevCloud | ||
# Version: 0.71 | ||
#========================================== | ||
if [ -z "$1" ]; then | ||
echo "Missing script argument, Usage: ./q run.sh" | ||
elif [ ! -f "$1" ]; then | ||
echo "File $1 does not exist" | ||
else | ||
echo "Job has been submitted to Intel(R) DevCloud and will execute soon." | ||
echo "" | ||
script=$1 | ||
# Remove old output files | ||
rm *.sh.* > /dev/null 2>&1 | ||
# Submit job using qsub | ||
qsub_id=`qsub -l nodes=1:gpu:ppn=2 -d . $script` | ||
job_id="$(cut -d'.' -f1 <<<"$qsub_id")" | ||
# Print qstat output | ||
qstat | ||
# Wait for output file to be generated and display | ||
echo "" | ||
echo -ne "Waiting for Output " | ||
until [ -f $script.o$job_id ]; do | ||
sleep 1 | ||
echo -ne "█" | ||
((timeout++)) | ||
# Timeout if no output file generated within 60 seconds | ||
if [ $timeout == 70 ]; then | ||
echo "" | ||
echo "" | ||
echo "TimeOut 60 seconds: Job is still queued for execution, check for output file later ($script.o$job_id)" | ||
echo "" | ||
break | ||
fi | ||
done | ||
# Print output and error file content if exist | ||
if [ -n "$(find -name '*.sh.o'$job_id)" ]; then | ||
echo " Done⬇" | ||
cat $script.o$job_id | ||
cat $script.e$job_id | ||
echo "Job Completed in $timeout seconds." | ||
rm *.sh.*$job_id > /dev/null 2>&1 | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/bash | ||
#========================================== | ||
# Copyright © Intel Corporation | ||
# | ||
# SPDX-License-Identifier: MIT | ||
#========================================== | ||
# Script to submit job in Intel(R) DevCloud | ||
# Version: 0.71 | ||
#========================================== | ||
if [ -z "$1" ]; then | ||
echo "Missing script argument, Usage: ./q run.sh" | ||
elif [ ! -f "$1" ]; then | ||
echo "File $1 does not exist" | ||
else | ||
echo "Job has been submitted to Intel(R) DevCloud and will execute soon." | ||
echo "" | ||
script=$1 | ||
# Remove old output files | ||
rm *.sh.* > /dev/null 2>&1 | ||
# Submit job using qsub | ||
qsub_id=`qsub -l nodes=1:gpu:ppn=2 -d . $script` | ||
job_id="$(cut -d'.' -f1 <<<"$qsub_id")" | ||
# Print qstat output | ||
qstat | ||
# Wait for output file to be generated and display | ||
echo "" | ||
echo -ne "Waiting for Output " | ||
until [ -f $script.o$job_id ]; do | ||
sleep 1 | ||
echo -ne "█" | ||
((timeout++)) | ||
# Timeout if no output file generated within 60 seconds | ||
if [ $timeout == 70 ]; then | ||
echo "" | ||
echo "" | ||
echo "TimeOut 60 seconds: Job is still queued for execution, check for output file later ($script.o$job_id)" | ||
echo "" | ||
break | ||
fi | ||
done | ||
# Print output and error file content if exist | ||
if [ -n "$(find -name '*.sh.o'$job_id)" ]; then | ||
echo " Done⬇" | ||
cat $script.o$job_id | ||
cat $script.e$job_id | ||
echo "Job Completed in $timeout seconds." | ||
rm *.sh.*$job_id > /dev/null 2>&1 | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/bash | ||
#========================================== | ||
# Copyright © Intel Corporation | ||
# | ||
# SPDX-License-Identifier: MIT | ||
#========================================== | ||
# Script to submit job in Intel(R) DevCloud | ||
# Version: 0.71 | ||
#========================================== | ||
if [ -z "$1" ]; then | ||
echo "Missing script argument, Usage: ./q run.sh" | ||
elif [ ! -f "$1" ]; then | ||
echo "File $1 does not exist" | ||
else | ||
echo "Job has been submitted to Intel(R) DevCloud and will execute soon." | ||
echo "" | ||
script=$1 | ||
# Remove old output files | ||
rm *.sh.* > /dev/null 2>&1 | ||
# Submit job using qsub | ||
qsub_id=`qsub -l nodes=1:gpu:ppn=2 -d . $script` | ||
job_id="$(cut -d'.' -f1 <<<"$qsub_id")" | ||
# Print qstat output | ||
qstat | ||
# Wait for output file to be generated and display | ||
echo "" | ||
echo -ne "Waiting for Output " | ||
until [ -f $script.o$job_id ]; do | ||
sleep 1 | ||
echo -ne "█" | ||
((timeout++)) | ||
# Timeout if no output file generated within 60 seconds | ||
if [ $timeout == 70 ]; then | ||
echo "" | ||
echo "" | ||
echo "TimeOut 60 seconds: Job is still queued for execution, check for output file later ($script.o$job_id)" | ||
echo "" | ||
break | ||
fi | ||
done | ||
# Print output and error file content if exist | ||
if [ -n "$(find -name '*.sh.o'$job_id)" ]; then | ||
echo " Done⬇" | ||
cat $script.o$job_id | ||
cat $script.e$job_id | ||
echo "Job Completed in $timeout seconds." | ||
rm *.sh.*$job_id > /dev/null 2>&1 | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/bash | ||
#========================================== | ||
# Copyright © Intel Corporation | ||
# | ||
# SPDX-License-Identifier: MIT | ||
#========================================== | ||
# Script to submit job in Intel(R) DevCloud | ||
# Version: 0.71 | ||
#========================================== | ||
if [ -z "$1" ]; then | ||
echo "Missing script argument, Usage: ./q run.sh" | ||
elif [ ! -f "$1" ]; then | ||
echo "File $1 does not exist" | ||
else | ||
echo "Job has been submitted to Intel(R) DevCloud and will execute soon." | ||
echo "" | ||
script=$1 | ||
# Remove old output files | ||
rm *.sh.* > /dev/null 2>&1 | ||
# Submit job using qsub | ||
qsub_id=`qsub -l nodes=1:gpu:ppn=2 -d . $script` | ||
job_id="$(cut -d'.' -f1 <<<"$qsub_id")" | ||
# Print qstat output | ||
qstat | ||
# Wait for output file to be generated and display | ||
echo "" | ||
echo -ne "Waiting for Output " | ||
until [ -f $script.o$job_id ]; do | ||
sleep 1 | ||
echo -ne "█" | ||
((timeout++)) | ||
# Timeout if no output file generated within 60 seconds | ||
if [ $timeout == 70 ]; then | ||
echo "" | ||
echo "" | ||
echo "TimeOut 60 seconds: Job is still queued for execution, check for output file later ($script.o$job_id)" | ||
echo "" | ||
break | ||
fi | ||
done | ||
# Print output and error file content if exist | ||
if [ -n "$(find -name '*.sh.o'$job_id)" ]; then | ||
echo " Done⬇" | ||
cat $script.o$job_id | ||
cat $script.e$job_id | ||
echo "Job Completed in $timeout seconds." | ||
rm *.sh.*$job_id > /dev/null 2>&1 | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters