[Scons-users] How to use scons build parallel program(MPI)?
罗飞
geoluo1217 at gmail.com
Sat Apr 11 03:17:59 EDT 2015
I set ‘FORTRAN’ env variable instead of ‘F90’.
--------------------------------------------------------------------------------
import os
env=Environment(ENV={'PATH':os.environ['PATH']},FORTRAN='mpif90')
env.Program('helloscons.f90')
=======================================================
it is still wrong!
---------------------------------------------
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
gfortran -o helloscons.o -c helloscons.f90
helloscons.f90:2: Error: Can't open included file 'mpif.h'
scons: *** [helloscons.o] Error 1
scons: building terminated because of errors.
================================================
How to make an experiment with 'LINK'?
===================================
cd /home/apps/lib/
libfmpich.a libmpichcxx.a libmpichf90.la libmpl.la pkgconfig
libfmpich.la libmpichcxx.la libmpich.la libopa.a
libmpich.a libmpichf90.a libmpl.a libopa.la
---------------------------------------------------------------------------
cd /home/apps/include/
mpi_base.mod mpif.h mpiof.h opa_config.h opa_util.h
mpi_constants.mod mpi.h mpio.h opa_primitives.h
mpicxx.h mpi.mod mpi_sizeofs.mod opa_queue.h
2015-04-10 22:52 GMT+08:00 Paweł Tomulik <ptomulik at meil.pw.edu.pl>:
> W dniu 10.04.2015 o 16:36, 罗飞 pisze:
> > According to the Internet,I write another SConstruct to compile MPI:
> >
> -------------------------------------------------------------------------------------------------------
> > import os
> > env=Environment(ENV={'PATH':os.environ['PATH']},F90='mpif90')
> > env.Program('helloscons.f90')
> > ======================================================
> > It is still wrong! As shown below:
> > ==================================
> > scons: Reading SConscript files ...
> > scons: done reading SConscript files.
> > scons: Building targets ...
> > mpif90 -o helloscons.o -c helloscons.f90
> > gfortran -o helloscons helloscons.o
> > helloscons.o: In function `MAIN__':
> > helloscons.f90:(.text+0x1f): undefined reference to
> > `__intel_new_feature_proc_init'
> > helloscons.f90:(.text+0x38): undefined reference to `for_set_reentrancy'
> > helloscons.f90:(.text+0x44): undefined reference to `mpi_init_'
> > helloscons.f90:(.text+0x5a): undefined reference to `mpi_comm_rank_'
> > helloscons.f90:(.text+0x70): undefined reference to `mpi_comm_size_'
> > helloscons.f90:(.text+0xb5): undefined reference to `for_write_seq_lis'
> > helloscons.f90:(.text+0xc1): undefined reference to `mpi_finalize_'
> > collect2: ld returned 1 exit status
> > scons: *** [helloscons] Error 1
> > scons: building terminated because of errors.
> >
>
>
> Try setting 'FORTRAN' env variable instead of 'F90'. If this doesn't
> help, make an experiment with 'LINK'.
>
>
> --
> Pawel Tomulik
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20150411/e70747a3/attachment.html>
More information about the Scons-users
mailing list