ComputationalRadiationPhysics / picongpu

Performance-Portable Particle-in-Cell Simulations for the Exascale Era :sparkles:
https://picongpu.readthedocs.io
Other
704 stars 217 forks source link

Ubuntu: libPMacc not found by CMake (system `types.h`) #796

Closed anshumang closed 9 years ago

anshumang commented 9 years ago

I am getting the following error on the latest release beta-rc6 -

[ 16%] [ 33%] [ 50%] Scanning dependencies of target mpiInfo Building NVCC (Device) object build_picongpu/CMakeFiles/picongpu.dir//./picongpu_generated_main.cu.o Building NVCC (Device) object build_picongpu/build_cuda_memtest/CMakeFiles/cuda_memtest.dir//./cuda_memtest_generated_tests.cu.o Building NVCC (Device) object build_picongpu/build_cuda_memtest/CMakeFiles/cuda_memtest.dir//./cuda_memtest_generated_cuda_memtest.cu.o [ 66%] Building CXX object build_picongpu/build_mpiInfo/CMakeFiles/mpiInfo.dir/main.cpp.o In file included from /home/agoswami/computationalRadiationPhysics/picongpu-beta-rc6/src/picongpu/include/simulation_defines.hpp:26:0, from /home/agoswami/computationalRadiationPhysics/picongpu-beta-rc6/src/picongpu/main.cu:32: /home/agoswami/computationalRadiationPhysics/picongpu-beta-rc6/src/picongpu/include/simulation_types.hpp:25:35: fatal error: algorithms/TypeCast.hpp: No such file or directory

include "algorithms/TypeCast.hpp"

                               ^

compilation terminated. CMake Error at picongpu_generated_main.cu.o.cmake:206 (message): Error generating /home/agoswami/computationalRadiationPhysics/picongpu-beta-rc6/temp-build/build_picongpu/CMakeFiles/picongpu.dir//./picongpu_generated_main.cu.o

make[2]: * [build_picongpu/CMakeFiles/picongpu.dir/./picongpu_generated_main.cu.o] Error 1 make[1]: * [build_picongpu/CMakeFiles/picongpu.dir/all] Error 2 make[1]: ** Waiting for unfinished jobs.... /home/agoswami/computationalRadiationPhysics/picongpu-beta-rc6/src/cuda_memtest/cuda_memtest.cu: In function ‘void display_deviceinfo(cudaDeviceProp)’: /home/agoswami/computationalRadiationPhysics/picongpu-beta-rc6/src/cuda_memtest/cuda_memtest.cu:113:212: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 7 has type ‘size_t {aka long unsigned int}’ [-Wformat=] PRINTF("Device name=%s, global memory size=%llu\n", prop->name, prop->totalGlobalMem); ^ /home/agoswami/computationalRadiationPhysics/picongpu-beta-rc6/src/cuda_memtest/cuda_memtest.cu:113:413: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 6 has type ‘size_t {aka long unsigned int}’ [-Wformat=] PRINTF("Device name=%s, global memory size=%llu\n", prop->name, prop->totalGlobalMem); ^ Scanning dependencies of target cuda_memtest [ 83%] Building CXX object build_picongpu/build_cuda_memtest/CMakeFiles/cuda_memtest.dir/misc.cpp.o Linking CXX executable cuda_memtest [ 83%] Built target cuda_memtest Linking CXX executable mpiInfo [ 83%] Built target mpiInfo make: _* [all] Error 2

ax3l commented 9 years ago

can you pls try again with the actual latest release branch, which is release-0.1.0?

Can you pls post the output of a fresh cmake run with that, too?

anshumang commented 9 years ago

I checked out the release-0.1.0 branch but still getting the same error. Please find below the output from the cmake run =>

