Issues regarding installation

Hi,

I was trying to install allpix-squared using lxplus. After cmake… , I tried to make install -j8 in the terminal. However, it showed two errors. Could you tell me what the issue could be? Here’s what it shows:

shbharth@lxplus778 allpix-squared] source /cvmfs/clicdp.cern.ch/software/allpix-squared/1.3/x86_64-centos7-gcc7-opt/setup.sh [shbharth@lxplus778 allpix-squared] cd build
[shbharth@lxplus778 build]$ make install -j 8
[ 6%] Built target apf_dump
[ 6%] Built target field_converter
[ 15%] Built target mesh_plotter
[ 18%] Built target CorryvreckanObjects
[ 21%] Built target AllpixObjects
[ 28%] Built target generate_potential
[ 44%] Built target mesh_converter
[ 47%] Built target AllpixCore
[ 57%] Built target AllpixModuleElectricFieldReader
[ 59%] Built target AllpixModuleCorryvreckanWriter
[ 59%] Built target AllpixModuleDummy
[ 57%] Built target AllpixModuleDefaultDigitizer
[ 59%] Built target AllpixModuleDepositionPointCharge
[ 59%] Built target AllpixModuleDetectorHistogrammer
[ 61%] Built target AllpixModuleCapacitiveTransfer
Scanning dependencies of target AllpixModuleInducedTransfer
Scanning dependencies of target AllpixModuleMagneticFieldReader
Scanning dependencies of target AllpixModuleProjectionPropagation
Scanning dependencies of target AllpixModulePulseTransfer
[ 63%] Built target AllpixModuleGenericPropagation
[ 65%] Building CXX object src/modules/GDMLOutputWriter/CMakeFiles/AllpixModuleGDMLOutputWriter.dir///core/module/dynamic_module_impl.cpp.o
Scanning dependencies of target AllpixModuleRCEWriter
[ 65%] Building CXX object src/modules/DepositionGeant4/CMakeFiles/AllpixModuleDepositionGeant4.dir///core/module/dynamic_module_impl.cpp.o
[ 65%] Building CXX object src/modules/GeometryBuilderGeant4/CMakeFiles/AllpixModuleGeometryBuilderGeant4.dir///core/module/dynamic_module_impl.cpp.o
g++: error: unrecognized command line option ‘-Qunused-arguments’; did you mean ‘-Wunused-parameter’?
make[2]: *** [src/modules/GeometryBuilderGeant4/CMakeFiles/AllpixModuleGeometryBuilderGeant4.dir///core/module/dynamic_module_impl.cpp.o] Error 1
make[1]: *** [src/modules/GeometryBuilderGeant4/CMakeFiles/AllpixModuleGeometryBuilderGeant4.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
g++: error: unrecognized command line option ‘-Qunused-arguments’; did you mean ‘-Wunused-parameter’?
g++: error: unrecognized command line option ‘-Qunused-arguments’; did you mean ‘-Wunused-parameter’?
make[2]: *** [src/modules/DepositionGeant4/CMakeFiles/AllpixModuleDepositionGeant4.dir///core/module/dynamic_module_impl.cpp.o] Error 1
make[1]: *** [src/modules/DepositionGeant4/CMakeFiles/AllpixModuleDepositionGeant4.dir/all] Error 2
[ 66%] Building CXX object src/modules/ProjectionPropagation/CMakeFiles/AllpixModuleProjectionPropagation.dir///core/module/dynamic_module_impl.cpp.o
[ 66%] Building CXX object src/modules/InducedTransfer/CMakeFiles/AllpixModuleInducedTransfer.dir/InducedTransferModule.cpp.o
[ 65%] Building CXX object src/modules/GDMLOutputWriter/CMakeFiles/AllpixModuleGDMLOutputWriter.dir/GDMLOutputWriterModule.cpp.o
[ 67%] Building CXX object src/modules/MagneticFieldReader/CMakeFiles/AllpixModuleMagneticFieldReader.dir///core/module/dynamic_module_impl.cpp.o
[ 67%] Building CXX object src/modules/InducedTransfer/CMakeFiles/AllpixModuleInducedTransfer.dir///core/module/dynamic_module_impl.cpp.o
[ 67%] Building CXX object src/modules/PulseTransfer/CMakeFiles/AllpixModulePulseTransfer.dir///core/module/dynamic_module_impl.cpp.o
make[2]: *** [src/modules/GDMLOutputWriter/CMakeFiles/AllpixModuleGDMLOutputWriter.dir///core/module/dynamic_module_impl.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs…
g++: error: unrecognized command line option ‘-Qunused-arguments’; did you mean ‘-Wunused-parameter’?
make[2]: *** [src/modules/GDMLOutputWriter/CMakeFiles/AllpixModuleGDMLOutputWriter.dir/GDMLOutputWriterModule.cpp.o] Error 1
make[1]: *** [src/modules/GDMLOutputWriter/CMakeFiles/AllpixModuleGDMLOutputWriter.dir/all] Error 2
[ 67%] Building CXX object src/modules/RCEWriter/CMakeFiles/AllpixModuleRCEWriter.dir///core/module/dynamic_module_impl.cpp.o
[ 69%] Building CXX object src/modules/PulseTransfer/CMakeFiles/AllpixModulePulseTransfer.dir/PulseTransferModule.cpp.o
[ 69%] Building CXX object src/modules/ProjectionPropagation/CMakeFiles/AllpixModuleProjectionPropagation.dir/ProjectionPropagationModule.cpp.o
[ 70%] Building CXX object src/modules/MagneticFieldReader/CMakeFiles/AllpixModuleMagneticFieldReader.dir/MagneticFieldReaderModule.cpp.o
[ 70%] Building CXX object src/modules/RCEWriter/CMakeFiles/AllpixModuleRCEWriter.dir/RCEWriterModule.cpp.o
[ 71%] Linking CXX shared library libAllpixModuleInducedTransfer.so
[ 72%] Linking CXX shared library libAllpixModuleProjectionPropagation.so
[ 73%] Linking CXX shared library libAllpixModuleMagneticFieldReader.so
[ 75%] Linking CXX shared library libAllpixModulePulseTransfer.so
Warning: Warning: Warning: Unused direct dependencies:
/afs/cern.ch/user/s/shbharth/allpix-squared/build/src/objects/libAllpixObjects.so
/cvmfs/clicdp.cern.ch/software/ROOT/6.08.06/x86_64-centos7-gcc7-opt/lib/libGeom.so
/cvmfs/clicdp.cern.ch/software/ROOT/6.08.06/x86_64-centos7-gcc7-opt/lib/libRIO.so
/cvmfs/clicdp.cern.ch/software/ROOT/6.08.06/x86_64-centos7-gcc7-opt/lib/libThread.so
/cvmfs/clicdp.cern.ch/software/ROOT/6.08.06/x86_64-centos7-gcc7-opt/lib/libHist.so
/cvmfs/clicdp.cern.ch/software/ROOT/6.08.06/x86_64-centos7-gcc7-opt/lib/libMatrix.so
/cvmfs/clicdp.cern.ch/software/ROOT/6.08.06/x86_64-centos7-gcc7-opt/lib/libMathCore.so
/lib64/libm.so.6
Unused direct dependencies:
/cvmfs/clicdp.cern.ch/software/ROOT/6.08.06/x86_64-centos7-gcc7-opt/lib/libGenVector.so
/cvmfs/clicdp.cern.ch/software/ROOT/6.08.06/x86_64-centos7-gcc7-opt/lib/libGeom.so
/cvmfs/clicdp.cern.ch/software/ROOT/6.08.06/x86_64-centos7-gcc7-opt/lib/libRIO.so
/cvmfs/clicdp.cern.ch/software/ROOT/6.08.06/x86_64-centos7-gcc7-opt/lib/libThread.so
/cvmfs/clicdp.cern.ch/software/ROOT/6.08.06/x86_64-centos7-gcc7-opt/lib/libMatrix.so
/cvmfs/clicdp.cern.ch/software/ROOT/6.08.06/x86_64-centos7-gcc7-opt/lib/libMathCore.so
Unused direct dependencies:
/cvmfs/clicdp.cern.ch/software/ROOT/6.08.06/x86_64-centos7-gcc7-opt/lib/libGenVector.so
/cvmfs/clicdp.cern.ch/software/ROOT/6.08.06/x86_64-centos7-gcc7-opt/lib/libGeom.so
/cvmfs/clicdp.cern.ch/software/ROOT/6.08.06/x86_64-centos7-gcc7-opt/lib/libRIO.so
/cvmfs/clicdp.cern.ch/software/ROOT/6.08.06/x86_64-centos7-gcc7-opt/lib/libThread.so
/cvmfs/clicdp.cern.ch/software/ROOT/6.08.06/x86_64-centos7-gcc7-opt/lib/libHist.so
/cvmfs/clicdp.cern.ch/software/ROOT/6.08.06/x86_64-centos7-gcc7-opt/lib/libMatrix.so
/cvmfs/clicdp.cern.ch/software/ROOT/6.08.06/x86_64-centos7-gcc7-opt/lib/libMathCore.so
Warning: Unused direct dependencies:
/cvmfs/clicdp.cern.ch/software/ROOT/6.08.06/x86_64-centos7-gcc7-opt/lib/libGenVector.so
/cvmfs/clicdp.cern.ch/software/ROOT/6.08.06/x86_64-centos7-gcc7-opt/lib/libGeom.so
/cvmfs/clicdp.cern.ch/software/ROOT/6.08.06/x86_64-centos7-gcc7-opt/lib/libRIO.so
/cvmfs/clicdp.cern.ch/software/ROOT/6.08.06/x86_64-centos7-gcc7-opt/lib/libThread.so
/cvmfs/clicdp.cern.ch/software/ROOT/6.08.06/x86_64-centos7-gcc7-opt/lib/libMatrix.so
/cvmfs/clicdp.cern.ch/software/ROOT/6.08.06/x86_64-centos7-gcc7-opt/lib/libMathCore.so
/lib64/libm.so.6
[ 75%] Built target AllpixModuleInducedTransfer
[ 75%] Built target AllpixModuleMagneticFieldReader
[ 75%] Built target AllpixModuleProjectionPropagation
[ 75%] Built target AllpixModulePulseTransfer
[ 76%] Linking CXX shared library libAllpixModuleRCEWriter.so
Warning: Unused direct dependencies:
/cvmfs/clicdp.cern.ch/software/ROOT/6.08.06/x86_64-centos7-gcc7-opt/lib/libGenVector.so
/cvmfs/clicdp.cern.ch/software/ROOT/6.08.06/x86_64-centos7-gcc7-opt/lib/libGeom.so
/cvmfs/clicdp.cern.ch/software/ROOT/6.08.06/x86_64-centos7-gcc7-opt/lib/libHist.so
/cvmfs/clicdp.cern.ch/software/ROOT/6.08.06/x86_64-centos7-gcc7-opt/lib/libMathCore.so
/cvmfs/clicdp.cern.ch/software/ROOT/6.08.06/x86_64-centos7-gcc7-opt/lib/libNet.so
/cvmfs/clicdp.cern.ch/software/ROOT/6.08.06/x86_64-centos7-gcc7-opt/lib/libThread.so
[ 76%] Built target AllpixModuleRCEWriter
make: *** [all] Error 2

Best regards,
Shudhashil

Hi @shbharth

for me this works flawlessly. What I do is:

$ mkdir build && cd build
$ source ../etc/scripts/setup_lxplus.sh
$ cmake ..
$ make install

This goes through without issue:

[...]
[ 98%] Built target AllpixModuleVisualizationGeant4
Scanning dependencies of target allpix
[100%] Building CXX object src/exec/CMakeFiles/allpix.dir/allpix.cpp.o
[100%] Linking CXX executable allpix
[100%] Built target allpix
Install the project...
-- Installing: /afs/cern.ch/user/s/simonspa/tmp/allpix-squared/bin/generate_potential
-- Set runtime path of "/afs/cern.ch/user/s/simonspa/tmp/allpix-squared/bin/generate_potential" to "/afs/cern.ch/user/s/simonspa/tmp/allpix-squared/lib:/cvmfs/clicdp.cern.ch/software/ROOT/6.08.06/x86_64-centos7-llvm40-opt/lib"
2020-03-09 15:20 simonspa@lxplus752:build (v1.4-stable)$ 

Are you sure you have no local changes? Also, better don’t source the setup of the installed CVFMS version as it sets the library path and executable path to this installation, not your local one.

If you don’t need to change things, just use the version you have sourced.

Cheers,

Simon

Hi Simon,

Thank you for your response. I treid to reinstall from the scratch and do the sourcing as per your suggestion but I get the following:

[shbharth@lxplus778 ~] cd allpix-squared/ [shbharth@lxplus778 allpix-squared] mkdir build && cd build
[shbharth@lxplus778 build]$ source …/etc/scripts/setup_lxplus.sh
Compiler type set to LLVM.
-bash: /cvmfs/sft.cern.ch/lcg/views/96b/x86_64-centos7-clang8-opt/setup.sh: No such file or directory

Best regards,
Shudhashil

Hi Simon,

Thank you for your response. I treid to reinstall from the scratch and do the sourcing as per your suggestion but I get the following:

[shbharth@lxplus778 ~] cd allpix-squared/ [shbharth@lxplus778 allpix-squared] mkdir build && cd build
[shbharth@lxplus778 build]$ source …/etc/scripts/setup_lxplus.sh
Compiler type set to LLVM.
-bash: /cvmfs/sft.cern.ch/lcg/views/96b/x86_64-centos7-clang8-opt/setup.sh: No such file or directory

Best regards,
Shudhashil

Hi @shbharth

something in your setup still isn’t completely right - are you sure there are no locally modified files? The path it tries to open is not the one set by the scripts without modification, check here:

The default LCG name is not 96b as in your example but it is LCG_96b. Then also the access works:

2020-03-10 11:07 simonspa@lxplus763:~$ ls /cvmfs/sft.cern.ch/lcg/views/LCG_96b/x86_64-centos7-clang8-opt/setup.sh 
/cvmfs/sft.cern.ch/lcg/views/LCG_96b/x86_64-centos7-clang8-opt/setup.sh

Do you by any chance have LCG_VERSION exported in your session? Check with echo $LCG_VERSION.

Cheers,
Simon

Dear @simonspa

I met the similar question when I try to install ap2 on lxplus.
git clone https://gitlab.cern.ch/allpix-squared/allpix-squared.git allpix-squared cd allpix-squared
$ source etc/scripts/setup_lxplus.sh

First two steps done, when I try to source the setup_lxplus.sh,
[wangsh@lxplus733 allpix-squared] source etc/scripts/setup_lxplus.sh No explicit LCG version set, using LCG_96b. Compiler type set to LLVM, version clang8. [wangsh@lxplus733 allpix-squared] source etc/scripts/setup_lxplus.sh
Compiler type set to LLVM, version clang8.
-bash: /cvmfs/sft.cern.ch/lcg/views/96b/x86_64-centos7-clang8-opt/setup.sh: No such file or directory
yes

Then,
[wangsh@lxplus733 allpix-squared]$ echo $LCG_VERSION
96b

I didn’t change anything in setup_lxplus.sh.

Cheers,
Shen

That’s very odd because in the script you are sourcing we set export LCG_VERSION="LCG_96b" as you can see from the printout, too. Also, I cannot reproduce this when I log onto lxplus.

In any case, I tried to solve your issue by renaming the variable so there is no clash with anything predefined, it’s now called ALLPIX_LCG_VERSION.

Could you test again with the latest version from the master branch?

Also - I might repeat myself - unless you want to develop code there is no need to install or build this on LXPLUS - please use the CVMFS installation by simply running

$ source /cvmfs/clicdp.cern.ch/software/allpix-squared/1.4.4/x86_64-centos7-gcc7-opt/setup.sh

and you are ready to run. No installation, no compilation, no nothing. Please use. :slight_smile:

Dear @simonspa, Thanks for your response, I tested again and still same output.

Yes, I ran allpix2 by sourcing cvmfs before.
But now I want to build some new detector model, but it seems impossible adding models to fold
/cvmfs/clicdp.cern.ch/…/1.4.4/…/Allpix/models, because it’s read only. That’s also why I tried to install allpix2 in lxplus. Do you konw how to add new detector model?

Cheers,
Shen

Dear @wangsh

for adding a new detector model there is no need to touch a single line of code. Simply prepare your detector model file and in your configuration set

[Allpix]
model_paths = /path/to/your/model

[...]

as described in the user manual: https://project-allpix-squared.web.cern.ch/project-allpix-squared/usermanual/allpix-manualch4.html#x5-190004.2

Best regards,
Simon

Dear @simonspa ,

Yes,this is the path to the detector. From the manual 4.1.3 detector configuration, it says at first a string refer to detector type should be defined. Can I also define my detector type at my local path? Because as section 5.4.3 says, the model exist in the search path of the repository, where I cannot touch.

Cheers,
Shen

Dear @wangsh

you are mixing a few things here.

  • The detector geometry where all your detectors and their placements are defined is set via the detectors_file parameter.
  • Allpix squared searches for detector models (so the files that describe how exactly your detector looks like) in many different paths. Among others, this is the installation path for the already shipped models. But also the path set via model_paths (can be multiple) like described in the manual, Section 4.2 which I linked for you. Furthermore, in Section 5.4.3 it says:

Search order for models
To support different detector models and storage locations, the framework searches different paths for model files in the following order:

  1. If defined, the paths provided in the global model_paths parameter are searched first. Files are read and parsed directly. If the path is a directory, all files in the directory are added (without recursing into subdirectories).
  2. The location where the models are installed to (refer to the description of the MODEL_DIRECTORY variable in Section 3.5).
  3. The standard data paths on the system as given by the environmental variable $XDG_ DATA_DIRS with “Allpix/models” appended. The $XDG_DATA_DIRS variable defaults to /usr/local/share/ (thus effectively /usr/local/share/Allpix/models) followed by /usr/share/ (effectively /usr/share/Allpix/models).

I hope this clarifies things.

Best regards,
Simon

Dear all,
I am unsure whether I should have created a new issue or not, but since I am encountering problems while trying to install allpix squared I guess this is a good place to ask questions.

I am attempting to install allpix squared on Linux slurm-nice-devel2904 5.4.0-91-generic.
While trying to build allpix squared (running make) I am getting the following error message:

In file included from /home/esrf/baussens/allpix_squared/allpix_src/src/tools/geant4/MTRunManager.cpp:12:
/home/esrf/baussens/allpix_squared/allpix_src/src/tools/geant4/MTRunManager.hpp:125:14: error: ‘void allpix::MTRunManager::RequestWorkersProcessCommandsStack()’ marked ‘override’, but does not override
  125 |         void RequestWorkersProcessCommandsStack() override {}
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/esrf/baussens/allpix_squared/allpix_src/src/tools/geant4/MTRunManager.hpp:159:14: error: ‘void allpix::MTRunManager::ThisWorkerProcessCommandsStackDone()’ marked ‘override’, but does not override
  159 |         void ThisWorkerProcessCommandsStackDone() override {}
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Scanning dependencies of target AllpixModuleDepositionPointCharge
make[2]: *** [src/tools/geant4/CMakeFiles/AllpixGeant4Interface.dir/build.make:63: src/tools/geant4/CMakeFiles/AllpixGeant4Interface.dir/MTRunManager.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2101: src/tools/geant4/CMakeFiles/AllpixGeant4Interface.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

Do you have any idea what this error means and how to solve it?

Cheers,
Oriane

PS:
I am not sure if it is related but I did get a warning while running cmake on allpix squared source regarding the fact that geant4 ‘gdml’ option was not found. I disregarded this warning since the option was turned off while running cmake.
Side question: Is the gdml option necessary to run allpix squared or can I just leave it off?

Hi @baussens

May I ask which version of Geant4 you are using? It looks like our run manager does not like the one from Geant4 it tries to extend :slight_smile:

Concerning GDML: as long as you do not need this functionality, it is completely fine to keep it off.

Best regards,
Simon

Hello Simon @simonspa,

Thank you for responding to me so quickly.
I am using Geant4-v11.0.1. I think it is the most current version. I have installed it a couple of days ago. The installation appeared to be fine. I ran the built-in basic example B1 to test it and it worked.
Do you think it is a version problem? Or maybe an installation issue?

Cheers,
Oriane

Hi Oriane,

I just compiled a Geant4 v11.0.1 for myself and tried to reproduce the issue but I can’t - for me it works just fine, and the lines reported in the error are unchanged for more than two years :slight_smile:

What version of Allpix Squared are you trying to compile, and are there any local changes to the code?

What does

$ geant4-config --prefix --version --libs --cflags

report for you?

All the best,
Simon

Hello again Simon,

I have followed the instructions from the user manual to get allpix squared source so I have used the command:

$ git clone https://gitlab.cern.ch/allpix-squared/allpix-squared

I guess it is the newest version but maybe I am wrong.

The command

$ geant4-config --prefix --version --libs --cflags

gives the following output

/home/esrf/baussens/geant4/geant4_install/bin/..
11.0.1
-L/home/esrf/baussens/geant4/geant4_install/bin/../lib -lG4OpenGL -lG4gl2ps -lG4Tree -lG4FR -lG4GMocren -lG4visHepRep -lG4RayTracer -lG4VRML -lG4vis_management -lG4modeling -lG4interfaces -lG4persistency -lG4error_propagation -lG4readout -lG4physicslists -lG4tasking -lG4run -lG4event -lG4tracking -lG4parmodels -lG4processes -lG4analysis -lG4digits_hits -lG4track -lG4particles -lG4geometry -lG4materials -lG4graphics_reps -lG4intercoms -lG4global -lG4tools -lG4clhep -lG4zlib -lG4ptl
-DG4VIS_USE_OPENGL -DG4UI_USE_TCSH -DG4UI_USE_QT -DG4VIS_USE_OPENGLQT -I/usr/include/x86_64-linux-gnu/qt5/ -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/lib/x86_64-linux-gnu/qt5//mkspecs/linux-g++ -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtOpenGL -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -W -Wall -pedantic -Wno-non-virtual-dtor -Wno-long-long -Wwrite-strings -Wpointer-arith -Woverloaded-virtual -Wno-variadic-macros -Wshadow -pipe -std=c++17 -I/home/esrf/baussens/geant4/geant4_install/bin/../include/Geant4

I have installed geant4 on my personal folder because I do not have administrative rights but some of the prerequisite libraries such as Qt were already installed in /usr. There might be a mismatch there.

Thank you very much for your help,
Oriane

Hi Oriane,

unfortunately that’s almost exactly the setup where I tried to reproduce the problem. The ALlpix Squared version is indeed the latest master branch version, so that is fine, Geant4 is also the version I use regularly and it seems to be installed properly.

I’m a bit at a loss here, especially since the files where the error occur have not been touched in more than two years :thinking:

Could you maybe as in the Geant4 forum and see if they have an idea what happens there?

Sorry for that,
Simon

Hi Simon,

Ok. Thank you for your help anyways.
I will take your advice and venture to other forums.

I will post an update here once the issue is solved.

Thanks again,
Oriane

Here is an update:
I solved the issue I was facing. The problem was that the variable Geant4_DIR pointed to an older version of geant4 that had previously been installed on a shared working network. I changed the value of Geant4_DIR to my path to geant4 and now it works.

Great to hear, @baussens - thanks for letting us know! :slight_smile:

Happy simulations,
Simon