Ctest failed: Required regular expression not found

Hi all,

I have installed allpix squared with all of its prerequisites, as well as HEPMC3 and LCIO, but when running

ctest

the installation pass most of the test except for the following:

The following tests FAILED:
	133 - modules/DepositionGenerator/01-hepmcascii (Failed)
	134 - modules/DepositionGenerator/02-hepmcttree (Failed)
	138 - modules/DepositionLaser/04_1_refraction (Failed)
	139 - modules/DepositionLaser/04_2_refraction (Failed)
	140 - modules/DepositionLaser/04_3_refraction (Failed)
	141 - modules/DepositionLaser/04_4_refraction (Failed)
	142 - modules/DepositionLaser/04_5_refraction (Failed)
	143 - modules/DepositionLaser/04_6_refraction (Failed)

The verbose output of the first two (the remaining ones have the same error, but too many characters to post) is

Start testing: Jun 10 10:43 CEST
----------------------------------------------------------
133/270 Testing: modules/DepositionGenerator/01-hepmcascii
133/270 Test: modules/DepositionGenerator/01-hepmcascii
Command: "/home/usr/Documents/allpix/allpix-squared/etc/unittests/run_directory.sh" "modules/DepositionGenerator/01-hepmcascii" "/home/usr/Documents/allpix/allpix-squared/bin/allpix -c /home/usr/Documents/allpix/allpix-squared/build/src/modules/DepositionGenerator/tests/01-hepmcascii.conf " "python /home/usr/Documents/allpix/allpix-squared/etc/scripts/create_hepmc3_file.py --type b --events 2 --seed 0"
Directory: /home/usr/Documents/allpix/allpix-squared/build/testing
"modules/DepositionGenerator/01-hepmcascii" start time: Jun 10 10:43 CEST
Output:
----------------------------------------------------------
Moving to WORKINGDIR
modules/DepositionGenerator/01-hepmcascii
/home/usr/Documents/allpix/allpix-squared/build/testing/modules/DepositionGenerator/01-hepmcascii
Running BEFORE_SCRIPT
python /home/usr/Documents/allpix/allpix-squared/etc/scripts/create_hepmc3_file.py --type b --events 2 --seed 0
Seeding PRNG with seed 0
Processing event 0
Processing event 1
Running TEST
/home/usr/Documents/allpix/allpix-squared/bin/allpix -c /home/usr/Documents/allpix/allpix-squared/build/src/modules/DepositionGenerator/tests/01-hepmcascii.conf 
|10:43:17.938|  (STATUS) Welcome to Allpix^2 v3.1.0-2-ga552a3f89-dirty
|10:43:17.939|  (STATUS) Initialized PRNG with configured seed 0
|10:43:18.144|  (STATUS) Loading module GeometryBuilderGeant4
|10:43:18.144|  (STATUS) Loading module DepositionGenerator  
|10:43:18.145|  (STATUS) Loading module ElectricFieldReader 
|10:43:18.145|  (STATUS) Loading module ProjectionPropagation
|10:43:18.146|  (STATUS) Loaded 4 modules                     
|10:43:18.146|  (STATUS) Multithreading enabled, processing events in parallel on 15 worker threads
|10:43:18.146|  (STATUS) Allocating a total of 3840 event slots for buffered modules
|10:43:18.146|  (STATUS) Initializing 14 module instantiations
|10:43:18.165|    (INFO) [I:DepositionGenerator] Successfully opened data file "/home/usr/Documents/allpix/allpix-squared/build/testing/modules/DepositionGenerator/01-hepmcascii/hepmc3.txt"
|10:43:18.166|    (INFO) [I:DepositionGenerator] Using G4 physics list "FTFP_BERT_LIV"
|10:43:18.166|    (INFO) [I:DepositionGenerator] Setting G4 production cut to 60um, derived from properties of detector "face0"
|10:43:18.166|    (INFO) [I:DepositionGenerator] Setting minimum kinetic energy for tracks to 3.64eV, derived from material of detector "face0"
|10:43:19.603|  (STATUS) Initialized 14 module instantiations
|10:43:19.610|  (STATUS) Starting event loop
|10:43:19.646|    (INFO) (Event 1) [R:DepositionGenerator] Deposited 789714 charges in sensor of detector face4
|10:43:19.659|  (STATUS) Buffered 0, finished 1 of 1 events
|10:43:19.660|  (STATUS) Finished run of 1 events          
|10:43:19.674|    (INFO) [F:DepositionGenerator] Deposited total of 789714 charges in 6 sensor(s) (average of 131619 per sensor for every event)
|10:43:19.681|  (STATUS) Finalization completed
|10:43:19.682|  (STATUS) Executed 14 instantiations in 1 seconds, spending 97% of time in slowest instantiation DepositionGenerator
|10:43:19.682|  (STATUS) Average processing time is 49.3831ms/event, event generation at 20 Hz
|10:43:19.682|  (STATUS) This corresponds to a processing time of 740.746ms/event per worker
<end of output>
Test time =   1.97 sec
----------------------------------------------------------
Test Fail Reason:
Required regular expression not found. Regex=[\(INFO\) \(Event 1\) \[R:DepositionGenerator\] Deposited 753500 charges in sensor of detector face4
]
"modules/DepositionGenerator/01-hepmcascii" end time: Jun 10 10:43 CEST
"modules/DepositionGenerator/01-hepmcascii" time elapsed: 00:00:01
----------------------------------------------------------

