并行化代码:: blocks项目

时间:2014-06-26 13:14:31

标签: c++ windows-7 makefile mpi codeblocks

我试图使用palabos发行版提供的progect文件,在Code :: Blocks版本13.12中使用palabos cfd库的版本1.3(可以在http://www.palabos.org/找到)。在我尝试激活palabos的并行处理功能之前,事情进展顺利。 palabos文档中给出的建议主要是针对基于unix的系统中命令行运行程序的tword人员。因此,他们给出的关于如何激活内置并行化功能的建议是:"编辑Makefile,设置MPI_PARALLEL = true,并重新编译"但是,Code :: blocks默认情况下不使用makefile,我已经尝试使用包含的makefile(检查下载与"渗透率"相同的文件夹),但它给出了一个关于没有的错误释放规则(即使在我更改了seffings以便它应该在windows中工作)。我该怎么办?

Makefile内容:

palabosRoot   = C:\Users\estone\Documents\summers\summer 2014\Soil Research\palabos v1.3r0
# Name of source files in current directory to compile and link with Palabos
projectFiles = permeability.cpp

# Set optimization flags on/off
optimize     = true
# Set debug mode and debug flags on/off
debug        = false
# Set profiling flags on/off
profile      = false
# Set MPI-parallel mode on/off (parallelism in cluster-like environment)
MPIparallel  = true
# Set SMP-parallel mode on/off (shared-memory parallelism)
SMPparallel  = false
# Decide whether to include calls to the POSIX API. On non-POSIX systems,
#   including Windows, this flag must be false, unless a POSIX environment is
#   emulated (such as with Cygwin).
usePOSIX     = false

# Path to external libraries (other than Palabos)
libraryPaths =
# Path to inlude directories (other than Palabos)
includePaths =
# Dynamic and static libraries (other than Palabos)
libraries    =

# Compiler to use without MPI parallelism
serialCXX    = g++
# Compiler to use with MPI parallelism
parallelCXX  = mpicxx
# General compiler flags (e.g. -Wall to turn on all warnings on g++)
compileFlags = -Wall -Wnon-virtual-dtor
# General linker flags (don't put library includes into this flag)
linkFlags    =
# Compiler flags to use when optimization mode is on
optimFlags   = -O3
# Compiler flags to use when debug mode is on
debugFlags   = -g
# Compiler flags to use when profile mode is on
profileFlags = -pg


##########################################################################
# All code below this line is just about forwarding the options
# to SConstruct. It is recommended not to modify anything there.
##########################################################################

SCons     = $(palabosRoot)/scons/scons.py -j 2 -f $(palabosRoot)/SConstruct

SConsArgs = palabosRoot=$(palabosRoot) \
            projectFiles="$(projectFiles)" \
            optimize=$(optimize) \
            debug=$(debug) \
            profile=$(profile) \
            MPIparallel=$(MPIparallel) \
            SMPparallel=$(SMPparallel) \
            usePOSIX=$(usePOSIX) \
            serialCXX=$(serialCXX) \
            parallelCXX=$(parallelCXX) \
            compileFlags="$(compileFlags)" \
            linkFlags="$(linkFlags)" \
            optimFlags="$(optimFlags)" \
            debugFlags="$(debugFlags)" \
        profileFlags="$(profileFlags)" \
        libraryPaths="$(libraryPaths)" \
        includePaths="$(includePaths)" \
        libraries="$(libraries)"

compile:
    python $(SCons) $(SConsArgs)

clean:
    python $(SCons) -c $(SConsArgs)
    /bin/rm -vf `find $(palabosRoot) -name '*~'`

0 个答案:

没有答案