[Scons-users] How to use scons build parallel program(MPI)?

罗飞 geoluo1217 at gmail.com
Fri Apr 10 10:36:43 EDT 2015


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.

=====================================================
We can see that it use mpif90 to compile and gfortran to Link.

*Hope someone can answer my question!*
Thanks!
luofei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20150410/43b81f55/attachment.html>


More information about the Scons-users mailing list