Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
xtpcpp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
A compter du 1er avril, attention à vos pipelines :
Nouvelles limitations de Docker Hub
Show more breadcrumbs
PAPPSO
xtpcpp
Commits
ca9fc9e6
Commit
ca9fc9e6
authored
6 years ago
by
Langella Olivier
Browse files
Options
Downloads
Patches
Plain Diff
check temporary directory for HTCondor
parent
9f1d4baa
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/core/tandem_run/tandemcondorprocess.cpp
+31
-11
31 additions, 11 deletions
src/core/tandem_run/tandemcondorprocess.cpp
src/core/tandem_run/tandemcondorprocess.h
+3
-8
3 additions, 8 deletions
src/core/tandem_run/tandemcondorprocess.h
with
34 additions
and
19 deletions
src/core/tandem_run/tandemcondorprocess.cpp
+
31
−
11
View file @
ca9fc9e6
...
...
@@ -66,9 +66,6 @@ TandemCondorProcess::TandemCondorProcess(MainWindow *p_main_window,
QString
condor_tmp_dir
=
QString
(
"%1/xtpcpp"
)
.
arg
(
settings
.
value
(
"condor/tmp_dir"
,
"/gorgone/pappso/tmp"
).
toString
());
_p_tmp_dir
=
new
QTemporaryDir
(
condor_tmp_dir
);
_p_tmp_dir
->
setAutoRemove
(
settings
.
value
(
"condor/tmp_dir_autoremove"
,
true
).
toBool
());
_condor_submit_command
=
settings
.
value
(
"condor/submit"
,
"/usr/bin/condor_submit"
).
toString
();
_condor_q_command
=
...
...
@@ -86,6 +83,30 @@ TandemCondorProcess::TandemCondorProcess(MainWindow *p_main_window,
settings
.
value
(
"condor/condor_q"
,
"/usr/bin/condor_q"
));
settings
.
setValue
(
"condor/condor_rm"
,
settings
.
value
(
"condor/condor_rm"
,
"/usr/bin/condor_rm"
));
}
TandemCondorProcess
::~
TandemCondorProcess
()
{
if
(
_p_tmp_dir
!=
nullptr
)
{
delete
_p_tmp_dir
;
}
}
void
TandemCondorProcess
::
prepareTemporaryDirectory
()
{
QSettings
settings
;
QString
condor_tmp_dir
=
QString
(
"%1/xtpcpp"
);
if
(
_p_tmp_dir
!=
nullptr
)
{
delete
_p_tmp_dir
;
_p_tmp_dir
=
nullptr
;
}
_p_tmp_dir
=
new
QTemporaryDir
(
condor_tmp_dir
);
_p_tmp_dir
->
setAutoRemove
(
settings
.
value
(
"condor/tmp_dir_autoremove"
,
true
).
toBool
());
if
(
!
_p_tmp_dir
->
isValid
())
{
...
...
@@ -95,11 +116,6 @@ TandemCondorProcess::TandemCondorProcess(MainWindow *p_main_window,
.
arg
(
condor_tmp_dir
));
}
}
TandemCondorProcess
::~
TandemCondorProcess
()
{
delete
_p_tmp_dir
;
}
unsigned
int
TandemCondorProcess
::
getCondorJobSize
()
const
{
...
...
@@ -133,7 +149,10 @@ TandemCondorProcess::prepareXmlDatabaseFile()
void
TandemCondorProcess
::
run
()
{
qDebug
()
<<
"TandemCondorProcess::run begin "
;
qDebug
()
<<
__FILE__
<<
" "
<<
__FUNCTION__
<<
" "
<<
__LINE__
;
prepareTemporaryDirectory
();
TandemParametersFile
orig_parameter_file
(
_tandem_run_batch
.
_preset_file
);
_preset_file
=
QString
(
"%1/%2"
)
.
arg
(
_p_tmp_dir
->
path
())
...
...
@@ -613,8 +632,9 @@ TandemCondorProcess::setCondorJobStatus(std::int8_t count_status[10])
{
QString
status_message
=
QString
(
"%1 unexpanded jobs
\n
%2 idle jobs
\n
%3 running jobs
\n
%4 removed "
"jobs
\n
%5 completed jobs
\n
%6 held jobs
\n
%7 submission errors"
)
QString
(
"%1 unexpanded jobs
\n
%2 idle jobs
\n
%3 running jobs
\n
%4 removed "
"jobs
\n
%5 completed jobs
\n
%6 held jobs
\n
%7 submission errors"
)
.
arg
(
count_status
[
0
])
.
arg
(
count_status
[
1
])
.
arg
(
count_status
[
2
])
...
...
This diff is collapsed.
Click to expand it.
src/core/tandem_run/tandemcondorprocess.h
+
3
−
8
View file @
ca9fc9e6
...
...
@@ -23,13 +23,9 @@
* You should have received a copy of the GNU General Public License
* along with XTPcpp. If not, see <http://www.gnu.org/licenses/>.
*
* Contributors:
* Olivier Langella <olivier.langella@u-psud.fr> - initial API and
*implementation
******************************************************************************/
#ifndef TANDEMCONDORPROCESS_H
#define TANDEMCONDORPROCESS_H
#pragma once
#include
"tandembatchprocess.h"
#include
<QTemporaryDir>
...
...
@@ -54,9 +50,10 @@ class TandemCondorProcess : public TandemBatchProcess
void
getCondorJobState
();
void
parseCondorQueue
(
QString
&
condor_q_xml
);
void
condorRemoveJob
();
void
prepareTemporaryDirectory
();
private:
QTemporaryDir
*
_p_tmp_dir
;
QTemporaryDir
*
_p_tmp_dir
=
nullptr
;
QString
_condor_submit_command
;
QString
_condor_q_command
;
QString
_condor_rm_command
;
...
...
@@ -67,5 +64,3 @@ class TandemCondorProcess : public TandemBatchProcess
unsigned
int
_condor_status_timer_millisecond
=
1000
;
unsigned
int
_condor_completed_jobs
=
0
;
};
#endif // TANDECONDORPROCESS_H
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment