Hi,
I am following the instructions at
https://picongpu.readthedocs.io/en/latest/install/instructions/spack.html
# get spack
git clone https://github.com/spack/spack.git $HOME/src/spack
$HOME/src/spack/bin/spack bootstrap
# activate the spack environment
# note: add this to your $HOME/.profile - otherwise you have to
# do this every time you open a new terminal
. $HOME/src/spack/share/spack/setup-env.sh
# install a supported compiler
spack install [email protected]
spack load [email protected]
spack compiler add
spack install picongpu %[email protected]
spack load picongpu %[email protected]
I have already placed $HOME/src/spack/share/spack/./setup-env.sh to .profile.
After successful install of gcc-5.4.0 or gcc-7.1.0, when I try to load the gcc, the following error occurs:
ajitup@plasma01:~> $HOME/src/spack/bin/spack load [email protected]
==> Error: 'module' object has no attribute 'print_help'
and subsequently all further commands fail.
Kindly help me resolve this issue.
Regards,
Ajit
Can you report this issue [...] Thanks for the report, I encountered this before and forgot to report it. I now posted the issue directly upstream to spack in https://github.com/spack/spack/issues/6196
Does it work if you only run spack load [email protected] instead of adding the whole path again?
I can reported the issue now to upstream, for now just do not add $HOME/src/spack/bin/ to spack load
Long story short: spack load must not be used with an absolute path before it since it is a shell function and not an executable.
The error message is currently confusing and will be changed upstream.
https://github.com/spack/spack/issues/6196#issuecomment-342759183
No it gives the same error. I also tried with other versions of gcc and it gave same error.
ajitup@plasma01:~> spack load [email protected]
==> Error: 'module' object has no attribute 'print_help'
ajitup@plasma01:~>
I have already placed $HOME/src/spack/share/spack/./setup-env.sh to .profile.
@ajitup73 there is a small syntax error. you should add:
. $HOME/src/spack/share/spack/setup-env.sh
instead to your $HOME/.profile.
(Afterwards, open a new terminal before you proceed.)
I edited and then opened a new terminal. The error is still there.
ajitup@plasma01:~> pwd
/home/ajitup
ajitup@plasma01:~> spack load [email protected]
==> Error: 'module' object has no attribute 'print_help'
can you please post the output of
tail -n 3 $HOME/.profile
ls $HOME/src/spack
?
(remove sensitive info if needed)
spack install [email protected]
==> gcc is already installed in /home/ajitup/src/spack/opt/spack/linux-opensuse42-x86_64/gcc-7.1.0/gcc-5.4.0-eo2rbaelyeomw6r7eaboplgmi4t72ngu
spack load [email protected]
==> Error: 'module' object has no attribute 'print_help'
tail -n 3 $HOME/.profile
. $HOME/src/spack/share/spack/setup-env.sh
ls $HOME/src/spack
bin etc lib LICENSE NOTICE opt pytest.ini README.md share templates var
ls -al $HOME/src/spack
total 88
drwxr-xr-x 10 ajitup users 4096 Nov 8 16:10 .
drwxr-xr-x 28 ajitup users 4096 Nov 1 15:27 ..
drwxr-xr-x 2 ajitup users 90 Nov 1 10:59 bin
-rw-r--r-- 1 ajitup users 690 Oct 31 15:33 .codecov.yml
-rw-r--r-- 1 ajitup users 746 Oct 31 15:33 .coveragerc
drwxr-xr-x 3 ajitup users 27 Oct 31 15:33 etc
-rw-r--r-- 1 ajitup users 648 Oct 31 15:33 .flake8
-rw-r--r-- 1 ajitup users 831 Oct 31 15:33 .flake8_packages
drwxr-xr-x 8 ajitup users 211 Oct 31 15:33 .git
-rw-r--r-- 1 ajitup users 351 Oct 31 15:33 .gitignore
drwxr-xr-x 3 ajitup users 27 Oct 31 15:33 lib
-rw-r--r-- 1 ajitup users 26426 Oct 31 15:33 LICENSE
-rw-r--r-- 1 ajitup users 5896 Oct 31 15:33 .mailmap
-rw-r--r-- 1 ajitup users 1592 Oct 31 15:33 NOTICE
drwxr-xr-x 3 ajitup users 27 Oct 31 15:34 opt
-rw-r--r-- 1 ajitup users 114 Oct 31 15:33 pytest.ini
-rw-r--r-- 1 ajitup users 4512 Oct 31 15:33 README.md
drwxr-xr-x 3 ajitup users 27 Oct 31 15:33 share
drwxr-xr-x 3 ajitup users 29 Oct 31 15:33 templates
-rw-r--r-- 1 ajitup users 5060 Oct 31 15:33 .travis.yml
drwxr-xr-x 3 ajitup users 27 Oct 31 15:33 var
Did you run spack bootstrap? Looks like you are lacking tcl modules.
Yes. I did run it in the sequence it is written.
Here are the results of a re-run:
spack bootstrap
==> Requirement environment-modules is satisfied with installed package [email protected]%gcc@7~X arch=linux-opensuse42-x86_64 ^[email protected]%gcc@7 arch=linux-opensuse42-x86_64 ^[email protected]%gcc@7+optimize+pic+shared arch=linux-opensuse42-x86_64
Weird. In which directory are you when running spack load gcc? In $HOME?
Ouch, I just realized putting it into $HOME/.profile does not help you.
Please remove that, I will update the documentation.
Instead, just source it manually for now please: . $HOME/src/spack/share/spack/setup-env.sh
Thanks. I could reach to
spack install picongpu %[email protected]
The command is running now.
Thanks n regards,
Ajit
All right, sorry for the bump!
NOW COMES THIS ERROR:---------
1 error found in build log:
19 -- Building RELEASE version
20 -- Parallel HDF5 found. Building parallel version
21 -- Found MPI_C: /home/ajitup/src/spack/opt/spack/linux-opensuse42-x86_64/gcc-5.4.0/openmpi-3.0.0-rid2d3qv34nrj5nkll45q25wkvvcmskn/lib64/libmpi.so
22 -- Found MPI_CXX: /home/ajitup/src/spack/opt/spack/linux-opensuse42-x86_64/gcc-5.4.0/openmpi-3.0.0-rid2d3qv34nrj5nkll45q25wkvvcmskn/lib64/libmpi_cxx.so;/home/ajitup/src/spack/opt/spack/linux-opensuse42-x86_64/gcc-5.4.0/openmpi-3.0.0-rid2d3qv34nrj5nkll45q25wkvvcmskn/lib64/libmpi.so
23 -- Building splashtools
24 -- Building splashtools parallel version
25 CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
26 Please set them or make sure they are set and tested correctly in the CMake files:
27 HDF5_sz_LIBRARY
28 linked by target "splash_static" in directory /home/ajitup/src/spack/var/spack/stage/libsplash-1.6.0-ssndo7amzg5wah4ytyk3zz7avzx4yfvy/libSplash-1.6.0
29 linked by target "splash" in directory /home/ajitup/src/spack/var/spack/stage/libsplash-1.6.0-ssndo7amzg5wah4ytyk3zz7avzx4yfvy/libSplash-1.6.0
30 -- Configuring incomplete, errors occurred!
Please provide a little bit more information :)
From the log that you get before this error occurs, can you tell:
Does this happen in the libSplash build step?
Which HDF5 version was taken?
Which CMake version was taken?
I tried to reproduce it but did not see this error before.
An independent build of splash in a separate directory shows following:-
cmake -DCMAKE_INSTALL_PREFIX=/home/ajitup/src/splash-install ../
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building libSplash version 1.6.0
-- Found HDF5: /usr/lib64/libhdf5.so;/usr/lib64/libpthread.so;HDF5_sz_LIBRARY-NOTFOUND;/usr/lib64/libz.so;/usr/lib64/libdl.so;/usr/lib64/libm.so (found suitable version "1.10.0", minimum required is "1.8.6")
-- Building RELEASE version
-- Parallel HDF5 NOT found. Building serial version
-- Building splashtools
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
HDF5_sz_LIBRARY
linked by target "splash" in directory /home/ajitup/src/LIBS/splash
linked by target "splash_static" in directory /home/ajitup/src/LIBS/splash
-- Configuring incomplete, errors occurred!
HERE ALSO IT IS ASKING FOR ENVIRONMENT VARIABLE "HDF5_sz_LIBRARY-NOTFOUND".
CMakeOutput.log for independent splash build and BUILD-LOG FOR picongpu %[email protected] ARE ATTACHED
Hi,
I could find out the problem. It was some serial version of hdf5 installed with netcdf in /usr/lib64/ which was causing problem. After I removed it while uninstalling netcdf, the problem got rectified.
"spack info picongpu " shows adios & isac to be off. How to install these along with picongpu?
Thanks.
Hi,
plasma01:~> spack install isaac %[email protected] was successful
However, plasma01:~> spack install adios %[email protected] gave errors. spack-build.log is attached.
plasma01:~> spack install picongpu %[email protected]
plasma01:~> spack load picongpu %[email protected]
have worked successfully. Subsequently, I did
spack install picongpu adios=True isaac=True %[email protected]
and it worked.
Thanks
Very well done!
ISAAC is a live visualization which you probably do not need right away and ADIOS is an alternative for HDF5 output if data gets really, really large.
The short hand to install ISAAC and ADIOS would be:
spack install picongpu+adios+isaac %[email protected]
spack load picongpu+adios+isaac %[email protected]
(both are currently not default-enabled in the spack package you are using. If you do not need them yet, skip them to save some compile time.).
Hi,
Now "pic-build" gives a path error:
picongpu@plasma01:~/picInputs/myLWFA> source $HOME/src/spack/share/spack/setup-env.sh
picongpu@plasma01:~/picInputs/myLWFA> spack load picongpu+adios+isaac %[email protected]
picongpu@plasma01:~/picInputs/myLWFA> pic-build
ERROR: Could not find directory 'include/picongpu'!
Are you in a PIConGPU input directory?
I tried to set the path in .bashrc to (the directory where spack has installed picongpu) $HOME/src/spack/opt/spack/linux-opensuse42-x86_64/gcc-5.4.0/picongpu-develop-yrxejwjwmcffy7pymnf63pfzvwwdzf2s/
but the problem persists. Kindly help me resolve this.
Also let me know what *.cfg file I need for running picongpu on a workstation.
My system config: Workstation with 2 nividia Quadro K4200 GPUs (cuda compatible), 128 GB RAM, openSuSe Leap 42.3.
Regards,
Ajit
Huh, that's confusing.
Did you run pic-create $PIC_EXAMPLES/LaserWakefield $HOME/picInputs/myLWFA?
Can you please share the output of:
echo $PIC_EXAMPLES
ls $PIC_EXAMPLES
ls ~/picInputs/myLWFA
?
Yes, I had done it. I removed the myLWFA directory and repeated the command pic-create as listed below. the ~/src/picongpu is a clone of git repository. Here are the output of the commands:
picongpu@plasma01:~> source $HOME/src/spack/share/spack/setup-env.sh
picongpu@plasma01:~> echo $PIC_EXAMPLES
/home/picongpu/src/picongpu/examples/
picongpu@plasma01:~> ls $PIC_EXAMPLES
Bremsstrahlung Empty LaserWakefield SingleParticleTest WarmCopper
Bunch KelvinHelmholtz limits.yml ThermalTest WeibelTransverse
picongpu@plasma01:~> ls $PIC_EXAMPLES/LaserWakefield
cmakeFlags include README.rst submit
picongpu@plasma01:~> pic-create $PIC_EXAMPLES/LaserWakefield $HOME/picInputs/myLWFA
picongpu@plasma01:~> ls ~/picInputs/myLWFA
cmakeFlags etc lib
picongpu@plasma01:~> ls ~/picInputs/myLWFA/etc/picongpu/
bash draco-mpcdf judge-fzj picongpu.profile submitAction.sh
cpuNumaStarter.sh hydra-hzdr keeneland-gt picongpu.profile~ taurus-tud
cuda.filter hypnos-hzdr lawrencium-lbnl pizdaint-cscs titan-ornl
davinci-rice joker-tud openib.conf scorep.filter
picongpu@plasma01:~> ls ~/picInputs/myLWFA/lib/python/picongpu/
__init__.py input plugins utils
picongpu@plasma01:~> pic-build
ERROR: Could not find directory 'include/picongpu'!
Are you in a PIConGPU input directory?
picongpu@plasma01:~>
Ah I see the problem now. You are mixing two install methods, the "development" (upcoming 0.4.0) install and a manual version of PIConGPU in src/picongpu which you mix with a manual picongpu.profile.
If you install via spack install picongpu (which will install an unstable "dev" version until the next release, so be warned), just do spack load ... with the same parameters as your spack install picongpu.... This will set $PIC_EXAMPLES correctly. You then do not need an other src/picongpu for now.
I had done the same as suggested by you.
picongpu@plasma01:~> spack install picongpu+adios+isaac %[email protected]
==> picongpu is already installed in /home/picongpu/src/spack/opt/spack/linux-opensuse42-x86_64/gcc-5.4.0/picongpu-develop-yrxejwjwmcffy7pymnf63pfzvwwdzf2s
picongpu@plasma01:~> spack load picongpu+adios+isaac %[email protected]
but the install directory of picongpu does not have any Example directory. Here is the listing of installed directory:
picongpu@plasma01:~> ls /home/picongpu/src/spack/opt/spack/linux-opensuse42-x86_64/gcc-5.4.0/picongpu-develop-yrxejwjwmcffy7pymnf63pfzvwwdzf2s
bin etc lib pic-compile pic-create share thirdParty
buildsystem include pic-build pic-configure pic-edit src
picongpu@plasma01:~> echo $PIC_EXAMPLES
it didn't show anything.
Also, when I didn't see the "Example" directory here, I cloned picongpu to ~/src/picongpu and exported $PIC_EXAMPLE to the example directory. If I don't clone then, from where should I use the example files? Also, it doesn't set $PIC_EXAMPLES automatically, I had to do it manually.
export PIC_EXAMPLES=$HOME/src/spack/opt/spack/linux-opensuse42-x86_64/gcc-5.4.0/picongpu-develop-yrxejwjwmcffy7pymnf63pfzvwwdzf2s/examples
Is it alright?
can you please check if the git repo under $HOME/src/spack-repo is up to date?
Please update it
git fetch
git pull --ff-only
then spack uninstall picongpu --all and spack install picongpu ... again.
Please be aware that you are trying a development feature in dev. I am still working on it heavily and spack is not yet stable either.
The recommended, manual install for version 0.3.1 is unfortunately still "build from source" and is documented here:
https://picongpu.readthedocs.io/en/0.3.1/install/compile.html
https://picongpu.readthedocs.io/en/0.3.1/install/dependencies.html
Thanks Axel,
I would say that this concept of installation with spack is great and going to be convenient to users.
I will try the release 0.3.1 with build from source method.
Thanks again.
Thanks a lot!
We are trying hard to make install as easy as possible but there are a few corner-cases still to fix until the release, thank you a lot for testing!
I you like, I can ping you for spack tests when we updated the build recipe :) Are you on our user mailing list as well?
I welcome your ping for spack tests. I am on user mailing list.
Thanks.