LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-28-2012, 09:53 AM   #1
kareempj
LQ Newbie
 
Registered: Mar 2012
Posts: 18

Rep: Reputation: Disabled
fortran compiler


Hey how ya'll doing? I have a problem with compiling fortran code on my system, each time i try to compile it says:

Error: Can't open included file 'mpif.h'

Anyone have any ideas how to fix this problem?

Thanks in advance!
 
Old 03-28-2012, 10:03 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,660

Rep: Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281
Software packages, that provide mpif.h, examples :

mpich-devel, libmpich1-devel, libmpich2-devel, libopenmpi-devel, openmpi-devel
libopenmpi-dev, libmpich2-dev, libmpich1.0-dev.

Different Linux OS's : Different package names.
And some programs require a specific version of "mpich".

.
 
Old 03-28-2012, 10:06 AM   #3
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
Basically your system misses the Message Passing Interface (MPI) development files to compile and run parallel applications. A free implementation on Linux is openmpi, but depending on what Fortran compiler you're using you may want to install a proper MPI library. If you use gfortran maybe you simply need to install openmpi and openmpi-devel (this one providing the included file mpif.h, but the exact package name depends on your Linux distribution.

Edit: beaten by knudfl!
 
1 members found this post helpful.
Old 03-28-2012, 10:10 AM   #4
kareempj
LQ Newbie
 
Registered: Mar 2012
Posts: 18

Original Poster
Rep: Reputation: Disabled
Thank you for your replies......The thing is I have those packages installed, the fortran compiler was previously working but for some reason it began giving that message recently...I'm working on a parallel machine using MPI, c++ code compiles and runs properly but only the fortran code seems to be giving problems!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fortran compiler pb abd_bela Programming 1 09-13-2011 04:06 PM
fortran compiler sarayazdani Linux - Software 1 09-20-2008 11:59 AM
g77 in gcc 4.1.0 not found only gfortran fortran 95 compiler! I need fortran 77. TheBrick Linux - Software 3 07-04-2007 06:39 AM
Fortran compiler serafimg Ubuntu 1 01-28-2007 02:19 PM
does linux fortran compiler in fedora 4 support VAX FORTRAN? terrence Programming 17 08-31-2005 08:59 AM


All times are GMT -5. The time now is 12:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration