<div dir="ltr">Hi All:<br><br>I know there have been a lot of messages posted on this subject in the past, and I&#39;ve tried all the solutions that have been suggested - but none has worked for me so far...<br><br>The machine I am running on is a dual quad-core IBM Xeon, with Red Hat Enterprise 4 OS. I am hoping to take advantage of the 8 CPUs with running gromacs in MPI version. The LAM/MPI installed is LAM 7.1.2/MPI 2 C++/ROMIO - Indiana University version.<br>
<br>The Gromacs was installed successfully from RPM built on CentOS 4 (gromacs-3.3.3-1.x86_64.rpm, gromacs-mpi-3.3.3-1.x86_64.rpm, with fftw3-3.0.1.1-4.x86_x64.rpm) - compilation from source code failed. 2 mdrun programs were installed as the result: mdrun and mdrun_mpi, the latter seems to be the MPI version of mdrun.<br>
<br>For testing purpose, I specified only 2 CPUs with LAM/MPI:<br><span style="font-family: courier new,monospace;">hostfile:</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">mymachinename cpu=2</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">%lamboot hostfile</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">%lamnodes</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">n0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mymachinename:2:origin,this_node</span><br style="font-family: courier new,monospace;"><br>mpirun seems to be working fine using the test program provided in lam/mpi distribution.<br>
<br>In order to test Gromacs, I used the files in the tutorial package:<br>tutor/methanol. <br>Single CPU run works fine (with mdrun), but I ran into problems when trying to run in parallel mode (with mdrun_mpi).<br><br>These are the commands I ran<br>
<span style="font-family: courier new,monospace;">%grompp -v -np 2 -shuffle -sort -o 2cpu.tpr </span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">%mpirun -np 2 /usr/bin/mdrun_mpi  -v -np 2 -s 2cpu.tpr &gt;&amp; run.log</span><br style="font-family: courier new,monospace;">
<br>In the run.log, it does not look like 2 processors are being used (MYRANK=0 line appeared twice)<br><span style="font-family: courier new,monospace;">NNODES=1, MYRANK=0, HOSTNAME=mymachinename</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">NNODES=1, MYRANK=0, HOSTNAME=mymachinename</span><br><br>And toward the end of the log is the following error message:<br><br><span style="font-family: courier new,monospace;">-------------------------------------------------------</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Program mdrun_mpi, VERSION 3.3.3</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Source code file: init.c, line: 69</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Fatal error:</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">run input file 2cpu.tpr was made for 2 nodes,</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while mdrun_mpi expected it to be for 1 nodes.</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">-------------------------------------------------------</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">-----------------------------------------------------------------------------</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">It seems that [at least] one of the processes that was started with</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">mpirun did not invoke MPI_INIT before quitting (it is possible that</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">more than one process did not invoke MPI_INIT -- mpirun was only</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">notified of the first one, which was on node n0).</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">mpirun can *only* be used with MPI programs (i.e., programs that</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">invoke MPI_INIT and MPI_FINALIZE).&nbsp; You can use the &quot;lamexec&quot; program</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">to run non-MPI programs over the lambooted nodes.</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">-----------------------------------------------------------------------------</span><br style="font-family: courier new,monospace;">
<br>I COULD run the following commands:<br><br><span style="font-family: courier new,monospace;">%grompp -v -o topol.tpr </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">%mpirun -np 2 /usr/bin/mdrun_mpi  -v [-multi] -np 2 -s topol.tpr &gt;&amp; run.log</span><br><br>But this essentially ran the same process twice on each CPU, it is not a real parallelization.<br>
<br>What did I do wrong?...I greatly appreciate any help!<br><br>Many thanks,<br>Hongxian<br><br><br></div>