Hi Orsola,
This is a fundamental limit on Macs where the actual binary of any single program cannot be greater than 2Gb in size. The phantom binary can exceed this size due to our use of static memory allocation in the code, which was done originally for performance reasons (static arrays are easier for compilers to optimise).
It is *only* an issue on Mac OS, and has not presented as a problem because everything we run seriously is done in Linux. It is also not an issue with the MPI code, because you can always stay within memory constraints by using more MPI threads.
I would suggest that if you are just using your Mac for testing purposes that you just set MAXP=1000000 rather than 10 million which is default for the star setup. That is:
make setup MAXP=1000000
make MAXP=1000000
This sets the array size, which is obviously also the maximum number of particles you can use.
The way to solve this issue would be for us to switch to dynamic allocation of memory. However this carries a potential performance hit and is a low priority for the reasons outlined above.
Hope that helps,
Daniel
> On 27 Nov 2017, at 12:37 pm, Orsola De Marco <> wrote:
>
> Dear Daniel,
>
> I want to finish the PHANTOM planet project this summer.
>
> I have now downloaded and successfully tested (test and also “blast”) phantom on 3 computers, two macs and a Linux box.
>
> However when I try to run the “star” test (as opposed, say to “sedov”) on the two Macs I get the linking error shown below when I run make or make setup. I use SYSTEM=gfortran
>
> This error is not there in my Linux computer, where everything is running well.
>
> I have asked Tom and even engaged my IT person - who seems to think that this is a non trivial error. Before pursuing further I thought I would ask you:
>
> __DATA/__bss0 addr=0x10098B9F8, size=0x0000000C, fileOffset=0x00000000, type=25
> __DATA/__bss5 addr=0x10098BA20, size=0x000002F0, fileOffset=0x00000000, type=25
> __DATA/__huge addr=0x10098BD40, size=0x12F2FF944, fileOffset=0x00000000, type=25
> ld: 32-bit RIP relative reference out of range
(2157947017 max is +/-2GB): from ___part_MOD_delete_particles_inside_radius (0x10000F190) to ___part_MOD_alphaind (0x180A09E80) in '___part_MOD_delete_particles_inside_radius' from part.o for architecture x86_64
> collect2: error: ld returned 1 exit status
> make[2]: *** [phantom] Error 1
> make[1]: *** [phantom] Error 2
> /Users/orsola/Work/Proj_2003_CETheory/Paper_AGBPlanet/SPH-runs/star
> cp: /Users/orsola/Work/codes/phantom//bin/phantom: No such file or directory
>
> Both Macs are running on the latest OS. Is this something that you know how to fix quickly? The only difference between Linux and Mac systems that comes to mind is that I could not set ulimit -s unlimited, and after looking it up I set it to 65532 as the maximum for a Mac seems to be 65533.
>
> Thanks! Orsola
>