Error Cannot Open Source File Mpi.h
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up fatal error: mpi.h: No such file or directory #include
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Setting up G++ or ICC for mpi.h on Ubuntu up vote 5 down vote favorite 3 I have never done http://stackoverflow.com/questions/26920083/fatal-error-mpi-h-no-such-file-or-directory-include-mpi-h any major programing outside of VS08. I am trying to compile a program called LAMMPS with either of the two relevant make files. One calls g++ and the other calls icc (Intel's compiler). icc produces this error: icc -O -DLAMMPS_GZIP -DMPICH_SKIP_MPICXX -DFFT_FFTW -M write_restart.cpp > write_restart.d write_restart.cpp(15): catastrophic error: cannot open source file "mpi.h" #include "mpi.h" and g++ throws this error g++ -g -O -DLAMMPS_GZIP -DMPICH_SKIP_MPICXX -DFFT_FFTW -M verlet.cpp > verlet.d pointers.h:25: fatal http://stackoverflow.com/questions/5762126/setting-up-g-or-icc-for-mpi-h-on-ubuntu error: mpi.h: No such file or directory compilation terminated. The mpi.h file is located in /usr/lib/openmpi/include It is my understanding that I need to set that $PATH variable which reads bash: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin:/opt/intel/bin:/usr/lib/openmpi/include: and $LD_LIBRARY_PATH which currently reads /usr/lib/openmpi/lib: SO, how does one include the mpi.h file? So that either icc or g++ find it? linux g++ ubuntu-10.10 include-path icc share|improve this question asked Apr 23 '11 at 4:16 Mikhail 3,80843278 add a comment| 3 Answers 3 active oldest votes up vote 5 down vote mpi.h is a header for MPI library. That would be included if you use mpic++ MPI compiler wrapper instead of g++ in your makefile. mpic++ will call the appropriate compiler. From what you describe you have openmpi package installed on your ubuntu machine. For more info, you need to consult the manual, e.g. http://lammps.sandia.gov/doc/Section_start.html#2_2 (for LAMMPS) and perhaps you need to see openmpi manual as to how to set up additional compiler. Not sure if this can be done after openmpi itself has been built. By default I think in Ubuntu openmpi compiler wrappers would only call g++. CMIIW. share|improve this answer answered Apr 23 '11 at 4:28 Wirawan Purwanto 534510 Make file spits out an executable that immediately crashes with >Fatal error in MPI_Comm_rank: Invalid communicator, error stack: MPI_Comm_rank(106): MPI_Comm_rank(comm=0x8e5bc0, rank=0x2854d00)
5 star hangout for overworked and underpaid system admins. Post Reply Print view Search Advanced search 13 posts 1 2 Next http://www.centos.org/forums/viewtopic.php?t=639 newport_j Posts: 257 Joined: 2012/06/01 16:30:08 mpi.h file Quote Postby newport_j » 2013/04/10 13:52:38 Oaky, here is a trivial one, but it got me. I was using makefile http://www.pgroup.com/userforum/viewtopic.php?t=4365&sid=b0b0216b84be47a378bf491d020dcbab and it came up with this error.Code: Select all"loop_test.c", line 7: catastrophic error: could not open source file "mpi.h"
#include
Now I use the mpi.h error cannot file all of the time in my programming, but it is from a commercialcompiler. I need to know where the mpi.h file is for gcc.I have gcc installed both 4.4 and 4.7 versions, but no mpi.h file for either of them. So whatmust I type in to install the mpi.h file. Where does it go? error cannot open Any help appreciated. Thanks in advance.Newport_j Top gerald_clark Posts: 10594 Joined: 2005/08/05 15:19:54 Location: Northern Illinois, USA mpi.h file Quote Postby gerald_clark » 2013/04/10 14:16:22 yum provides \*/mpi.hThen figure out which is the correct package for your source. Top newport_j Posts: 257 Joined: 2012/06/01 16:30:08 Re: mpi.h file Quote Postby newport_j » 2013/04/10 14:41:22 I did that and the results are shown:sudo yum provides \*/mpi.hLoaded plugins: downloadonly, fastestmirror, refresh-packagekit, securityLoading mirror speeds from cached hostfile * base: mirrors.lga7.us.voxel.net * elrepo: mirror.ventraip.net.au * extras: mirror.sanctuaryhost.com * updates: mirror.itc.virginia.eduelrepo/filelists_db | 4.0 kB 00:00 ... http://mirror.ventraip.net.au/elrepo/el ... sqlite.bz2: [Errno -1] Metadata file does not match checksumTrying other mirror.elrepo/filelists_db | 87 kB 00:01 http://elrepo.org/linux/elrepo/el6/x86_ ... sqlite.bz2: [Errno -1] Metadata file does not match checksumTrying other mirror.http://mirror.symnds.com/distributions/ ... sqlite.bz2: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 416 Requested Range Not Satisfiable"Trying other mirror.elrepo/filelists_db | 91 kB 00:00 ... http://repos.mia.lax-noc.com/elrepo/elr ... sqlite.bz2: [Errno -1] Metadata file does not match checksumTrying other mirror.http://mirrors.coreix.net/elrepo/elrepo ... sqlite.bz2: [Errno 14]
HPC Platform Products PGI Products for Apple OS X PGI Products for Windows Free HPC Products Free PGI for OS X HPC Product Feature Comparison Services PGI Subscription Service PGI Premier Service Support Support Options Current Release Information Current Version Information Licensing Generate Permanent Keys Generate Trial License Keys Trial License FAQ Transfer License Locating Your PIN Licensing Troubleshooting FAQ Compatibility and Installation Licensing Compilation Linking Execution Portability Inter-language Support Request Download Free Trial Software Current Version Current Version Information Archive Releases Licensing Daemons Resources Documentation Porting & Tuning Guides Tutorial Videos PGInsider Newsletters White Papers & Specifications Technical Papers & Presentations Articles Benchmarking Glossary User Forums Programming and Compiling Accelerator Programming Debugging and Profiling License and Installation Purchase Find a Reseller Product Configurator Quote Request Pricing End-user License Agreement Subscription Services Agreement Become a Reseller About Why Choose PGI News Center Job Openings Locations Contact PGI PGI User Forum Search Memberlist Register Profile Log in Cannot open source file "stddef.h" Goto page 1, 2, 3, 4Next PGI User Forum Forum Index -> Programming and Compiling View previous topic :: View next topic Author Message chesterismayJoined: 06 Jun 2014Posts: 8 Posted: Fri Jun 06, 2014 2:01 pm Post subject: Cannot open source file "stddef.h" I just installed the PGI compilers so that I could use OpenMP on my Macbook running Mavericks. Unfortunately, when I try to compile any C++ program it gives the following error in the Terminal: $ pgcpp hello.cc hello hello.cc: "/opt/pgi/osx86-64/14.6/include/stddef.h", line 16: catastrophic error: cannot open source file "stddef.h" #include_next