|
[Sponsors] |
August 1, 2010, 12:43 |
Kubuntu 10.04 bashrc script returns error
|
#1 |
New Member
Join Date: Aug 2010
Posts: 5
Rep Power: 16 |
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 |
|
August 2, 2010, 12:20 |
|
#2 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
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. |
|
August 3, 2010, 15:00 |
|
#3 |
New Member
Join Date: Aug 2010
Posts: 5
Rep Power: 16 |
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. |
|
August 4, 2010, 07:45 |
|
#4 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
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 |
|
August 7, 2010, 12:25 |
|
#5 |
New Member
Join Date: Aug 2010
Posts: 5
Rep Power: 16 |
Problem solved.
I changed the symlink: /etc/alternatives/mpicc -> /usr/bin/mpicc.openmpi Thanks mattijs. |
|
Tags |
bashrc, gcc, mpicc, ubuntu |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CGNS Compiling | Diego | Main CFD Forum | 17 | December 21, 2014 02:40 |
Compile problem | ivanyao | OpenFOAM Running, Solving & CFD | 1 | October 12, 2012 10:31 |
POSDAT problem | piotka | STAR-CD | 4 | June 12, 2009 09:43 |
Problems of Duns Codes! | Martin J | Main CFD Forum | 8 | August 15, 2003 00:19 |
error while compiling the USER Sub routine | CFD user | CFX | 3 | November 25, 2002 16:16 |