Git Product home page Git Product logo

legend-swdev-scripts's People

Contributors

gipert avatar iguinn avatar jasondet avatar oschulz avatar schwarzmario avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

legend-swdev-scripts's Issues

Set C++ standard version automatically

Instead of using

cmd(f'{preconfigure}cmake -S MaGe/source -B MaGe/build -DCMAKE_CXX_STANDARD=14 -DCMAKE_INSTALL_PREFIX={install_path}')

we use get the C++ standard version ROOT was built with, e.g. via root-config --cflags | sed 's/.*std=c++\([0-9]\+\).*/\1/'

installMaGe fails during compilation of MaGe files

Running the script installMaGe.py in Legend Docker Container (https://github.com/legend-exp/legendexp_legend-base_img) to build MGDO, MaGe and GAT, an error occurs during the compilation of MaGe files. As a consequence, I cannot complete the installation of MaGe.

I run the container on Linux Ubuntu 18.04 with the following commands:

docker pull legendexp/legend-base:latest
docker run -it  -v "$HOME":"/home/user":consistent -v "${HOME}/legend-base":"/root":delegated \  
          -p 8888:8888 -p 14500:14500 legendexp/legend-base:latest

Then, I copied the installMaGe.py script in ${HOME}/legend-base and run the following commands from within the container:

mkdir dirinstall
python /root/installMaGe.py /root/dirinstall/
source /root/setup_mage.sh
python /root/installMaGe.py /root/dirinstall/

When it starts compiling the MaGe files, the following error occurs:

Compiling MGImportanceAlgorithm.cc ...
src/MGImportanceAlgorithm.cc: In member function 'virtual G4Nsplit_Weight MGImportanceAlgorithm::Calculate(G4double, G4double, G4double) const':
src/MGImportanceAlgorithm.cc:87:28: error: could not convert '{0, 0}' from '<brace-enclosed initializer list>' to 'G4Nsplit_Weight'
   G4Nsplit_Weight nw = {0,0};
                            ^
make[1]: *** [/root/MaGe/tmp/Linux-g++/geometry/MGImportanceAlgorithm.o] Error 1
make: *** [geometry] Error 2
Entering directory geometry
make[1]: Entering directory `/root/MaGe/geometry'
Compiling MGImportanceAlgorithm.cc ...
src/MGImportanceAlgorithm.cc: In member function 'virtual G4Nsplit_Weight MGImportanceAlgorithm::Calculate(G4double, G4double, G4double) const':
src/MGImportanceAlgorithm.cc:87:28: error: could not convert '{0, 0}' from '<brace-enclosed initializer list>' to 'G4Nsplit_Weight'
   G4Nsplit_Weight nw = {0,0};
                            ^
make[1]: *** [/root/MaGe/tmp/Linux-g++/geometry/MGImportanceAlgorithm.o] Error 1
make[1]: Leaving directory `/root/MaGe/geometry'
make: *** [install] Error 2

The complete log file is attached.
install.log

installMaGe.py not compatible with python 3.6.8 (in current docker version)

Dear legend group,
The current version of the docker image contains python 3.6.8 which is not compatible with the signature of the subprocess command.

I solved this compatibility issue changing the installMaGe.py code at line 57:
pwd = subprocess.run(['pwd'], capture_output=True, encoding="utf-8").stdout.rstrip()
with
pwd = subprocess.check_output(['pwd'], encoding="utf-8").rstrip()

pygama install script fails when running build_ext

Running pygama_install.sh within the legend docker container (legendexp/legend-base:latest) fails when running build_ext. To reproduce, change the INSTALL_PREFIX within the script to a valid directory (I used /home/src) and run the script. It seems to be complaining about a missing CMakeLists.txt file in pygama/cygama/pybind11. Here is the error message:

CMake Error at CMakeLists.txt:15 (add_subdirectory):
The source directory

/home/src/pygama/cygama/pybind11

does not contain a CMakeLists.txt file.

CMake Error at CMakeLists.txt:18 (pybind11_add_module):
Unknown CMake command "pybind11_add_module".

-- Configuring incomplete, errors occurred!
See also "/home/src/pygama/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "setup.py", line 82, in
zip_safe=False,
File "/opt/anaconda3/lib/python3.7/site-packages/setuptools/init.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/opt/anaconda3/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/opt/anaconda3/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/opt/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/opt/anaconda3/lib/python3.7/site-packages/setuptools/command/install.py", line 67, in run
self.do_egg_install()
File "/opt/anaconda3/lib/python3.7/site-packages/setuptools/command/install.py", line 109, in do_egg_install
self.run_command('bdist_egg')
File "/opt/anaconda3/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/opt/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/opt/anaconda3/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 172, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/opt/anaconda3/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 158, in call_command
self.run_command(cmdname)
File "/opt/anaconda3/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/opt/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/opt/anaconda3/lib/python3.7/site-packages/setuptools/command/install_lib.py", line 11, in run
self.build()
File "/opt/anaconda3/lib/python3.7/distutils/command/install_lib.py", line 107, in build
self.run_command('build_ext')
File "/opt/anaconda3/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/opt/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "setup.py", line 38, in run
self.build_extension(ext)
File "setup.py", line 67, in build_extension
cwd=self.build_temp, env=env)
File "/opt/anaconda3/lib/python3.7/subprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/home/src/pygama', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/src/pygama/build/lib.linux-x86_64-3.7/pygama', '-DPYTHON_EXECUTABLE=/opt/anaconda3/bin/python', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.