MPI_SIESTA should not be compiled for many of the utilities in the Util
directory.
In your case the Gen-basis/Makefile has a bug (it has been corrected in
later versions).

Change the lines:
DEFS:=$(DEFS_PREFIX)-UMPI $(DEFS)
FPPFLAGS:=$(DEFS_PREFIX)-UMPI $(FPPFLAGS)
to
DEFS:=$(DEFS)  $(DEFS_PREFIX)-UMPI
FPPFLAGS:= $(FPPFLAGS) $(DEFS_PREFIX)-UMPI

and re-compile (remember "make clean").

2014-11-03 7:31 GMT+01:00 Bing Huang <[email protected]>:

>  In fact, i've noticed that mpi_siesta.mod exists under the directory
> siesta/Obj/, by copying it to the Util/Gen-basis/, the previous error
> dissapears. Unfortunately, new error message poped up, as shown below. Any
> ideas?
>
> ######################################################################
> ############################## Error Message #########################
> gen-basis.o: In function `gen_basis':
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/gen-basis.F:68: undefined
> reference to `mpi_init_'
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/gen-basis.F:69: undefined
> reference to `mpi_comm_rank_'
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/gen-basis.F:70: undefined
> reference to `mpi_comm_size_'
> alloc.o: In function `print_report':
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/alloc.F90:1705:
> undefined reference to `__mpi__r8_s_MOD_mpi_reduce_t'
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/alloc.F90:1707:
> undefined reference to `__mpi__r8_v_MOD_mpi_reduce_t'
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/alloc.F90:1711:
> undefined reference to `__mpi__integer_s_MOD_mpi_bcast_t'
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/alloc.F90:1723:
> undefined reference to `__mpi__r8_s_MOD_mpi_recv_t'
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/alloc.F90:1718:
> undefined reference to `__mpi__r8_s_MOD_mpi_send_t'
> alloc.o: In function `__alloc_MOD_alloc_report':
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/alloc.F90:318:
> undefined reference to `__mpi__integer_s_MOD_mpi_bcast_t'
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/alloc.F90:319:
> undefined reference to `__mpi__integer_s_MOD_mpi_bcast_t'
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/alloc.F90:320:
> undefined reference to `__mpi__character_s_MOD_mpi_bcast_t'
> xcmod.o: In function `__xcmod_MOD_setxc':
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/xcmod.F:136:
> undefined reference to `__mpi__integer_s_MOD_mpi_bcast_t'
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/xcmod.F:138:
> undefined reference to `__mpi__character_v_MOD_mpi_bcast_t'
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/xcmod.F:140:
> undefined reference to `__mpi__character_v_MOD_mpi_bcast_t'
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/xcmod.F:142:
> undefined reference to `__mpi__r8_v_MOD_mpi_bcast_t'
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/xcmod.F:144:
> undefined reference to `__mpi__r8_v_MOD_mpi_bcast_t'
> memory.o: In function `printmemory_':
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/memory.F:144:
> undefined reference to `__mpi__integer_s_MOD_mpi_allreduce_t'
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/memory.F:167:
> undefined reference to `__mpi__integer_sv_MOD_mpi_gather_t'
> atom_options.o: In function `__atom_options_MOD_get_atom_options':
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/atom_options.F90:26:
> undefined reference to `mpi_comm_rank_'
> sys.o: In function `__sys_MOD_bye':
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/sys.F:105:
> undefined reference to `mpi_finalize_'
> sys.o: In function `__sys_MOD_die':
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/sys.F:69:
> undefined reference to `mpi_abort_'
> timer.o: In function `timer1_':
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/timer.F:117:
> undefined reference to `__mpi__r8_s_MOD_mpi_allreduce_t'
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/timer.F:164:
> undefined reference to `__mpi__r8_v_MOD_mpi_reduce_t'
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/timer.F:139:
> undefined reference to `__mpi__r8_v_MOD_mpi_reduce_t'
> collect2: error: ld returned 1 exit status
> make: *** [gen-basis] Error 1
> ######################################################################
> ############################## Error Message #########################
>
>  At 2014/11/3 14:00, Bing Huang wrote:
>
>  Hi, siesta users,
>
> i've got an error (see the last part of this message) when compiling the
> Gen-basis utility. Everything was just fine when compling the main program
> (MPI version) of siesta and its dependencies.
>
> As suggested in the Makefile (whose absolute path is
> `siesta-3.2/Util/Gen-basis/Makefile), i.e., define an FC_SERIAL symbol in
> my top arch.make, to avoid linking in the mpi libraries even if we
> explicitly undefine MPI below.
>
> I've followed exactly the suggestion by insert one line with content
> "FC_SERIAL=gfortran" in top arch.make file and  modified the related lines
> in `siesta-3.2/Util/Gen-basis/Makefile
> #+++++++++++++++++++++++++++++++++++++++++++++++++++
> #FC_DEFAULT:=$(FC)
> #FC_SERIAL?=$(FC_DEFAULT)
> FC:=$(FC_SERIAL)         # Make it non-recursive
> #+++++++++++++++++++++++++++++++++++++++++++++++++++
> the error still exists. Any suggestions?
>
> Best regards,
> Bing
>
> ######################################################################
> ############################## *Error Message* #########################
> bhuang@ubuntu:~/src/siesta-3.2/Util/Gen-basis$ make
> (cd fdf ; make -f
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/fdf/makefile
> "FC=gfortran         "
> "VPATH=/home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/fdf" \
>                           "ARCH_MAKE=../../../Obj/arch.make" \
>                           "INCFLAGS=-I
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/fdf
> -I/home/bhuang/netcdf/include " "FFLAGS=-g -O2" module)
> make[1]: Entering directory
> `/home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/fdf'
> In fdf, INCFLAGS is: -I
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/fdf
> -I/home/bhuang/netcdf/include
> gfortran          -c -g -O2 -I
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/fdf
> -I/home/bhuang/netcdf/include
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/fdf/fdf.f
> Assembler messages:
> Fatal error: can't create fdf.o: Permission denied
> make[1]: *** [fdf.o] Error 1
> make[1]: Leaving directory
> `/home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/fdf'
> make: *** [libfdf.a] Error 2
> bhuang@ubuntu:~/src/trash/siesta-3.2/Util/Gen-basis$ sudo make
> (cd fdf ; make -f
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/fdf/makefile
> "FC=gfortran         "
> "VPATH=/home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/fdf" \
>                           "ARCH_MAKE=../../../Obj/arch.make" \
>                           "INCFLAGS=-I
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/fdf
> -I/home/bhuang/netcdf/include " "FFLAGS=-g -O2" module)
> make[1]: Entering directory
> `/home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/fdf'
> In fdf, INCFLAGS is: -I
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/fdf
> -I/home/bhuang/netcdf/include
> gfortran          -c -g -O2 -I
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/fdf
> -I/home/bhuang/netcdf/include
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/fdf/fdf.f
> gfortran          -c -g -O2 -I
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/fdf
> -I/home/bhuang/netcdf/include
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/fdf/parse.f
> gfortran          -c -g -O2 -I
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/fdf
> -I/home/bhuang/netcdf/include
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/fdf/fdf_mod.f
> ar  cru libfdf.a fdf.o fdf_mod.o parse.o
> ranlib libfdf.a
> cp libfdf.a ..
> make[1]: Leaving directory
> `/home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/fdf'
> gfortran          -c -g -O2 -I/home/bhuang/netcdf/include
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/parallel.f
> gfortran          -c -g -O2 -I/home/bhuang/netcdf/include  -UMPI -DMPI
> -DFC_HAVE_FLUSH -DFC_HAVE_ABORT -DCDF
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/precision.F
> gfortran          -c -g -O2 -I/home/bhuang/netcdf/include  -UMPI -DMPI
> -DFC_HAVE_FLUSH -DFC_HAVE_ABORT -DCDF
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/sys.F
> /home/bhuang/src/trash/siesta-3.2/Util/Gen-basis/../../Src/sys.F:23.9:
>
>       use mpi_siesta
>          1
> Fatal Error: Can't open module file 'mpi_siesta.mod' for reading at (1):
> No such file or directory
> make: *** [sys.o] Error 1
> ######################################################################
> ############################## *Error Message* #########################
>
>
>


-- 
Kind regards Nick

Responder a