agoswami@shiva:~/computationalRadiationPhysics/picongpu/build-temp$ ../configure ../examples/KelvinHelmholtz/ cmake command: cmake -DCUDA_ARCH=sm_20 -DCMAKE_INSTALL_PREFIX=../examples/KelvinHelmholtz/ -DPIC_EXTENSION_PATH=../examples/KelvinHelmholtz/ .. -- Found CUDA: /usr/local/cuda-6.0 (found suitable version "6.0", minimum required is "5.0") -- Debug version -- Boost version: 1.54.0 -- Found the following Boost libraries: -- program_options -- regex -- filesystem -- system -- Found CUDA: /usr/local/cuda-6.0 (found version "6.0") -- Could NOT find NVML (missing: NVML_INCLUDE_DIR) -- Boost version: 1.54.0 -- Found the following Boost libraries: -- program_options -- Can NOT find 'adios_config' - set ADIOS_ROOT or check your PATH -- Could NOT find ADIOS (missing: ADIOS_LIBRARIES ADIOS_INCLUDE_DIRS) (Required is at least version "1.6.0") -- Can NOT find libSplash for HDF5 output - set SPLASH_ROOT -- Could NOT find Splash (missing: Splash_LIBRARIES Splash_INCLUDE_DIRS) (Required is at least version "1.2.4") -- Can NOT find PNGwriter - set PNGWRITER_ROOT -- Could NOT find PNGwriter (missing: PNGwriter_LIBRARIES PNGwriter_INCLUDE_DIRS) -- Configuring done -- Generating done -- Build files have been written to: /home/agoswami/computationalRadiationPhysics/picongpu/build-temp

anshumang commented 9 years ago

It's gotta be due to some change in my environment because I am getting the same error in my existing work area for PIConGPU, too. I tried re-running cmake and building on another machine and it works fine so I should be able to proceed for now. But I am really interested to find out the cause of this error.

ax3l commented 9 years ago

can you pls clean the build directory and run cmake again, the output is very short which means it did take an old set.

can you create a fresh case with createParameterSet so we can be sure it's not an incompatibility from an update of the code base (with an old param set)? It looks a bit like you are using an old setup/case but updated the PIConGPU main source.

anshumang commented 9 years ago

Still getting the error, here are my steps - 1) Download the latest release and extract 2) cd picongpu-beta-rc6 3) mkdir temp-build temp-build/paramSets 4) cd temp-build 5) ../createParameterSet ../examples/KelvinHelmholtz ./paramSets/KH 6) ../configure ./paramSets/KH 7) make -j12

ax3l commented 9 years ago

If you go to the source directory where you extraced PIConGPU to, what does

find ./src -name TypeCast*

print?

Can you please try it again with the release-branch of 0.1.0?

git clone https://github.com/ComputationalRadiationPhysics/picongpu.git
cd picongpu
git checkout -b release-0.1.0 origin/release-0.1.0

what is your compiler and operating system?

anshumang commented 9 years ago

It prints - ./src/libPMacc/include/algorithms/TypeCast.hpp

I did a fresh clone and checked out the release branch. And then followed steps 3 to 7 from above. Still the same error :(

host compiler => g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2 cuda compiler => Cuda compilation tools, release 6.5, V6.5.12 OS => Ubuntu 14.04.1 LTS

ax3l commented 9 years ago

found with @psychocoderHPC: wait, you do build in-source!

Step 3 and 4: do not create your build-temp directory in a sub-folder of the picongpu/ source directory.

Also do not create the param directory in the build directory

also, please avoid building an example directly but run createParameterSet to clone from it - into an other directory that is again nota sub-directory of picongpu, first.

does that fix it?

ax3l commented 9 years ago

Please try to follow the instructions in our INSTALL file, there are many steps mixed and many directories not correctly placed :) Please use the directory structure we suggest in Step 1 :)

anshumang commented 9 years ago

Sorry I deviated from the INSTALL.md recommendations slightly .... but the build-temp and param-sets-temp directory placements never created any trouble before...

So I created two directories, build-temp and param-sets-temp under the same top-level directory where I cloned (and checked out the release branch of) picongpu. This is the directory structure => top-level |--- picongpu |--- build-temp |--- param-sets-temp

cd build-temp ../picongpu/createParameterSet ../picongpu/examples/KelvinHelmholtz ../param-sets-temp/KH

