Comments (10)
Yikes, this is the nightmare scenario where we have to pull more and more of Boost guts into our repo in order to freeze the random number version. Let's hope that pulling in one more file is sufficient and there are not long tentacles of include files needed…
On Apr 2, 2012, at 10:26 AM, rmjarvis wrote:
On at least two systems (Mandeep's and one of Mike's), there are errors compiling pysrc/Random.cpp.
g++ -o pysrc/.obj/Random.os -c -O2 -fno-strict-aliasing -g3 -Wall -Werror -fPIC -Iinclude/galsim -Iinclude -I/home/mjarvis/include -I/usr/local/cfitsio/include -I/usr/local/fftw/include -I/usr/include/python2.6 -I/usr/local/numpy/lib64/python2.6/site-packages/numpy/core/include pysrc/Random.cpp In file included from include/galsim/Random.h:23, from pysrc/Random.cpp:2: include/galsim/boost1_48_0.random/mersenne_twister.hpp:493: error: a function call cannot appear in a constant-expression include/galsim/boost1_48_0.random/mersenne_twister.hpp:493: error: a function call cannot appear in a constant-expression include/galsim/boost1_48_0.random/mersenne_twister.hpp:494: error: a function call cannot appear in a constant-expression include/galsim/boost1_48_0.random/mersenne_twister.hpp:494: error: a function call cannot appear in a constant-expression include/galsim/boost1_48_0.random/mersenne_twister.hpp:495: error: a function call cannot appear in a constant-expression include/galsim/boost1_48_0.random/mersenne_twister.hpp:495: error: template argument 6 is invalid include/galsim/boost1_48_0.random/mersenne_twister.hpp:495: error: template argument 8 is invalid include/galsim/boost1_48_0.random/mersenne_twister.hpp:495: error: template argument 10 is invalid include/galsim/boost1_48_0.random/mersenne_twister.hpp:495: error: template argument 12 is invalid include/galsim/boost1_48_0.random/mersenne_twister.hpp:495: error: template argument 14 is invalid include/galsim/boost1_48_0.random/mersenne_twister.hpp:495: error: invalid type in declaration before ‘;’ token scons: *** [pysrc/.obj/Random.os] Error 1
I think it is probably due to a mismatch of the version 1.48 boost files with whatever the other installed boost is, since the lines in question involve the UINT64_C macro, which is defined in
boost/cstdint.hpp
, and this is one of the files that Gary didn't port over into our boost1_48_0.random mirror. So I'm going to start by trying to copy over this and all other low level boost files that Gary left to the installed boost, so our mirror will be completely self-contained. Hopefully this will solve the problem...
Reply to this email directly or view it on GitHub:
#63
from galsim.
Yuck. What you suggested seems worth a try, but as Gary said, we don't want to go too crazy with adding more and more boost files.
Mike, out of curiosity, is your system on which this fails similar in setup to Mandeep's system?
from galsim.
They're both RHEL, but I think the problem is that the boost version is 1.41 on mine. I'm guessing Mandeep's must be similarly old. The cstdint.hpp file changed substantially between 1.41 and 1.48. Not sure of the exact version where it changed. Anyway, I copied that over and it works on my system now. Here is the commit:
Not sure why it didn't link here automatically.
It looks more substantial than it is. I added cstdint.hpp as I said. I also deleted some files that were duplicates in both the random/ directory and random/detail. The ones in random/detail are the only ones that were being used, and that's really the right place for them anyway, since it mirrors boost's directory structure. So I deleted the extraneous ones.
from galsim.
Mandeep, can you please do the following to test that this fixes the problem for you too:
git pull
git checkout -t 'origin/#63'
scons
If this all works, let me know. Then you can return to the main branch with
git checkout master
from galsim.
FWIW, I did not have this problem, but I just confirmed that your fix doesn't break anything for me (possibly useful info since I have a later boost, 1.49?).
from galsim.
I just realized Mandeep may not have gotten Mike's message above (people are not automatically subscribed to comments on issues unless they either respond to the issue or explicitly subscribe). So, I'm going to try to bring him in explicitly:
@mssgill , can you please click on the link to go to this issue on github, and see Mike's request? (2 comments above this one)
from galsim.
Thx Mike + Rachel- well - i think all has worked out, now, i copy the tail-end of the details below, and there are no errors -- i don't see a binary, either in the GalSim dir, or the galsim or bin subdirs, but let me look back at how to run the actual main code..
...
g++ -o pysrc/.obj/Random.os -c -O2 -fno-strict-aliasing -g3 -Wall -Werror -fPIC -Iinclude/galsim -Iinclude -I/usr/include/python2.6 -I/usr/lib/pymodules/python2.6/numpy/core/include pysrc/Random.cpp
g++ -o galsim/_galsim.so -Wl,-rpath=/home/m/fizzAndAstro/great3/GalSim/lib -fopenmp -Wl,-rpath=/home/m/fizzAndAstro/great3/GalSim/lib -shared pysrc/.obj/module.os pysrc/.obj/Bounds.os pysrc/.obj/Shear.os pysrc/.obj/Image.os pysrc/.obj/SBProfile.os pysrc/.obj/SBPixel.os pysrc/.obj/Random.os -Llib -L/usr/lib -lboost_python -lcfitsio -lfftw3 -ltmv -lpython2.6 -lssl -lcrypto -lz -lpthread -ldl -lutil -lgalsim
scons: done building targets.
from galsim.
In the install file:
Once you have a successful build, you can install the GalSim library, python modules, and header files into standard locations (like /usr/local and your Python site-packages directory) with
scons install
or
sudo scons install
If you want to install into a different location, the prefix for the library and header files can
be specified with PREFIX=, and the location for the python modules can be specified
with PYPREFIX=. So the command would be
scons install PREFIX= PYPREFIX=
from galsim.
If you want to be able to run some of the example code, you'll also need to do
scons examples
and
sudo scons install examples
which would allow you to do some of the things on
https://github.com/GalSim-developers/GalSim/wiki/Examples:-getting-started-with-SBprofile-and-hsm
from galsim.
hi Rachel- all following compiles above executed successfully, now going to try some of the examples from that page you pointed to, thx- M
from galsim.
Related Issues (20)
- Small Discrepancy between Real and Fourier Space Shift HOT 4
- Colab install failed error: metadata-generation-failed HOT 1
- Monochromatic SED HOT 2
- BUG in FFTs? HOT 5
- Remove hidden scipy dependency
- SED flux type units lost in translation HOT 2
- Installation issue (FFTW problem with Apple ARM) HOT 2
- define `origin` and `world_origin` for CelestialWCS classes? HOT 8
- CelestialWCS method docstring erratum?
- Quintic interpolant (ALT_QUINTIC) uval: sign pb HOT 2
- Construct images without sanity checks in `_convertMask` function in the HSM module HOT 5
- New quintic kernel for interpolation in Fourier Space
- Sum over ghosts or use a diffrent formula for periodic cardinal sinus.
- maxk approximation used in Exponential profile HOT 2
- Spergel shoot photon for nu<0 HOT 2
- Accept pathlib.PosixPath in places where a basestring file_name is currently allowed.
- `save_photons` does not work for `ChromaticAiry` HOT 1
- Image array throws error about having no setter but still performs operation HOT 9
- numerical issue for some realizations of atmosphere HOT 29
- DoubleZernike.__call__ ought to handle integers
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from galsim.