CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (http://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   Kubuntu 10.04 bashrc script returns error (http://www.cfd-online.com/Forums/openfoam-bugs/78753-kubuntu-10-04-bashrc-script-returns-error.html)

openfoamstudents August 1, 2010 12:43

Kubuntu 10.04 bashrc script returns error
 
Hello OpenFoamers out there,

I just installed OpenFoam through the repository.
When the bashrc script is executed, the settings.sh is run, which includes the commands:
`mpicc --showme:compile`
`mpicc --showme:link`
which cause these errors:
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/crt1.o: In function `_start': (.text+0x18): undefined reference to `main' collect2: ld returned 1 exit status
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/crt1.o: In function `_start': (.text+0x18): undefined reference to `main' collect2: ld returned 1 exit status
How can I fix that? Can I somehow replace mpicc with the apparently working /usr/bin/mpicc.openmpi from the Ubuntu repositories?

Thanks for your help.
openfoamstudents

mattijs August 2, 2010 12:20

Check your $WM_MPLIB and $OPAL_PREFIX environment variables.

WM_MPLIB should be SYSTEMOPENMPI, OPAL_PREFIX should not be set. They are probably still left over from running with WM_MPLIB=OPENMPI.

openfoamstudents August 3, 2010 15:00

Thanks mattijs, but the variables are correct.
As a workaround, I renamed mpicc.openmpi to mpicc and mpic++.openmpi to mpic++.
I'd still be interested in a cleaner solution, tough.

mattijs August 4, 2010 07:45

I'm running kubuntu10.04 , 64bit and have

/usr/bin/mpicc : symbolic link to `/etc/alternatives/mpicc'
/etc/alternatives/mpicc : symbolic link to `/usr/bin/mpicc.openmpi'

This is from just installing openmpi

openfoamstudents August 7, 2010 12:25

Problem solved.

I changed the symlink:
/etc/alternatives/mpicc -> /usr/bin/mpicc.openmpi

Thanks mattijs.


All times are GMT -4. The time now is 17:40.