Hi all,<br>With the help of my colleague Nathan Weeks I am able to run pdb2gmx and
all other commands successfully . Here are his responses which he wanted
me to share with you in case someone is trying to install Gromacs in a
similar system. <br><br>We set CFLAGS that way due to the following message when running configure:<br><br>########################################<br>checking whether gcc-4.3.2 accepts -native -fast -xO5 -fsimple=2<br>-fnonstd -dalign -O3 -fomit-frame-pointer -finline-functions -Wall<br>
-Wno-unused -msse2 -funroll-<br>all-loops -std=gnu99... no<br>*******************************************************************<br>* Sorry, these optimization settings don't seem to work for *<br>* your C compiler. Use make CFLAGS=..., or edit the top Makefile. *<br>
*******************************************************************<br>########################################<br><br>The "-native -fast -xO5 -fsimple=2 -fnonstd -dalign" options that get<br>generated are for Solaris Studio, but we're using GCC. Also,<br>
"-D_POSIX_PTHREAD_SEMANTICS" is required on Solaris to make use of the POSIX<br>versions of reentrant functions like ctime_r() and readdir_r() (if the<br>standard _POSIX_C_SOURCE or _XOPEN_SOURCE feature test macros<br>
are set, _POSIX_PTHREAD_SEMANTICS will automatically be set as well).<br><br>The memory fault that occurs when running pdb2gmx is due to a non-portable use<br>of readdir_r() in futil.c; specifically, on Linux, the dirent structure<br>
has a "char d_name[256]" member, and on Solaris, it is "char d_name[1]", and<br>the user is required to allocate memory to store its contents. The Linux<br>readdir(3) man page gives an example of how to do this portably:<br>
<br><a href="http://www.kernel.org/doc/man-pages/online/pages/man3/readdir.3.html">http://www.kernel.org/doc/man-pages/online/pages/man3/readdir.3.html</a><br><br>I applied this method to futil.c, and it fixed the memory fault problem:<br>
<br>########################################<br>--- src/gmxlib/futil.c.orig 2011-03-15 07:44:30.000000000 -0500<br>+++ src/gmxlib/futil.c 2011-04-20 13:04:58.388912208 -0500<br>@@ -37,6 +37,7 @@<br> #include <config.h><br>
#endif<br><br>+#include <stddef.h><br> #include <stdio.h><br> #include <stdlib.h><br> #include <string.h><br>@@ -595,22 +596,28 @@<br><br> #ifdef HAVE_DIRENT_H<br><br>- struct dirent tmp_dirent;<br>
+ struct dirent * tmp_dirent;<br> struct dirent * p;<br>+ size_t len;<br><br><br> if(gmxdir!=NULL && gmxdir->dirent_handle!=NULL)<br> {<br>- rc = readdir_r(gmxdir->dirent_handle,&tmp_dirent,&p);<br>
+ len = offsetof(struct dirent, d_name)<br>+ + fpathconf(dirfd(gmxdir->dirent_handle), _PC_NAME_MAX) + 1;<br>+ smalloc(tmp_dirent, len);<br>+ rc = readdir_r(gmxdir->dirent_handle,tmp_dirent,&p);<br>
+<br> if(p!=NULL && rc==0)<br> {<br>- strncpy(name,tmp_dirent.d_name,maxlength_name);<br>+ strncpy(name,tmp_dirent->d_name,maxlength_name);<br> }<br> else<br> {<br>
name[0] = '\0';<br> rc = ENOENT;<br> }<br>+ sfree(tmp_dirent);<br> }<br> else<br> {<br>########################################<br><br>> Also why the make -j 48, when you only have 8 cores?<br>
<br>We have 8 6-core CPUs (48 cores total).<br><br>> I'm not even sure if the linker is ok with make -jN for building gromacs, it<br>> is not listed as compatible for *BSD ports. Also, does your make (I imagine<br>
> this is Solaris make) have all the same semantics as gnu-make (gmake)?<br><br>We are using GNU make.<br><br>> And why did you switch your CC between fftw and gromacs configures?<br>> Solaris 'cc' may or may not be gcc43. Also, do we know if gcc43 is stable<br>
> especially with -O3...Try removing -O3 or move it to -O2 at most...<br><br>The Sun Studio 12.1 C compiler worked for fftw, but not for gromacs.<br><br>> To rule out a bad fftw library, you can set --with-fft to use the builtin<br>
> (slower) libfft instead of fftw (but fftw should not be affecting pdb2gmx<br>> I don't think...).<br>><br>> I too have the questions of your CFLAGS, do you not require -m64 either?<br><br>With gcc 4.3, there was a compilation error when -m64 was added to CFLAGS:<br>
<br>###################################################<br>make[5]: Entering directory<br>`/tmp//gromacs-4.5.4/src/gmxlib/nonbonded/nb_kernel_ia32_sse'<br>/bin/sh ../../../../libtool --mode=compile gcc-4.3.2 -m64 -g<br>
-msse2 -std=gnu99 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -pthread<br>-I./include -c -o nb_kernel010_ia32_sse.lo nb_kernel010_ia32_sse.s<br> gcc-4.3.2 -m64 -g -msse2 -std=gnu99 -D_POSIX_PTHREAD_SEMANTICS<br>-D_REENTRANT -pthread -I./include -c nb_kernel010_ia32_sse.s -fPIC<br>
-DPIC -o .libs/nb_kernel010_ia32_sse.o<br>nb_kernel010_ia32_sse.s: Assembler messages:<br>nb_kernel010_ia32_sse.s:87: Error: suffix or operands invalid for `push'<br>nb_kernel010_ia32_sse.s:89: Error: suffix or operands invalid for `push'<br>
nb_kernel010_ia32_sse.s:90: Error: suffix or operands invalid for `push'<br>nb_kernel010_ia32_sse.s:91: Error: suffix or operands invalid for `push'<br>nb_kernel010_ia32_sse.s:92: Error: suffix or operands invalid for `push'<br>
nb_kernel010_ia32_sse.s:93: Error: suffix or operands invalid for `push'<br>nb_kernel010_ia32_sse.s:94: Error: suffix or operands invalid for `push'<br>nb_kernel010_ia32_sse.s:795: Error: suffix or operands invalid for `pop'<br>
nb_kernel010_ia32_sse.s:796: Error: suffix or operands invalid for `pop'<br>nb_kernel010_ia32_sse.s:797: Error: suffix or operands invalid for `pop'<br>nb_kernel010_ia32_sse.s:798: Error: suffix or operands invalid for `pop'<br>
nb_kernel010_ia32_sse.s:799: Error: suffix or operands invalid for `pop'<br>nb_kernel010_ia32_sse.s:800: Error: suffix or operands invalid for `pop'<br>nb_kernel010_ia32_sse.s:865: Error: suffix or operands invalid for `push'<br>
nb_kernel010_ia32_sse.s:867: Error: suffix or operands invalid for `push'<br>nb_kernel010_ia32_sse.s:868: Error: suffix or operands invalid for `push'<br>nb_kernel010_ia32_sse.s:869: Error: suffix or operands invalid for `push'<br>
nb_kernel010_ia32_sse.s:870: Error: suffix or operands invalid for `push'<br>nb_kernel010_ia32_sse.s:871: Error: suffix or operands invalid for `push'<br>nb_kernel010_ia32_sse.s:872: Error: suffix or operands invalid for `push'<br>
nb_kernel010_ia32_sse.s:1344: Error: suffix or operands invalid for `pop'<br>nb_kernel010_ia32_sse.s:1345: Error: suffix or operands invalid for `pop'<br>nb_kernel010_ia32_sse.s:1346: Error: suffix or operands invalid for `pop'<br>
nb_kernel010_ia32_sse.s:1347: Error: suffix or operands invalid for `pop'<br>nb_kernel010_ia32_sse.s:1348: Error: suffix or operands invalid for `pop'<br>nb_kernel010_ia32_sse.s:1349: Error: suffix or operands invalid for `pop'<br>
make[5]: *** [nb_kernel010_ia32_sse.lo] Error 1<br>##############################################<br><br clear="all"><br>-- <br>****************************************<br>Ragothaman M Yennamalli, Ph.D.<br>Postdoctoral Research Associate<br>
1012 Crop Genome Informatics Laboratory<br>Department of Genetics, Development and Cell Biology<br>Iowa State University<br>Ames, Iowa 50011-3260 USA<br><br>+1 515-294-8971 (Office)<br>+1 515-294-8280 (Fax)<br>+1 515-851-1016 (Mobile)<br>
<br>"When
you can do the common things of life in an uncommon way, you will
command the attention of the world." -George Washington Carver<br><br><a href="http://www.public.iastate.edu/%7Eraghu/" target="_blank">http://www.public.iastate.edu/~raghu/</a><br><a href="http://www.artistrkrishnarao.com/" target="_blank">http://www.artistrkrishnarao.com/</a><br>
<br>***************************************<br><br>