Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
WindEnergyToolbox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
The Gitlab server is succesfully updated to version 17.9.2
Show more breadcrumbs
toolbox
WindEnergyToolbox
Commits
2cd22774
Commit
2cd22774
authored
7 years ago
by
Mads M. Pedersen
Browse files
Options
Downloads
Patches
Plain Diff
queue selection in cluster resources in simulation_resources.py
parent
2664924b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wetb/hawc2/simulation_resources.py
+23
-6
23 additions, 6 deletions
wetb/hawc2/simulation_resources.py
with
23 additions
and
6 deletions
wetb/hawc2/simulation_resources.py
+
23
−
6
View file @
2cd22774
...
@@ -203,11 +203,12 @@ class SimulationThread(Thread):
...
@@ -203,11 +203,12 @@ class SimulationThread(Thread):
class
PBSClusterSimulationResource
(
SSHPBSClusterResource
):
class
PBSClusterSimulationResource
(
SSHPBSClusterResource
):
def
__init__
(
self
,
sshclient
,
min_cpu
,
min_free
,
init_cmd
,
wine_cmd
,
python_cmd
):
def
__init__
(
self
,
sshclient
,
min_cpu
,
min_free
,
init_cmd
,
wine_cmd
,
python_cmd
,
queue
=
"
workq
"
):
SSHPBSClusterResource
.
__init__
(
self
,
sshclient
,
min_cpu
,
min_free
)
SSHPBSClusterResource
.
__init__
(
self
,
sshclient
,
min_cpu
,
min_free
)
self
.
init_cmd
=
init_cmd
self
.
init_cmd
=
init_cmd
self
.
wine_cmd
=
wine_cmd
self
.
wine_cmd
=
wine_cmd
self
.
python_cmd
=
python_cmd
self
.
python_cmd
=
python_cmd
self
.
queue
=
queue
def
is_clean
(
self
):
def
is_clean
(
self
):
...
@@ -245,11 +246,27 @@ class PBSClusterSimulationResource(SSHPBSClusterResource):
...
@@ -245,11 +246,27 @@ class PBSClusterSimulationResource(SSHPBSClusterResource):
pass
pass
class
GormSimulationResource
(
PBSClusterSimulationResource
):
class
GormSimulationResource
(
PBSClusterSimulationResource
):
def
__init__
(
self
,
username
,
password
,
wine_cmd
=
"
WINEARCH=win32 WINEPREFIX=~/.wine32 wine
"
):
init_cmd
=
"""
export PATH=/home/python/miniconda3/bin:$PATH
init_cmd
=
"""
export PATH=/home/python/miniconda3/bin:$PATH
source activate wetb_py3
"""
source activate wetb_py3
"""
queue
=
"
workq
"
host
=
"
gorm.risoe.dk
"
def
__init__
(
self
,
username
,
password
,
wine_cmd
=
"
WINEARCH=win32 WINEPREFIX=~/.wine32 wine
"
):
from
wetb.utils.cluster_tools.ssh_client
import
SSHClient
PBSClusterSimulationResource
.
__init__
(
self
,
SSHClient
(
self
.
host
,
username
,
password
,
22
),
25
,
100
,
self
.
init_cmd
,
wine_cmd
,
"
python
"
,
self
.
queue
)
class
JessSimulationResource
(
PBSClusterSimulationResource
):
host
=
'
jess.dtu.dk
'
init_cmd
=
"""
export PATH=/home/python/miniconda3/bin:$PATH
source activate wetb_py3
WINEARCH=win32 WINEPREFIX=~/.wine32 winefix
"""
queue
=
"
windq
"
def
__init__
(
self
,
username
,
password
,
wine_cmd
=
"
WINEARCH=win32 WINEPREFIX=~/.wine32 wine
"
):
from
wetb.utils.cluster_tools.ssh_client
import
SSHClient
from
wetb.utils.cluster_tools.ssh_client
import
SSHClient
PBSClusterSimulationResource
.
__init__
(
self
,
SSHClient
(
'
gorm.risoe.dk
'
,
username
,
password
,
22
),
25
,
100
,
init_cmd
,
wine_cmd
,
"
python
"
)
PBSClusterSimulationResource
.
__init__
(
self
,
SSHClient
(
self
.
host
,
username
,
password
,
22
),
25
,
600
,
self
.
init_cmd
,
wine_cmd
,
"
python
"
,
self
.
queue
)
class
PBSClusterSimulationHost
(
SimulationHost
):
class
PBSClusterSimulationHost
(
SimulationHost
):
...
@@ -416,10 +433,10 @@ class PBSClusterSimulationHost(SimulationHost):
...
@@ -416,10 +433,10 @@ class PBSClusterSimulationHost(SimulationHost):
###PBS -a 201547.53
###PBS -a 201547.53
#PBS -lnodes=1:ppn=1
#PBS -lnodes=1:ppn=1
### Queue name
### Queue name
#PBS -q
workq
#PBS -q
%s
### Create scratch directory and copy data to it
### Create scratch directory and copy data to it
cd $PBS_O_WORKDIR
cd $PBS_O_WORKDIR
pwd
"""
%
(
self
.
simulation_id
,
self
.
stdout_filename
,
walltime
)
pwd
"""
%
(
self
.
simulation_id
,
self
.
stdout_filename
,
walltime
,
self
.
resource
.
queue
)
copy_to
=
"""
copy_to
=
"""
cp -R %s /scratch/$USER/$PBS_JOBID
cp -R %s /scratch/$USER/$PBS_JOBID
### Execute commands on scratch nodes
### Execute commands on scratch nodes
...
...
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