../picongpu/configure ../param-sets-temp/KH

Output=> cmake command: cmake -DCUDA_ARCH=sm_20 -DCMAKE_INSTALL_PREFIX=../param-sets-temp/KH/ -DPIC_EXTENSION_PATH=../param-sets-temp/KH/ ../picongpu -- The C compiler identification is GNU 4.8.2 -- The CXX compiler identification is GNU 4.8.2 -- 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 -- 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 -- Found CUDA: /usr/local/cuda (found suitable version "6.5", minimum required is "5.0") -- Debug version -- Found MPI_C: /usr/lib/libmpi.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libhwloc.so
-- Found MPI_CXX: /usr/lib/libmpi_cxx.so;/usr/lib/libmpi.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libhwloc.so
-- Looking for include file pthread.h -- Looking for include file pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE
-- Boost version: 1.54.0 -- Found the following Boost libraries: -- program_options -- regex -- filesystem -- system -- Found CUDA: /usr/local/cuda (found version "6.5") -- Could NOT find NVML (missing: NVML_INCLUDE_DIR) -- Boost version: 1.54.0 -- Found the following Boost libraries: -- program_options -- Can NOT find 'adios_config' - set ADIOS_ROOT or check your PATH -- Could NOT find ADIOS (missing: ADIOS_LIBRARIES ADIOS_INCLUDE_DIRS) (Required is at least version "1.6.0") -- Can NOT find libSplash for HDF5 output - set SPLASH_ROOT -- Could NOT find Splash (missing: Splash_LIBRARIES Splash_INCLUDE_DIRS) (Required is at least version "1.2.4") -- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8") -- Found PNG: /usr/lib/x86_64-linux-gnu/libpng.so (found suitable version "1.2.50", minimum required is "1.2.9") -- Can NOT find PNGwriter - set PNGWRITER_ROOT -- Could NOT find PNGwriter (missing: PNGwriter_LIBRARIES PNGwriter_INCLUDE_DIRS) -- Configuring done -- Generating done -- Build files have been written to: /home/agoswami/computationalRadiationPhysics/release-branch/build-temp

make -j12

Output=> [ 16%] [ 33%] [ 50%] Scanning dependencies of target mpiInfo Building NVCC (Device) object build_picongpu/CMakeFiles/picongpu.dir//./picongpu_generated_main.cu.o Building NVCC (Device) object build_picongpu/build_cuda_memtest/CMakeFiles/cuda_memtest.dir//./cuda_memtest_generated_cuda_memtest.cu.o Building NVCC (Device) object build_picongpu/build_cuda_memtest/CMakeFiles/cuda_memtest.dir//./cuda_memtest_generated_tests.cu.o [ 66%] Building CXX object build_picongpu/build_mpiInfo/CMakeFiles/mpiInfo.dir/main.cpp.o In file included from /home/agoswami/computationalRadiationPhysics/release-branch/picongpu/src/picongpu/include/simulation_defines.hpp:26:0, from /home/agoswami/computationalRadiationPhysics/release-branch/picongpu/src/picongpu/main.cu:32: /home/agoswami/computationalRadiationPhysics/release-branch/picongpu/src/picongpu/include/simulation_types.hpp:25:35: fatal error: algorithms/TypeCast.hpp: No such file or directory

include "algorithms/TypeCast.hpp"

                               ^

compilation terminated. CMake Error at picongpu_generated_main.cu.o.cmake:206 (message): Error generating /home/agoswami/computationalRadiationPhysics/release-branch/build-temp/build_picongpu/CMakeFiles/picongpu.dir//./picongpu_generated_main.cu.o

make[2]: * [build_picongpu/CMakeFiles/picongpu.dir/./picongpu_generated_main.cu.o] Error 1 make[1]: * [build_picongpu/CMakeFiles/picongpu.dir/all] Error 2 make[1]: * Waiting for unfinished jobs.... Linking CXX executable mpiInfo [ 66%] Built target mpiInfo Scanning dependencies of target cuda_memtest [ 83%] Building CXX object build_picongpu/build_cuda_memtest/CMakeFiles/cuda_memtest.dir/misc.cpp.o Linking CXX executable cuda_memtest [ 83%] Built target cuda_memtest make: * [all] Error 2

