[mpich-discuss] Needs information

Dave Goodell goodell at mcs.anl.gov
Fri Oct 12 12:45:21 CDT 2012


In general, we recommend compiling with "mpicc" (and friends) rather than attempting to get the compiler flags correct yourself.  However, if you really don't want to do that, then look at the output of "mpicc -show" (or the equivalent command for your language, cxx maybe?).  It looks to me like you're missing a "-L" for the MPICH2 lib directory.

-Dave

On Oct 12, 2012, at 12:39 PM CDT, Abid Muslim Malik wrote:

> Thanks Dave.
> 
> I have installed MPICH-2 . The path is /home/ammalik/mpich2-1.4/build
> 
> Here is the GNUmakefile which I am changing to avoid errors:
> 
> ----------------------------
> # For gnu toolchain ------------ 
> include $(BOXLIB_HOME)/Tools/C_mk/Make.defs
> fFLAGS += -cpp -fdefault-real-8
> fincludes += ./libs3d/source
> DEFINES += -fexceptions -cpp
> BL_MPI_LIBS += -L./libs3d/source -ls3d -L/usr/lib -L/usr/lib -Wl,-rpath -Wl,/usr/lib -lmpichcxx -lmpich -lopa -lpthread -lrt
> ( This is where -lmpich is mentioned)
> 
> 
> ### For PGI toolchain -----------
> #COMP          = CC
> #FCOMP         = ftn
> #include Make.pgi
> #BL_MPI_LIBS += -L./libs3d/source -ls3d  -lm
> ##### ----------------------------
> 
> include ./Make.package
> 
> 
> 
> 
> include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package
> #include $(BOXLIB_HOME)/Src/C_AMRLib/Make.package
> #include $(BOXLIB_HOME)/Src/C_BoundaryLib/Make.package
> 
> 
> INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_BaseLib
> INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_AMRLib
> INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_BoundaryLib /home/ammalik/mpich2-1.4.1p1/build/include /home/ammalik/mpich2-1.4.1p1/build/bin
> ( I have added the above paths and was able to compile some files of S3D)
> 
> INCLUDE_LOCATIONS += ./libs3d/source
> VPATH_LOCATIONS   += . $(BOXLIB_HOME)/Src/C_BaseLib
> VPATH_LOCATIONS   += . $(BOXLIB_HOME)/Src/C_AMRLib
> VPATH_LOCATIONS   += . $(BOXLIB_HOME)/Src/C_BoundaryLib
> 
> -------------------------------------------------------------------
> 
> Thanks for your time and help.
> 
> Abid
> 
> 
> On Fri, Oct 12, 2012 at 12:19 PM, Dave Goodell <goodell at mcs.anl.gov> wrote:
> Try installing MPICH2, preferably from a binary package: http://www.mcs.anl.gov/research/projects/mpich2/downloads/index.php?s=downloads
> 
> -Dave
> 
> On Oct 12, 2012, at 11:31 AM CDT, Abid Muslim Malik wrote:
> 
> > Dear All:
> >
> > I am getting following error while compiling a S3D application:
> >
> > /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: cannot find -lmpich
> > collect2: ld returned 1 exit status
> > make: *** [s3d_box3d.Linux.gcc.gfortran.MPI.ex] Error 1
> >
> >
> > Any suggestion how to fix it? Where  can I find -lmpich?
> >
> > Thanks,
> > --
> > Abid M. Malik
> > ******************************************************
> > "I have learned silence from the talkative, toleration from the intolerant, and kindness from the unkind"---Gibran
> > "Success is not for the chosen few, but for the few who choose" --- John Maxwell
> > "Being a good person does not depend on your religion or status in life, your race or skin color, political views or culture. IT DEPENDS ON HOW GOOD YOU TREAT OTHERS"---
> >
> >
> > _______________________________________________
> > mpich-discuss mailing list     mpich-discuss at mcs.anl.gov
> > To manage subscription options or unsubscribe:
> > https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
> 
> _______________________________________________
> mpich-discuss mailing list     mpich-discuss at mcs.anl.gov
> To manage subscription options or unsubscribe:
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
> 
> 
> 
> -- 
> Abid M. Malik
> ******************************************************
> "I have learned silence from the talkative, toleration from the intolerant, and kindness from the unkind"---Gibran
> "Success is not for the chosen few, but for the few who choose" --- John Maxwell
> "Being a good person does not depend on your religion or status in life, your race or skin color, political views or culture. IT DEPENDS ON HOW GOOD YOU TREAT OTHERS"--- 
>  
> 
> _______________________________________________
> mpich-discuss mailing list     mpich-discuss at mcs.anl.gov
> To manage subscription options or unsubscribe:
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss



More information about the mpich-discuss mailing list