Project

General

Profile

Feature #22861

Make artdaq_database python3.7.x compatible

Added by Gennadiy Lukhanin 9 months ago. Updated 2 months ago.

Status:
Reviewed
Priority:
Normal
Category:
artdaq-database
Target version:
-
Start date:
07/02/2019
Due date:
% Done:

100%

Estimated time:
Experiment:
-
Co-Assignees:
Duration:

Description

Add python3.7.x compatibility to the artdaq_database package.

History

#1 Updated by Gennadiy Lukhanin 5 months ago

  • % Done changed from 0 to 70
  • Status changed from New to Work in progress

#2 Updated by Gennadiy Lukhanin 3 months ago

  • % Done changed from 70 to 100
  • Status changed from Work in progress to Resolved

Made artdaq_database python 3.x compatible.

Testing instructions:

  1. Install artdaq_demo v3_7_2
  2. Download and install python 3_7_2 from scisoft
  3. Download and install artdaq_database v1_04_82
  4. Test exporting and importing of run and archived configurations from your run_records directory with conftool.py

#3 Updated by Ron Rechenmacher 2 months ago

  • Status changed from Resolved to Reviewed

I ran the demo to create run records directory $MRB_TOP/run_records/1.
I downloaded and installed python

/mu2e/ups
products@mu2edaq13 $ curl https://scisoft.fnal.gov/scisoft/packages/python/v3_7_2/python-3.7.2-sl7-x86_64.tar.bz2 | tar xjf -
tar_opts='--exclude lost+found --totals --one-file-system --sparse' 1='xjf' 2='-'; time tar $1 $2 $tar_opts 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 39.2M  100 39.2M    0     0  6386k      0  0:00:06  0:00:06 --:--:-- 6790k
Total bytes read: 174448640 (167MiB, 28MiB/s)

real    0m6.321s
user    0m5.859s
sys     0m0.562s
--2020-02-06_13:36:36--

downloaded and installed artdaq_database-1.04.82, the e17 varients.

/home/products
products@mu2edaq13 $ urls='https://scisoft.fnal.gov/scisoft/packages/artdaq_database/v1_04_82/artdaq_database-1.04.82-slf7-x86_64-e17-s82p3-debug.tar.bz2
> https://scisoft.fnal.gov/scisoft/packages/artdaq_database/v1_04_82/artdaq_database-1.04.82-slf7-x86_64-e17-s82p3-prof.tar.bz2
> https://scisoft.fnal.gov/scisoft/packages/artdaq_database/v1_04_82/artdaq_database-1.04.82-slf7-x86_64-e17-s83p3-debug.tar.bz2
> https://scisoft.fnal.gov/scisoft/packages/artdaq_database/v1_04_82/artdaq_database-1.04.82-slf7-x86_64-e17-s83p3-prof.tar.bz2
> https://scisoft.fnal.gov/scisoft/packages/artdaq_database/v1_04_82/artdaq_database-1.04.82-slf7-x86_64-e17-s85p3-debug.tar.bz2
> https://scisoft.fnal.gov/scisoft/packages/artdaq_database/v1_04_82/artdaq_database-1.04.82-slf7-x86_64-e17-s85p3-prof.tar.bz2
> https://scisoft.fnal.gov/scisoft/packages/artdaq_database/v1_04_82/artdaq_database-1.04.82-slf7-x86_64-e17-s87p3-debug.tar.bz2
> https://scisoft.fnal.gov/scisoft/packages/artdaq_database/v1_04_82/artdaq_database-1.04.82-slf7-x86_64-e17-s87p3-prof.tar.bz2
> https://scisoft.fnal.gov/scisoft/packages/artdaq_database/v1_04_82/artdaq_database-1.04.82-slf7-x86_64-e17-s92p3-debug.tar.bz2
> https://scisoft.fnal.gov/scisoft/packages/artdaq_database/v1_04_82/artdaq_database-1.04.82-slf7-x86_64-e17-s92p3-prof.tar.bz2
> https://scisoft.fnal.gov/scisoft/packages/artdaq_database/v1_04_82/artdaq_database-1.04.82-slf7-x86_64-e17-s94p3-debug.tar.bz2
> https://scisoft.fnal.gov/scisoft/packages/artdaq_database/v1_04_82/artdaq_database-1.04.82-slf7-x86_64-e17-s94p3-prof.tar.bz2'
--2020-02-06_13:32:21--