Still the same error !!! I am at a loss :(

psychocoderHPC commented 9 years ago

Please run cmake -L in your build folder, git status in the picongpu folder and post the output.

psychocoderHPC commented 9 years ago

Please also run make VERBOSE=1 from your build folder.

anshumang commented 9 years ago

Thanks @psychocoderHPC for the pointers....sorry I was unable to respond earlier... Here are the steps and their corresponding outputs => git status On branch release-0.1.0 Your branch is up-to-date with 'origin/release-0.1.0'.

Untracked files: (use "git add ..." to include in what will be committed)

temp-build/

nothing added to commit but untracked files present (use "git add" to track)

cmake -L => CMake Error: The source directory "/home/agoswami/computationalRadiationPhysics/release-branch/build-temp" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI. -- Cache values ADIOS_CONFIG:FILEPATH=ADIOS_CONFIG-NOTFOUND CMAKE_BUILD_TYPE:STRING= CMAKE_INSTALL_PREFIX:PATH=/home/agoswami/computationalRadiationPhysics/release-branch/param-sets-temp/KH CUDA_ARCH:STRING=sm_20 CUDA_BUILD_CUBIN:BOOL=OFF CUDA_BUILD_EMULATION:BOOL=OFF CUDA_FTZ:STRING=--ftz=false CUDA_HOST_COMPILER:FILEPATH=/usr/bin/cc CUDA_KEEP_FILES:BOOL=OFF CUDA_MATH:STRING=--use_fast_math CUDA_MEMTEST_DIR:PATH=/home/agoswami/computationalRadiationPhysics/release-branch/picongpu/src/cuda_memtest CUDA_MEMTEST_RELEASE:BOOL=ON CUDA_SDK_ROOT_DIR:PATH=CUDA_SDK_ROOT_DIR-NOTFOUND CUDA_SEPARABLE_COMPILATION:BOOL=OFF CUDA_SHOW_CODELINES:BOOL=OFF CUDA_SHOW_REGISTER:BOOL=OFF CUDA_TOOLKIT_ROOT_DIR:PATH=/usr/local/cuda CUDA_VERBOSE_BUILD:BOOL=OFF MPI_EXTRA_LIBRARY:STRING=/usr/lib/libmpi.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libhwloc.so MPI_INFO_DIR:PATH=/home/agoswami/computationalRadiationPhysics/release-branch/picongpu/src/mpiInfo MPI_LIBRARY:FILEPATH=/usr/lib/libmpi_cxx.so PIC_COPY_ON_INSTALL:STRING=include/simulation_defines;submit PIC_ENABLE_INSITU_VOLVIS:BOOL=OFF PIC_EXTENSION_PATH:PATH=/home/agoswami/computationalRadiationPhysics/release-branch/param-sets-temp/KH PIC_RELEASE:BOOL=OFF PIC_VERBOSE:STRING=1 PMACC_BLOCKING_KERNEL:BOOL=OFF PMACC_ROOT_DIR:PATH=/usr/local PMACC_VERBOSE:STRING=0 PNGwriter_ROOT_DIR:PATH=PNGwriter_ROOT_DIR-NOTFOUND SCOREP_ENABLE:BOOL=OFF Splash_ROOT_DIR:PATH=Splash_ROOT_DIR-NOTFOUND VAMPIR_ENABLE:BOOL=OFF VT_INST_FILE_FILTER:STRING=stl,usr/include,libgpugrid,vector_types.h,Vector.hpp,DeviceBuffer.hpp,DeviceBufferIntern.hpp,Buffer.hpp,StrideMapping.hpp,StrideMappingMethods.hpp,MappingDescription.hpp,AreaMapping.hpp,AreaMappingMethods.hpp,ExchangeMapping.hpp,ExchangeMappingMethods.hpp,DataSpace.hpp,Manager.hpp,Manager.tpp,Transaction.hpp,Transaction.tpp,TransactionManager.hpp,TransactionManager.tpp,Vector.tpp,Mask.hpp,ITask.hpp,EventTask.hpp,EventTask.tpp,StandartAccessor.hpp,StandartNavigator.hpp,HostBuffer.hpp,HostBufferIntern.hpp VT_INST_FUNC_FILTER:STRING=vector,Vector,dim3,GPUGrid,execute,allocator,Task,Manager,Transaction,Mask,operator,DataSpace,PitchedBox,Event,new,getGridDim,GetCurrentDataSpaces,MappingDescription,getOffset,getParticlesBuffer,getDataSpace,getInstance

anshumang commented 9 years ago

make VERBOSE=1 =>

/usr/bin/cmake -H/home/agoswami/computationalRadiationPhysics/release-branch/picongpu -B/home/agoswami/computationalRadiationPhysics/release-branch/build-temp --check-build-system CMakeFiles/Makefile.cmake 0 /usr/bin/cmake -E cmake_progress_start /home/agoswami/computationalRadiationPhysics/release-branch/build-temp/CMakeFiles /home/agoswami/computationalRadiationPhysics/release-branch/build-temp/CMakeFiles/progress.marks make -f CMakeFiles/Makefile2 all make[1]: Entering directory /home/agoswami/computationalRadiationPhysics/release-branch/build-temp' make -f build_picongpu/CMakeFiles/picongpu.dir/build.make build_picongpu/CMakeFiles/picongpu.dir/depend make[2]: Entering directory/home/agoswami/computationalRadiationPhysics/release-branch/build-temp' /usr/bin/cmake -E cmake_progress_report /home/agoswami/computationalRadiationPhysics/release-branch/build-temp/CMakeFiles 5 [ 16%] Building NVCC (Device) object build_picongpu/CMakeFiles/picongpu.dir//./picongpu_generated_main.cu.o cd /home/agoswami/computationalRadiationPhysics/release-branch/build-temp/build_picongpu/CMakeFiles/picongpu.dir && /usr/bin/cmake -E make_directory /home/agoswami/computationalRadiationPhysics/release-branch/build-temp/build_picongpu/CMakeFiles/picongpu.dir//. cd /home/agoswami/computationalRadiationPhysics/release-branch/build-temp/build_picongpu/CMakeFiles/picongpu.dir && /usr/bin/cmake -D verbose:BOOL=1 -D build_configuration:STRING=Debug -D generated_file:STRING=/home/agoswami/computationalRadiationPhysics/release-branch/build-temp/build_picongpu/CMakeFiles/picongpu.dir//./picongpu_generated_main.cu.o -D generated_cubin_file:STRING=/home/agoswami/computationalRadiationPhysics/release-branch/build-temp/build_picongpu/CMakeFiles/picongpu.dir//./picongpu_generated_main.cu.o.cubin.txt -P /home/agoswami/computationalRadiationPhysics/release-branch/build-temp/build_picongpu/CMakeFiles/picongpu.dir//picongpu_generated_main.cu.o.cmake -- Removing /home/agoswami/computationalRadiationPhysics/release-branch/build-temp/build_picongpu/CMakeFiles/picongpu.dir//./picongpu_generated_main.cu.o /usr/bin/cmake -E remove /home/agoswami/computationalRadiationPhysics/release-branch/build-temp/build_picongpu/CMakeFiles/picongpu.dir//./picongpu_generated_main.cu.o -- Generating dependency file: /home/agoswami/computationalRadiationPhysics/release-branch/build-temp/build_picongpu/CMakeFiles/picongpu.dir//picongpu_generated_main.cu.o.NVCC-depend /usr/local/cuda/bin/nvcc -M -DCUDACC /home/agoswami/computationalRadiationPhysics/release-branch/picongpu/src/picongpu/main.cu -o /home/agoswami/computationalRadiationPhysics/release-branch/build-temp/build_picongpu/CMakeFiles/picongpu.dir//picongpu_generated_main.cu.o.NVCC-depend -ccbin /usr/bin/cc -m64 -DPMACC_VERBOSE_LVL=0 -DPIC_VERBOSE_LVL=1 -Xcompiler ,\"-Wall\",\"-Wno-unknown-pragmas\",\"-Wextra\",\"-Wno-unused-parameter\",\"-Wno-unused-local-typedefs\",\"-g\" -arch=sm_20 --use_fast_math --ftz=false -g -Xcompiler=-g,-pthread -DNVCC -I/usr/local/cuda/include -I/home/agoswami/computationalRadiationPhysics/release-branch/param-sets-temp/KH/include -I/usr/lib/openmpi/include -I/usr/lib/openmpi/include/openmpi -I/usr/include -I/usr/local/include -I/home/agoswami/computationalRadiationPhysics/release-branch/picongpu/src/picongpu/include -I/usr/local/cuda/include In file included from /home/agoswami/computationalRadiationPhysics/release-branch/picongpu/src/picongpu/include/simulation_defines.hpp:26:0, from /home/agoswami/computationalRadiationPhysics/release-branch/picongpu/src/picongpu/main.cu:32: /home/agoswami/computationalRadiationPhysics/release-branch/picongpu/src/picongpu/include/simulation_types.hpp:25:35: fatal error: algorithms/TypeCast.hpp: No such file or directory

include "algorithms/TypeCast.hpp"

                               ^

compilation terminated. CMake Error at picongpu_generated_main.cu.o.cmake:206 (message): Error generating /home/agoswami/computationalRadiationPhysics/release-branch/build-temp/build_picongpu/CMakeFiles/picongpu.dir//./picongpu_generated_main.cu.o

make[2]: * [build_picongpu/CMakeFiles/picongpu.dir/./picongpu_generated_main.cu.o] Error 1 make[2]: Leaving directory `/home/agoswami/computationalRadiationPhysics/release-branch/build-temp' make[1]: * [build_picongpu/CMakeFiles/picongpu.dir/all] Error 2 make[1]: Leaving directory`/home/agoswami/computationalRadiationPhysics/release-branch/build-temp' make: *\ [all] Error 2

anshumang commented 9 years ago

Shouldn't there also be a "-I/home/agoswami/computationalRadiationPhysics/release-branch/picongpu/src/libPMacc/include" in the nvcc flags?

psychocoderHPC commented 9 years ago

Thanks for your help. Yes you are right the PMacc path is missing/wrong. cmake -L . showed that the path is set to wrong directory.

...
PIC_VERBOSE:STRING=1
PMACC_BLOCKING_KERNEL:BOOL=OFF
PMACC_ROOT_DIR:PATH=/usr/local
PMACC_VERBOSE:STRING=0
...

I will check why this can happened. A workaround for the moment:

../picongpu/configure -c"-DPMACC_ROOT_DIR=../picongpu/src/libPMacc" ../param-sets-temp/KH
psychocoderHPC commented 9 years ago

We should check the cmake version: please run cmake --version

psychocoderHPC commented 9 years ago

Ok it is a BUG here Please run ls -la /usr/local/include/types.h to verify that I am right.

I will fix it on monday.

ax3l commented 9 years ago

well spotted you two!

@psychocoderHPC dah, I should have realized that earlier! Very well spotted!

We should either just set the path directly without find_ since we know it or choose a more significant file... it is also possible to exclude system path's, but that only postpones the problem.

an even better thing would be to add a top-folder such as PMacc/ since an install to /usr of libPMacc in the future will always risk naming collisions.

@anshumang thank you tremendously for your help! You did a great job!

anshumang commented 9 years ago

@ax3l @psychocoderHPC => Thanks both of you for following up and :+1: for tracing down the bug...

anshumang commented 9 years ago

@psychocoderHPC cmake version 2.8.12.2

anshumang commented 9 years ago

@psychocoderHPC Indeed, the difference between the two boxes are ls -la /usr/local/include/types.h - the one where it runs does not have such a file

ax3l commented 9 years ago

fixed in dev now and will be fixed in the next release, too (0.1.0).