-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't find mpif.h and many other header files. #15
Comments
Hi Hamid, I think the easiest solution to this problem is to use the "mpif90" wrapper function that calls gfortran. A wrapper is kind of like an alias, that makes a compilcated command very simple. For instance, I use openmpi for MPI communications, and it is built with gfortran. If I execute the command "mpif90 -show" in my terminal window, it will show me what it's equivalent command string is, as if it was passed to compile a program: rgknox@eddi:$ mpif90 -show gfortran -I/home/rgknox/local/openmpi-1.8.1/include -pthread -I/home/rgknox/local/openmpi-1.8.1/lib -Wl,-rpath -Wl,/home/rgknox/local/openmpi-1.8.1/lib -Wl,--enable-new-dtags -L/home/rgknox/local/openmpi-1.8.1/lib -lmpi_usempi -lmpi_mpifh -lmpi All that stuff that comes after the gfortran command tell the compiler where to find external libraries and how exactly to compile. So you need to work with your system administrator to find out what type of MPI is available on your system, and once you have identified that you must have the binaries (mpif90) and the libraries that come with it, in your path. See below I have the F_COMP variable in my include.mk.opt file set to mpif90, and the C_COMP variable set to mpicc. F_COMP=mpif90 Note that you will run into a similar issue when the build process tries to incorporate the HDF5 libraries and functionality. In this case you have to make sure that the HDF5_INCS variable and HDF5_LIBS variable are set to the correct path on your machine. See http://www.hdfgroup.org/HDF5/ for more info. |
Another comment: For some reason, the build process will tell you it can't find mpif.h and some other libraries, but these are just false positives and can be ignored. This is generated during my compile: ./generate_deps.sh ../.. Do you get any specific error messages during compile time? |
Thanks for your response. And here is my address to HDF5: Thanks |
This is essentially a wild guess, but it looks like the issue might be the omission of any sort of HDF4 flag I've italicized below... cp -f /home/hamid/opt/source/ED2-master/BRAMS/src/mksfc/landuse_input.F90 landuse_input.F90 Which is to say it looks like the compiler simply doesn't know how to interpret 'USE_HDF4'. Seems reasonable anyway. |
I am trying to compile the ED with mpich and hdf5 using the GFORTRAN include file. I am new to these types of the model. By the way when i try ./instal.sh the error is compiler can not find the mpif.h and some other include files residing in /ED/src/mpi/ed_empass_init.f90 and /ED/utils/utils_c.c . Do you have any idea what could be the possible reason for that?
Thanks,
hamid
The text was updated successfully, but these errors were encountered: