<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV><BR>Thanks Ansgar</DIV>
<DIV>&nbsp;</DIV>
<DIV>We'll try it.</DIV>
<DIV><BR><BR>&nbsp;</DIV>
<DIV><FONT color=#57708f face="garamond, new york, times, serif">Dr Gustavo Fioravanti Vieira&nbsp;</FONT></DIV>
<DIV><FONT color=#57708f face="garamond, new york, times, serif">Núcleo de Bioinformática do Laboratório de Imunogenética&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></DIV>
<DIV><FONT color=#57708f face=Times>Bolsista PNPD do Programa de Pós-Graduação em Genética e Biologia Molecular</FONT></DIV>
<DIV><FONT color=#57708f face="garamond, new york, times, serif">UFRGS</FONT></DIV><BR><BR>--- Em <B>seg, 29/6/09, Ansgar Esztermann <I>&lt;aeszter@gwdg.de&gt;</I></B> escreveu:<BR>
<BLOCKQUOTE style="BORDER-LEFT: rgb(16,16,255) 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px"><BR>De: Ansgar Esztermann &lt;aeszter@gwdg.de&gt;<BR>Assunto: Re: [gmx-users] disable ulimit<BR>Para: "Discussion list for GROMACS users" &lt;gmx-users@gromacs.org&gt;<BR>Data: Segunda-feira, 29 de Junho de 2009, 12:58<BR><BR>
<DIV class=plainMail>Hi Gustavo,<BR><BR><BR>On Jun 24, 2009, at 20:48 , Gustavo Fioravanti wrote:<BR><BR>&gt; we are trying to run mdrun_mpi in a public cluster of our university. However, we got the following error:<BR>&gt; <BR>&gt; /etc/profile.d/limits.sh: line 1: ulimit: max locked memory: cannot modify limit: Operation not permitted<BR><BR>There are two kinds of ulimits, soft and hard. Hard limits cannot be increased, so maybe you try to exceed a hard limit here?<BR><BR>&gt; /var/tmp/sge_local_spool/r01n19/job_scripts/3051: line 10: grompp_mpi: command not found<BR>&gt; The cluster has already settled to unlimited access to memory. However, grompp hasn't have permission to modify this file (limits.sh).<BR><BR>I do not think grompp tries to modify the file. The error message above seems to point at limits.sh not being allowed to raise the limit. Did you talk to your sysadmin? They should be able to raise the limit. BTW, note that the limit in
 question here is not memory per se, but locked memory.<BR>&gt; <BR>&gt; I would like to disable the ulimit function at source file from GROMACS. How can I do that?<BR><BR>Try to do it from a script (or by hand) before starting gromacs, like so:<BR>ulimit -l unlimited<BR><BR>Modifying the limit from the program is also possible, but a little bit more involved (this code should work on Linux; on other systems, things might be a bit different):<BR><BR>#include &lt;sys/resource.h&gt;<BR><BR>struct rlimit unlim = {RLIM_INFINITY, RLIM_INFINITY};<BR>int err = setrlimit(RLIMIT_MEMLOCK, &amp;unlim);<BR><BR>/* error handling skeleton; based on the error message given above, you will probably get EPERM */<BR>if (err)<BR>&nbsp; switch (errno)<BR>&nbsp; {<BR>&nbsp; &nbsp; case EFAULT: /* limit points outside address range */<BR>&nbsp; &nbsp; &nbsp; break;<BR><BR>&nbsp; &nbsp; case EINVAL: /* invalid resource, or soft &gt; hard */<BR>&nbsp; &nbsp; &nbsp;
 break;<BR><BR>&nbsp; &nbsp; case EPERM: /* unprivileged process tried to raise hard limit */<BR>&nbsp; &nbsp; &nbsp; break;<BR><BR>&nbsp; }<BR><BR><BR><BR>A.<BR>--Ansgar Esztermann<BR>DV-Systemadministration<BR>Max-Planck-Institut für biophysikalische Chemie, Abteilung 105<BR><BR>_______________________________________________<BR>gmx-users mailing list&nbsp; &nbsp; <A href="http://br.mc525.mail.yahoo.com/mc/compose?to=gmx-users@gromacs.org" ymailto="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</A><BR><A href="http://lists.gromacs.org/mailman/listinfo/gmx-users" target=_blank>http://lists.gromacs.org/mailman/listinfo/gmx-users</A><BR>Please search the archive at <A href="http://www.gromacs.org/search" target=_blank>http://www.gromacs.org/search</A> before posting!<BR>Please don't post (un)subscribe requests to the list. Use the<BR>www interface or send it to <A href="http://br.mc525.mail.yahoo.com/mc/compose?to=gmx-users-request@gromacs.org"
 ymailto="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</A>.<BR>Can't post? Read <A href="http://www.gromacs.org/mailing_lists/users.php" target=_blank>http://www.gromacs.org/mailing_lists/users.php</A><BR></DIV></BLOCKQUOTE></td></tr></table><br>


      <hr size=1>Veja quais são os assuntos do momento no Yahoo! + Buscados: <a href="http://br.rd.yahoo.com/mail/taglines/mail/*http://br.maisbuscados.yahoo.com/">Top 10</a> - <a href="http://br.rd.yahoo.com/mail/taglines/mail/*http://br.maisbuscados.yahoo.com/celebridades/">Celebridades</a> - <a href="http://br.rd.yahoo.com/mail/taglines/mail/*http://br.maisbuscados.yahoo.com/m%C3%BAsica/">Música</a> - <a href="http://br.rd.yahoo.com/mail/taglines/mail/*http://br.maisbuscados.yahoo.com/esportes/">Esportes</a>