and did
for url in $urls;do echo url=$url; curl $url | tar xjf -;done

Then I made sure I had an ARTDAQ_DATABASE_URI defined:

/home/ron/work/artdaqPrj/demo6-v3_07_01/run_records/1
ron@mu2edaq13 :^) efind URI
ARTDAQ_DATABASE_URI=filesystemdb:///home/ron/databases/filesystemdb/test_db
--2020-02-06_13:47:04--

I cd to run_records dir and, after adding write access to the directory:

/home/ron/work/artdaqPrj/demo6-v3_07_01/run_records/1
ron@mu2edaq13 :^) chmod u+w .
--2020-02-06_13:49:00--
/home/ron/work/artdaqPrj/demo6-v3_07_01/run_records/1
ron@mu2edaq13 :^) conftool.py importConfiguration demo_safemode
New configuration demo_safemode00001
Info: Copied /mu2e/ups/artdaq_database/v1_04_82/slf7.x86_64.e17.s85p3.prof/conf/schema.fcl to schema.fcl
Warning: The following files will be excluded from being loaded into the artdaq database ./ranks.txt, ./environment.txt, ./setup.txt, ./known_boardreaders_list.txt, ./boot.txt, ./metadata.txt, ./settings.txt. Update schema.fcl to include them.
Error: Importing of incomplete configurations is not allowed;set ARTDAQ_DATABASE_ALLOW_INCOMPLETE_CONFIGURATIONS to TRUE to allow.
None
--2020-02-06_13:49:06--

I then:

