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

building python wrapper for the develop branch #179

Closed
huangrenke opened this issue Nov 17, 2023 · 2 comments
Closed

building python wrapper for the develop branch #179

huangrenke opened this issue Nov 17, 2023 · 2 comments

Comments

@huangrenke
Copy link
Contributor

Hi,

For the purpose of testing the hadrec model for the develop branch , when I trying to build the python wrapper for the develop branch, I encountered the following error during the building using the following command (GridPACK has already been successfully built and installed):

python setup.py build

Any suggestions for this? Thank you very much!

-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- LTO enabled
-- Configuring done
-- Generating done
-- Build files have been written to: /home/fwtop/hadrec/gridpack-dev/python/build/temp.linux-x86_64-3.6
[ 0%] Built target parallel_scripts
[ 50%] Building CXX object src/CMakeFiles/gridpack.dir/gridpack.cpp.o
In file included from /home/fwtop/hadrec/gridpack-dev/python/src/gridpack.cpp:21:
/home/fwtop/hadrec/gridpack-dev/src/install/include/gridpack/environment/environment.hpp:24:10: fatal error: boost/mpi.hpp: No such file or directory
24 | #include <boost/mpi.hpp>
| ^~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [src/CMakeFiles/gridpack.dir/gridpack.cpp.o] Error 1
gmake[1]: *** [src/CMakeFiles/gridpack.dir/all] Error 2
gmake: *** [all] Error 2
Traceback (most recent call last):
File "setup.py", line 72, in
tests_require=['nose'],
File "/home/fwtop/anaconda3/envs/py3test/lib/python3.6/site-packages/setuptools/init.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/home/fwtop/anaconda3/envs/py3test/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/fwtop/anaconda3/envs/py3test/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/home/fwtop/anaconda3/envs/py3test/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/fwtop/anaconda3/envs/py3test/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/home/fwtop/anaconda3/envs/py3test/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/fwtop/anaconda3/envs/py3test/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "setup.py", line 37, in run
self.build_extension(ext)
File "setup.py", line 56, in build_extension
subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp)
File "/home/fwtop/anaconda3/envs/py3test/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2.

@wperkins
Copy link
Member

@huangrenke, edit src/lib/GridPACK.cmake and uncomment these lines:

  list(APPEND gp_include 
    @Boost_INCLUDE_DIR@
    @MPI_INCLUDE_PATH@
  )
  
  list(APPEND gp_libs
    @Boost_LIBRARIES@
    @MPI_CXX_LIBRARIES@
  )

and run make install again. This should be fixed when #119 is merged or maybe sooner.

@wperkins
Copy link
Member

This should be fixed now. Reopen if not.

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