[gmx-developers] gmx master: compiling on mac and segfault

Szilárd Páll szilard.pall at cbr.su.se
Fri Jul 27 04:26:45 CEST 2012


On Fri, Jul 27, 2012 at 4:06 AM, Szilárd Páll <szilard.pall at cbr.su.se>wrote:

> On Thu, Jul 26, 2012 at 2:09 PM, Jochen Hub <jhub at gwdg.de> wrote:
>
>> Hi,
>>
>> I am trying to compile and run the git master on my Macbook air (OS X
>> Lion). Without success. If I compile with a newer gcc (4.5 or newer,
>> installed from Macports), I get errors like (does this have to do with AVX?)
>>
>> [  1%] Building C object src/gromacs/CMakeFiles/**
>> libgromacs.dir/gmxpreprocess/**add_par.c.o
>> /var/folders/ys/**rh9lzqpj7854h34d2__**mznph0000gn/T//ccPxJmjg.s:66:**no
>> such instruction: `vmovups 0(%r13), %ymm0'
>> /var/folders/ys/**rh9lzqpj7854h34d2__**mznph0000gn/T//ccPxJmjg.s:69:**no
>> such instruction: `vmovups %ymm0, 24(%rdi)'
>> /var/folders/ys/**rh9lzqpj7854h34d2__**mznph0000gn/T//ccPxJmjg.s:79:**no
>> such instruction: `vmovss 0(%r13), %xmm1'
>> /var/folders/ys/**rh9lzqpj7854h34d2__**mznph0000gn/T//ccPxJmjg.s:83:**no
>> such instruction: `vmovss %xmm1, 24(%rdi,%r9,4)'
>> /var/folders/ys/**rh9lzqpj7854h34d2__**mznph0000gn/T//ccPxJmjg.s:99:**no
>> such instruction: `vmovss 0(%r13), %xmm2'
>> /var/folders/ys/**rh9lzqpj7854h34d2__**mznph0000gn/T//ccPxJmjg.s:102:**no
>> such instruction: `vmovss %xmm2, 24(%rdi,%r9,4)'
>>
>
> I can confirm this, works on Linux, fails on Mac OS Lion with gcc 4.5 -
> 4.7 with GMX_ACCELERATION=AVX_256. It looks like AVX instructions are
> somehow not recognized, although the aforementioned compilers are supposed
> to have support for it.
>
>
>> On a gcc 4.4 or earlier, compiling works fine, but mdruns stops with a
>> segfault. A backtrace in gdb
>
>
> That's strange as gcc 4.4 is supposed to have AVX support (
> http://goo.gl/Rt3BM).
>

Just checked and, as expected, the same compiler errors show up with gcc
4.4.7 as well. I'm not sure what did you change in the configuration to get
the code built, but you must have used GMX_ACCELERATION != AVX_256.


>
>
>> gives the following. Seems like something goes wrong in FFTW (which was
>> compiled with the same gcc and with --enable-threads --enable-sse
>> --enable-sse2).
>>
>> Program received signal EXC_BAD_ACCESS, Could not access memory.
>> Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000048
>> [Switching to process 44300 thread 0x1b03]
>> 0x0000000100050ebd in gomp_resolve_num_threads ()
>> (gdb) bt
>> #0  0x0000000100050ebd in gomp_resolve_num_threads ()
>> #1  0x0000000100050fc3 in GOMP_parallel_start ()
>> #2  0x00000001004c0bc2 in fft5d_plan_3d ()
>> #3  0x0000000100434a52 in gmx_parallel_3dfft_init ()
>> #4  0x000000010046b6fc in gmx_pme_init ()
>> #5  0x0000000100026ab3 in mdrunner (nthreads_requested=4, fplog=0x0,
>> cr=0x102100b40, nfile=36, fnm=0x103808200, oenv=0x101000c10, bVerbose=0,
>> bCompact=1, nstglobalcomm=-1, ddxyz=0x1013c0e04, dd_node_order=1, rdd=0,
>> rconstr=0, dddlb_opt=0x10002e26a "auto", dlb_scale=0.800000012, ddcsx=0x0,
>> ddcsy=0x0, ddcsz=0x0, nstepout=100, resetstep=-1, nmultisim=0,
>> repl_ex_nst=0, repl_ex_nex=0, repl_ex_seed=-1, pforce=-1, cpt_period=15,
>> max_hours=-1, deviceOptions=0x10002e276 "", Flags=7168) at
>> /Users/jhub/src/gmx/gromacs/**src/programs/mdrun/runner.c:**844
>> #6  0x0000000100024f2d in mdrunner_start_fn (arg=0x101005d60) at
>> /Users/jhub/src/gmx/gromacs/**src/programs/mdrun/runner.c:**173
>> #7  0x0000000100242bfb in tMPI_Thread_starter ()
>> #8  0x00007fff9785f8bf in _pthread_start ()
>> #9  0x00007fff97862b75 in thread_start ()
>>
>
> Can't confirm this one right now as there's no gcc 4.4 on the Mac OS build
> server. Will check it later. However, it sounds like it's a similar issue
> to the ones we've had with an ordered clause in a #pragma omp statment.
>

Unfortunately, I can confirm this crash. It seems to occur with
OMP_NUM_THREADS=m and -nt n, where m>1 and n >1.


>
>
>>
>> Can anyone give me a hint how to fix this? Or is the master so
>> experimental that it is not interned to be used at all right now?
>>
>
> Unfortunately, this affects the release-4-6 branch as well. Could you
> please file a bug on Redmine on the first issue and have a look at the
> related issue on the second.
>
> Cheers,
> --
> Sz.
>
>
>> Many thanks,
>> Jochen
>>
>>
>> --
>> ------------------------------**---------------------
>> Dr. Jochen Hub
>> Computational Molecular Biophysics Group
>> Institute for Microbiology and Genetics
>> Georg-August-University of Göttingen
>> Justus-von-Liebig-Weg 11, 37077 Göttingen, Germany.
>> Phone: +49-551-39-14189
>> http://cmb.bio.uni-goettingen.**de/ <http://cmb.bio.uni-goettingen.de/>
>> ------------------------------**---------------------
>> --
>> gmx-developers mailing list
>> gmx-developers at gromacs.org
>> http://lists.gromacs.org/**mailman/listinfo/gmx-**developers<http://lists.gromacs.org/mailman/listinfo/gmx-developers>
>> Please don't post (un)subscribe requests to the list. Use the www
>> interface or send it to gmx-developers-request@**gromacs.org<gmx-developers-request at gromacs.org>
>> .
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20120727/bc8262fe/attachment.html>


More information about the gromacs.org_gmx-developers mailing list