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

Kubuntu 10.04 bashrc script returns error

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   August 1, 2010, 11:43
Question Kubuntu 10.04 bashrc script returns error
  #1
New Member
 
Join Date: Aug 2010
Posts: 5
Rep Power: 6
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, 11:20
Default
  #2
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
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, 14:00
Default
  #3
New Member
 
Join Date: Aug 2010
Posts: 5
Rep Power: 6
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, 06:45
Default
  #4
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
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, 11:25
Default
  #5
New Member
 
Join Date: Aug 2010
Posts: 5
Rep Power: 6
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

Thread Tools
Display Modes

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 On
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 09:31
POSDAT problem piotka STAR-CD 4 June 12, 2009 08:43
Problems of Duns Codes! Martin J Main CFD Forum 8 August 14, 2003 23: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 03:07.