[mvapich-discuss] Re: mpif90 wrapper compile error when mpif.h is needed

Brian Curtis curtisbr at cse.ohio-state.edu
Sat Mar 1 22:19:08 EST 2008


For the Sun Studio compiler you can link with libfui (mpicc).  For  
mpiCC, the -xlang=f90 option will do the same.  Thanks to Giri  
Chukkapalli for providing this solution.


Brian

On Mar 1, 2008, at 9:27 PM, Brian Curtis wrote:

> Giri,
>
>
> Depending on the platform/compiler, you can link with libg2c (Linux  
> F77), U77 (HPUX), or PEPCF90 (Intel ifc).  MVAPICH2 contains some  
> intelligence during configuration that resolves this issue for many  
> (if not all) supported platforms that we will look at backporting.   
> Can you provide a simple test program so that we can replicate this  
> issue with MVAPICH?
>
>
> Brian
>
>
>
> On Mar 1, 2008, at 8:11 PM, giri chukkapalli wrote:
>
>> Thanks. I got that code compiled. But now I have another problem  
>> related
>> to F2C. This seem to be a common problem. Lot of references all  
>> over the
>> web. I tried few things with out much success.:
>>
>>  Here is a link time error:
>>
>> /work/00335/giri/mvapich/lib/libmpich.a(farg.o)(.text+0x8): In  
>> function
>> `mpir_iargc_':
>> : undefined reference to `iargc_'
>> /work/00335/giri/mvapich/lib/libmpich.a(farg.o)(.text+0x32): In  
>> function
>> `mpir_getarg_':
>> : undefined reference to `getarg_'
>> make[1]: *** [localmake] Error 1
>> make[1]: Leaving directory `/work/00335/giri/benchmarks/milc/ 
>> ks_imp_dyn2'
>> make: *** [su3_rmd] Error 2
>>
>>   I am thinking of just downloading getarg_.c and iargc_.c files  
>> compile
>> and link them?
>>
>>  thanks for your help.
>>
>>  giri
>>
>> Brian Curtis wrote:
>>> Giri,
>>>
>>>
>>> The mpif90 wrapper script will attempt to create a symbolic link to
>>> mpif.h if F90INC is not set, otherwise, the value of F90INC is added
>>> to the search path for include files.  Try setting F90INC to the  
>>> path
>>> where mpif.h resides.  You can also specify the include directory to
>>> mpif90 directly:
>>>
>>> mpif90 -I/path/to/mpif/includes
>>>
>>>
>>>
>>> Brian
>>>
>>>
>>> On Feb 29, 2008, at 7:46 PM, girichukkapalli wrote:
>>>
>>>>
>>>>  When I compile a file which needs mpif.h file instead of module
>>>> include files, I get the following error:
>>>>
>>>> mpif90  -f77 -g -I../src -e -m64 -xtarget=barcelona -xarch=sse3
>>>> -xprefetch -xprefetch_level=2 -xvector=simd -xO5 -stackvar -dalign
>>>> -fsimple=2   -M../libs/netcdf_stubs -D_PRIM -M./objpr.96810011M
>>>> -I./objpr.96810011M -D_NOPRESTART -D_Linux -D_MPI -D_NO_OMP_THREADS
>>>> -D_NONSTAGGER -DNP=8 -DPLEV=96 -D_WK_GRAD -DTIMING
>>>> -I../libs/netcdf_stubs -free  -c ../src/parallel_mod.F90 -o
>>>> objpr.96810011M/parallel_mod.o
>>>> "parallel_mod.F90", line 16: error: can't find include file: mpif.h
>>>> "parallel_mod.F90", line 116: error: can't find include file:  
>>>> mpif.h
>>>> "parallel_mod.F90", line 465: error: can't find include file:  
>>>> mpif.h
>>>> make[1]: *** [parallel_mod.o] Error 3
>>>> make[1]: Leaving directory
>>>> `/work/00335/giri/benchmarks/HOMME/src_makefiles/build.Linux'
>>>> make: *** [preqx] Error 2
>>>>
>>>>
>>>> when I looked in the wrapper script, I see something about  
>>>> F90INC. Do
>>>> I need to include any flag?
>>>>
>>>> I am using mvapich-trunk, SUN Studio Compiler.
>>>>
>>>>  thanks
>>>>   giri
>>>
>
> _______________________________________________
> mvapich-discuss mailing list
> mvapich-discuss at cse.ohio-state.edu
> http://mail.cse.ohio-state.edu/mailman/listinfo/mvapich-discuss



More information about the mvapich-discuss mailing list