Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure due to missing sys/sysctl.h #118

Open
AI-Pranto opened this issue Jan 15, 2021 · 7 comments
Open

Build failure due to missing sys/sysctl.h #118

AI-Pranto opened this issue Jan 15, 2021 · 7 comments

Comments

@AI-Pranto
Copy link
Contributor

AI-Pranto commented Jan 15, 2021

My system places sysctl.h under /usr/include/linux.

CC=mpicc CXX=mpicxx FC=mpifort cmake -DNEK_DIST=nekrs ../../../..

[ 62%] Building CXX object vendor/nekRS/home/pranto/github/enrico/tests/singlerod/short/build/_deps/occa_content-build/CMakeFiles/libocca.dir/src/tools/sys.cpp.o
/home/pranto/github/enrico/tests/singlerod/short/build/_deps/occa_content-src/src/tools/sys.cpp:16:12: fatal error: sys/sysctl.h: No such file or directory
   16 | #  include <sys/sysctl.h>
      |            ^~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [vendor/nekRS/home/pranto/github/enrico/tests/singlerod/short/build/_deps/occa_content-build/CMakeFiles/libocca.dir/build.make:2932: vendor/nekRS/home/pranto/github/enrico/tests/singlerod/short/build/_deps/occa_content-build/CMakeFiles/libocca.dir/src/tools/sys.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1187: vendor/nekRS/home/pranto/github/enrico/tests/singlerod/short/build/_deps/occa_content-build/CMakeFiles/libocca.dir/all] Error 2
make: *** [Makefile:149: all] Error 2

I didn't see this on ubuntu-20.04.

  • OS: POP!_OS 20.10
  • kernel: 5.8.0-7630-generic
@RonRahaman
Copy link
Collaborator

This is an error from OCCA (the parallel backend in NekRS). I would raise the issue to them: https://github.com/libocca/occa
It's pretty likely that they could fix this by locating the header in the CMake

@AI-Pranto
Copy link
Contributor Author

@RonRahaman, Any update?

@AI-Pranto
Copy link
Contributor Author

@RonRahaman I've got the similar error on ubuntu-20.10 too.

@RonRahaman
Copy link
Collaborator

Sorry for not getting back to you sooner! So OCCA has addressed this issue:

https://github.com/libocca/occa/pull/432/files#diff-dd832eaf5a2504c8796682e7c123e78446d83478cc01e479931350f8fc2d9df1

However, NekRS uses it's own fork of OCCA, and they haven't merged these upstream changes. I'm trying to get the NekRS folks to update their fork of OCCA, and unfortunately, I'm really not sure what their timeframe will be.

@AI-Pranto
Copy link
Contributor Author

@RonRahaman I am planning to use nekRS with CUDA backend and OpenMC with all threads(16 threads) in my pc, How can I do this? mpirun -np 1 ../bld/install/bin/enrico It's ok for nekRS because I have only 1GPU but in case of OpenMC I get only 2 threads :(

@RonRahaman
Copy link
Collaborator

Have you tried setting the environment variable OMP_NUM_THREADS=16?

@AI-Pranto
Copy link
Contributor Author

AI-Pranto commented Apr 12, 2021

Thanks @RonRahaman :) for pointing this out.

Yeah, Now It's using all 16 threads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants