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

罗飞 geoluo1217 at gmail.com
Sat Apr 11 04:38:22 EDT 2015


Thanks! According to your document, I solve my problem.Originally the
compile and link is set separately.

2015-04-11 16:18 GMT+08:00 Dirk Bächle <tshortik at gmx.de>:

> Hi there,
>
> On 11.04.2015 09:17, 罗飞 wrote:
>
>> 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 ...
>> [...]
>> ================================================
>> How to make an experiment with 'LINK'?
>> ===================================
>>
>
> it seems that you're a bit confused and overwhelmed by all the different
> options and possibilities...which is perfectly normal for a starter. I
> would like to suggest that you start to read a little bit more about
> Environments/Programs and so on, here a few references:
>
>   SCons UserGuide (start with chapters 1-7):
>     http://scons.org/doc/production/HTML/scons-user.html
>   SCons CrashCourse:
>     http://scons.org/wiki/SConsCrashCourse
>   Fortran Tutorial (might be outdated):
>     http://www.scons.org/wiki/llarsen/FortranTutorial
>
> What you have to understand is, that all commands that SCons executes are
> defined by variables in your environment (not 100% true, but it simplifies
> the following explanation). There is, for example, a variable named "LINK"
> which defines the path to your linker program. Another variable named
> "LINKCOM" will look like
> "$LINK $LINKFLAGS -o $TARGET $SOURCES", where the single expressions get
> expanded at runtime, based on how you define the included variables in your
> current environment. You can always redefine these on your own (the manuals
> listed above will show you how to do that), after the constructor of
> Environment() has set them to their defaults.
> In the UserGuide you can find a list of pre-defined variables and their
> explanation...
>
> Hope this helps you further.
>
> Best regards,
>
> Dirk
>
>
> _______________________________________________
> 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/aaf6666a/attachment.html>


More information about the Scons-users mailing list