134/270 Testing: modules/DepositionGenerator/02-hepmcttree
134/270 Test: modules/DepositionGenerator/02-hepmcttree
Command: "/home/usr/Documents/allpix/allpix-squared/etc/unittests/run_directory.sh" "modules/DepositionGenerator/02-hepmcttree" "/home/usr/Documents/allpix/allpix-squared/bin/allpix -c /home/usr/Documents/allpix/allpix-squared/build/src/modules/DepositionGenerator/tests/02-hepmcttree.conf " "python /home/usr/Documents/allpix/allpix-squared/etc/scripts/create_hepmc3_file.py --type a --events 2 --seed 0"
Directory: /home/usr/Documents/allpix/allpix-squared/build/testing
"modules/DepositionGenerator/02-hepmcttree" start time: Jun 10 10:43 CEST
Output:
----------------------------------------------------------
Moving to WORKINGDIR
modules/DepositionGenerator/02-hepmcttree
/home/usr/Documents/allpix/allpix-squared/build/testing/modules/DepositionGenerator/02-hepmcttree
Running BEFORE_SCRIPT
python /home/usr/Documents/allpix/allpix-squared/etc/scripts/create_hepmc3_file.py --type a --events 2 --seed 0
Seeding PRNG with seed 0
Processing event 0
Processing event 1
Running TEST
/home/usr/Documents/allpix/allpix-squared/bin/allpix -c /home/usr/Documents/allpix/allpix-squared/build/src/modules/DepositionGenerator/tests/02-hepmcttree.conf 
|10:43:20.189|  (STATUS) Welcome to Allpix^2 v3.1.0-2-ga552a3f89-dirty
|10:43:20.190|  (STATUS) Initialized PRNG with configured seed 0
|10:43:20.397|  (STATUS) Loading module GeometryBuilderGeant4
|10:43:20.397|  (STATUS) Loading module DepositionGenerator  
|10:43:20.397|  (STATUS) Loading module ElectricFieldReader 
|10:43:20.398|  (STATUS) Loading module ProjectionPropagation
|10:43:20.398|  (STATUS) Loaded 4 modules                     
|10:43:20.398|  (STATUS) Multithreading enabled, processing events in parallel on 15 worker threads
|10:43:20.398|  (STATUS) Allocating a total of 3840 event slots for buffered modules
|10:43:20.399|  (STATUS) Initializing 14 module instantiations
|10:43:20.514|    (INFO) [I:DepositionGenerator] Successfully opened data file "/home/usr/Documents/allpix/allpix-squared/build/testing/modules/DepositionGenerator/02-hepmcttree/hepmc3.root"
|10:43:20.515|    (INFO) [I:DepositionGenerator] Using G4 physics list "FTFP_BERT_LIV"
|10:43:20.515|    (INFO) [I:DepositionGenerator] Setting G4 production cut to 60um, derived from properties of detector "face0"
|10:43:20.515|    (INFO) [I:DepositionGenerator] Setting minimum kinetic energy for tracks to 3.64eV, derived from material of detector "face0"
|10:43:21.931|  (STATUS) Initialized 14 module instantiations
|10:43:21.938|  (STATUS) Starting event loop
|10:43:21.971|    (INFO) (Event 1) [R:DepositionGenerator] Deposited 789714 charges in sensor of detector face4
|10:43:21.985|  (STATUS) Buffered 0, finished 1 of 1 events
|10:43:21.986|  (STATUS) Finished run of 1 events          
|10:43:22.000|    (INFO) [F:DepositionGenerator] Deposited total of 789714 charges in 6 sensor(s) (average of 131619 per sensor for every event)
|10:43:22.007|  (STATUS) Finalization completed
|10:43:22.007|  (STATUS) Executed 14 instantiations in 1 seconds, spending 97% of time in slowest instantiation DepositionGenerator
|10:43:22.007|  (STATUS) Average processing time is 48.2608ms/event, event generation at 21 Hz
|10:43:22.007|  (STATUS) This corresponds to a processing time of 723.912ms/event per worker
<end of output>
Test time =   2.33 sec
----------------------------------------------------------
Test Fail Reason:
Required regular expression not found. Regex=[\(INFO\) \(Event 1\) \[R:DepositionGenerator\] Deposited 753500 charges in sensor of detector face4
]
"modules/DepositionGenerator/02-hepmcttree" end time: Jun 10 10:43 CEST
"modules/DepositionGenerator/02-hepmcttree" time elapsed: 00:00:02
----------------------------------------------------------

What could be causing these “errors”?
I am using the following versions:

  • Ubuntu: 24.04 LTS
  • Geant4: v11.2.1
  • ROOT: 6.32.00
  • Allpix2: v3.1.0-2

Geant4, ROOT, Allpix2, and the applicable dependencies, have been built from source.
It doesn’t seem to be anything fatal, but it is enough for me to be worried that something might be wrong and needs to be fixed before I continue with simulating anything important.

Any help is appreciated, and let me know if more information is needed!

It would seem as if the recieved regex is not the same as the expected one. When changing the expected regex the installation passes all of the tests. This does not feel like a solid solution since one changes the expected incident angle to the one in the output.
I do not know if the tests done by ctest are supposed to get the same output on all machines and by changing the expected regex one masks errors that can be problematic in the long run.

If someone have some additional information, please let me know.

Dear @rickard

The test are indeed supposed to work and produce exactly the same resulting any machine - given the right version of the dependencies.

We are tracking LCG releases and therefore not always have the very latest version as dependency.

For practical purpose however, this has no impact - the reason for the difference is likely a different usage of random numbers and therefore a differing output. You may proceed with your own simulations anyway!

I will have a look what the reason for the differences is once I’m back in the office.

Best
Simon

Dear @simonspa

Thank you for the reply.
I suspected as much, but good to have confirmation.

Best,
Rickard