CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Bugs

Kubuntu 10.04 bashrc script returns error

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 1, 2010, 12:43
Question Kubuntu 10.04 bashrc script returns error
  #1
New Member
 
Join Date: Aug 2010
Posts: 5
Rep Power: 16
openfoamstudents is on a distinguished road
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
openfoamstudents is offline   Reply With Quote

Old   August 2, 2010, 12:20
Default
  #2
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
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.
mattijs is offline   Reply With Quote

Old   August 3, 2010, 15:00
Default
  #3
New Member
 
Join Date: Aug 2010
Posts: 5
Rep Power: 16
openfoamstudents is on a distinguished road
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.
openfoamstudents is offline   Reply With Quote

Old   August 4, 2010, 07:45
Default
  #4
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
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
mattijs is offline   Reply With Quote

Old   August 7, 2010, 12:25
Default
  #5
New Member
 
Join Date: Aug 2010
Posts: 5
Rep Power: 16
openfoamstudents is on a distinguished road
Problem solved.

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

Thanks mattijs.
openfoamstudents is offline   Reply With Quote

Reply

Tags
bashrc, gcc, mpicc, ubuntu


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 05:58.