/home/ron/work/artdaqPrj/demo6-v3_07_01/run_records/1
ron@mu2edaq13 :^) export ARTDAQ_DATABASE_ALLOW_INCOMPLETE_CONFIGURATIONS=TRUE
--2020-02-06_14:06:28--
/home/ron/work/artdaqPrj/demo6-v3_07_01/run_records/1
ron@mu2edaq13 :^) conftool.py importConfiguration demo_safemode
New configuration demo_safemode00001
Warning: The following files will be excluded from being loaded into the artdaq database ./ranks.txt, ./environment.txt, ./setup.txt, ./known_boardreaders_list.txt, ./boot.txt, ./metadata.txt, ./settings.txt. Update schema.fcl to include them.
Imported ('DataLoggers', 'DataLogger1', './DataLogger1.fcl')
Imported ('SystemLayout', 'schema', './schema.fcl')
Imported ('EventBuilders', 'EventBuilder1', './EventBuilder1.fcl')
Imported ('EventBuilders', 'EventBuilder2', './EventBuilder2.fcl')
Imported ('Components', 'component02', './component02.fcl')
Imported ('Components', 'component01', './component01.fcl')
Imported ('Dispatchers', 'Dispatcher1', './Dispatcher1.fcl')
Imported ('Hashes', 'hashes', './hashes.fcl')
New configuration demo_safemode00001
None
--2020-02-06_14:06:36--
/home/ron/work/artdaqPrj/demo6-v3_07_01/run_records/1
ron@mu2edaq13 :^) conftool.py getListOfAvailableRunConfigurations
demo_safemode00001
--2020-02-06_14:06:49--
/home/ron/work/artdaqPrj/demo6-v3_07_01/run_records/1
ron@mu2edaq13 :^) cd ..
--2020-02-06_14:07:51--
/home/ron/work/artdaqPrj/demo6-v3_07_01/run_records
ron@mu2edaq13 :^) mkdir cfgtst
--2020-02-06_14:08:02--
/home/ron/work/artdaqPrj/demo6-v3_07_01/run_records
ron@mu2edaq13 :^) cd cfgtst/
--2020-02-06_14:08:09--
/home/ron/work/artdaqPrj/demo6-v3_07_01/run_records/cfgtst
ron@mu2edaq13 :^) conftool.py exportConfiguration demo_safemode00001
Last configuration demo_safemode00001
Exported ('SystemLayout', 'schema', 'schema.fcl')
Exported ('Hashes', 'hashes', 'hashes.fcl')
Exported ('Components', 'component01', 'demo_safemode/component01.fcl')
Exported ('Components', 'component02', 'demo_safemode/component02.fcl')
Exported ('EventBuilders', 'EventBuilder1', 'demo_safemode/EventBuilder1.fcl')
Exported ('EventBuilders', 'EventBuilder2', 'demo_safemode/EventBuilder2.fcl')
Exported ('DataLoggers', 'DataLogger1', 'demo_safemode/DataLogger1.fcl')
Exported ('Dispatchers', 'Dispatcher1', 'demo_safemode/Dispatcher1.fcl')
True
--2020-02-06_14:08:49--
/home/ron/work/artdaqPrj/demo6-v3_07_01/run_records/cfgtst
ron@mu2edaq13 :^) ls
total 12
drwxrwxrwx 2 ron 4096 Feb  6 14:08 demo_safemode/
-rw-rw-rw- 1 ron  342 Feb  6 14:08 hashes.fcl
-rw-rw-rw- 1 ron 3197 Feb  6 14:08 schema.fcl
--2020-02-06_14:09:17--
/home/ron/work/artdaqPrj/demo6-v3_07_01/run_records/cfgtst
ron@mu2edaq13 :^) ls demo_safemode
total 24
-rw-rw-rw- 1 ron 1365 Feb  6 14:08 component01.fcl
-rw-rw-rw- 1 ron 1366 Feb  6 14:08 component02.fcl
-rw-rw-rw- 1 ron 2306 Feb  6 14:08 DataLogger1.fcl
-rw-rw-rw- 1 ron 1088 Feb  6 14:08 Dispatcher1.fcl
-rw-rw-rw- 1 ron 2082 Feb  6 14:08 EventBuilder1.fcl
-rw-rw-rw- 1 ron 2082 Feb  6 14:08 EventBuilder2.fcl
--2020-02-06_14:09:41--
/home/ron/work/artdaqPrj/demo6-v3_07_01/run_records/cfgtst
ron@mu2edaq13 :^) ls ../1/*.fcl
-r--r--r-- 1 ron 2165 Feb  6 13:44 ../1/component01.fcl
-r--r--r-- 1 ron 2166 Feb  6 13:44 ../1/component02.fcl
-r--r--r-- 1 ron 3719 Feb  6 13:44 ../1/DataLogger1.fcl
-r--r--r-- 1 ron 1792 Feb  6 13:44 ../1/Dispatcher1.fcl
-r--r--r-- 1 ron 3485 Feb  6 13:44 ../1/EventBuilder1.fcl
-r--r--r-- 1 ron 3485 Feb  6 13:44 ../1/EventBuilder2.fcl
-rw-rw-rw- 1 ron 3195 Feb  6 13:49 ../1/schema.fcl
--2020-02-06_14:09:58--
/home/ron/work/artdaqPrj/demo6-v3_07_01/run_records/cfgtst
ron@mu2edaq13 :^) ups active
Active ups products:
artdaq_database   v1_04_82        -f Linux64bit+3.10-2.17 -q e17:prof:s85p3  -z /mu2e/ups
boost             v1_66_0a        -f Linux64bit+3.10-2.17 -q e17:prof        -z /mu2e/ups
cetpkgsupport     v1_14_01        -f NULL                                    -z /mu2e/ups
gcc               v7_3_0          -f Linux64bit+3.10-2.17                    -z /mu2e/ups
mongodb           v4_0_8b         -f Linux64bit+3.10-2.17 -q e17:prof        -z /mu2e/ups
python            v3_7_2          -f Linux64bit+3.10-2.17                    -z /mu2e/ups
sqlite            v3_26_00_00     -f Linux64bit+3.10-2.17                    -z /mu2e/ups
ups               v6_0_7          -f Linux64bit+3.10-2.17                    -z /mu2e/ups
--2020-02-06_14:10:59--

Above shows the verification that python 3 was used.
Changed status to reviewed.



Also available in: Atom PDF