Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jukkr
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
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
Show more breadcrumbs
kkr
jukkr
Commits
689e8a07
Commit
689e8a07
authored
6 years ago
by
Philipp Rüssmann
Browse files
Options
Downloads
Patches
Plain Diff
Add check if rabbitmq is running
parent
7a6460c4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tests/KKRhost/tools/aiida_test.sh
+24
-6
24 additions, 6 deletions
tests/KKRhost/tools/aiida_test.sh
tests/KKRhost/tools/check_pika-rabbitmq.py
+36
-0
36 additions, 0 deletions
tests/KKRhost/tools/check_pika-rabbitmq.py
tests/gitlab-ci/run_kkrhost.yml
+2
-0
2 additions, 0 deletions
tests/gitlab-ci/run_kkrhost.yml
with
62 additions
and
6 deletions
tests/KKRhost/tools/aiida_test.sh
+
24
−
6
View file @
689e8a07
echo
echo
"Clone aiida-kkr"
#download aiida-kkr to have tests directory
git clone
--depth
=
1 https://github.com/JuDFTteam/aiida-kkr.git
echo
echo
"fake executable paths"
# fake code install (reuse already compiled code)
mkdir
aiida-kkr/aiida_kkr/tests/jukkr
ln
-s
../../kkr.x aiida-kkr/aiida_kkr/tests/jukkr/kkr.x
ln
-s
../../voronoi.exe aiida-kkr/aiida_kkr/tests/jukkr/voronoi.exe
ln
-s
../../../ElementDataBase aiida-kkr/aiida_kkr/tests/jukkr/ElementDataBase
ln
-s
../../../../../../kkr.x aiida-kkr/aiida_kkr/tests/jukkr/kkr.x
ln
-s
../../../../../../voronoi.exe aiida-kkr/aiida_kkr/tests/jukkr/voronoi.exe
ln
-s
../../../../../../../ElementDataBase aiida-kkr/aiida_kkr/tests/jukkr/ElementDataBase
echo
echo
"install aiida-kkr"
virtualenv venv_aiida-kkr
&&
source
venv_aiida-kkr/bin/activate
&&
\
pip
install
git+https://github.com/JuDFTteam/masci-tools@master
&&
\
cd
aiida-kkr
&&
pip
install
aiida-kkr
&&
\
reentry scan
-r
aiida
&&
cd
../
# now run aiida-kkr tests
cd
aiida-kkr/aiida_kkr/tests/
echo
echo
"change dbsetup.py"
# change dbsetup to match slurm settings
sed
-i
"s/kkr_codename = 'kkrhost'/kkr_codename = 'KKRhost'/g"
dbsetup.py
#sed -i "s/computername = 'localhost'/computername = 'slurmcontrol'/g" dbsetup.py
#sed -i "s/kkr_codename = 'kkrhost'/kkr_codename = 'KKRcode'/g" dbsetup.py
echo
echo
"run standard tests"
# first run tests without doing actual kkr or kkrimp calculations (only voronoi included)
./run_all.sh
#echo
#echo "run kkrhost tests"
# now do kkr calculations
pytest
--cov-report
=
term-missing
--cov-append
--cov
=
aiida_kkr
--ignore
=
jukkr
-k
Test_dos_workflow
pytest
--cov-report
=
term-missing
--cov-append
--cov
=
aiida_kkr
--ignore
=
jukkr
-k
Test_gf_writeout_workflow
pytest
--cov-report
=
term-missing
--cov-append
--cov
=
aiida_kkr
--ignore
=
jukkr
-k
Test_scf_workflow
#
pytest --cov-report=term-missing --cov-append --cov=aiida_kkr --ignore=jukkr -k Test_dos_workflow
#
pytest --cov-report=term-missing --cov-append --cov=aiida_kkr --ignore=jukkr -k Test_gf_writeout_workflow
#
pytest --cov-report=term-missing --cov-append --cov=aiida_kkr --ignore=jukkr -k Test_scf_workflow
# and finally kkrimp calculations
#pytest --cov-report=term-missing --cov-append --cov=aiida_kkr --ignore=jukkr -k Test_kkrimp_scf_workflow
...
...
This diff is collapsed.
Click to expand it.
tests/KKRhost/tools/check_pika-rabbitmq.py
0 → 100755
+
36
−
0
View file @
689e8a07
#!/usr/bin/env python
import
pika
from
time
import
sleep
,
time
import
timeout_decorator
@timeout_decorator.timeout
(
5
)
def
rmq_listen
():
channel
.
start_consuming
()
# Part 1: send message
print
"
Start sending message...
"
connection
=
pika
.
BlockingConnection
(
pika
.
ConnectionParameters
(
'
localhost
'
))
channel
=
connection
.
channel
()
channel
.
queue_declare
(
queue
=
'
hello
'
)
msg
=
'
Hello World! {}
'
.
format
(
time
())
channel
.
basic_publish
(
exchange
=
''
,
routing_key
=
'
hello
'
,
body
=
msg
)
print
"
[x] Sent
'
{}
'"
.
format
(
msg
)
connection
.
close
()
print
"
done sending message. Wait for 5 seconds and start receiving...
"
sleep
(
5
)
# Part 2: receive message
connection
=
pika
.
BlockingConnection
(
pika
.
ConnectionParameters
(
host
=
'
localhost
'
))
channel
=
connection
.
channel
()
channel
.
queue_declare
(
queue
=
'
hello
'
)
print
'
[*] Waiting 5 seconds for messages.
'
def
callback
(
ch
,
method
,
properties
,
body
):
print
"
[x] Received %r
"
%
(
body
,)
channel
.
basic_consume
(
callback
,
queue
=
'
hello
'
,
no_ack
=
True
)
try
:
rmq_listen
()
except
timeout_decorator
.
timeout_decorator
.
TimeoutError
:
print
"
Done waiting, now close connection
"
connection
.
close
()
This diff is collapsed.
Click to expand it.
tests/gitlab-ci/run_kkrhost.yml
+
2
−
0
View file @
689e8a07
...
...
@@ -550,6 +550,8 @@ run_kkrhost:intel:aiida-kkr:
-
tests/KKRhost/tools/setup_codes_aiida.sh
# start rabbitmq message broker in background
-
rabbitmq-server -detached
# check if rabbit mq is running
-
tests/KKRhost/tools/check_pika-rabbitmq.py
# finally run simple test case using kkr_scf workflow of aiida
-
tests/KKRhost/tools/aiida_simple_test.py
# check some output of the calculation and export aiida database
...
...
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