commit 4b35549b20632a8bab9238d7f3b7e451493f202b Author: Gregor Weiss Date: Thu Sep 21 17:05:56 2023 +0200 initial release diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f55495a --- /dev/null +++ b/.gitignore @@ -0,0 +1,148 @@ +# git-ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. + +# editor and misc backup files - anywhere +*~ +.*~ +*.bak +*.bak[0-9][0-9] +*.orig +*.orig[0-9][0-9] +\#*\# +.cache +*.swp + +# file-browser settings - anywhere +.directory + +# KDevelop include-path files - anywhere +.kdev_include_paths + +# CVS recovered versions - anywhere +.#* + +# objects and archives - anywhere +*.[oa] +*.la +*.so +*.jar +*.dylib +.cdll + +# derived files +lex.yy.c + +# Corefiles +core + +# dependency files - anywhere +*.dep + +# lnInclude (symlink) folders - anywhere +lnInclude + +# A hidden file created by the Mac OS X Finder. +.DS_Store + +# build folders - anywhere +linux*Gcc*/ +linux*Icc*/ +mingw*Gcc*/ +linuxARM*/ +darwin*Gcc*/ +darwin*Intel*/ +linuxming*/ +SiCortex*Gcc*/ +solaris*Gcc*/ +SunOS*Gcc*/ + +# debian/ derived files +build-stamp +debian/files +debian/openfoam170.debhelper.log +debian/openfoam170.substvars +debian/openfoam170/ +debian/stamp-patched + +# reinstate wmake/rules that might look like build folders +!wmake/rules/*/ + +# doxygen generated documentation +doc/[Dd]oxygen/html +doc/[Dd]oxygen/latex +doc/[Dd]oxygen/man + +# generated files in the main directory (e.g. ReleaseNotes-?.?.html) +/*.html + +# patch residue +*.orig +*.rej + +# pyFoam-stuff +PlyParser_FoamFileParser_parsetab.py + +# python-compile +*.pyc + +# other stuff +.build +.hgignore +.timeStamp + +# source packages - anywhere +*.tar.bz2 +*.tar.gz +*.tar +*.tgz +*.gtgz +*.xz + +# ignore the persistent .build tag in the main directory +/.build + +# ignore .timeStamp in the main directory +/.timeStamp + +# ignore .tags in the main directory +/.tags + +# ignore - changes to the configuration +etc/cshrc +etc/bashrc +etc/settings.csh +etc/settings.sh +etc/prefs.csh +etc/prefs.sh + +# make sure that this settings file is not used +etc/bashrc.preset + +#Test-Harness generated stuff + +# The following files are blacklisted because of a DMCA complaint by ANSYS. +src/lduSolvers/tools/PriorityArray.C +src/lduSolvers/tools/PriorityArray.H +src/lduSolvers/amg/amgPolicy/samgPolicy.C +src/lduSolvers/amg/amgPolicy/samgPolicy.H +src/lduSolvers/amg/amgPolicy/aamgPolicy.C +src/lduSolvers/amg/amgPolicy/aamgPolicy.H + +# vagrant stuff +vagrantSandbox/.vagrant/ + +# Various intermediate files and directories generated CMAKE +CMakeFiles/ +build/ +CMakeCache.txt +cmake_install.cmake +install_manifest.txt +timestamp + +# new target folders - just for the moment +lib + +# libarchive thirdParty for tar modules +applications/tarmodules/startTarCase/thirdParty/libarchive/ + +# end-of-file diff --git a/Allclean b/Allclean new file mode 100755 index 0000000..b8f4195 --- /dev/null +++ b/Allclean @@ -0,0 +1,3 @@ +#!/bin/bash +rmdepall +wcleanLnIncludeAll diff --git a/Allwmake b/Allwmake new file mode 100755 index 0000000..b222d50 --- /dev/null +++ b/Allwmake @@ -0,0 +1,42 @@ +#!/bin/bash +cd ${0%/*} || exit 1 # run from this directory + +# Stop the script if a command returns an error code +# trap "exit -1" ERR +set -e +trap 'catch $? $LINENO' EXIT +catch() { + if [ "$1" != "0" ]; then + # error handling goes here + echo "Error $1 occurred on $2" + fi +} + +if [ "$PWD" != "$WM_PROJECT_DIR" ] +then + echo "Error: Current directory is not \$WM_PROJECT_DIR" + echo " The environment variable are not consistent with the installation." + echo " Check the OpenFOAM entries in your dot-files and source them." + exit 1 +fi + +# wmake is required for subsequent targets +( cd wmake/src && make ) + +# build ThirdParty sources +# ( cd $WM_THIRD_PARTY_DIR && ./AllMake ) + +# We make sure the ThirdParty packages environment variables are up-to-date +# before compiling the rest of OpenFOAM +. $WM_PROJECT_DIR/etc/settings.sh + +# build OpenFOAM libraries and applications +src/Allwmake +applications/Allwmake + +if [ "$1" = doc ] +then + doc/Allwmake +fi + +# ----------------------------------------------------------------- end-of-file diff --git a/Allwmake.firstInstall b/Allwmake.firstInstall new file mode 100755 index 0000000..2a25840 --- /dev/null +++ b/Allwmake.firstInstall @@ -0,0 +1,89 @@ +#!/bin/bash +cd ${0%/*} || exit 1 # run from this directory + +if [ "$PWD" != "$WM_PROJECT_DIR" ] +then + echo + echo "Error: Current directory is not \$WM_PROJECT_DIR" + echo " The environment variables are not consistent with the installation." + echo " Please source configuration files." + echo + echo "Examples:" + echo " bash: . etc/bashrc" + echo " tcsh: source etc/cshrc" + echo + echo " If you sourced the configuration files, please check the 'foamInstall' entry." + echo + exit 1 +fi + +if [ -z "$PARAVIEW_SYSTEM" ] && [ -z "$QT_BIN_DIR" ] +then + echo + echo "\$QT_BIN_DIR not set. To compile Paraview from sources" + echo "the command \$QT_BIN_DIR/qmake needs to be valid." + echo + echo "Examples: " + echo " Ubuntu: \"export QT_BIN_DIR=/usr/bin\"" + echo " Fedora: \"export QT_BIN_DIR=/usr/lib64/qt4/bin\"" + echo " openSuse: \"export QT_BIN_DIR=/usr/bin\"" + echo + read -r -p "Proceed without compiling ParaView [Y/n] " response + if [[ $response =~ ^([nN][oO]|[nN])$ ]] + then + exit 0 + fi +fi + +# Check whether we will be compiling cudaSolvers +if [ -f $CUDA_BIN_DIR/nvcc ] +then + echo + echo "Cuda compiler detected at $CUDA_BIN_DIR/nvcc;" + echo "cudaSolvers will be compiled by default." + echo + + # If yes, check presence of $CUDA_ARCH + if [ -z "$CUDA_ARCH" ] + then + echo + echo "\$CUDA_ARCH is required by nvcc compiler but not set." + echo "Check section '-gpu-architecture' in 'man nvcc' for details." + echo + read -r -p "Proceed without compiling cudaSolvers? [Y/n] " response + if [[ $response =~ ^([nN][oO]|[nN])$ ]] + then + exit 0 + fi + export CUDA_IGNORE + fi + echo "Cuda architecture set to: $CUDA_ARCH" +fi + +# wmake is required for subsequent targets +( cd wmake/src && make ) + +# build ThirdParty sources +( cd $WM_THIRD_PARTY_DIR && ./AllMake.pre ) + +# We make sure the ThirdParty packages environment variables are up-to-date +# before compiling the rest of OpenFOAM +. $WM_PROJECT_DIR/etc/settings.sh + +# build OpenFOAM libraries and applications +src/Allwmake +applications/Allwmake + +if [ "$1" = doc ] +then + doc/Allwmake +fi + +# build ThirdParty sources that depend on main installation +export WM_NCOMPPROCS=1 +( cd $WM_THIRD_PARTY_DIR && ./AllMake.post ) + +# Build extend-bazaar packages +#( cd extend-bazaar && ./Allwmake) + +# ----------------------------------------------------------------- end-of-file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/README.md b/README.md new file mode 100644 index 0000000..7f31ea7 --- /dev/null +++ b/README.md @@ -0,0 +1,63 @@ +## Coherent I/O format for OpenFOAM +The new "coherent" OpenFOAM file format is designed for input/output (I/O) on high performance parallel file systems. The developments were conducted in a reduced version of foam-extend 4.1 comprising the core `foam` and `finiteVolume` libraries. + +### Installation +For the reduced version the same steps apply as for foam-extend-4.1, see +https://openfoamwiki.net/index.php/Installation/Linux/foam-extend-4.1. + +In particular, use `Allwmake.firstInstall` to download and install the dependency to ADIOS2 in the ThirdParty folder. + +``` +source etc/bashrc [WM_MPLIB=XXX MPI_ROOT=/path/to/mpi] +Allwmake.firstInstall +``` + +Sourcing the bashrc for a second time enables usage of ADIOS2 tools like `bpls`. + +### Usage +Check out the `lid-driven-cavity-3D` case in the `tutorials` folder. The following workflow works straightforward: + +``` +blockMesh +[decomposePar] +mpirun -n X icoFoam -parallel +``` + +Note that `decomposePar` actually is optional because a *naive* decomposition can be used during start-up phase of `icoFoam`. Also, if the number of processors in `decomposeParDict` does not match the number of ranks in `mpirun -n X`, the *naive* decomposition is used. Hence, `decomposePar` becomes optional and restarts on arbitrary number of MPI ranks is possible. + +After the first run the time folders contain a ADIOS2 bp-file. The data can be observed using the command line tool `bpls`. + +``` +bpls 0.001/data.bp/ + double U/internalField {3000000} + double p/internalField {1000000} + double phi/boundaryField/movingWall/value {10000} + double phi/internalField {2970000} +``` + +Please also refer to https://adios2.readthedocs.io/en/v2.9.1/ about viewing and extracting data from ADIOS2 files. + +If the `system/controlDict` sets `writeBulkData yes`, the the data of all time steps is stored in a case-global ADIOS2 bp-file. The time steps share one common `data.bp` file in the case folder. In that case, asynchronous output can be activate in the `system/config.xml`: + +``` + + +``` + +The activated asynchronous output into the case-global data file can hide the overheads of the I/O latencies. + +#### Contributors +The work has been carried out in Task 3.4 — Parallel I/O — of the exaFOAM project. +Participating partners (partner in **bold** is the task lead): **HLRS**, Wikki GmbH + +HLRS: Gregor Weiss, Flavio Galeazzo, and Andreas Ruopp + +Wikki GmbH: Sergey Lesnik and Henrik Rusche + +#### Acknowledgment +This application has been developed as part of the exaFOAM Project +https://www.exafoam.eu, which has received funding from the European +High-Performance Computing Joint Undertaking (JU) under grant agreement No +956416. The JU receives support from the European Union's Horizon 2020 research +and innovation programme and France, Germany, Italy, Croatia, Spain, Greece, +and Portugal. diff --git a/ThirdParty/.gitignore b/ThirdParty/.gitignore new file mode 100644 index 0000000..1aec42b --- /dev/null +++ b/ThirdParty/.gitignore @@ -0,0 +1,20 @@ +# git-ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. + +# editor and misc backup files - anywhere +*~ +.*~ +*.bak +*.bak[0-9][0-9] +*.orig +*.orig[0-9][0-9] +\#*\# + +# ignore the build +rpmBuild/BUILD +rpmBuild/RPMS +rpmBuild/rpmDB +packages +rpmBuild/tmp + +# end-of-file diff --git a/ThirdParty/AllClean b/ThirdParty/AllClean new file mode 100755 index 0000000..9360b51 --- /dev/null +++ b/ThirdParty/AllClean @@ -0,0 +1,78 @@ +#!/bin/bash +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | foam-extend: Open Source CFD +# \\ / O peration | +# \\ / A nd | For copyright notice see file Copyright +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of foam-extend. +# +# foam-extend is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# foam-extend is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with foam-extend. If not, see . +# +# Script +# Allclean +# +# Description +# Cleanup script for ThirdParty packages. +# Add option alsoPackage to remove the installed files. +# +# Author: +# Martin Beaudoin, Hydro-Quebec, (2013) +# +#------------------------------------------------------------------------------ +# run from third-party directory only +cd ${0%/*} || exit 1 + +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the foam-extend entries in your dot-files and source them." + exit 1 +} +. tools/makeThirdPartyFunctionsForRPM +#------------------------------------------------------------------------------ + +echo ======================================== +echo Starting ThirdParty Allclean +echo ======================================== +echo + +# Cleaning stage 1 +./AllClean.stage1 $1 + +# Cleaning stage 2 +./AllClean.stage2 $1 + +# Cleaning stage 3 +./AllClean.stage3 $1 + +# Cleaning stage 4 +./AllClean.stage4 $1 + +# Cleaning stage 5 +./AllClean.stage5 $1 + +# Cleaning stage 6 +./AllClean.stage6 $1 + +echo ======================================== +echo Done ThirdParty Allclean +echo ======================================== +echo + +# ----------------------------------------------------------------- end-of-file + + diff --git a/ThirdParty/AllClean.full b/ThirdParty/AllClean.full new file mode 100755 index 0000000..59a2842 --- /dev/null +++ b/ThirdParty/AllClean.full @@ -0,0 +1,10 @@ +#!/bin/bash + +./AllClean +rm -r packages/ +rm -r rpmBuild/tmp/ +rm -r rpmBuild/TGZS/ +rm -r rpmBuild/BUILDROOT/ +rm -r rpmBuild/rpmDB/ +rm -r rpmBuild/RPMS/ +rm -r rpmBuild/BUILD/ diff --git a/ThirdParty/AllClean.stage1 b/ThirdParty/AllClean.stage1 new file mode 100755 index 0000000..aa2a33e --- /dev/null +++ b/ThirdParty/AllClean.stage1 @@ -0,0 +1,97 @@ +#!/bin/bash +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | foam-extend: Open Source CFD +# \\ / O peration | +# \\ / A nd | For copyright notice see file Copyright +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of foam-extend. +# +# foam-extend is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# foam-extend is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with foam-extend. If not, see . +# +# Script +# AllClean.stage1 +# +# Description +# Cleaning script for ThirdParty packages: Stage1 +# Add option alsoPackage to remove the installed files. +# +# Author: +# Martin Beaudoin, Hydro-Quebec, (2013) +# +#------------------------------------------------------------------------------ +# run from third-party directory only +cd ${0%/*} || exit 1 + +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the foam-extend entries in your dot-files and source them." + exit 1 +} +. tools/makeThirdPartyFunctionsForRPM +#------------------------------------------------------------------------------ + +echo ======================================== +echo Starting ThirdParty AllClean: Stage1 +echo ======================================== +echo + +# gmp +uninstallPackage gmp-4.3.2 $1 +uninstallPackage gmp-5.0.1 $1 +uninstallPackage gmp-5.1.2 $1 + +# mpfr +uninstallPackage mpfr-2.4.2 $1 +uninstallPackage mpfr-3.0.0 $1 +uninstallPackage mpfr-3.0.1 $1 +uninstallPackage mpfr-3.1.2 $1 + +# mpc +uninstallPackage mpc-0.8.2 $1 +uninstallPackage mpc-1.0.1 $1 + +# gcc +uninstallPackage gcc-4.9.2 $1 + +#LLVM +uninstallPackage llvm-3.6.0 $1 + +#Python +uninstallPackage Python-2.7 $1 + +# m4 +uninstallPackage m4-1.4.16 $1 + +# bison +uninstallPackage bison-2.4.3 $1 +uninstallPackage bison-2.7 $1 + +# flex +uninstallPackage flex-2.5.35 $1 + +# cmake +uninstallPackage cmake-3.11.4 $1 + + +echo +echo ======================================== +echo Done ThirdParty AllClean: Stage1 +echo ======================================== +echo + +# ----------------------------------------------------------------- end-of-file diff --git a/ThirdParty/AllClean.stage2 b/ThirdParty/AllClean.stage2 new file mode 100755 index 0000000..b365a99 --- /dev/null +++ b/ThirdParty/AllClean.stage2 @@ -0,0 +1,68 @@ +#!/bin/bash +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | foam-extend: Open Source CFD +# \\ / O peration | +# \\ / A nd | For copyright notice see file Copyright +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of foam-extend. +# +# foam-extend is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# foam-extend is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with foam-extend. If not, see . +# +# Script +# AllClean.stage1 +# +# Description +# Cleaning script for ThirdParty packages: Stage2 +# +# Author: +# Martin Beaudoin, Hydro-Quebec, (2013) +# Add option alsoPackage to remove the installed files. +# +#------------------------------------------------------------------------------ +# run from third-party directory only +cd ${0%/*} || exit 1 + +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the foam-extend entries in your dot-files and source them." + exit 1 +} +. tools/makeThirdPartyFunctionsForRPM +#------------------------------------------------------------------------------ + +echo ======================================== +echo Starting ThirdParty AllClean: Stage2 +echo ======================================== +echo + +# openmpi +uninstallPackage openmpi-1.4.1 $1 +uninstallPackage openmpi-1.4.3 $1 +uninstallPackage openmpi-1.5 $1 +uninstallPackage openmpi-1.6.5 $1 +uninstallPackage openmpi-1.8.4 $1 +uninstallPackage openmpi-3.1.0 $1 +uninstallPackage openmpi-4.0.0 $1 + +echo +echo ======================================== +echo Done ThirdParty AllClean: Stage2 +echo ======================================== +echo + +# ----------------------------------------------------------------- end-of-file diff --git a/ThirdParty/AllClean.stage3 b/ThirdParty/AllClean.stage3 new file mode 100755 index 0000000..06ca217 --- /dev/null +++ b/ThirdParty/AllClean.stage3 @@ -0,0 +1,99 @@ +#!/bin/bash +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | foam-extend: Open Source CFD +# \\ / O peration | +# \\ / A nd | For copyright notice see file Copyright +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of foam-extend. +# +# foam-extend is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# foam-extend is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with foam-extend. If not, see . +# +# Script +# AllClean.stage1 +# +# Description +# Cleaning script for ThirdParty packages: Stage3 +# Add option alsoPackage to remove the installed files. +# +# Author: +# Martin Beaudoin, Hydro-Quebec, (2013) +# +#------------------------------------------------------------------------------ +# run from third-party directory only +cd ${0%/*} || exit 1 + +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the foam-extend entries in your dot-files and source them." + exit 1 +} +. tools/makeThirdPartyFunctionsForRPM +#------------------------------------------------------------------------------ + +echo ======================================== +echo Starting ThirdParty AllClean: Stage3 +echo ======================================== +echo + +# metis +uninstallPackage metis-5.1.0 $1 + +# ParMGridGen +uninstallPackage ParMGridGen-1.0 $1 + +# Libccmio +uninstallPackage libccmio-2.6.1 $1 + +# Mesquite +uninstallPackage mesquite-2.1.2 $1 + +# Scotch/PtScotch +uninstallPackage scotch-6.0.4 $1 +uninstallPackage scotch-6.0.0 $1 + +# ParMertis +uninstallPackage parmetis-4.0.3 $1 + +# Zoltan +# uninstallPackage zoltan-3.6 $1 + +# PyFoam +uninstallPackage PyFoam-0.6.3 $1 +uninstallPackage PyFoam-0.6.4 $1 + +# hwloc +uninstallPackage hwloc-1.10.1 $1 +uninstallPackage hwloc-1.7.2 $1 + +# adios2 +uninstallPackage ADIOS2-2.8.3 $1 +rm -f $WM_THIRD_PARTY_DIR/rpmBuild/SOURCES/v2.8.3.tar.gz # manual because of skewed naming from download + +# petsc +uninstallPackage petsc-release $1 +rm -f $WM_THIRD_PARTY_DIR/rpmBuild/SOURCES/release.tar.gz # manual because of skewed naming from download + +echo +echo ======================================== +echo Done ThirdParty AllClean: Stage3 +echo ======================================== +echo + +# ----------------------------------------------------------------- end-of-file + + diff --git a/ThirdParty/AllClean.stage4 b/ThirdParty/AllClean.stage4 new file mode 100755 index 0000000..1c8d880 --- /dev/null +++ b/ThirdParty/AllClean.stage4 @@ -0,0 +1,82 @@ +#!/bin/bash +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | foam-extend: Open Source CFD +# \\ / O peration | +# \\ / A nd | For copyright notice see file Copyright +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of foam-extend. +# +# foam-extend is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# foam-extend is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with foam-extend. If not, see . +# +# Script +# AllClean.stage1 +# +# Description +# Cleaning script for ThirdParty packages: Stage4 +# Add option alsoPackage to remove the installed files. +# +# Author: +# Martin Beaudoin, Hydro-Quebec, (2013) +# +#------------------------------------------------------------------------------ +# run from third-party directory only +cd ${0%/*} || exit 1 + +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the foam-extend entries in your dot-files and source them." + exit 1 +} +. tools/makeThirdPartyFunctionsForRPM +#------------------------------------------------------------------------------ + +echo ======================================== +echo Starting ThirdParty AllClean: Stage4 +echo ======================================== +echo + +# QT +uninstallPackage qt-everywhere-opensource-src-4.7.0 $1 +uninstallPackage qt-everywhere-opensource-src-4.7.4 $1 +uninstallPackage qt-everywhere-opensource-src-4.8.5 $1 +uninstallPackage qt-everywhere-opensource-src-4.8.6 $1 +uninstallPackage qt-everywhere-opensource-src-5.8.0 $1 + +# ParaView +uninstallPackage ParaView-4.0.1 $1 +uninstallPackage ParaView-4.1.0 $1 +uninstallPackage ParaView-4.2.0 $1 +uninstallPackage ParaView-4.3.1 $1 +uninstallPackage ParaView-4.4.0 $1 +uninstallPackage ParaView-5.4.1 $1 + +# ParaView-Server +uninstallPackage llvm-3.6.0 +uninstallPackage mesa-git +uninstallPackage ParaView-4.1.0_Server +uninstallPackage ParaView-4.3.1_Server + +echo +echo ======================================== +echo Done ThirdParty AllClean: Stage4 +echo ======================================== +echo + +# ----------------------------------------------------------------- end-of-file + + diff --git a/ThirdParty/AllClean.stage5 b/ThirdParty/AllClean.stage5 new file mode 100755 index 0000000..1eac91d --- /dev/null +++ b/ThirdParty/AllClean.stage5 @@ -0,0 +1,64 @@ +#!/bin/bash +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | foam-extend: Open Source CFD +# \\ / O peration | +# \\ / A nd | For copyright notice see file Copyright +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of foam-extend. +# +# foam-extend is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# foam-extend is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with foam-extend. If not, see . +# +# Script +# AllClean.stage1 +# +# Description +# Cleaning script for ThirdParty packages: Stage5 +# +# Author: +# Martin Beaudoin, Hydro-Quebec, (2013) +# +#------------------------------------------------------------------------------ +# run from third-party directory only +cd ${0%/*} || exit 1 + +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the foam-extend entries in your dot-files and source them." + exit 1 +} +. tools/makeThirdPartyFunctionsForRPM +#------------------------------------------------------------------------------ + +echo ======================================== +echo Starting ThirdParty AllClean: Stage5 +echo ======================================== +echo + +# swak4foam +pkg=swak4Foam-0.3.0 +set -x +rm -rf $WM_THIRD_PARTY_DIR/rpmBuild/BUILD/${pkg}* +set +x + +echo +echo ======================================== +echo Done ThirdParty AllClean: Stage5 +echo ======================================== +echo + +# ----------------------------------------------------------------- end-of-file diff --git a/ThirdParty/AllClean.stage6 b/ThirdParty/AllClean.stage6 new file mode 100755 index 0000000..beddcab --- /dev/null +++ b/ThirdParty/AllClean.stage6 @@ -0,0 +1,63 @@ +#!/bin/bash +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | foam-extend: Open Source CFD +# \\ / O peration | +# \\ / A nd | For copyright notice see file Copyright +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of foam-extend. +# +# foam-extend is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# foam-extend is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with foam-extend. If not, see . +# +# Script +# AllClean.stage1 +# +# Description +# Cleaning script for ThirdParty packages: Stage6 +# +# Author: +# Martin Beaudoin, Hydro-Quebec, (2013) +# +#------------------------------------------------------------------------------ +# run from third-party directory only +cd ${0%/*} || exit 1 + +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the foam-extend entries in your dot-files and source them." + exit 1 +} +. tools/makeThirdPartyFunctionsForRPM +#------------------------------------------------------------------------------ + +echo ======================================== +echo Starting ThirdParty AllClean: Stage6 +echo ======================================== +echo + +# Nothing to do for now +echo "Nothing to do for now." + +echo +echo ======================================== +echo Done ThirdParty AllClean: Stage6 +echo ======================================== +echo + +# ----------------------------------------------------------------- end-of-file + + diff --git a/ThirdParty/AllMake b/ThirdParty/AllMake new file mode 100755 index 0000000..48f14a4 --- /dev/null +++ b/ThirdParty/AllMake @@ -0,0 +1,87 @@ +#!/bin/bash +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | foam-extend: Open Source CFD +# \\ / O peration | +# \\ / A nd | For copyright notice see file Copyright +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of foam-extend. +# +# foam-extend is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# foam-extend is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with foam-extend. If not, see . +# +# Script +# AllMake +# +# Description +# Build script for ThirdParty packages. +# You can pass along a list of package RPMs to this script in order +# to populate the local RPM vault before proceeding to the various +# packages installation +# +# +# Author: +# Martin Beaudoin, Hydro-Quebec, (2010) +# +#------------------------------------------------------------------------------ +# run from third-party directory only +cd ${0%/*} || exit 1 + +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the foam-extend entries in your dot-files and source them." + exit 1 +} +. tools/makeThirdPartyFunctionsForRPM +#------------------------------------------------------------------------------ + +echo ======================================== +echo Starting ThirdParty Allwmake +echo ======================================== +echo + +# Running stage 0 (only if RPM filenames are supplied on the command line) +[ "$#" -gt 0 ] && { + ./AllMake.stage0 "$@" + shift "$#" +} + +# Running stage 1 +./AllMake.stage1 + +# Running stage 2 +./AllMake.stage2 + +# Running stage 3 +./AllMake.stage3 + +# Running stage 4 +./AllMake.stage4 + +# Running stage 5 +# This stage depends on a properly compiled installation +# of foam-extend. On a brand new installation of foam-extend-3.0 +# this stage should be called last in your compilation process +./AllMake.stage5 + +echo ======================================== +echo Done ThirdParty Allwmake +echo ======================================== +echo + +# ----------------------------------------------------------------- end-of-file + + diff --git a/ThirdParty/AllMake.post b/ThirdParty/AllMake.post new file mode 100755 index 0000000..f17ea6b --- /dev/null +++ b/ThirdParty/AllMake.post @@ -0,0 +1,70 @@ +#!/bin/bash +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | foam-extend: Open Source CFD +# \\ / O peration | +# \\ / A nd | For copyright notice see file Copyright +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of foam-extend. +# +# foam-extend is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# foam-extend is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with foam-extend. If not, see . +# +# Script +# AllMake +# +# Description +# Build script for ThirdParty packages. +# You can pass along a list of package RPMs to this script in order +# to populate the local RPM vault before proceeding to the various +# packages installation +# +# +# Author: +# Martin Beaudoin, Hydro-Quebec, (2010) +# Converted to AllMake.post: Dominik Christ, Wikki Ltd, (2013) +# +#------------------------------------------------------------------------------ +# run from third-party directory only +cd ${0%/*} || exit 1 + +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the foam-extend entries in your dot-files and source them." + exit 1 +} +. tools/makeThirdPartyFunctionsForRPM +#------------------------------------------------------------------------------ + +echo ======================================== +echo Starting ThirdParty Allwmake +echo ======================================== +echo + +# Running stage 5 +# This stage depends on a properly compiled installation +# of foam-extend. On a brand new installation of foam-extend-3.0, +# this stage should be called last in your compilation process +./AllMake.stage5 + +echo ======================================== +echo Done ThirdParty Allwmake +echo ======================================== +echo + +# ----------------------------------------------------------------- end-of-file + + diff --git a/ThirdParty/AllMake.pre b/ThirdParty/AllMake.pre new file mode 100755 index 0000000..cebcc2a --- /dev/null +++ b/ThirdParty/AllMake.pre @@ -0,0 +1,83 @@ +#!/bin/bash +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | foam-extend: Open Source CFD +# \\ / O peration | +# \\ / A nd | For copyright notice see file Copyright +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of foam-extend. +# +# foam-extend is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# foam-extend is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with foam-extend. If not, see . +# +# Script +# AllMake +# +# Description +# Build script for ThirdParty packages. +# You can pass along a list of package RPMs to this script in order +# to populate the local RPM vault before proceeding to the various +# packages installation +# +# +# Author: +# Martin Beaudoin, Hydro-Quebec, (2010) +# Converted to AllMake.Pre: Dominik Christ, Wikki Ltd, (2013) +# +#------------------------------------------------------------------------------ +# run from third-party directory only +cd ${0%/*} || exit 1 + +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the foam-extend entries in your dot-files and source them." + exit 1 +} +. tools/makeThirdPartyFunctionsForRPM +#------------------------------------------------------------------------------ + +echo ======================================== +echo Starting ThirdParty Allwmake.pre +echo ======================================== +echo + +# Running stage 0 (only if RPM filenames are supplied on the command line) +[ "$#" -gt 0 ] && { + ./AllMake.stage0 "$@" + shift "$#" +} + +# Running stage 1 +./AllMake.stage1 + +# Running stage 2 +./AllMake.stage2 + +# Running stage 3 +./AllMake.stage3 + +# Running stage 4 +./AllMake.stage4 + + +echo ======================================== +echo Done ThirdParty Allwmake.pre +echo ======================================== +echo + +# ----------------------------------------------------------------- end-of-file + + diff --git a/ThirdParty/AllMake.stage0 b/ThirdParty/AllMake.stage0 new file mode 100755 index 0000000..0b79538 --- /dev/null +++ b/ThirdParty/AllMake.stage0 @@ -0,0 +1,74 @@ +#!/bin/bash +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | foam-extend: Open Source CFD +# \\ / O peration | +# \\ / A nd | For copyright notice see file Copyright +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of foam-extend. +# +# foam-extend is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# foam-extend is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with foam-extend. If not, see . +# +# Script +# AllMake.stage0 +# +# Description +# Build script for ThirdParty packages: Stage0 +# +# Populate the local RPM vault +# +# NOTE: This stage is optional. Use it only if you want to move some RPMs +# to the appropriate location for your architcture so the other stage scripts +# will be able to pick them up +# +# Usage: ./AllMake.stage0 file_1.rpm file_2.rpm ... file_n.rpm +# +# Author: +# Martin Beaudoin, Hydro-Quebec, (2010) +# +#------------------------------------------------------------------------------ +# run from third-party directory only +cd ${0%/*} || exit 1 + +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the foam-extend entries in your dot-files and source them." + exit 1 +} + +. tools/makeThirdPartyFunctionsForRPM +#------------------------------------------------------------------------------ + +echo ======================================== +echo Starting ThirdParty AllMake: Stage0 +echo ======================================== +echo + +( + rpm_makeRPMvault + + [ "$#" -gt 0 ] && { + rpm_populateRPMvault "$@" + } +) + +echo ======================================== +echo Done ThirdParty AllMake: Stage0 +echo ======================================== +echo + +# ----------------------------------------------------------------- end-of-file diff --git a/ThirdParty/AllMake.stage1 b/ThirdParty/AllMake.stage1 new file mode 100755 index 0000000..ff374eb --- /dev/null +++ b/ThirdParty/AllMake.stage1 @@ -0,0 +1,120 @@ +#!/bin/bash +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | foam-extend: Open Source CFD +# \\ / O peration | +# \\ / A nd | For copyright notice see file Copyright +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of foam-extend. +# +# foam-extend is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# foam-extend is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with foam-extend. If not, see . +# +# Script +# AllMake.stage1 +# +# Description +# Build script for ThirdParty packages: Stage1 +# +# Compilers and basic tools. +# +# Once this stage is built, you would normally re-initialize your +# foam-extend environment in order to use the new compilers and tools +# +# NOTE: This stage is optional. Use it only if you want to override +# your system pre-installed compilers and tools +# +# Requirements: +# 1: Your foam-extend environment must be properly initialized +# 2: The file etc/prefs.sh should be used for setting the variables enabling +# the compilation of the various packages +# Author: +# Martin Beaudoin, Hydro-Quebec, (2015) +# +#------------------------------------------------------------------------------ +# run from third-party directory only +cd ${0%/*} || exit 1 + +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the foam-extend entries in your dot-files and source them." + exit 1 +} +. tools/makeThirdPartyFunctionsForRPM +#------------------------------------------------------------------------------ + +echo ======================================== +echo Starting ThirdParty AllMake: Stage1 +echo ======================================== +echo + +# Gcc 4.9.2 and companion libraries +# +[ ! -z "$WM_THIRD_PARTY_USE_GCC_492" ] && { + echo "Building gcc-4.9.2" + ( rpm_make -p gcc-4.9.2 -s gcc-4.9.2.spec -u http://ftpmirror.gnu.org/gcc/gcc-4.9.2/gcc-4.9.2.tar.gz ) +} + +# Clang 3.6.0 +# +[ ! -z "$WM_THIRD_PARTY_USE_LLVM_360" ] && { + echo "Building llvm and clang 3.6.0" + ( rpm_make -p llvm-3.6.0 -s llvm-3.6.0.spec -u http://llvm.org/releases/3.6.0/llvm-3.6.0.src.tar.xz ) +} + +# Python 2.7 +# +[ ! -z "$WM_THIRD_PARTY_USE_PYTHON_27" ] && { + echo "Building python 2.7" + ( rpm_make -p Python-2.7 -s Python-2.7.spec -u http://www.python.org/ftp/python/2.7/Python-2.7.tgz ) +} + +# m4 1.4.16 +# +[ ! -z "$WM_THIRD_PARTY_USE_M4_1416" ] && { + echo "Building m4 1.4.16" + # You need a recent version of m4 in order to compile a recent version of bison + ( rpm_make -p m4-1.4.16 -s m4-1.4.16.spec -u http://ftpmirror.gnu.org/m4/m4-1.4.16.tar.gz ) +} + +# bison 2.7 +# +[ ! -z "$WM_THIRD_PARTY_USE_BISON_27" ] && { + echo "Building bison 2.7" + # You need a recent version of m4 in order to compile a recent version of bison + ( rpm_make -p bison-2.7 -s bison-2.7.spec -u http://ftpmirror.gnu.org/bison/bison-2.7.tar.gz ) +} + +# flex 2.5.35 +# +[ ! -z "$WM_THIRD_PARTY_USE_FLEX_2535" ] && { + echo "Building flex 2.5.35" + ( rpm_make -p flex-2.5.35 -s flex-2.5.35.spec -u https://github.com/westes/flex/archive/flex-2-5-35.tar.gz ) +} + +# cmake 3.11.4 +# +[ ! -z "$WM_THIRD_PARTY_USE_CMAKE_3114" ] && { + echo "Building cmake 3.11.4" + ( rpm_make -p cmake-3.11.4 -s cmake-3.11.4.spec -u http://www.cmake.org/files/v3.11/cmake-3.11.4.tar.gz ) +} + +echo ======================================== +echo Done ThirdParty AllMake: Stage1 +echo ======================================== +echo + +# ----------------------------------------------------------------- end-of-file diff --git a/ThirdParty/AllMake.stage2 b/ThirdParty/AllMake.stage2 new file mode 100755 index 0000000..37c556d --- /dev/null +++ b/ThirdParty/AllMake.stage2 @@ -0,0 +1,140 @@ +#!/bin/bash +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | foam-extend: Open Source CFD +# \\ / O peration | +# \\ / A nd | For copyright notice see file Copyright +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of foam-extend. +# +# foam-extend is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# foam-extend is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with foam-extend. If not, see . +# +# Script +# AllMake.stage2 +# +# Description +# Build script for ThirdParty packages: Stage2 +# +# Communication libraries +# +# Once this stage is built, you would normally re-initialize your +# foam-extend environment in order redirect foam-extend toward the +# appropriate communication library +# +# NOTE: This stage is optional. Use it only if you want to override +# your system communication libraries +# +# Requirements: +# 1: Your foam-extend environment must be properly initialized +# 2: AllMake.stage1 if you are overriding your system compiler +# 3: The file etc/prefs.sh should be used for setting the variables +# enabling the compilation of the various packages +# +# Author: +# Martin Beaudoin, Hydro-Quebec, (2015) +# +#------------------------------------------------------------------------------ +# run from third-party directory only +cd ${0%/*} || exit 1 + +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the foam-extend entries in your dot-files and source them." + exit 1 +} +. tools/makeThirdPartyFunctionsForRPM +#------------------------------------------------------------------------------ + +echo ======================================== +echo Starting ThirdParty AllMake: Stage2 +echo ======================================== +echo + +if [ "$WM_MPLIB" != "SYSTEMOPENMPI" ] +then + # MPI + + # openmpi 1.4.1 + # + [ ! -z "$WM_THIRD_PARTY_USE_OPENMPI_141" ] && { + echo "Building openmpi 1.4.1" + ( rpm_make -p openmpi-1.4.1 -s openmpi-1.4.1.spec -u http://www.open-mpi.org/software/ompi/v1.4/downloads/openmpi-1.4.1.tar.gz ) + } + + # openmpi 1.4.3 + # + [ ! -z "$WM_THIRD_PARTY_USE_OPENMPI_143" ] && { + echo "Building openmpi 1.4.3" + ( rpm_make -p openmpi-1.4.3 -s openmpi-1.4.3.spec -u http://www.open-mpi.org/software/ompi/v1.4/downloads/openmpi-1.4.3.tar.gz ) + } + + # openmpi 1.5 + # + [ ! -z "$WM_THIRD_PARTY_USE_OPENMPI_15" ] && { + echo "Building openmpi 1.5" + ( rpm_make -p openmpi-1.5 -s openmpi-1.5.spec -u http://www.open-mpi.org/software/ompi/v1.5/downloads/openmpi-1.5.tar.gz ) + } + + # openmpi 1.6.5 + # + [ ! -z "$WM_THIRD_PARTY_USE_OPENMPI_165" ] && { + echo "Building openmpi 1.6.5" + ( rpm_make -p openmpi-1.6.5 -s openmpi-1.6.5.spec -u http://www.open-mpi.org/software/ompi/v1.6/downloads/openmpi-1.6.5.tar.gz \ + -f --define '_configureAdditionalArgs "$WM_THIRD_PARTY_USE_OPENMPI_165_ConfigureAdditionalArgs"') + } + + # openmpi 1.8.8 + # + [ ! -z "$WM_THIRD_PARTY_USE_OPENMPI_188" ] && { + echo "Building openmpi 1.8.8" + ( rpm_make -p openmpi-1.8.8 -s openmpi-1.8.8.spec -u https://www.open-mpi.org/software/ompi/v1.8/downloads/openmpi-1.8.8.tar.gz \ + -f --define '_configureAdditionalArgs "$WM_THIRD_PARTY_USE_OPENMPI_188_ConfigureAdditionalArgs"') + } + + # openmpi 3.1.1 + # + [ ! -z "$WM_THIRD_PARTY_USE_OPENMPI_311" ] && { + echo "Building openmpi 3.1.1" + ( rpm_make -p openmpi-3.1.1 -s openmpi-3.1.1.spec -u https://www.open-mpi.org/software/ompi/v3.1/downloads/openmpi-3.1.1.tar.gz \ + -f --define '_configureAdditionalArgs "$WM_THIRD_PARTY_USE_OPENMPI_311_ConfigureAdditionalArgs"') + } + + # openmpi 4.0.0 + # + [ ! -z "$WM_THIRD_PARTY_USE_OPENMPI_400" ] && { + echo "Building openmpi 4.0.0" + ( rpm_make -p openmpi-4.0.0 -s openmpi-4.0.0.spec -u https://www.open-mpi.org/software/ompi/v4.0/downloads/openmpi-4.0.0.tar.gz \ + -f --define '_configureAdditionalArgs "$WM_THIRD_PARTY_USE_OPENMPI_400_ConfigureAdditionalArgs"') + } + + # mvipich2-2.2 + # + [ ! -z "$WM_THIRD_PARTY_USE_MVAPICH2_22" ] && { + echo "Building mvapich2 2.2" + ( rpm_make -p mvapich2-2.2 -s mvapich2-2.2.spec -u http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-2.2.tar.gz \ + -f --define '_configureAdditionalArgs "$WM_THIRD_PARTY_USE_MVAPICH2_22_ConfigureAdditionalArgs"') + } +else + echo "Using system installed OpenMPI" + echo "" +fi +echo ======================================== +echo Done ThirdParty AllMake: Stage2 +echo ======================================== +echo + +# ----------------------------------------------------------------- end-of-file diff --git a/ThirdParty/AllMake.stage3 b/ThirdParty/AllMake.stage3 new file mode 100755 index 0000000..82b5c95 --- /dev/null +++ b/ThirdParty/AllMake.stage3 @@ -0,0 +1,271 @@ +#!/bin/bash +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | foam-extend: Open Source CFD +# \\ / O peration | +# \\ / A nd | For copyright notice see file Copyright +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of foam-extend. +# +# foam-extend is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# foam-extend is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with foam-extend. If not, see . +# +# Script +# AllMake.stage3 +# +# Description +# Build script for ThirdParty packages: Stage3 +# +# The ThirdParty libraries +# +# Requirements: +# 1: Your foam-extend environment must be properly initialized +# 2: AllMake.stage1 if you are overriding your system compiler +# 3: AllMake.stage2 if you are overriding your system comm. libraries +# +# Author: +# Martin Beaudoin, Hydro-Quebec, (2015) +# +#------------------------------------------------------------------------------ +# run from third-party directory only +cd ${0%/*} || exit 1 + +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the foam-extend entries in your dot-files and source them." + exit 1 +} +. tools/makeThirdPartyFunctionsForRPM +#------------------------------------------------------------------------------ + +echo ======================================== +echo Starting ThirdParty AllMake: Stage3 +echo ======================================== +echo + +# Metis +if [ -z "$METIS_SYSTEM" ] +then + # metis 5.1.0 + # + [ ! -z "$WM_THIRD_PARTY_USE_METIS_510" ] && { + echo "Building metis 5.1.0" + ( rpm_make -p metis-5.1.0 -s metis-5.1.0.spec -u http://downloads.sourceforge.net/project/foam-extend/ThirdParty/metis-5.1.0.tar.gz ) + } +else + echo "Using system installed Metis" + echo "" +fi + +# ParMGridGen +if [ -z "$PARMGRIDGEN_SYSTEM" ] +then + # ParMGridGen 1.0 + # + [ ! -z "$WM_THIRD_PARTY_USE_PARMGRIDGEN_10" ] && { + echo "Building ParMGridGen 1.0" + #( rpm_make -p ParMGridGen-1.0 -s ParMGridGen-1.0.spec -u http://www.mgnet.org/mgnet/Codes/parmgridgen/ParMGridGen-1.0.tar.gz ) + ( rpm_make -p ParMGridGen-1.0 -s ParMGridGen-1.0.spec -u http://downloads.sourceforge.net/project/foam-extend/ThirdParty/ParMGridGen-1.0.tar.gz ) + } +else + echo "Using system installed ParMGridGen" + echo "" +fi + +# Libccmio +if [ -z "$LIBCCMIO_SYSTEM" ] +then + # Libccmio 2.6.1 + # + [ ! -z "$WM_THIRD_PARTY_USE_LIBCCMIO_261" ] && { + echo "Building Libccmio 2.6.1" + ( rpm_make -p libccmio-2.6.1 -s libccmio-2.6.1.spec -u http://downloads.sourceforge.net/project/foam-extend/ThirdParty/libccmio-2.6.1.tar.gz ) + } +else + echo "Using system installed Libccmio" + echo "" +fi + +# Mesquite +if [ -z "$MESQUITE_SYSTEM" ] +then + # Mesquite 2.1.2 + # + [ ! -z "$WM_THIRD_PARTY_USE_MESQUITE_212" ] && { + echo "Building Mesquite 2.1.2" + ( rpm_make -p mesquite-2.1.2 -s mesquite-2.1.2.spec -u http://downloads.sourceforge.net/project/foam-extend/ThirdParty/mesquite-2.1.2.tar.gz ) + } + # Mesquite 2.3.0 + # + [ ! -z "$WM_THIRD_PARTY_USE_MESQUITE_230" ] && { + echo "Building Mesquite 2.3.0" + ( rpm_make -p mesquite-2.3.0 -s mesquite-2.3.0.spec -u https://software.sandia.gov/mesquite/mesquite-2.3.0.tar.gz ) + # ( rpm_make -p mesquite-2.3.0 -s mesquite-2.3.0.spec -u http://downloads.sourceforge.net/project/foam-extend/ThirdParty/mesquite-2.3.0.tar.gz ) + } +else + echo "Using system installed Mesquite" + echo "" +fi + +# The following three packages depends on the availability of OpenMPI +# The macro rpm_make() will make sure to update the ThirdParty environment variables before starting +# the compilation. +# Just make sure the OpenMPI environment variables are properly initialized, or that +# the AllMake.stage2 script completed correctly +# +# Scotch +if [ -z "$SCOTCH_SYSTEM" ] +then + # Scotch 6.0.4 + # + [ ! -z "$WM_THIRD_PARTY_USE_SCOTCH_604" ] && { + echo "Building Scotch 6.0.4" + #( rpm_make -p scotch-6.0.4 -s scotch-6.0.4.spec -u http://gforge.inria.fr/frs/download.php/file/34618/scotch_6.0.4.tar.gz ) + ( rpm_make -p scotch-6.0.4 -s scotch-6.0.4.spec -u http://downloads.sourceforge.net/project/foam-extend/ThirdParty/scotch_6.0.4.tar.gz ) + } + # Scotch 6.0.0 + # + [ ! -z "$WM_THIRD_PARTY_USE_SCOTCH_600" ] && { + echo "Building Scotch 6.0.0" + ( rpm_make -p scotch-6.0.0 -s scotch-6.0.0.spec -u http://downloads.sourceforge.net/project/foam-extend/ThirdParty/scotch-6.0.0.tar.gz ) + } +else + echo "Using system installed Scotch" + echo "" +fi + +# ParMetis +if [ -z "$PARMETIS_SYSTEM" ] +then + # ParMetis 4.0.3 + # + [ ! -z "$WM_THIRD_PARTY_USE_PARMETIS_403" ] && { + echo "Building ParMetis 4.0.3" + ( rpm_make -p parmetis-4.0.3 -s parmetis-4.0.3.spec -u http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/parmetis-4.0.3.tar.gz ) + } +else + echo "Using system installed ParMetis" + echo "" +fi + +# Zoltan +if [ -z "$ZOLTAN_SYSTEM" ] +then + # Zoltan 3.6 + # + [ ! -z "$WM_THIRD_PARTY_USE_ZOLTAN_36" ] && { + echo "Building Zoltan 3.6" + ( rpm_make -p zoltan-3.6 -s zoltan-3.6.spec -u http://www.cs.sandia.gov/~kddevin/Zoltan_Distributions/zoltan_distrib_v3.6.tar.gz ) + } +else + echo "Using system installed Zoltan" + echo "" +fi + +# PyFoam +if [ -z "$PYFOAM_SYSTEM" ] +then + # PyFoam 0.6.3 + # + [ ! -z "$WM_THIRD_PARTY_USE_PYFOAM_063" ] && { + echo "Building PyFoam 0.6.3" + ( rpm_make -p PyFoam-0.6.3 -s PyFoam-0.6.3.spec -u http://openfoamwiki.net/images/c/cb/PyFoam-0.6.3.tar.gz -n PyFoam-0.6.3-1.noarch -a noarch) + } + # PyFoam 0.6.4 + # + [ ! -z "$WM_THIRD_PARTY_USE_PYFOAM_064" ] && { + echo "Building PyFoam 0.6.4" + ( rpm_make -p PyFoam-0.6.4 -s PyFoam-0.6.4.spec -u http://openfoamwiki.net/images/3/3b/PyFoam-0.6.4.tar.gz -n PyFoam-0.6.4-1.noarch -a noarch) + } + # PyFoam 0.6.6 + # + [ ! -z "$WM_THIRD_PARTY_USE_PYFOAM_066" ] && { + echo "Building PyFoam 0.6.6" + ( rpm_make -p PyFoam-0.6.6 -s PyFoam-0.6.6.spec -u https://openfoamwiki.net/images/a/af/PyFoam-0.6.6.tar.gz -n PyFoam-0.6.6-1.noarch -a noarch) + } + # PyFoam 0.6.9 + # + [ ! -z "$WM_THIRD_PARTY_USE_PYFOAM_069" ] && { + echo "Building PyFoam 0.6.9" + ( rpm_make -p PyFoam-0.6.9 -s PyFoam-0.6.9.spec -u https://files.pythonhosted.org/packages/78/f5/8f65b66c8ac0e5415f785809e182dd0f0dc562a42094e1a86bd22c7d7ece/PyFoam-0.6.9.tar.gz -n PyFoam-0.6.9-1.noarch -a noarch) + } +else + echo "Using system installed PyFoam" + echo "" +fi + +# hwloc +if [ -z "$HWLOC_SYSTEM" ] +then + # hwloc 2.0.1 + # + [ ! -z "$WM_THIRD_PARTY_USE_HWLOC_201" ] && { + echo "Building hwloc 2.0.1" + ( rpm_make -p hwloc-2.0.1 -s hwloc-2.0.1.spec -u http://www.open-mpi.org/software/hwloc/v2.0/downloads/hwloc-2.0.1.tar.gz ) + # ( rpm_make -p hwloc-2.0.1 -s hwloc-2.0.1.spec -u http://downloads.sourceforge.net/project/foam-extend/ThirdParty/hwloc-2.0.1.tar.gz ) + } + # hwloc 1.10.1 + # + [ ! -z "$WM_THIRD_PARTY_USE_HWLOC_1101" ] && { + echo "Building hwloc 1.10.1" + # ( rpm_make -p hwloc-1.10.1 -s hwloc-1.10.1.spec -u http://www.open-mpi.org/software/hwloc/v1.10/downloads/hwloc-1.10.1.tar.gz ) + ( rpm_make -p hwloc-1.10.1 -s hwloc-1.10.1.spec -u http://downloads.sourceforge.net/project/foam-extend/ThirdParty/hwloc-1.10.1.tar.gz ) + } + # hwloc 1.7.2 + # + [ ! -z "$WM_THIRD_PARTY_USE_HWLOC_172" ] && { + echo "Building hwloc 1.7.2" + ( rpm_make -p hwloc-1.7.2 -s hwloc-1.7.2.spec -u http://downloads.sourceforge.net/project/foam-extend/ThirdParty/hwloc-1.7.2.tar.gz ) + } +else + echo "Using system installed hwloc" + echo "" +fi + +# ADIOS2 +if [ -z "$ADIOS2_SYSTEM" ] +then + # ADIOS2 2.9.1 + # + [ ! -z "$WM_THIRD_PARTY_USE_ADIOS2_291" ] && { + echo "Building ADIOS2 2.9.1" + ( rpm_make -p ADIOS2-2.9.1 -s ADIOS2-2.9.1.spec -u https://github.com/ornladios/ADIOS2/archive/v2.9.1.tar.gz ) + } +else + echo "Using system installed ADIOS2" + echo "" +fi + +# PETSC +if [ -z "$PETSC_SYSTEM" ] +then + # petsc + # + [ ! -z "$WM_THIRD_PARTY_USE_PETSC" ] && { + echo "Building petsc 3.16.5" + ( rpm_make -p petsc-release -s petsc-release.spec -u https://github.com/petsc/petsc/archive/release.tar.gz ) + } +else + echo "Using system installed petsc" + echo "" +fi + +echo ======================================== +echo Done ThirdParty AllMake: Stage3 +echo ======================================== +echo + +# ----------------------------------------------------------------- end-of-file diff --git a/ThirdParty/AllMake.stage4 b/ThirdParty/AllMake.stage4 new file mode 100755 index 0000000..aa84c82 --- /dev/null +++ b/ThirdParty/AllMake.stage4 @@ -0,0 +1,188 @@ +#!/bin/bash +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | foam-extend: Open Source CFD +# \\ / O peration | +# \\ / A nd | For copyright notice see file Copyright +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of foam-extend. +# +# foam-extend is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# foam-extend is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with foam-extend. If not, see . +# +# Script +# AllMake.stage4 +# +# Description +# Build script for ThirdParty packages: Stage4 +# +# The foam-extend viewers +# +# Requirements: +# 1: Your foam-extend environment must be properly initialized +# 2: AllMake.stage1 if you are overriding your system compiler +# 3: AllMake.stage2 if you are overriding your system comm. libraries +# +# Author: +# Martin Beaudoin, Hydro-Quebec, (2015) +# +#------------------------------------------------------------------------------ +# run from third-party directory only +cd ${0%/*} || exit 1 + +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the foam-extend entries in your dot-files and source them." + exit 1 +} +. tools/makeThirdPartyFunctionsForRPM +#------------------------------------------------------------------------------ + +echo ======================================== +echo Starting ThirdParty AllMake: Stage4 +echo ======================================== +echo + +# qt-everywhere-opensource-src-4.8.6 +if [ ! -z "$QT_THIRD_PARTY" ] +then + # Qt 4.8.6 + # + [ ! -z "$WM_THIRD_PARTY_USE_QT_486" ] && { + echo "Building Qt 4.8.6" + ( rpm_make -p qt-everywhere-opensource-src-4.8.6 -s qt-everywhere-opensource-src-4.8.6.spec -u http://download.qt.io/archive/qt/4.8/4.8.6/qt-everywhere-opensource-src-4.8.6.tar.gz ) + } + # Qt 5.8.0 + # + [ ! -z "$WM_THIRD_PARTY_USE_QT_580" ] && { + echo "Building Qt 5.8.0" + ( rpm_make -p qt-everywhere-opensource-src-5.8.0 -s qt-everywhere-opensource-src-5.8.0.spec -u http://download.qt.io/archive/qt/5.8/5.8.0/single/qt-everywhere-opensource-src-5.8.0.tar.gz ) + } + # Qt 5.11.1 + # + [ ! -z "$WM_THIRD_PARTY_USE_QT_5111" ] && { + echo "Building Qt 5.11.1" + ( rpm_make -p qt-everywhere-src-5.11.1 -s qt-everywhere-src-5.11.1.spec -u http://download.qt.io/archive/qt/5.11/5.11.1/single/qt-everywhere-src-5.11.1.tar.xz ) + } +else + echo "Using system installed QT" + echo "" +fi + +# Paraview +if [ -z "$PARAVIEW_SYSTEM" ] +then + # Make sure we get the value of QT_BIN_DIR initialized + . $WM_PROJECT_DIR/etc/settings.sh + + if [ -d "$QT_BIN_DIR" -a -r "$QT_BIN_DIR"/qmake ] + then + # ParaView 4.0.1 + # + [ ! -z "$WM_THIRD_PARTY_USE_PARAVIEW_401" ] && { + echo "Building ParaView 4.0.1" + ( rpm_make -p ParaView-4.0.1 -s ParaView-4.0.1.spec -u http://downloads.sourceforge.net/project/foam-extend/ThirdParty/ParaView-v4.0.1-source.tgz \ + -f --define='_qmakePath $QT_BIN_DIR/qmake' + ) + } + # ParaView 4.1.0 + # + [ ! -z "$WM_THIRD_PARTY_USE_PARAVIEW_410" ] && { + echo "Building ParaView 4.1.0" + ( rpm_make -p ParaView-4.1.0 -s ParaView-4.1.0.spec -u http://downloads.sourceforge.net/project/foam-extend/ThirdParty/ParaView-v4.1.0-source.tar.gz \ + -f --define='_qmakePath $QT_BIN_DIR/qmake' + ) + } + # ParaView 4.3.1 + # + [ ! -z "$WM_THIRD_PARTY_USE_PARAVIEW_431" ] && { + echo "Building ParaView 4.3.1" + ( rpm_make -p ParaView-4.3.1 -s ParaView-4.3.1.spec -u http://downloads.sourceforge.net/project/foam-extend/ThirdParty/ParaView-v4.3.1-source.tar.gz \ + -f --define='_qmakePath $QT_BIN_DIR/qmake' + ) + } + # ParaView 4.4.0 + # + [ ! -z "$WM_THIRD_PARTY_USE_PARAVIEW_440" ] && { + echo "Building ParaView 4.4.0" + ( rpm_make -p ParaView-4.4.0 -s ParaView-4.4.0.spec -u http://downloads.sourceforge.net/project/foam-extend/ThirdParty/ParaView-v4.4.0-source.tar.gz \ + -f --define='_qmakePath $QT_BIN_DIR/qmake' + ) + } + # ParaView 5.4.1 + # + [ ! -z "$WM_THIRD_PARTY_USE_PARAVIEW_541" ] && { + echo "Building ParaView 5.4.1" + ( rpm_make -p ParaView-5.4.1 -s ParaView-5.4.1.spec -u http://www.paraview.org/files/v5.4/ParaView-v5.4.1.tar.gz \ + -f --define='_qmakePath $QT_BIN_DIR/qmake' + ) + } + # ParaView 5.5.2 + # + [ ! -z "$WM_THIRD_PARTY_USE_PARAVIEW_552" ] && { + echo "Building ParaView 5.5.2" + ( rpm_make -p ParaView-5.5.2 -s ParaView-5.5.2.spec -u http://www.paraview.org/files/v5.5/ParaView-v5.5.2.tar.gz \ + -f --define='_qmakePath $QT_BIN_DIR/qmake' + ) + } + else + echo "WARNING: " + echo "WARNING: Skipping the installation of ParaView-4.x.x." + echo "WARNING: Please make sure the QT_BIN_DIR environment variable properly" + echo "WARNING: initialized in the file prefs.sh or prefs.csh" + echo "WARNING: The command \$QT_BIN_DIR/qmake needs to be valid" + echo "WARNING: " + fi +else + echo "Using system installed ParaView" + echo "" +fi + +# ParaView Server +if [ -z "$PARAVIEW_SERVER_THIRD_PARTY" ] +then + # ParaView 4.1.0: Server-only + # + [ ! -z "$WM_THIRD_PARTY_USE_PARAVIEW_SERVER_410" ] && { + echo "Building ParaView Server 4.1.0" + ( rpm_make -p llvm-3.6.0 -s llvm-3.6.0.spec -u http://llvm.org/releases/3.6.0/llvm-3.6.0.src.tar.xz ) + ( rpm_make -p mesa-git -s mesa-git.spec -u ftp://ftp.freedesktop.org/pub/mesa/10.5.3/mesa-10.5.3.tar.gz ) + ( rpm_make -p ParaView-4.1.0_Server -s ParaView-4.1.0_Server.spec -u http://www.paraview.org/files/v4.1/ParaView-v4.1.0-source.tar.gz \ + -f --define='_qmakePath $QT_BIN_DIR/qmake' + ) + } + # ParaView 4.3.1: Server-only + # + [ ! -z "$WM_THIRD_PARTY_USE_PARAVIEW_SERVER_431" ] && { + echo "Building ParaView Server 4.3.1" + ( rpm_make -p llvm-3.6.0 -s llvm-3.6.0.spec -u http://llvm.org/releases/3.6.0/llvm-3.6.0.src.tar.xz ) + ( rpm_make -p mesa-git -s mesa-git.spec -u ftp://ftp.freedesktop.org/pub/mesa/10.5.3/mesa-10.5.3.tar.gz ) + ( rpm_make -p ParaView-4.3.1_Server -s ParaView-4.3.1_Server.spec -u http://www.paraview.org/files/v4.3/ParaView-v4.3.1-source.tar.gz \ + -f --define='_qmakePath $QT_BIN_DIR/qmake' + ) + } +else + echo "Using system installed ParaView Server" + echo "" +fi + + +echo ======================================== +echo Done ThirdParty AllMake: Stage4 +echo ======================================== +echo + +# ----------------------------------------------------------------- end-of-file diff --git a/ThirdParty/AllMake.stage5 b/ThirdParty/AllMake.stage5 new file mode 100755 index 0000000..3390e40 --- /dev/null +++ b/ThirdParty/AllMake.stage5 @@ -0,0 +1,127 @@ +#!/bin/bash +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | foam-extend: Open Source CFD +# \\ / O peration | +# \\ / A nd | For copyright notice see file Copyright +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of foam-extend. +# +# foam-extend is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# foam-extend is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with foam-extend. If not, see . +# +# Script +# AllMake.stage5 +# +# Description +# Build script for ThirdParty packages not requiring rpm packaging +# +# +# Requirements: +# 1: Your foam-extend environment must be properly initialized +# 2: foam-extend must already been compiled because swak4Foam depends on +# foam-extend include files and libraries +# +# Author: +# Martin Beaudoin, Hydro-Quebec, (2012) +# +#------------------------------------------------------------------------------ +# run from Third-party directory only +cd ${0%/*} || exit 1 + +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the foam-extend entries in your dot-files and source them." + exit 1 +} + +#------------------------------------------------------------------------------ + +echo "========================================" +echo "Starting ThirdParty AllMake: Stage5 " +echo "========================================" +echo + +# swak4Foam - Version 0.3.1 +# swak4Foam - Version 0.3.2 +# swak4Foam - Version 0.4.0 +# In fact, we are basically tracking the head branch from the Mercurial repository +# which is also replicated under the Breeder_2.0 section of the Subversion repository +# + +SWAK_RELEASE_VERSION=0.4.2 + +if [ -z "$SWAK4FOAM_SYSTEM" ] +then + # Do we need to download the source code? + # We choose to put the source code under ./rpmBuild/BUILD prior to compiling. + # We will not generate a rpm package, but all ThirdParty source code will be + # centralized under the same scratch area + if [ ! -e ./rpmBuild/BUILD/swak4Foam-$SWAK_RELEASE_VERSION ]; + then + echo "Checking for a Mercurial client: hg" + command -v hg >/dev/null + if [ $? -eq 0 ]; + then + echo "Using Mercurial/hg to download the source code for swak4Foam" + ( + cd ./rpmBuild/BUILD + hg clone http://hg.code.sf.net/p/openfoam-extend/swak4Foam swak4Foam-$SWAK_RELEASE_VERSION + cd swak4Foam-$SWAK_RELEASE_VERSION + #hg checkout version_${SWAK_RELEASE_VERSION}_v2.x + # We use dev-branch temporarily + hg checkout compile_foamExtend4.1 + ) + else + echo "Warning: Mercurial/hg is not installed. Switching to an alternate Subversion repository" + command -v svn >/dev/null + if [ $? -eq 0 ]; + then + # Disabled temporarily + echo "Subversion/svn is currently not supported" + exit -1 + + echo "Using Subversion/svn to download the source code for swak4Foam" + (cd ./rpmBuild/BUILD; svn checkout svn://svn.code.sf.net/p/openfoam-extend/svn/trunk/Breeder_2.0/libraries/swak4Foam swak4Foam-$SWAK_RELEASE_VERSION) + else + echo "Error: Please install either a Mercurial or Subversion client in order to download the source code for swak4Foam" + exit -1 + fi + fi + # We move the compilation results directly to $FOAM_SITE_APPBIN and $FOAM_SITE_LIBBIN + # If you prefer to keep the libraries and tools under $FOAM_USER_LIBBIN and $FOAM_USER_APPBIN, simply + # comment out the next two lines + (cd ./rpmBuild/BUILD/swak4Foam-$SWAK_RELEASE_VERSION; find . -name files | xargs -n 1 sed -i.old "s/FOAM_USER/FOAM_SITE/g") + (cd ./rpmBuild/BUILD/swak4Foam-$SWAK_RELEASE_VERSION; find . -name options | xargs -n 1 sed -i.old "s/FOAM_USER/FOAM_SITE/g") + + # We recompile everything + (cd ./rpmBuild/BUILD/swak4Foam-$SWAK_RELEASE_VERSION; ./Allwclean; ./Allwmake) + else + echo "The source code for swak4Foam is already present under ./rpmBuild/BUILD/swak4Foam-$SWAK_RELEASE_VERSION" + echo "Please remove this directory if you want to refresh your installation of swak4Foam" + fi + echo "" +else + echo "Using system installed swak4Foam" + echo "" +fi + +echo "========================================" +echo "Done ThirdParty AllMake: Stage5 " +echo "========================================" +echo + +# ----------------------------------------------------------------- end-of-file diff --git a/ThirdParty/AllMake.stage6 b/ThirdParty/AllMake.stage6 new file mode 100755 index 0000000..e1629e1 --- /dev/null +++ b/ThirdParty/AllMake.stage6 @@ -0,0 +1,68 @@ +#!/bin/bash +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | foam-extend: Open Source CFD +# \\ / O peration | +# \\ / A nd | For copyright notice see file Copyright +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of foam-extend. +# +# foam-extend is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# foam-extend is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with foam-extend. If not, see . +# +# Script +# AllMake.stage6 +# +# Description +# Build script for ThirdParty packages located under LocalDev +# +# +# Requirements: +# 1: Your foam-extend environment must be properly initialized +# +# Author: +# Martin Beaudoin, Hydro-Quebec, (2012) +# +#------------------------------------------------------------------------------ +# run from Third-party directory only +cd ${0%/*} || exit 1 + +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the foam-extend entries in your dot-files and source them." + exit 1 +} + +#------------------------------------------------------------------------------ + +echo "========================================" +echo "Starting ThirdParty AllMake: Stage6 " +echo "========================================" +echo + +# Local developments from Hydro-Quebec (Turbomachinery) +# Temporary solution until we find a more suitable place +# for this. MB +(cd ./LocalDev/Hydro-Quebec/PyFoam; ./AllMake) + +echo "========================================" +echo "Done ThirdParty AllMake: Stage6 " +echo "========================================" +echo + +# ----------------------------------------------------------------- end-of-file + + diff --git a/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/AllMake b/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/AllMake new file mode 100755 index 0000000..05f727c --- /dev/null +++ b/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/AllMake @@ -0,0 +1,86 @@ +#!/bin/bash +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | foam-extend: Open Source CFD +# \\ / O peration | +# \\ / A nd | For copyright notice see file Copyright +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of foam-extend. +# +# foam-extend is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# foam-extend is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with foam-extend. If not, see . +# +# Script +# AllMake +# +# Description +# Installation script for local development +# +# Author: +# Martin Beaudoin, Hydro-Quebec, (2012) +# +#------------------------------------------------------------------------------ + +command -v python -V >/dev/null +if [ ! $? -eq 0 ]; +then + echo "Error: You need to install python in order to run these PyFoam scripts" + exit -1 +fi + +if [ -z "$PYFOAM_SITE_DIR" ] +then + echo "Error: Missing environment variable \$PYFOAM_SITE_DIR." + echo " Please execute the script ThirdParty/AllMake.stage5 to install PyFoam." + echo " Then, make sure to freshen your foam-extend environment by sourcing your main" + echo " foam-extend configuration file." + exit -1 +fi + +if [ ! -d $PYFOAM_SITE_DIR/lib -o ! -d $PYFOAM_SITE_DIR/bin ] +then + echo "Directory $PYFOAM_SITE_DIR/lib or $PYFOAM_SITE_DIR/bin missing" + exit -1 +fi +set -x + +# pyFoamChangeMixingPlaneBoundary.py +cp pyFoamChangeMixingPlaneBoundary.py $PYFOAM_SITE_DIR/bin +cp ChangeMixingPlaneBoundary.py $PYFOAM_SITE_DIR/lib + +# pyFoamChangeGGIBoundary.py +# Same as pyFoamModifyGGIBoundary.py. We just harmonize the name with rest of PyFoam +cp pyFoamChangeGGIBoundary.py $PYFOAM_SITE_DIR/bin +cp ChangeGGIBoundary.py $PYFOAM_SITE_DIR/lib + +# pyFoamInitializeMixingPlane.py +cp pyFoamInitMixingPlaneInterface.py $PYFOAM_SITE_DIR/bin +cp InitMixingPlaneInterface.py $PYFOAM_SITE_DIR/lib + +# pyFoamInitializeGGI.py +cp pyFoamInitGgiInterface.py $PYFOAM_SITE_DIR/bin +cp InitGgiInterface.py $PYFOAM_SITE_DIR/lib + +# pyFoamConvertMixingPlaneBoundaryToNewSyntax.py +cp pyFoamConvertMixingPlaneBoundaryToNewSyntax.py $PYFOAM_SITE_DIR/bin +cp ConvertMixingPlaneBoundaryToNewSyntax.py $PYFOAM_SITE_DIR/lib + +set +x +echo ======================================== +echo Done +echo ======================================== +echo + +# ----------------------------------------------------------------- end-of-file diff --git a/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/ChangeGGIBoundary.py b/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/ChangeGGIBoundary.py new file mode 100644 index 0000000..2148039 --- /dev/null +++ b/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/ChangeGGIBoundary.py @@ -0,0 +1,156 @@ +""" +Application-class that implements pyFoamChangeGGIBoundary.py + +Modification of GGI and cyclicGGI interface parameters in +constant/polymesh/boundary file. + +Author: + Martin Beaudoin, Hydro-Quebec, 2009. All rights reserved + +""" + +from PyFoam.Applications.PyFoamApplication import PyFoamApplication +from PyFoam.RunDictionary.ParsedParameterFile import ParsedParameterFile +from PyFoam.ThirdParty.six import print_ +from os import path +import sys +import re + +class ChangeGGIBoundary(PyFoamApplication): + def __init__(self,args=None): + description="""\ +Change GGI boundary condition parameters +""" + PyFoamApplication.__init__(self, + args=args, + description=description, + usage="%prog ggiPatchName", + interspersed=True, + changeVersion=False, + nr=2) + + def addOptions(self): + self.parser.add_option("--shadowPatch", + action="store", + dest="shadowPatch", + default=None, + help='Name of the shadowPatch') + self.parser.add_option("--shadowName", + action="store", + dest="shadowName", + default=None, + help='Name of the shadowPatch. Deprecated. Use --shadowPatch instead') + self.parser.add_option("--zone", + action="store", + dest="zone", + default=None, + help='Name of the zone for the GGI patch') + self.parser.add_option("--patchZoneName", + action="store", + dest="patchZoneName", + default=None, + help='Name of the zone for the GGI patch. Deprecated. Use --zone instead') + self.parser.add_option("--bridgeOverlap", + action="store", + dest="bridgeOverlap", + default=None, + help='bridgeOverlap flag (on/off)') + self.parser.add_option("--bridgeOverlapFlag", + action="store", + dest="bridgeOverlapFlag", + default=None, + help='bridgeOverlap flag (on/off). Deprecated. Use --bridgeOverlap instead') + self.parser.add_option("--rotationAxis", + action="store", + dest="rotationAxis", + default=None, + help='rotation axis for cyclicGgi') + self.parser.add_option("--rotationAngle", + action="store", + dest="rotationAngle", + default=None, + help='rotation axis angle for cyclicGgi') + self.parser.add_option("--separationOffset", + action="store", + dest="separationOffset", + default=None, + help='separation offset for cyclicGgi') + + self.parser.add_option("--test", + action="store_true", + default=False, + dest="test", + help="Only print the new boundary file") + + def run(self): + fName=self.parser.getArgs()[0] + bName=self.parser.getArgs()[1] + + boundary=ParsedParameterFile(path.join(".",fName,"constant","polyMesh","boundary"),debug=False,boundaryDict=True) + + bnd=boundary.content + + if type(bnd)!=list: + self.error("Problem with boundary file (not a list)") + + found=False + + for val in bnd: + if val==bName: + found=True + elif found: + bcType=val["type"] + if re.match("cyclicGgi", bcType)!= None or re.match("ggi", bcType)!= None: + if self.parser.getOptions().shadowPatch!=None: + shadowPatch=self.parser.getOptions().shadowPatch + val["shadowPatch"]=shadowPatch + if shadowPatch not in bnd: + self.error("\n Option --shadowPatch for patch:",bName,": there is no patch called",shadowPatch,"\n") + + if self.parser.getOptions().zone!=None: + val["zone"]=self.parser.getOptions().zone + + if self.parser.getOptions().bridgeOverlap!=None: + val["bridgeOverlap"]=self.parser.getOptions().bridgeOverlap + + if val["type"]=="cyclicGgi": + if self.parser.getOptions().rotationAxis!=None: + val["rotationAxis"]=self.parser.getOptions().rotationAxis + + if self.parser.getOptions().rotationAngle!=None: + val["rotationAngle"]=self.parser.getOptions().rotationAngle + + if self.parser.getOptions().separationOffset!=None: + val["separationOffset"]=self.parser.getOptions().separationOffset + + + # Deprecated + if self.parser.getOptions().shadowName!=None: + self.warning("\n PatchName:",bName,": Option --shadowName is deprecated. Use --shadowPatch instead\n") + shadowName=self.parser.getOptions().shadowName + val["shadowPatch"]=shadowName + if shadowName not in bnd: + self.error("\n Option --shadowName for patch:",bName,": there is no patch called",shadowName,"\n") + + # Deprecated + if self.parser.getOptions().patchZoneName!=None: + self.warning("\n PatchName:",bName,": Option --patchZoneName is deprecated. Use --zone instead\n") + val["zone"]=self.parser.getOptions().patchZoneName + + # Deprecated + if self.parser.getOptions().bridgeOverlapFlag!=None: + self.warning("\n PatchName:",bName,": Option --bridgeOverlapFlag is deprecated. Use --bridgeOverlap instead\n") + val["bridgeOverlap"]=self.parser.getOptions().bridgeOverlapFlag + + + else: + print_("Unsupported GGI type '",bcType,"' for patch",bName) + break + + if not found: + self.error("Boundary",bName,"not found in",bnd[::2]) + + if self.parser.getOptions().test: + print_(boundary) + else: + boundary.writeFile() diff --git a/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/ChangeMixingPlaneBoundary.py b/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/ChangeMixingPlaneBoundary.py new file mode 100644 index 0000000..2212d5a --- /dev/null +++ b/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/ChangeMixingPlaneBoundary.py @@ -0,0 +1,153 @@ +""" +Application-class that implements pyFoamChangeMixingPlaneBoundary.py + +Change various mixingPlane interface attributes in +constant/polymesh/boundary file. + +Author: + Martin Beaudoin, Hydro-Quebec, 2012. All rights reserved + +""" + +from PyFoam.Applications.PyFoamApplication import PyFoamApplication +from PyFoam.RunDictionary.ParsedParameterFile import ParsedParameterFile +from PyFoam.ThirdParty.six import print_ +from os import path +import sys + +class ChangeMixingPlaneBoundary(PyFoamApplication): + def __init__(self,args=None): + description=""" +Change MixingPlane boundary condition parameters +""" + PyFoamApplication.__init__(self, + args=args, + description=description, + usage="%prog mixingPlanePatchName", + interspersed=True, + changeVersion=False, + nr=2) + + def addOptions(self): + self.parser.add_option("--shadowPatch", + action="store", + dest="shadowPatch", + default=None, + help='Name of the shadowPatch') + self.parser.add_option("--zone", + action="store", + dest="zone", + default=None, + help='Name of the zone for mixingPlanePatch') + self.parser.add_option("--coordinateSystemName", + action="store", + dest="coordinateSystemName", + default="mixingCS", + help='coordinateSystemName (mixingCS)') + self.parser.add_option("--coordinateSystemType", + action="store", + dest="coordinateSystemType", + default=None, + help='coordinateSystemType (cyindrical/spherical)') + self.parser.add_option("--coordinateSystemOrigin", + action="store", + dest="coordinateSystemOrigin", + default=None, + help='origin for coordinate system of mixingPlane') + self.parser.add_option("--coordinateSystemE1", + action="store", + dest="coordinateSystemE1", + default=None, + help='axis E1 for coordinate system of mixingPlane') + self.parser.add_option("--coordinateSystemE3", + action="store", + dest="coordinateSystemE3", + default=None, + help='axis E3 for coordinate system of mixingPlane') + self.parser.add_option("--ribbonPatchSweepAxis", + action="store", + dest="ribbonPatchSweepAxis", + default=None, + help='ribbonPatch sweepAxis (X|Y|Z|R|Theta') + self.parser.add_option("--ribbonPatchStackAxis", + action="store", + dest="ribbonPatchStackAxis", + default=None, + help='ribbonPatch stackAxis (X|Y|Z|R|Theta') + self.parser.add_option("--ribbonPatchDiscretisation", + action="store", + dest="ribbonPatchDiscretisation", + default=None, + help='ribbonPatch discretisation (masterPatch|slavePatch|bothPatches|uniform|userDefined)') + + self.parser.add_option("--test", + action="store_true", + default=False, + dest="test", + help="Only print the new boundary file") + + def run(self): + fName=self.parser.getArgs()[0] + bName=self.parser.getArgs()[1] + + boundary=ParsedParameterFile(path.join(".",fName,"constant","polyMesh","boundary"),debug=False,boundaryDict=True) + + bnd=boundary.content + + if type(bnd)!=list: + print_("Problem with boundary file (not a list)") + sys.exit(-1) + + found=False + + for val in bnd: + if val==bName: + found=True + elif found: + if val["type"]=="mixingPlane": + if self.parser.getOptions().shadowPatch!=None: + val["shadowPatch"]=self.parser.getOptions().shadowPatch + + if self.parser.getOptions().zone!=None: + val["zone"]=self.parser.getOptions().zone + + if val.has_key("coordinateSystem")==False: + val["coordinateSystem"]={} + + if self.parser.getOptions().coordinateSystemName!=None: + val["coordinateSystem"]["name"]=self.parser.getOptions().coordinateSystemName + + if self.parser.getOptions().coordinateSystemType!=None: + val["coordinateSystem"]["type"]=self.parser.getOptions().coordinateSystemType + + if self.parser.getOptions().coordinateSystemOrigin!=None: + val["coordinateSystem"]["origin"]=self.parser.getOptions().coordinateSystemOrigin + + if self.parser.getOptions().coordinateSystemE1!=None: + val["coordinateSystem"]["e1"]=self.parser.getOptions().coordinateSystemE1 + + if self.parser.getOptions().coordinateSystemE3!=None: + val["coordinateSystem"]["e3"]=self.parser.getOptions().coordinateSystemE3 + + if val.has_key("ribbonPatch")==False: + val["ribbonPatch"]={} + + if self.parser.getOptions().ribbonPatchSweepAxis!=None: + val["ribbonPatch"]["sweepAxis"]=self.parser.getOptions().ribbonPatchSweepAxis + + if self.parser.getOptions().ribbonPatchStackAxis!=None: + val["ribbonPatch"]["stackAxis"]=self.parser.getOptions().ribbonPatchStackAxis + + if self.parser.getOptions().ribbonPatchDiscretisation!=None: + val["ribbonPatch"]["discretisation"]=self.parser.getOptions().ribbonPatchDiscretisation + + break + + if not found: + print_("Boundary",bName,"not found in",bnd[::2]) + sys.exit(-1) + + if self.parser.getOptions().test: + print_(boundary) + else: + boundary.writeFile() diff --git a/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/ConvertMixingPlaneBoundaryToNewSyntax.py b/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/ConvertMixingPlaneBoundaryToNewSyntax.py new file mode 100644 index 0000000..4a5e625 --- /dev/null +++ b/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/ConvertMixingPlaneBoundaryToNewSyntax.py @@ -0,0 +1,203 @@ +""" +Application-class that implements pyFoamConvertMixingPlaneToNewSyntax.py + +Adjust the mixingPlane interface definition in the boundary +file to the latest supported syntax. + +Author: + Martin Beaudoin, Hydro-Quebec, 2012. All rights reserved + +""" + +from PyFoam.Applications.PyFoamApplication import PyFoamApplication +from PyFoam.RunDictionary.ParsedParameterFile import ParsedParameterFile +from PyFoam.ThirdParty.six import print_ +from os import path +import sys + +# ------> Start of Python code snippet copied from an external source +# +# Author : Brian Beck +# http://code.activestate.com/recipes/410692-readable-switch-construction-without-lambdas-or-di/ +# +# License for this Python code snippet: +# +# This code that was deposited before July 15, 2008 on aspn.activestate.com. +# It is governed by the Python license (http://www.python.org/psf/license/) +# in accordance with the Python Cookbook agreement. +# +# Description: +# Python's lack of a 'switch' statement has garnered much discussion and even +# a PEP. The most popular substitute uses dictionaries to map cases to +# functions, which requires lots of defs or lambdas. While the approach shown +# here may be O(n) for cases, it aims to duplicate C's original 'switch' +# functionality and structure with reasonable accuracy. +# +# This class provides the functionality we want. You only need to look at +# this if you want to know how this works. It only needs to be defined +# once, no need to muck around with its internals. +# + +class switch(object): + def __init__(self, value): + self.value = value + self.fall = False + + def __iter__(self): + """Return the match method once, then stop""" + yield self.match + raise StopIteration + + def match(self, *args): + """Indicate whether or not to enter a case suite""" + if self.fall or not args: + return True + elif self.value in args: # changed for v1.5, see below + self.fall = True + return True + else: + return False + +# ------> End of Python code snippet copied from an external source + +#################################################################### +# +# The rest of this source code was written by me. +# Martin Beaudoin, June 2012 + +class ConvertMixingPlaneBoundaryToNewSyntax(PyFoamApplication): + def __init__(self,args=None): + description=""" +Change MixingPlane boundary condition parameters +""" + PyFoamApplication.__init__(self, + args=args, + description=description, + usage="%prog ", + interspersed=True, + changeVersion=False, + nr=1) + + def addOptions(self): + + self.parser.add_option("--test", + action="store_true", + default=False, + dest="test", + help="Only print the new boundary file") + + def run(self): + fName=self.parser.getArgs()[0] + + boundary=ParsedParameterFile(path.join(".",fName,"constant","polyMesh","boundary"),debug=False,boundaryDict=True) + + bnd=boundary.content + + if type(bnd)!=list: + print_("Problem with boundary file (not a list)") + sys.exit(-1) + + found=False + + for index in range(0, len(bnd), 2): + + indexDefPatch=index+1 + + oldAssembly="" + oldOrientation="" + + if bnd[indexDefPatch]["type"]=="mixingPlane": + if bnd[indexDefPatch].has_key("assembly"): + print_(" Replacing the parameter 'assembly' for patch", bnd[index]) + oldAssembly=bnd[indexDefPatch]["assembly"] + del bnd[indexDefPatch]["assembly"] + + if bnd[indexDefPatch].has_key("orientation"): + print_(" Replacing the parameter 'orientation' for patch", bnd[index]) + oldOrientation=bnd[indexDefPatch]["orientation"] + del bnd[indexDefPatch]["orientation"] + + if bnd[indexDefPatch].has_key("ribbonPatch")==False: + bnd[indexDefPatch]["ribbonPatch"]={} + + if bnd[indexDefPatch].has_key("zone")==False: + bnd[indexDefPatch]["zone"]=bnd[index] + "Zone" + + if oldAssembly != "": + # Converting "assembly" to ribbonPatch/discretisation + for case in switch(oldAssembly): + if case('master'): + bnd[indexDefPatch]["ribbonPatch"]["discretisation"]="masterPatch" + break + if case('slave'): + bnd[indexDefPatch]["ribbonPatch"]["discretisation"]="slavePatch" + break + if case('both'): + bnd[indexDefPatch]["ribbonPatch"]["discretisation"]="bothPatches" + break + if case('userdefined'): + bnd[indexDefPatch]["ribbonPatch"]["discretisation"]="userDefined" + break + if case(): # default + print_("Unsupported assembly type: ", oldAssembly) + + if oldOrientation != "": + # Converting "orientation" to ribbonPatch/ribbonPatchSweepAxis and + # ribbonPatch/ribbonPatchStackAxis + for case in switch(oldOrientation): + + if case('dirX_spanY'): + bnd[indexDefPatch]["ribbonPatch"]["stackAxis"]="X" + bnd[indexDefPatch]["ribbonPatch"]["sweepAxis"]="Y" + break + if case('dirX_spanZ'): + bnd[indexDefPatch]["ribbonPatch"]["stackAxis"]="X" + bnd[indexDefPatch]["ribbonPatch"]["sweepAxis"]="Z" + break + if case('dirY_spanX'): + bnd[indexDefPatch]["ribbonPatch"]["stackAxis"]="Y" + bnd[indexDefPatch]["ribbonPatch"]["sweepAxis"]="X" + break + if case('dirY_spanZ'): + bnd[indexDefPatch]["ribbonPatch"]["stackAxis"]="Y" + bnd[indexDefPatch]["ribbonPatch"]["sweepAxis"]="Z" + break + if case('dirZ_spanX'): + bnd[indexDefPatch]["ribbonPatch"]["stackAxis"]="Z" + bnd[indexDefPatch]["ribbonPatch"]["sweepAxis"]="X" + break + if case('dirZ_spanY'): + bnd[indexDefPatch]["ribbonPatch"]["stackAxis"]="Z" + bnd[indexDefPatch]["ribbonPatch"]["sweepAxis"]="Y" + break + if case('dirR_spanTheta'): + bnd[indexDefPatch]["ribbonPatch"]["stackAxis"]="R" + bnd[indexDefPatch]["ribbonPatch"]["sweepAxis"]="Theta" + break + if case('dirR_spanZ'): + bnd[indexDefPatch]["ribbonPatch"]["stackAxis"]="R" + bnd[indexDefPatch]["ribbonPatch"]["sweepAxis"]="Z" + break + if case('dirTheta_spanZ'): + bnd[indexDefPatch]["ribbonPatch"]["stackAxis"]="Theta" + bnd[indexDefPatch]["ribbonPatch"]["sweepAxis"]="Z" + break + if case('dirTheta_spanR'): + bnd[indexDefPatch]["ribbonPatch"]["stackAxis"]="Theta" + bnd[indexDefPatch]["ribbonPatch"]["sweepAxis"]="R" + break + if case('dirZ_spanTheta'): + bnd[indexDefPatch]["ribbonPatch"]["stackAxis"]="Z" + bnd[indexDefPatch]["ribbonPatch"]["sweepAxis"]="Theta" + break + if case('dirZ_spanR'): + bnd[indexDefPatch]["ribbonPatch"]["stackAxis"]="Z" + bnd[indexDefPatch]["ribbonPatch"]["sweepAxis"]="R" + break + if case(): # default + print_("Unsupported orientation type: ", oldOrientation) + + if self.parser.getOptions().test: + print_(boundary) + else: + boundary.writeFile() diff --git a/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/InitGgiInterface.py b/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/InitGgiInterface.py new file mode 100644 index 0000000..7a73bcf --- /dev/null +++ b/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/InitGgiInterface.py @@ -0,0 +1,296 @@ +""" +Application-class that implements pyFoamInitGgiInterface.py + +Inititialize various ggi interface attributes in the +constant/polymesh/boundary file, and in the time directories. + +Backups of the boundary file is created. + +Generate companion scripts for initializing the ggi zone faceSets. + +Modify the decomposeParDict file for the new ggi zones names. + +Author: + Martin Beaudoin, Hydro-Quebec, 2012. All rights reserved + +""" + +import sys, fnmatch, re +from os import path, listdir, chmod +from stat import * + +from PyFoam.Applications.PyFoamApplication import PyFoamApplication +from PyFoam.RunDictionary.ParsedParameterFile import ParsedParameterFile +from PyFoam.ThirdParty.six import print_ +from PyFoam.RunDictionary.TimeDirectory import TimeDirectory +from PyFoam.Basics.BasicFile import BasicFile + +class InitGgiInterface(PyFoamApplication): + def __init__(self,args=None): + description=""" +Init GGI boundary condition parameters in boundary file. +Init GGI boundary fields in time directories. +Generate faceSet scripts for ggi zones. +Modify GGI zones information in decomposeParDict file. +""" + PyFoamApplication.__init__(self, + args=args, + description=description, + usage="%prog ggi_MasterPatchName ggi_ShadowPatchName", + interspersed=True, + changeVersion=False, + nr=3) + + def addOptions(self): + self.parser.add_option("--type", + action="store", + dest="ggiType", + default='ggi', + help='ggi type: ggi | cyclicGgi | overlapGgi') + self.parser.add_option("--patchZoneName", + action="store", + dest="patchZoneName", + default=None, + help='Name of the zone for the GGI patch') + self.parser.add_option("--bridgeOverlapFlag", + action="store", + dest="bridgeOverlapFlag", + default=None, + help='bridgeOverlap flag (on/off)') + self.parser.add_option("--rotationAxis", + action="store", + dest="rotationAxis", + default=None, + help='rotation axis for cyclicGgi or overlapGgi') + self.parser.add_option("--rotationAngle", + action="store", + dest="rotationAngle", + default=None, + help='rotation axis angle for cyclicGgi. Accept Python math expressions like 360.0/17.0') + self.parser.add_option("--separationOffset", + action="store", + dest="separationOffset", + default=None, + help='separation offset for cyclicGgi') + self.parser.add_option("--nCopies", + action="store", + dest="nCopies", + default=None, + help='number of copies for overlapGgi') + self.parser.add_option("--timeDirs", + action="store", + dest="timeDirs", + default=None, + help='time directories for modifying the ggi boundaryfields. Accept expressions like "[0-9]*", "0", etc.') + + self.parser.add_option("--genFaceSetForGgiZonesScriptName", + action="store", + dest="genFaceSetForGgiZonesScriptName", + default="genFaceSetForGgiZones.setSet", + help='setSet batch file for generating faceSets for GGI zones. Default: genFaceSetForGgiZones.setSet') + + self.parser.add_option("--initGgiZonesScriptName", + action="store", + dest="initGgiZonesScriptName", + default="initGgiZones.sh", + help='script name for initializing the GGI zone faceSets. Default: initGgiZones.sh') + + self.parser.add_option("--test", + action="store_true", + default=False, + dest="test", + help="Only print the new boundary file") + + def createGGIPatch(self, patch, patchName, ggiType): + description="""\ +Create a default definition for a ggi patch, and replace +the current definition + """ + print_("Replacing definition of patch: ", patchName, ":", patch) + newPatch={ + 'type' : ggiType, + 'nFaces' : patch["nFaces"], + 'startFace' : patch["startFace"], + 'shadowPatch' : 'unknown', + 'zone' : patchName+'Zone', + 'bridgeOverlap' : 'true', + 'rotationAxis' : '(0 0 1)', + 'rotationAngle' : '0.0', + 'separationOffset' : '(0 0 0)' + } + return newPatch + + def modifyGGIPatchDefinition(self, patch, patchName, shadowName, ggiType, rotationAngle): + description="""\ +Modify the definition of a ggi patch + """ + print_(" Modifying ggi boundary definition in constant/polyMesh/boundary for patch", patchName) + + patch["type"]=ggiType + + patch["shadowPatch"]=shadowName + + if self.parser.getOptions().patchZoneName!=None: + patch["zone"]=self.parser.getOptions().patchZoneName + else: + patch["zone"]=patchName+'Zone' + + if self.parser.getOptions().bridgeOverlapFlag!=None: + patch["bridgeOverlap"]=self.parser.getOptions().bridgeOverlapFlag + + if ggiType=="cyclicGgi": + if self.parser.getOptions().rotationAxis!=None: + patch["rotationAxis"]=self.parser.getOptions().rotationAxis + + # Use the rotationAngle value passed as a parameter. + # The calling function will change the sign for the slave ggi patch + if self.parser.getOptions().rotationAngle!=None: + patch["rotationAngle"]=rotationAngle + + if self.parser.getOptions().separationOffset!=None: + patch["separationOffset"]=self.parser.getOptions().separationOffset + + if ggiType=="overlapGgi": + if self.parser.getOptions().rotationAxis!=None: + patch["rotationAxis"]=self.parser.getOptions().rotationAxis + + if self.parser.getOptions().nCopies!=None: + patch["nCopies"]=self.parser.getOptions().nCopies + + + def modifyGGIPatchDefinitionInTimeDirs(self, caseDir, patchName, ggiType, timeDirs): + description="""\ +Modify the definition of a ggi patch in the time directories + """ + regex = fnmatch.translate(timeDirs) + + reobj = re.compile(regex) + + for timeDir in listdir(caseDir): + if reobj.match(timeDir): + print_(" Modifying ggi boundaryFields in timeDir", timeDir, "for patch", patchName) + + td=TimeDirectory(caseDir, timeDir, yieldParsedFiles=True) + + for f in td: + print_(" Modifying field", f.name) + f["boundaryField"][patchName]["type"]=ggiType + f.writeFile() + + + def generateCompanionFiles(self, caseDir, boundary): + description="""\ +Generate a setSet batch file based on the zone info specified in the ggi interfaces definition. +Generate a bash file for invoking setSet and setsToZones +Update GGI zone infoprmation in decomposeParDict + """ + # Default file: genFaceSetForGgiZones.setSet + bfGenFaceSets = BasicFile(path.join(caseDir, self.parser.getOptions().genFaceSetForGgiZonesScriptName)) + + print_(" Updating file ", bfGenFaceSets.name, " for generating GGI zones faceSet using the setSet command") + + bnd=boundary.content + + if type(bnd)!=list: + self.error("Problem with boundary file (not a list)") + + # Memorize list of GGI zones for later processing + listOfGgiZones = [] + + for index in range(0, len(bnd), 2): + patchName = bnd[index] + indexDefPatch=index+1 + if bnd[indexDefPatch]["type"]=='ggi' or bnd[indexDefPatch]["type"]=='cyclicGgi' or bnd[indexDefPatch]["type"]=='overlapGgi': + bfGenFaceSets.writeLine([ "faceSet " + bnd[indexDefPatch]["zone"] + " new patchToFace "+ patchName ]) + listOfGgiZones.append(bnd[indexDefPatch]["zone"]) + + bfGenFaceSets.writeLine([ "quit" ]) + bfGenFaceSets.close() + + # Default file: initGgiZones.sh + bfInitGgiZones = BasicFile(path.join(caseDir, self.parser.getOptions().initGgiZonesScriptName)) + + print_(" Updating file ", bfInitGgiZones.name, " for inititalizing GGI zones") + + bfInitGgiZones.writeLine([ "#!/bin/bash" ]) + bfInitGgiZones.writeLine([ "setSet -batch " + self.parser.getOptions().genFaceSetForGgiZonesScriptName ]) + bfInitGgiZones.writeLine([ "setsToZones -noFlipMap" ]) + bfInitGgiZones.close() + + # Set execution permissions for this script (755) + chmod(bfInitGgiZones.name, S_IRWXU|S_IRGRP|S_IXGRP|S_IXOTH|S_IROTH) + + # DecomposeParDict + decomposeParDictPath=path.join(caseDir,"system","decomposeParDict") + if path.exists(decomposeParDictPath): + print_(" Updating file ", decomposeParDictPath, " for GGI zones") + decomposeParDict=ParsedParameterFile(decomposeParDictPath,debug=False,backup=True) + dcp=decomposeParDict.content + dcp["globalFaceZones"]="(\n " + '\n '.join(list(listOfGgiZones)) + "\n)" + decomposeParDict.writeFile() + + def run(self): + caseDir=self.parser.getArgs()[0] + masterbName=self.parser.getArgs()[1] + shadowbName=self.parser.getArgs()[2] + + boundary=ParsedParameterFile(path.join(".",caseDir,"constant","polyMesh","boundary"),debug=False,boundaryDict=True,backup=True) + + bnd=boundary.content + + if type(bnd)!=list: + self.error("Problem with boundary file (not a list)") + + masterFound=False + shadowFound=False + updateTimeDirs=False + + timeDirs="0" + if self.parser.getOptions().timeDirs!=None: + timeDirs=self.parser.getOptions().timeDirs + updateTimeDirs=True + + ggiType=self.parser.getOptions().ggiType + + rotationAngle=0.0 + if self.parser.getOptions().rotationAngle!=None: + rotationAngle=float(eval(self.parser.getOptions().rotationAngle)) + + for index in range(len(bnd)): + indexDefPatch=index+1 + + if bnd[index]==masterbName: + masterFound=True + if bnd[indexDefPatch]["type"]!=ggiType: + bnd[indexDefPatch] = self.createGGIPatch(bnd[indexDefPatch], masterbName, ggiType) + + self.modifyGGIPatchDefinition(bnd[indexDefPatch], masterbName, shadowbName, ggiType, rotationAngle) + + if updateTimeDirs: + self.modifyGGIPatchDefinitionInTimeDirs(caseDir, masterbName, ggiType, timeDirs) + + elif bnd[index]==shadowbName: + shadowFound=True + if bnd[indexDefPatch]["type"]!=ggiType: + bnd[indexDefPatch] = self.createGGIPatch(bnd[indexDefPatch], shadowbName, ggiType) + self.modifyGGIPatchDefinition(bnd[indexDefPatch], shadowbName, masterbName, ggiType, -rotationAngle) + + if updateTimeDirs: + self.modifyGGIPatchDefinitionInTimeDirs(caseDir, shadowbName, ggiType, timeDirs) + + if masterFound and shadowFound: + break; + + if not masterFound: + self.error("Boundary patch",masterbName,"not found in",bnd[::2]) + + if not shadowFound: + self.error("Boundary patch",shadowbName,"not found in",bnd[::2]) + + if self.parser.getOptions().test: + print_(boundary) + else: + boundary.writeFile() + + # Write companion files + self.generateCompanionFiles(caseDir, boundary) diff --git a/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/InitMixingPlaneInterface.py b/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/InitMixingPlaneInterface.py new file mode 100644 index 0000000..a20deb3 --- /dev/null +++ b/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/InitMixingPlaneInterface.py @@ -0,0 +1,239 @@ +""" +Application-class that implements pyFoamInitMixingPlaneInterface.py + +Initialize various mixingPlane interface attributes in the +constant/polymesh/boundary file, and in the time directories. + +Backups of the modified files are created + +Author: + Martin Beaudoin, Hydro-Quebec, 2012. All rights reserved + +""" + +from PyFoam.Applications.PyFoamApplication import PyFoamApplication +from PyFoam.RunDictionary.ParsedParameterFile import ParsedParameterFile +from PyFoam.RunDictionary.TimeDirectory import TimeDirectory +from PyFoam.ThirdParty.six import print_ +from os import path, listdir +import sys, fnmatch, re + +class InitMixingPlaneInterface(PyFoamApplication): + def __init__(self,args=None): + description=""" +Init MixingPlane boundary condition parameters +""" + PyFoamApplication.__init__(self, + args=args, + description=description, + usage="%prog mixingPlane_MasterPatchName mixingPlane_ShadowPatchName", + interspersed=True, + changeVersion=False, + nr=3) + + def addOptions(self): + # No need for option --shadowPatch since the name of the shadowPatch is a mandatory parameter to the script + #self.parser.add_option("--shadowPatch", + # action="store", + # dest="shadowPatch", + # default=None, + # help='Name of the shadowPatch') + self.parser.add_option("--coordinateSystemName", + action="store", + dest="coordinateSystemName", + default="mixingCS", + help='coordinateSystemName (mixingCS)') + self.parser.add_option("--coordinateSystemType", + action="store", + dest="coordinateSystemType", + default=None, + help='coordinateSystemType (cyindrical/spherical)') + self.parser.add_option("--coordinateSystemOrigin", + action="store", + dest="coordinateSystemOrigin", + default=None, + help='origin for coordinate system of mixingPlane') + self.parser.add_option("--coordinateSystemE1", + action="store", + dest="coordinateSystemE1", + default=None, + help='axis E1 for coordinate system of mixingPlane') + self.parser.add_option("--coordinateSystemE3", + action="store", + dest="coordinateSystemE3", + default=None, + help='axis E3 for coordinate system of mixingPlane') + self.parser.add_option("--ribbonPatchSweepAxis", + action="store", + dest="ribbonPatchSweepAxis", + default=None, + help='ribbonPatch sweepAxis (X|Y|Z|R|Theta') + self.parser.add_option("--ribbonPatchStackAxis", + action="store", + dest="ribbonPatchStackAxis", + default=None, + help='ribbonPatch stackAxis (X|Y|Z|R|Theta') + self.parser.add_option("--ribbonPatchDiscretisation", + action="store", + dest="ribbonPatchDiscretisation", + default=None, + help='ribbonPatch discretisation (masterPatch|slavePatch|bothPatches|uniform|userDefined)') + + self.parser.add_option("--timeDirs", + action="store", + dest="timeDirs", + default=None, + help='time directories for the mixingPlane boundaryfields. Accept expressions like "[0-9]*", "0", etc.') + + self.parser.add_option("--test", + action="store_true", + default=False, + dest="test", + help="Only print the new boundary file") + + def createMixingPlanePatch(self, patch, patchName): + description="""\ +Create a default definition for a mixingPlane patch, and replace +the current definition + """ + print_("Replacing definition of patch: ", patchName, ":", patch) + newPatch={ + 'type' : "mixingPlane", + 'nFaces' : patch["nFaces"], + 'startFace' : patch["startFace"], + 'shadowPatch' : 'unknown', + 'coordinateSystem' : { + 'name' : 'mixingCS', + 'type' : 'cylindrical', + 'origin' : '(0 0 0)', + 'e1' : '(1 0 0)', + 'e3' : '(0 0 1)' + }, + 'ribbonPatch' : { + 'sweepAxis' : 'Theta', + 'stackAxis' : 'Z', + 'discretisation' : 'bothPatches', + } + } + return newPatch + + def modifyMixinPlanePatchDefinition(self, patch, patchName, shadowName): + description="""\ +Modify the definition of a mixingPlane patch + """ + print_(" Modifying mixingPlane boundary definition in constant/polyMesh/boundary for patch", patchName) + + patch["shadowPatch"]=shadowName + + if patch.has_key("coordinateSystem")==False: + patch["coordinateSystem"]={} + + if self.parser.getOptions().coordinateSystemName!=None: + patch["coordinateSystem"]["name"]=self.parser.getOptions().coordinateSystemName + + if self.parser.getOptions().coordinateSystemType!=None: + patch["coordinateSystem"]["type"]=self.parser.getOptions().coordinateSystemType + + if self.parser.getOptions().coordinateSystemOrigin!=None: + patch["coordinateSystem"]["origin"]=self.parser.getOptions().coordinateSystemOrigin + + if self.parser.getOptions().coordinateSystemE1!=None: + patch["coordinateSystem"]["e1"]=self.parser.getOptions().coordinateSystemE1 + + if self.parser.getOptions().coordinateSystemE3!=None: + patch["coordinateSystem"]["e3"]=self.parser.getOptions().coordinateSystemE3 + + if patch.has_key("ribbonPatch")==False: + patch["ribbonPatch"]={} + + if self.parser.getOptions().ribbonPatchSweepAxis!=None: + patch["ribbonPatch"]["sweepAxis"]=self.parser.getOptions().ribbonPatchSweepAxis + + if self.parser.getOptions().ribbonPatchStackAxis!=None: + patch["ribbonPatch"]["stackAxis"]=self.parser.getOptions().ribbonPatchStackAxis + + if self.parser.getOptions().ribbonPatchDiscretisation!=None: + patch["ribbonPatch"]["discretisation"]=self.parser.getOptions().ribbonPatchDiscretisation + + + + def modifyMixinPlanePatchDefinitionInTimeDirs(self, caseDir, patchName, timeDirs): + description="""\ +Modify the definition of a mixingPlane patch in the time directories + """ + regex = fnmatch.translate(timeDirs) + + reobj = re.compile(regex) + + for timeDir in listdir(caseDir): + if reobj.match(timeDir): + print_(" Modifying mixingPlane boundaryFields in timeDir", timeDir, "for patch", patchName) + + td=TimeDirectory(caseDir, timeDir, yieldParsedFiles=True) + + for f in td: + print_(" Modifying field", f.name) + f["boundaryField"][patchName]["type"]='mixingPlane' + f.writeFile() + + def run(self): + fName=self.parser.getArgs()[0] + masterbName=self.parser.getArgs()[1] + shadowbName=self.parser.getArgs()[2] + + boundary=ParsedParameterFile(path.join(".",fName,"constant","polyMesh","boundary"),debug=False,boundaryDict=True,backup=True) + + bnd=boundary.content + + if type(bnd)!=list: + print_("Problem with boundary file (not a list)") + sys.exit(-1) + + masterFound=False + shadowFound=False + updateTimeDirs=False + + timeDirs="0" + if self.parser.getOptions().timeDirs!=None: + timeDirs=self.parser.getOptions().timeDirs + updateTimeDirs=True + + print_("UpdateTimeDirs: ", updateTimeDirs) + + for index in range(len(bnd)): + + indexDefPatch=index+1 + + if bnd[index]==masterbName: + masterFound=True + if bnd[indexDefPatch]["type"]!="mixingPlane": + bnd[indexDefPatch] = self.createMixingPlanePatch(bnd[indexDefPatch], masterbName) + + self.modifyMixinPlanePatchDefinition(bnd[indexDefPatch], masterbName, shadowbName) + + if updateTimeDirs: + self.modifyMixinPlanePatchDefinitionInTimeDirs(fName, masterbName, timeDirs) + + elif bnd[index]==shadowbName: + shadowFound=True + if bnd[indexDefPatch]["type"]!="mixingPlane": + bnd[indexDefPatch] = self.createMixingPlanePatch(bnd[indexDefPatch], shadowbName) + + self.modifyMixinPlanePatchDefinition(bnd[indexDefPatch], shadowbName, masterbName) + + if updateTimeDirs: + self.modifyMixinPlanePatchDefinitionInTimeDirs(fName, shadowbName, timeDirs) + + if masterFound and shadowFound: + break; + + if not masterFound: + self.error("Boundary patch",masterbName,"not found in",bnd[::2]) + + if not shadowFound: + self.error("Boundary patch",shadowbName,"not found in",bnd[::2]) + + if self.parser.getOptions().test: + print_(boundary) + else: + boundary.writeFile() diff --git a/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/Readme.txt b/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/Readme.txt new file mode 100644 index 0000000..3677614 --- /dev/null +++ b/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/Readme.txt @@ -0,0 +1,6 @@ +PyFoam scripts for handling GGI and mixingPlane cases. + +-- +Martin Beaudoin +Hydro-Quebec +April 2012 diff --git a/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/pyFoamChangeGGIBoundary.py b/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/pyFoamChangeGGIBoundary.py new file mode 100755 index 0000000..32c7530 --- /dev/null +++ b/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/pyFoamChangeGGIBoundary.py @@ -0,0 +1,5 @@ +#!/usr/bin/env python + +from PyFoam.Site.ChangeGGIBoundary import ChangeGGIBoundary + +ChangeGGIBoundary() diff --git a/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/pyFoamChangeMixingPlaneBoundary.py b/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/pyFoamChangeMixingPlaneBoundary.py new file mode 100755 index 0000000..2aa0190 --- /dev/null +++ b/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/pyFoamChangeMixingPlaneBoundary.py @@ -0,0 +1,5 @@ +#!/usr/bin/env python + +from PyFoam.Site.ChangeMixingPlaneBoundary import ChangeMixingPlaneBoundary + +ChangeMixingPlaneBoundary() diff --git a/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/pyFoamConvertMixingPlaneBoundaryToNewSyntax.py b/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/pyFoamConvertMixingPlaneBoundaryToNewSyntax.py new file mode 100755 index 0000000..5d6540e --- /dev/null +++ b/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/pyFoamConvertMixingPlaneBoundaryToNewSyntax.py @@ -0,0 +1,5 @@ +#!/usr/bin/env python + +from PyFoam.Site.ConvertMixingPlaneBoundaryToNewSyntax import ConvertMixingPlaneBoundaryToNewSyntax + +ConvertMixingPlaneBoundaryToNewSyntax() diff --git a/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/pyFoamInitGgiInterface.py b/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/pyFoamInitGgiInterface.py new file mode 100755 index 0000000..5a55e88 --- /dev/null +++ b/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/pyFoamInitGgiInterface.py @@ -0,0 +1,5 @@ +#!/usr/bin/env python + +from PyFoam.Site.InitGgiInterface import InitGgiInterface + +InitGgiInterface() diff --git a/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/pyFoamInitMixingPlaneInterface.py b/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/pyFoamInitMixingPlaneInterface.py new file mode 100755 index 0000000..211d83b --- /dev/null +++ b/ThirdParty/LocalDev/Hydro-Quebec/PyFoam/pyFoamInitMixingPlaneInterface.py @@ -0,0 +1,5 @@ +#!/usr/bin/env python + +from PyFoam.Site.InitMixingPlaneInterface import InitMixingPlaneInterface + +InitMixingPlaneInterface() diff --git a/ThirdParty/LocalDev/Readme.txt b/ThirdParty/LocalDev/Readme.txt new file mode 100644 index 0000000..68a0773 --- /dev/null +++ b/ThirdParty/LocalDev/Readme.txt @@ -0,0 +1,13 @@ +This directory contains ThirdParty developments specific to the mixingPlane_RC1 branch. +Those developments might eventually find a more suitable home elsewhere. + +Instead of spreading these developments around in various repositories, I find +it more convenient to regroup them under this directory. + +So expect this ThirdParty/LocalDev directory to disappear eventually, once its +content will prove it usefulness. + +-- +Martin Beaudoin +Hydro-Quebec +April 2012 diff --git a/ThirdParty/PyFoamSiteScripts/bin/.gitStandin b/ThirdParty/PyFoamSiteScripts/bin/.gitStandin new file mode 100644 index 0000000..e69de29 diff --git a/ThirdParty/PyFoamSiteScripts/etc/.gitStandin b/ThirdParty/PyFoamSiteScripts/etc/.gitStandin new file mode 100644 index 0000000..e69de29 diff --git a/ThirdParty/README.ThirdParty b/ThirdParty/README.ThirdParty new file mode 100644 index 0000000..18c9833 --- /dev/null +++ b/ThirdParty/README.ThirdParty @@ -0,0 +1,249 @@ +A new design for the ThirdParty packages compilation and installation process: +============================================================================== + +The main purpose of this new development is to build a complete ThirParty +packages set for foam-extend-3.1 using only the original package source +tarball and some patch files (when necessary). + +A useful by-product of this development is also to provide some kind of +binary packaging of the ThirdParty packages. There are currently two types of +binary packaging generated by this compilation process: RPMs and compressed +tarballs (TGZs) + +The RPM package manager was selected to develop a first prototype. RPM is +available for multiple flavors of Unix/Linux, and offers all the necessary +functionnality to configured, patch, compile and install source code packages. + +One of the main requirement for this new development is that the whole process +needs to run and install in user-space, without the need to be root for +installing the packages. + +Here is what's available: + + a: A set of RPM spec files for specific ThirdParty packages. + b: A set of bash scripts to automate the complete sequence of downloading, + compiling, installing and generating RPMs. + c: An directory structure pre-configured and ready to proceed with the + download, compilation and installation of chosen ThirdParty packages for + OF-1.6-ext. + + +1: Quick description of the main scripts: +----------------------------------------- + a: AllMake: + Main wrapper script that will call AllMake.stage0 to AllMake.stage4 + scripts in sequence. + + b: AllMake.stage0: + This script is useful only for populating what I am calling the local "RPM + vault" with pre-generated RPMs. + + This is the script written to address the following use case: + "I have some pre-generated RPM files, now what" + + Basically, you call this script with a list of RPMs already generated by + whichever of the AllMake.stage(1-4) in order to populate the local RPMS + vault. Once in place in the RPM vault, these are the RPMs that will get + directly installed by the AllMake.stage(1-4) scripts, instead of being + regenerated by the normal compilation and install process of the + ThirdParty packages. + + c: AllMake.stage1: + This script is taking care of the basic ThirdParty tools like compilers, + flex, bison, cmake , python, etc. + This compilation stage will generate .sh and .csh files that will be + sourced by your file settings.sh or settings.csh in order to initialize + the PATH and LD_LIBRARY_PATH environment variable for the stage1 packages. + + d: AllMake.stage2: + This script is taking care of the MPI communication libraries. Right now, + only OpenMPI is supported. + This compilation stage will generate .sh and .csh files that will be + sourced by your file settings.sh or settings.csh in order to initialize + the PATH and LD_LIBRARY_PATH environment variable for the stage2 packages. + + e: AllMake.stage3: + This script is taking care of the "standard" ThirdParty libraries like + metis, scotch, mesquite, etc. + This compilation stage will generate .sh and .csh files that will be + sourced by your file settings.sh or settings.csh in order to initialize + the PATH and LD_LIBRARY_PATH environment variable for the stage3 packages. + + f: AllMake.stage4: + This script is taking care of Paraview and QT (and this step will take an + awfull long time to compile, honest...). + This compilation stage will generate .sh and .csh files that will be + sourced by your file settings.sh or settings.csh in order to initialize + the PATH and LD_LIBRARY_PATH environment variable for the stage4 packages. + + g: tools/makeThirdPartyFunctionsForRPM: + A set of bash functions useful for wrapping the rpmbuild and rpm commands + + +2: Important notice: +-------------------- +Every single ThirdParty package will be installed with a set of companion .sh +and .csh files one needs to source in order to properly initialize the PATH and +LD_LIBRARY_PATH environment variables for running the packages. + +Some packages will also create environments variables necessary for the +compilation of some foam-extend libraries. + +The scripts AllMake.stage[1-4] are taking care of refreshing the environment +variable after the installation of every single package, so you will not need to +manually refresh your foam-extend environment yourself when building individual +ThirdParty packages through the AllMake.stage[1-4] scripts. + +The main Allwmake script for the compilation of foam-extend will also take care of +refreshing the environment variable before moving on to the compilation of the +main foam-extend libraries and applications. + +However, if you decide to compile the libraries and/or applications manually, or +through the src/Allwmake or applications/Allwmake scripts, YOU MUST MAKE SURE +YOUR ENVIRONMENT VARIABLES FOR THE THIRDPARTY PACKAGES ARE UPDATED FIRST! + +In that case, simply resource your bashrc or cshrc file once, before moving on +with the rest of your compilation activities. + + +3: The building and installation process overview: +-------------------------------------------------- +For every ThirdParty packages, this is the basic process we will be going +through when starting the compilation from scratch: + + a: Verify in the local "RPM vault" if a RPM file is available for the + required ThirdParty package. + + b: If the RPM is available, and the package already installed, then there is + nothing to do for this package, and we proceed with the next package. + + c: If the RPM is available, and the package is NOT already installed, then + we simply install it using the RPM and move on to the next package. + + d: if the RPM is absent: + 1: we verify if the source tarbal is available from the SOURCES "vault" + 2: if it is not, we download the tarball using the specified URL. + 3: we then proceed with the extraction, patching, configuration, + compilation, RPM generation, TGZ generation and installation of the + package. + + Important notices: + - The generated RPM is always used for the installation, not the TGZ file. + + - The compressed tarball (.tgz) file is generated for systems where + using rpm for installing packages as a non-root user might be a problem. + + - The .rpm files will be located under the directory + $WM_THIRD_PARTY_DIR/rpmBuild/RPMS + + - The .tgz files will be located under the directory + $WM_THIRD_PARTY_DIR/rpmBuild/TGZS + + e: The default installation root directory is "$WM_THIRD_PARTY_DIR". + This can be overridden though when installing the RPM. + + f: Through the modification of the AllMake.stage[1-4] scripts, it is + possible to specify a modified version of a .spec file for a given + package in order to tweak its local compilation or installation. + + The modified .spec file will have to be installed under the SPECS + directory, and the corresponding invocation or the command rpm_make in + the AllMake.stage[1-4] file will need to be modified accordingly. + + +4: Relocating the RPM root installation directory: +-------------------------------------------------- + +Warning: This section is a bit advanced, and as of yet, I have no evidence that + this feature has ever been used by anybody. So please feel free to skip + this section if you don't need to relocate your ThirdParty packages + installation directory, which you should not have do on most + installation anyway. + + a: All the generated RPMs can be relocated, meaning that you can override + the hard-coded root installation directory when using those RPMs for + installation. + + b: You can check that the RPM is relocatable by using the command rpm -qip + thePackage.rpm. For example, from the cmake-2.8.3 package generated on one + of my machines, I will get: + + > rpm -qip cmake-2.8.3-darwinIntelGccDPOpt.i386.rpm| grep Relocations + Name : cmake Relocations: /home/beaudoin/foam/foam-extend-3.1/ThirdParty + + The Relocations path is the actual location pointed by the + $WM_THIRD_PARTY_DIR on my virtual machine when I generated the RPM. It is + the indication that the RPM is relocatable. This path will end up being + hardcoded in the RPM because the environment variable was expanded before + generating the RPM. + + This is the default root directory where the RPM will install its + "payload". This can be overridden using the 'rpm' command-line parameter + --relocate OLDPATH=NEWPATH . + + For example, let's say I want to install my cmake-2.8.3 RPM under the root + directory /tmp/someDir instead. I will need to call the 'rpm' command like + this: + + rpm -ivh ./cmake-2.8.3-darwinIntelGccDPOpt.i386.rpm \ + --relocate /home/beaudoin/foam/foam-extend-3.1/ThirdParty=/tmp/someDir + + Even better, you can dig down the hard-coded path even deeper in order to + relocate the whole installation directory, down to the last hard-coded + subdirectory. + Just specify the whole path when using the --relocate parameter + So basically, you can install the RPM right under /usr if you want, hence + bypassing the default sequence of package subdirectories I have chosen in + order to stay close to the "traditional" ThirdParty layout. + + +5: Things to do: +---------------- + a: Testing testing testing. This prototype was tested on the following + platforms: + + Centos 5.5 64-bit (RPM based) + Mac OS X 10.6 (Snow Leopard) (non RPM based) + OpenSUSE 11.3 64-bit (RPM based) + RedHat Enterprise Linux 6 64-bit (RPM based) + Ubuntu 10.04 32-bit (non RPM based) + Ubuntu 10.04 64-bit (non RPM based) + + b: Maybe adding some RPM dependencies might be useful. I have not explored + this yet. + + c: Supplying compilation recipes with the source code for various OSes. + Lots of traffic on the Forum about this. This does not need to be that + complicated. + + + +6: Gotchas and solutions: +------------------------- + + 1: It was reported that version 5.2.0 of rpm does not work well with the provided scripts. + rpm version 5.2.1 is working nicely. + + + 2: Error messages from rpm: + + Problem : error: can't create transaction lock on /var/lock/rpm/transaction + + Solution: add the following entry in your file ~/.rpmmacros + + %_rpmlock_path %{_dbpath}/__db.000 + + +7: Reporting errors: +-------------------- + + Please report ThirdParty packages related bugs to the Bug tracking system + for foam-extend-3.1 + http://sourceforge.net/apps/mantisbt/openfoam-extend/main_page.php + + + +Martin Beaudoin +Rev 0: 05/2011 +Rev 1: 08/2011 +Rev 2: 05/2014 diff --git a/ThirdParty/mingwBuild/build.sh b/ThirdParty/mingwBuild/build.sh new file mode 100644 index 0000000..c27199f --- /dev/null +++ b/ThirdParty/mingwBuild/build.sh @@ -0,0 +1,296 @@ +#!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | foam-extend: Open Source CFD +# \\ / O peration | Version: 3.2 +# \\ / A nd | Web: http://www.foam-extend.org +# \\/ M anipulation | For copyright notice see file Copyright +#------------------------------------------------------------------------------ +# License +# This file is part of foam-extend. +# +# foam-extend is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# foam-extend is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with foam-extend. If not, see . +# +# Script +# build.sh +# +# Description +# Downloads, extracts, builds and installs thirdy-party dependencies. +# +# Author: +# Cesare Guardino, Alstom Power Ltd., (2015) +# +#------------------------------------------------------------------------------ + +# {{{ DEFINE UTILITY FUNCTIONS +download() { + file=$1 + url=$2 + + if [ -f $BUILD_HOME/downloads/$file ] ; then + echo "Using already existing file $BUILD_HOME/downloads/$file" + else + wget --no-check-certificate $url -O $BUILD_HOME/downloads/$file + fi +} + +extract() { + file=$1 + program=$2 + + cp -p $BUILD_HOME/downloads/$file . + package=`basename $file` + if [ "$program" = "7zip" ] ; then + "$ZIP_EXE" x $package + else + $program -cd $package | tar xvf - + fi + rm $package +} + +unzip_dir() { + dir=$1 + + mkdir $dir + cd $dir + extract $dir.zip 7zip + cd .. +} + +patch() { + dir=$1 + + cp -rp $BUILD_HOME/$ARCH/patches/$dir . +} + +mkchk() { + dir=$1 + + if [ ! -d $dir ] ; then + mkdir $dir + fi +} + +mkdel() { + dir=$1 + + rm -rf $dir > /dev/null 2>&1 + mkdir $dir +} +# }}} + +# {{{ DEFINE PROCESS FUNCTIONS +start() { + echo "======================== FOAM-EXTEND THIRD-PARTY DEPENDENCIES WINDOWS BUILD SCRIPT ========================" +} + +initialise() { + echo "" + + if [ ! "$MINGW_HOME" ] ; then + echo "*** ERROR: MINGW_HOME environment variable not specified." + exit 1 + else + echo "Using MINGW_HOME=$MINGW_HOME" + fi + + BUILD_HOME=`pwd` + ZIP_EXE="7z.exe" + ARCH="x64" + + BUILD_DIR=$BUILD_HOME/$ARCH/build + INSTALL_DIR=$BUILD_HOME/$ARCH/install + OUT_DIR=$BUILD_HOME/$ARCH/output + + mkchk $BUILD_HOME/downloads + + echo "" + echo "All stdout/stderr output is redirected to the directory $OUT_DIR" + echo "All builds occur in the directory $BUILD_DIR" + echo "The script will install the completed builds in the directory $INSTALL_DIR" +} + +cleanup() { + echo "" + echo "Removing previous builds ..." + + mkdel $BUILD_DIR + mkdel $INSTALL_DIR + mkdel $OUT_DIR +} + +build_library() { + PACKAGE=$1 + + echo "- Building $PACKAGE ..." + LOG_FILE=$OUT_DIR/$PACKAGE.log + cd $BUILD_DIR + + case $PACKAGE in + + dlfcn-win32-master) + download $PACKAGE.zip https://github.com/dlfcn-win32/dlfcn-win32/archive/master.zip > $LOG_FILE 2>&1 + extract $PACKAGE.zip 7zip >> $LOG_FILE 2>&1 + cd $PACKAGE + ./configure --prefix=$INSTALL_DIR/system >> $LOG_FILE 2>&1 + make >> $LOG_FILE 2>&1 + mkdir $INSTALL_DIR/system + make install >> $LOG_FILE 2>&1 + ;; + + system) + cd $INSTALL_DIR + patch $PACKAGE + ;; + + pthreads-w32-2-9-1-release) + download $PACKAGE.zip ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.zip > $LOG_FILE 2>&1 + unzip_dir $PACKAGE >> $LOG_FILE 2>&1 + patch $PACKAGE + sleep 5 + mv $PACKAGE $INSTALL_DIR + sleep 5 + ;; + + metis-5.1.0) + download $PACKAGE.tar.gz http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/$PACKAGE.tar.gz > $LOG_FILE 2>&1 + extract "$PACKAGE.tar.gz" gzip >> $LOG_FILE 2>&1 + patch $PACKAGE + cd $PACKAGE + mkdir build/windows + cd build/windows + cmake -G "MSYS Makefiles" -DCMAKE_CONFIGURATION-TYPES="Release" -DGKLIB_PATH="../../GKlib" ../.. >> $LOG_FILE 2>&1 + make >> $LOG_FILE 2>&1 + mkdir $INSTALL_DIR/$PACKAGE + mkdir $INSTALL_DIR/$PACKAGE/bin + mkdir $INSTALL_DIR/$PACKAGE/include + mkdir $INSTALL_DIR/$PACKAGE/lib + cp -p programs/*.exe $INSTALL_DIR/$PACKAGE/bin + cp -p ../../include/metis.h $INSTALL_DIR/$PACKAGE/include + cp -p libmetis/libmetis.a $INSTALL_DIR/$PACKAGE/lib + ;; + + parmetis-4.0.3) + download $PACKAGE.tar.gz http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/$PACKAGE.tar.gz > $LOG_FILE 2>&1 + extract "$PACKAGE.tar.gz" gzip >> $LOG_FILE 2>&1 + patch $PACKAGE + cd $PACKAGE + mkdir build/windows + cd build/windows + cmake -G "MSYS Makefiles" -DCMAKE_CONFIGURATION-TYPES="Release" -DGKLIB_PATH="../../metis/GKlib" ../.. >> $LOG_FILE 2>&1 + $BUILD_HOME/parmetis_includes_hack.pl + make >> $LOG_FILE 2>&1 + mkdir $INSTALL_DIR/$PACKAGE + mkdir $INSTALL_DIR/$PACKAGE/bin + mkdir $INSTALL_DIR/$PACKAGE/include + mkdir $INSTALL_DIR/$PACKAGE/lib + cp -p programs/*.exe $INSTALL_DIR/$PACKAGE/bin + cp -p ../../metis/include/metis.h $INSTALL_DIR/$PACKAGE/include + cp -p ../../include/parmetis.h $INSTALL_DIR/$PACKAGE/include + cp -p libmetis/libmetis.a $INSTALL_DIR/$PACKAGE/lib + cp -p libparmetis/libparmetis.a $INSTALL_DIR/$PACKAGE/lib + ;; + + ParMGridGen-1.0) + export EXTRA_SYSTEM_HOME=$INSTALL_DIR/system + download $PACKAGE.tar.gz http://www.mgnet.org/mgnet/Codes/parmgridgen/$PACKAGE.tar.gz > $LOG_FILE 2>&1 + extract "$PACKAGE.tar.gz" gzip >> $LOG_FILE 2>&1 + patch $PACKAGE + cd $PACKAGE + make serial >> $LOG_FILE 2>&1 + make parallel >> $LOG_FILE 2>&1 + mkdir $INSTALL_DIR/$PACKAGE + mkdir $INSTALL_DIR/$PACKAGE/bin + mkdir $INSTALL_DIR/$PACKAGE/include + mkdir $INSTALL_DIR/$PACKAGE/lib + cp -p *.exe $INSTALL_DIR/$PACKAGE/bin + cp -p libmgrid.a $INSTALL_DIR/$PACKAGE/lib + cp -p libparmgrid.a $INSTALL_DIR/$PACKAGE/lib + cp -p MGridGen/IMlib/libIMlib.a $INSTALL_DIR/$PACKAGE/lib + cp -p ParMGridGen/IMParMetis-2.0/libIMparmetis.a $INSTALL_DIR/$PACKAGE/lib + cp -p MGridGen/IMlib/*.h $INSTALL_DIR/$PACKAGE/include + cp -p MGridGen/Lib/*.h $INSTALL_DIR/$PACKAGE/include + export EXTRA_SYSTEM_HOME= + ;; + + scotch_6.0.4) + export PTHREADS_HOME=$INSTALL_DIR/pthreads-w32-2-9-1-release + download $PACKAGE.tar.gz https://gforge.inria.fr/frs/download.php/34618 > $LOG_FILE 2>&1 + extract "$PACKAGE.tar.gz" gzip >> $LOG_FILE 2>&1 + patch $PACKAGE + cd $PACKAGE/src + make scotch >> $LOG_FILE 2>&1 + make ptscotch >> $LOG_FILE 2>&1 + mkdir $INSTALL_DIR/$PACKAGE + make install prefix=$INSTALL_DIR/$PACKAGE >> $PACKAGE.log 2>&1 + export PTHREADS_HOME= + ;; + + mesquite-2.1.2) + export CPPFLAGS=-fpermissive + download $PACKAGE.tar.gz http://downloads.sourceforge.net/project/openfoam-extend/foam-extend-3.0/ThirdParty/$PACKAGE.tar.gz > $LOG_FILE 2>&1 + extract "$PACKAGE.tar.gz" gzip >> $LOG_FILE 2>&1 + cd $PACKAGE + cp -p $MINGW_HOME/bin/libstdc++-6.dll utils + ./configure --prefix=$INSTALL_DIR >> $LOG_FILE 2>&1 + make >> $LOG_FILE 2>&1 + mkdir $INSTALL_DIR/$PACKAGE + make install prefix=$INSTALL_DIR/$PACKAGE >> $LOG_FILE 2>&1 + export CPPFLAGS= + ;; + + *) + echo "*** ERROR: Unknown package '$PACKAGE'" + exit 1 + ;; + esac +} + +build_libraries() { + echo "" + echo "Building libraries ..." + build_library dlfcn-win32-master + build_library system + build_library pthreads-w32-2-9-1-release + build_library metis-5.1.0 + build_library parmetis-4.0.3 + build_library ParMGridGen-1.0 + build_library scotch_6.0.4 + build_library mesquite-2.1.2 +} + +create_dirs() { + echo "" + echo "Checking for build directories and creating them if required ..." + + mkchk $BUILD_DIR + mkchk $INSTALL_DIR + mkchk $OUT_DIR +} + +finish() { + echo "" + echo "All done!" +} +# }}} + +# {{{ MAIN EXECUTION +cd ${0%/*} || exit 1 # run from this directory +start +initialise +mkchk $ARCH +cleanup +build_libraries +finish +# }}} diff --git a/ThirdParty/mingwBuild/clean.sh b/ThirdParty/mingwBuild/clean.sh new file mode 100644 index 0000000..dade716 --- /dev/null +++ b/ThirdParty/mingwBuild/clean.sh @@ -0,0 +1,83 @@ +#!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | foam-extend: Open Source CFD +# \\ / O peration | Version: 3.2 +# \\ / A nd | Web: http://www.foam-extend.org +# \\/ M anipulation | For copyright notice see file Copyright +#------------------------------------------------------------------------------ +# License +# This file is part of foam-extend. +# +# foam-extend is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# foam-extend is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with foam-extend. If not, see . +# +# Script +# clean.sh +# +# Description +# Removes previous thirdy-party dependencies build directories +# (does not remove installed packages directory) +# +# Author: +# Cesare Guardino, Alstom Power Ltd., (2015) +# +#------------------------------------------------------------------------------ + +# {{{ DEFINE UTILITY FUNCTIONS +remove_dir() { + dir=$1 + + rm -rf $dir > /dev/null 2>&1 +} +# }}} + +# {{{ DEFINE PROCESS FUNCTIONS +start() { + echo "======================== FOAM-EXTEND THIRD-PARTY DEPENDENCIES WINDOWS CLEAN SCRIPT ========================" +} + +initialise() { + echo "" + + BUILD_HOME=`pwd` + ARCH="x64" + + BUILD_DIR=$BUILD_HOME/$ARCH/build + INSTALL_DIR=$BUILD_HOME/$ARCH/install + OUT_DIR=$BUILD_HOME/$ARCH/output +} + +cleanup() { + echo "" + echo "Removing previous builds ..." + + remove_dir $BUILD_DIR + remove_dir $INSTALL_DIR + remove_dir $OUT_DIR + remove_dir $BUILD_HOME/downloads +} + +finish() { + echo "" + echo "All done!" +} +# }}} + +# {{{ MAIN EXECUTION +cd ${0%/*} || exit 1 # run from this directory +start +initialise +cleanup +finish +# }}} diff --git a/ThirdParty/mingwBuild/configure_OpenMPI.sh b/ThirdParty/mingwBuild/configure_OpenMPI.sh new file mode 100644 index 0000000..312682e --- /dev/null +++ b/ThirdParty/mingwBuild/configure_OpenMPI.sh @@ -0,0 +1,66 @@ +#!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | foam-extend: Open Source CFD +# \\ / O peration | Version: 3.2 +# \\ / A nd | Web: http://www.foam-extend.org +# \\/ M anipulation | For copyright notice see file Copyright +#------------------------------------------------------------------------------ +# License +# This file is part of foam-extend. +# +# foam-extend is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# foam-extend is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with foam-extend. If not, see . +# +# Script +# configure_OpenMPI.sh +# +# Description +# Generates static OpenMPI library to enable compilation with MINGW toolchain. +# +# Author: +# Cesare Guardino, Alstom Power Ltd., (2015) +# +#------------------------------------------------------------------------------ + +if [ -f "$MPI_ROOTDIR/lib/libmpi.a" ] ; then + echo "$MPI_ROOTDIR/lib/libmpi.a already exists." + exit 1 +fi + +INSTALL=1 +if [ $1 ] ; then + if [ $1 = "--no-install" ] ; then + INSTALL=0 + echo "*** WARNING: Will not install exported libmpi.a and libmpi.def" + fi +fi + +tmp=`echo $RANDOM$RANDOM$RANDOM` +current_dir=`pwd` +mkdir -p /tmp/$tmp +cd /tmp/$tmp + +pexports $MPI_ROOTDIR/bin/libmpi.dll > libmpi.def +dlltool --dllname libmpi.dll --def libmpi.def --output-lib libmpi.a + +if [ $INSTALL -eq 1 ] ; then + mv libmpi.a $MPI_ROOTDIR/lib + mv libmpi.def $MPI_ROOTDIR/lib + cd $current_dir + rm -rf /tmp/$tmp + echo "Installed exported libraries into $MPI_ROOTDIR/lib" +else + cd $current_dir + echo "Exported libraries left in directory /tmp/$tmp" +fi diff --git a/ThirdParty/mingwBuild/parmetis_includes_hack.pl b/ThirdParty/mingwBuild/parmetis_includes_hack.pl new file mode 100644 index 0000000..7def6e3 --- /dev/null +++ b/ThirdParty/mingwBuild/parmetis_includes_hack.pl @@ -0,0 +1,70 @@ +#!/usr/bin/perl +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | foam-extend: Open Source CFD +# \\ / O peration | Version: 3.2 +# \\ / A nd | Web: http://www.foam-extend.org +# \\/ M anipulation | For copyright notice see file Copyright +#------------------------------------------------------------------------------ +# License +# This file is part of foam-extend. +# +# foam-extend is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# foam-extend is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with foam-extend. If not, see . +# +# Script +# parmetis_includes_hack.pl +# +# Description +# Adds OpenMPI lib/includes dirs to CMake-generated GCC options. +# +# Author: +# Cesare Guardino, Alstom Power Ltd., (2015) +# +#------------------------------------------------------------------------------ + +use strict; +use warnings; + +use File::Find; + +my $MPI_ROOTDIR = $ENV{"MPI_ROOTDIR"}; +$MPI_ROOTDIR =~ s/^\/\w//; +my $drive_letter = $&; +$drive_letter =~ s/\///; +$MPI_ROOTDIR = uc($drive_letter) . ":" . $MPI_ROOTDIR; + +my @dirs = ("."); +find(\&wanted, @dirs); + +sub wanted +{ + my $file = $_; + my $path = $File::Find::name; + + if ($file eq "linklibs.rsp" or $file eq "includes_C.rsp") + { + open (FILE, '<', $file) or die ("ERROR: Can't open '$path' [$!]"); + my @contents = ; + close (FILE); + + my $string = ($file eq "linklibs.rsp") ? "-L$MPI_ROOTDIR/lib -lmpi" : "-I$MPI_ROOTDIR/include"; + open (FILE, '>', $file) or die ("ERROR: Can't open '$path' [$!]"); + foreach my $line (@contents) + { + chomp($line); + print FILE $line . $string; + } + close (FILE); + } +} diff --git a/ThirdParty/mingwBuild/x64/patches/ParMGridGen-1.0/MGridGen/IMlib/IMlib.h b/ThirdParty/mingwBuild/x64/patches/ParMGridGen-1.0/MGridGen/IMlib/IMlib.h new file mode 100644 index 0000000..94dcf76 --- /dev/null +++ b/ThirdParty/mingwBuild/x64/patches/ParMGridGen-1.0/MGridGen/IMlib/IMlib.h @@ -0,0 +1,285 @@ +/* + * IMlib.h + * + * Irene's library of most frequently used routines + * + */ + +#ifndef _IMLIB_H_ +#define _IMLIB_H_ + + +/* Undefine the following #define in order to use short int as the idxtype */ +#define IDXTYPE_INT +/* Undefine the following #define in order to use float as the realtype */ +/*#define TYPE_REAL*/ + +/* Indexes are as long as integers for now */ +#ifdef IDXTYPE_INT +typedef int idxtype; +#else +typedef short idxtype; +#endif + +/* floats for now */ +#ifdef TYPE_REAL +typedef float realtype; +#else +typedef double realtype; +#endif + + +/************************************************************************* +* Header file inclusion section +**************************************************************************/ +#include +#include +#include +#include +#include +#include +#include +#include "rand48.h" + +#ifdef DMALLOC +#include +#else +#include +#endif + +/************************************************************************* +* Data structure definition section +**************************************************************************/ +/*------------------------------------------------------------- + * The following data structure stores int key-value pairs + *-------------------------------------------------------------*/ +struct IKeyValueType { + int key; + int val; +}; + +typedef struct IKeyValueType IKeyValueType; + + +/*------------------------------------------------------------- + * The following data structure stores int key-value pairs + *-------------------------------------------------------------*/ +struct idxKeyValueType { + idxtype key; + idxtype val; +}; + +typedef struct idxKeyValueType idxKeyValueType; + + +/*------------------------------------------------------------- + * The following data structure stores int-key - double-value pairs + *-------------------------------------------------------------*/ +struct FKeyValueType { + double key; + int val, val1, val2; +}; + +typedef struct FKeyValueType FKeyValueType; + + +/*------------------------------------------------------------- + * The following data structure stores int-key - double-value pairs + *-------------------------------------------------------------*/ +struct realKeyValueType { + realtype key; + int val, val1, val2; +}; + +typedef struct realKeyValueType realKeyValueType; + +/************************************************************************* +* Definition Section +**************************************************************************/ +#define LTERM (void **) 0 /* List terminator for IMfree() */ + + + +/************************************************************************* +* Macros Section +**************************************************************************/ +/*------------------------------------------------------------- + * Usefull commands + *-------------------------------------------------------------*/ +#define sign(a, b) ((b) >= 0 ? ((a) >= 0.0 ? a : -a) : ((a) >= 0.0 ? -a : a)) +#define amax(a, b) ((a) >= (b) ? (a) : (b)) +#define amin(a, b) ((a) >= (b) ? (b) : (a)) +#define RandomInRange(u) ((int)(drand48()*((double)(u)))) +#define RandomInRangeFast(u) ((rand()>>3)%(u)) +#define SWAP(a, b, tmp) do {(tmp) = (a); (a) = (b); (b) = (tmp);} while(0) +#define INC_DEC(a, b, val) do {(a) += (val); (b) -= (val);} while(0) +#define icopy(n, a, b) (int *)memcpy((void *)(b), (void *)(a), sizeof(int)*(n)) +#define idxcopy(n, a, b) (idxtype *)memcpy((void *)(b), (void *)(a), sizeof(idxtype)*(n)) +#define scopy(n, a, b) (double *)memcpy((void *)(b), (void *)(a), sizeof(double)*(n)) +#define fcopy(n, a, b) (double *)memcpy((void *)(b), (void *)(a), sizeof(double)*(n)) +#define realcopy(n, a, b) (realtype *)memcpy((void *)(b), (void *)(a), sizeof(realtype)*(n)) + + +/*------------------------------------------------------------- + * Timing macros + *-------------------------------------------------------------*/ +#define cleartimer(tmr) (tmr = 0.0) +#define starttimer(tmr) (tmr -= seconds()) +#define stoptimer(tmr) (tmr += seconds()) +#define gettimer(tmr) (tmr) + + +/*------------------------------------------------------------- + * Debuging memory leaks + *-------------------------------------------------------------*/ +#ifdef DMALLOC +#define imalloc(n, msg) (malloc(sizeof(int)*(n))) +#define fmalloc(n, msg) (malloc(sizeof(double)*(n))) +#define idxmalloc(n, msg) ((idxtype *)malloc(sizeof(idxtype)*(n))) +#define realmalloc(n, msg) ((realtype *)malloc(sizeof(realtype)*(n))) +#define ismalloc(n, val, msg) (iset((n), (val), malloc(sizeof(int)*(n)))) +#define idxsmalloc(n, val, msg) (idxset((n), (val), (idxtype *)malloc(sizeof(idxtype)*(n)))) +#define fsmalloc(n, val, msg) (fset((n), (val), malloc(sizeof(double)*(n)))) +#define realsmalloc(n, val, msg) (realset((n), (val), (realtype *)malloc(sizeof(realtype)*(n)))) +#define IMmalloc(a, b) (malloc((a))) +#endif + +#ifdef DMALLOC +# define MALLOC_CHECK(ptr) \ + if (malloc_verify((ptr)) == DMALLOC_VERIFY_ERROR) { \ + printf("***MALLOC_CHECK failed on line %d of file %s: " #ptr "\n", \ + __LINE__, __FILE__); \ + abort(); \ + } +#else +# define MALLOC_CHECK(ptr) ; +#endif + + +/*------------------------------------------------------------- + * CSR conversion macros + *-------------------------------------------------------------*/ +#define MAKECSR(i, n, a) \ + do { \ + for (i=1; i0; i--) a[i] = a[i-1]; \ + a[0] = 0; \ + } while(0) + + +/*------------------------------------------------------------- + * Program Assertions + *-------------------------------------------------------------*/ +#ifdef DEBUG +# define ASSERT(expr) \ + if (!(expr)) { \ + printf("***ASSERTION failed on line %d of file %s: " #expr "\n", \ + __LINE__, __FILE__); \ + abort(); \ + } +#else +# define ASSERT(expr) ; +#endif + +#ifdef DEBUG +# define ASSERTP(expr,msg) \ + if (!(expr)) { \ + printf("***ASSERTION failed on line %d of file %s: " #expr "\n", \ + __LINE__, __FILE__); \ + printf msg ; \ + printf("\n"); \ + abort(); \ + } +#else +# define ASSERTP(expr,msg) ; +#endif + + +/************************************************************************* +* Function prototypes +**************************************************************************/ +/*------------------------------------------------------------- + * blas.c + *-------------------------------------------------------------*/ +int *iset(int, int, int *); +idxtype *idxset(int, idxtype, idxtype *); +double *fset(int, double, double *); +realtype *realset(int, realtype, realtype *); +int iamax(int, int *); +int idxamax(int, idxtype *); +int famax(int, double *); +int iamin(int, int *); +int idxamin(int, idxtype *); +int famin(int, double *); +int charsum(int, char *); +int isum(int, int *); +int idxsum(int, idxtype *); +double ssum(int, double *); +double ssum_strd(int, double *, int); +void sscale(int, double, double *); +double snorm2(int, double *); +double sdot(int, double *, double *); +void saxpy(int, double, double *, int, double *, int); + + +/*------------------------------------------------------------- + * file.c + *-------------------------------------------------------------*/ +FILE *IMfopen(char *, char *, char *); +void IMfclose(FILE *); + +/*------------------------------------------------------------- + * memory.c + *-------------------------------------------------------------*/ +#ifndef DMALLOC +int *imalloc(int, char *); +idxtype *idxmalloc(int, char *); +double *fmalloc(int, char *); +realtype *realmalloc(int, char *); +int *ismalloc(int, int, char *); +idxtype *idxsmalloc(int, idxtype, char *); +double *fsmalloc(int, double, char *); +realtype *realsmalloc(int, realtype, char *); +void *IMmalloc(int, char *); +#endif +/* void IMfree(void **, ...); */ + + +/*------------------------------------------------------------- + * util.c + *-------------------------------------------------------------*/ +void *errexit(char *,...); +int IMlog2(int); +double flog2(double); +int ispow2(int); +double seconds(void); + + +/*------------------------------------------------------------- + * Sorting routines + *-------------------------------------------------------------*/ +void dfkeysort(int, FKeyValueType *); +void dkeysort(int, IKeyValueType *); +void ifkeysort(int, FKeyValueType *); +void ifkeysort2(int, FKeyValueType *); +void ifloatsort(int, double *); +void iintsort(int, int *); +void ikeysort(int, IKeyValueType *); +void idxkeysort(int, idxKeyValueType *); +void ikeysort2(int, IKeyValueType *); +void idxkeysort2(int, idxKeyValueType *); + +/*------------------------------------------------------------- + * sort.c + *-------------------------------------------------------------*/ +void ikeyvalsort_org(int, IKeyValueType *); +int IncKeyValueCmp(const void *, const void *); +void dkeyvalsort(int, IKeyValueType *); +void BucketSortKeysInc(int, idxtype, idxtype *, int *, int *); +int DecKeyValueCmp(const void *, const void *); +int BSearch(int, idxtype *, int); +void RandomPermute(int, idxtype *, int); +void RandomPermuteFine(int, int *, int); +void FastRandomPermute(int, idxtype *, int); + +#endif diff --git a/ThirdParty/mingwBuild/x64/patches/ParMGridGen-1.0/MGridGen/Lib/mgridgen.c b/ThirdParty/mingwBuild/x64/patches/ParMGridGen-1.0/MGridGen/Lib/mgridgen.c new file mode 100644 index 0000000..a678a2c --- /dev/null +++ b/ThirdParty/mingwBuild/x64/patches/ParMGridGen-1.0/MGridGen/Lib/mgridgen.c @@ -0,0 +1,111 @@ +/* + * Copyright 2001, Regents of the University of Minnesota + * + * mgridgen.c + * + * This file contains the top level routines for the sparse hierarchical + * clustering algorithm. + * + * George Irene + */ + +#include "mgridgen.h" +#include "rand48.h" + + +/************************************************************************* +* This function is the entry point for the SHCluster() routine. +**************************************************************************/ +void MGridGen(int nvtxs, idxtype *xadj, realtype *vvol, realtype *vsurf, + idxtype *adjncy, realtype *adjwgt, int minsize, int maxsize, + int *options, int *nmoves, int *nparts, idxtype *part) +{ + GraphType graph; + CtrlType ctrl; + + srand(4321); + srand48(7654321L); + + /*------------------------------------------------------------ + * Set up the various control structures + *------------------------------------------------------------*/ + ctrl.CType = options[OPTION_CTYPE]; + ctrl.RType = options[OPTION_RTYPE]; + ctrl.dbglvl = options[OPTION_DBGLVL]; + ctrl.dim = options[OPTION_DIM]; + ctrl.minsize = minsize; + ctrl.maxsize = maxsize; + ctrl.nparts = -1; + + /*------------------------------------------------------------ + * Set up the graph + *------------------------------------------------------------*/ + SetUpGraph(&graph, nvtxs, xadj, vvol, vsurf, adjncy, adjwgt); + + CreateGrid(&ctrl, &graph); + + *nparts = ctrl.nparts; + icopy(nvtxs, graph.where, part); + *nmoves = graph.nmoves; + + FreeGraph(&graph); +} + + +/************************************************************************* +* This function is the entry point for performing refinement +**************************************************************************/ +void MGridGenRefine(int nvtxs, idxtype *xadj, realtype *vvol, realtype *vsurf, + idxtype *adjncy, idxtype *fusedinfo, realtype *adjwgt, + int minsize, int maxsize, int *options, int *nmoves, + int *nparts, idxtype *part) +{ + int i; + GraphType graph; + CtrlType ctrl; + + srand(4321); + srand48(7654321L); + + /*------------------------------------------------------------ + * Set up the various control structures + *------------------------------------------------------------*/ + ctrl.CType = options[OPTION_CTYPE]; + ctrl.RType = options[OPTION_RTYPE]; + ctrl.dbglvl = options[OPTION_DBGLVL]; + ctrl.dim = options[OPTION_DIM]; + ctrl.minsize = minsize; + ctrl.maxsize = maxsize; + ctrl.nparts = -1; + + /*------------------------------------------------------------ + * Set up the graph + *------------------------------------------------------------*/ + SetUpGraph(&graph, nvtxs, xadj, vvol, vsurf, adjncy, adjwgt); + graph.cmap = NULL; + + graph.where = idxmalloc(graph.nvtxs, "graph.where"); + for (i=0; i>2)%(u)) + +#define amax(a, b) ((a) >= (b) ? (a) : (b)) +#define amin(a, b) ((a) >= (b) ? (b) : (a)) + +#define AND(a, b) ((a) < 0 ? ((-(a))&(b)) : ((a)&(b))) +#define OR(a, b) ((a) < 0 ? -((-(a))|(b)) : ((a)|(b))) +#define XOR(a, b) ((a) < 0 ? -((-(a))^(b)) : ((a)^(b))) + +#define SWAP(a, b, tmp) \ + do {(tmp) = (a); (a) = (b); (b) = (tmp);} while(0) + +#define INC_DEC(a, b, val) \ + do {(a) += (val); (b) -= (val);} while(0) + + +#define scopy(n, a, b) memcpy((b), (a), sizeof(float)*(n)) +#define idxcopy(n, a, b) memcpy((b), (a), sizeof(idxtype)*(n)) +#define realcopy(n, a, b) memcpy((b), (a), sizeof(realtype)*(n)) + + +#define HASHFCT(key, size) ((key)%(size)) + + +/************************************************************************* +* Timer macros +**************************************************************************/ +#define cleartimer(tmr) (tmr = 0.0) +#define starttimer(tmr) (tmr -= MPI_Wtime()) +#define stoptimer(tmr) (tmr += MPI_Wtime()) +#define gettimer(tmr) (tmr) + + +/************************************************************************* +* This macro is used to handle dbglvl +**************************************************************************/ +#define IFSET(a, flag, cmd) if ((a)&(flag)) (cmd); + +/************************************************************************* +* These macros are used for debuging memory leaks +**************************************************************************/ +#ifdef DMALLOC +#define imalloc(n, msg) (malloc(sizeof(int)*(n))) +#define fmalloc(n, msg) (malloc(sizeof(float)*(n))) +#define idxmalloc(n, msg) (malloc(sizeof(idxtype)*(n))) +#define realmalloc(n, msg) ((realtype *)malloc(sizeof(realtype)*(n))) +#define ismalloc(n, val, msg) (iset((n), (val), malloc(sizeof(int)*(n)))) +#define idxsmalloc(n, val, msg) (idxset((n), (val), malloc(sizeof(idxtype)*(n)))) +#define realsmalloc(n, val, msg) (realset((n), (val), (realtype *)malloc(sizeof(realtype)*(n)))) +#define IMmalloc(a, b) (malloc(a)) +#endif + +#ifdef DMALLOC +# define MALLOC_CHECK(ptr) \ + if (malloc_verify((ptr)) == DMALLOC_VERIFY_ERROR) { \ + printf("***MALLOC_CHECK failed on line %d of file %s: " #ptr "\n", \ + __LINE__, __FILE__); \ + abort(); \ + } +#else +# define MALLOC_CHECK(ptr) ; +#endif + +/************************************************************************* +* This macro converts a length array in a CSR one +**************************************************************************/ +#define MAKECSR(i, n, a) \ + do { \ + for (i=1; i0; i--) a[i] = a[i-1]; \ + a[0] = 0; \ + } while(0) + + + + +#ifdef DEBUG +# define ASSERT(ctrl, expr) \ + if (!(expr)) { \ + myprintf(ctrl, "***ASSERTION failed on line %d of file %s: " #expr "\n", \ + __LINE__, __FILE__); \ + abort(); \ + } +#else +# define ASSERT(ctrl, expr) ; +#endif + +#ifdef DEBUG +# define ASSERTP(ctrl, expr,msg) \ + if (!(expr)) { \ + myprintf(ctrl, "***ASSERTION failed on line %d of file %s:" #expr "\n", \ + __LINE__, __FILE__); \ + myprintf msg ; \ + abort(); \ + } +#else +# define ASSERTP(ctrl, expr,msg) ; +#endif + +#ifdef DEBUGS +# define ASSERTS(expr) \ + if (!(expr)) { \ + printf("***ASSERTION failed on line %d of file %s: " #expr "\n", \ + __LINE__, __FILE__); \ + abort(); \ + } +#else +# define ASSERTS(expr) ; +#endif + +#ifdef DEBUGS +# define ASSERTSP(expr, msg) \ + if (!(expr)) { \ + printf("***ASSERTION failed on line %d of file %s: " #expr "\n", \ + __LINE__, __FILE__); \ + printf msg ; \ + abort(); \ + } +#else +# define ASSERTSP(expr, msg) ; +#endif diff --git a/ThirdParty/mingwBuild/x64/patches/ParMGridGen-1.0/ParMGridGen/ParLib/macros.h b/ThirdParty/mingwBuild/x64/patches/ParMGridGen-1.0/ParMGridGen/ParLib/macros.h new file mode 100644 index 0000000..321e07f --- /dev/null +++ b/ThirdParty/mingwBuild/x64/patches/ParMGridGen-1.0/ParMGridGen/ParLib/macros.h @@ -0,0 +1,108 @@ +/* + * Copyright 2001, Regents of the University of Minnesota + * + * macros.h + * + * This file contains macros used in multilevel + * + * George Irene + */ + +#include "rand48.h" + +/************************************************************************* +* This macro is used to normalize the weights of two nodes +**************************************************************************/ +#define ARATIO1(dim, surf, vol) ((dim == 2) ? (pow((surf), 2)/(vol)) : (pow((surf), 1.5)/(vol))) +#define ARATIO(dim, surf, vol) ((dim == 2) ? ((surf)*(surf)/(vol)) : (sqrt((surf)*(surf)*(surf))/(vol))) +#define ARATIO2(dim, surf, vol) ((dim == 2) ? ((surf)*(surf)*(surf)*(surf)/(vol)*(vol)) : ((surf)*(surf)*(surf)/((vol)*(vol)))) + + +/************************************************************************* +* The following macro returns a random number in the specified range +**************************************************************************/ +#define RandomInRange(u) ((int)(drand48()*((double)(u)))) + +#define amax(a, b) ((a) >= (b) ? (a) : (b)) +#define amin(a, b) ((a) >= (b) ? (b) : (a)) + +#define AND(a, b) ((a) < 0 ? ((-(a))&(b)) : ((a)&(b))) +#define OR(a, b) ((a) < 0 ? -((-(a))|(b)) : ((a)|(b))) +#define XOR(a, b) ((a) < 0 ? -((-(a))^(b)) : ((a)^(b))) + +#define SWAP(a, b, tmp) \ + do {(tmp) = (a); (a) = (b); (b) = (tmp);} while(0) + +#define INC_DEC(a, b, val) \ + do {(a) += (val); (b) -= (val);} while(0) + + +#define HASHFCT(key, size) ((key)%(size)) + + +/************************************************************************* +* Timer macros +**************************************************************************/ +#undef cleartimer +#undef starttimer +#undef stoptimer +#undef gettimer +#define cleartimer(tmr) (tmr = 0.0) +#define starttimer(tmr) (tmr -= MPI_Wtime()) +#define stoptimer(tmr) (tmr += MPI_Wtime()) +#define gettimer(tmr) (tmr) + + +/************************************************************************* +* This macro is used to handle dbglvl +**************************************************************************/ +#define IFSET(a, flag, cmd) if ((a)&(flag)) (cmd); + +#undef ASSERT +#undef ASSERTP + +#ifdef DEBUG +# define ASSERT(ctrl, expr) \ + if (!(expr)) { \ + MGridmyprintf(ctrl, "***ASSERTION failed on line %d of file %s: " #expr "\n", \ + __LINE__, __FILE__); \ + abort(); \ + } +#else +# define ASSERT(ctrl, expr) ; +#endif + +#ifdef DEBUG +# define ASSERTP(ctrl, expr,msg) \ + if (!(expr)) { \ + MGridmyprintf(ctrl, "***ASSERTION failed on line %d of file %s:" #expr "\n", \ + __LINE__, __FILE__); \ + MGridmyprintf msg ; \ + abort(); \ + } +#else +# define ASSERTP(ctrl, expr,msg) ; +#endif + +#ifdef DEBUGS +# define ASSERTS(expr) \ + if (!(expr)) { \ + printf("***ASSERTION failed on line %d of file %s: " #expr "\n", \ + __LINE__, __FILE__); \ + abort(); \ + } +#else +# define ASSERTS(expr) ; +#endif + +#ifdef DEBUGS +# define ASSERTSP(expr, msg) \ + if (!(expr)) { \ + printf("***ASSERTION failed on line %d of file %s: " #expr "\n", \ + __LINE__, __FILE__); \ + printf msg ; \ + abort(); \ + } +#else +# define ASSERTSP(expr, msg) ; +#endif diff --git a/ThirdParty/mingwBuild/x64/patches/metis-5.1.0/GKlib/gk_arch.h b/ThirdParty/mingwBuild/x64/patches/metis-5.1.0/GKlib/gk_arch.h new file mode 100644 index 0000000..0ae6ca5 --- /dev/null +++ b/ThirdParty/mingwBuild/x64/patches/metis-5.1.0/GKlib/gk_arch.h @@ -0,0 +1,71 @@ +/*! +\file gk_arch.h +\brief This file contains various architecture-specific declerations + +\date Started 3/27/2007 +\author George +\version\verbatim $Id: gk_arch.h 10711 2011-08-31 22:23:04Z karypis $ \endverbatim +*/ + +#ifndef _GK_ARCH_H_ +#define _GK_ARCH_H_ + +/************************************************************************* +* Architecture-specific differences in header files +**************************************************************************/ +#ifdef LINUX +#if !defined(__USE_XOPEN) +#define __USE_XOPEN +#endif +#if !defined(_XOPEN_SOURCE) +#define _XOPEN_SOURCE 600 +#endif +#if !defined(__USE_XOPEN2K) +#define __USE_XOPEN2K +#endif +#endif + + +#ifdef HAVE_EXECINFO_H +#include +#endif + + +#ifdef __MSC__ + #include "ms_stdint.h" + #include "ms_inttypes.h" + #include "ms_stat.h" +#else +#ifndef SUNOS + #include +#endif + #include + #include +// #include + #include +#endif + + +/************************************************************************* +* Architecture-specific modifications +**************************************************************************/ +#ifdef WIN32 +typedef ptrdiff_t ssize_t; +#endif + + +#ifdef SUNOS +#define PTRDIFF_MAX INT64_MAX +#endif + +#ifdef __MSC__ +/* MSC does not have rint() function */ +#define rint(x) ((int)((x)+0.5)) + +/* MSC does not have INFINITY defined */ +#ifndef INFINITY +#define INFINITY FLT_MAX +#endif +#endif + +#endif diff --git a/ThirdParty/mingwBuild/x64/patches/metis-5.1.0/GKlib/gk_getopt.h b/ThirdParty/mingwBuild/x64/patches/metis-5.1.0/GKlib/gk_getopt.h new file mode 100644 index 0000000..d2b31c4 --- /dev/null +++ b/ThirdParty/mingwBuild/x64/patches/metis-5.1.0/GKlib/gk_getopt.h @@ -0,0 +1,64 @@ +/*! +\file gk_getopt.h +\brief This file contains GNU's externs/structs/prototypes + +\date Started 3/27/2007 +\author George +\version\verbatim $Id: gk_getopt.h 10711 2011-08-31 22:23:04Z karypis $ \endverbatim +*/ + +#ifndef _GK_GETOPT_H_ +#define _GK_GETOPT_H_ + + +/* Externals from getopt.c */ +//extern char *gk_optarg; +//extern int gk_optind; +//extern int gk_opterr; +//extern int gk_optopt; + + +/*! \brief The structure that stores the information about the command-line options + +This structure describes a single long option name for the sake of +gk_getopt_long(). The argument long_options must be an array +of these structures, one for each long option. Terminate the array with +an element containing all zeros. +*/ +struct gk_option { + char *name; /*!< This field is the name of the option. */ + int has_arg; /*!< This field says whether the option takes an argument. + It is an integer, and there are three legitimate values: + no_argument, required_argument and optional_argument. + */ + int *flag; /*!< See the discussion on ::gk_option#val */ + int val; /*!< These fields control how to report or act on the option + when it occurs. + + If flag is a null pointer, then the val is a value which + identifies this option. Often these values are chosen + to uniquely identify particular long options. + + If flag is not a null pointer, it should be the address + of an int variable which is the flag for this option. + The value in val is the value to store in the flag to + indicate that the option was seen. */ +}; + +/* Names for the values of the `has_arg' field of `struct gk_option'. */ +#define no_argument 0 +#define required_argument 1 +#define optional_argument 2 + + +/* Function prototypes */ +//extern int gk_getopt(int __argc, char **__argv, char *__shortopts); +//extern int gk_getopt_long(int __argc, char **__argv, char *__shortopts, +// struct gk_option *__longopts, int *__longind); +//extern int gk_getopt_long_only (int __argc, char **__argv, +// char *__shortopts, struct gk_option *__longopts, int *__longind); + + + +#endif + diff --git a/ThirdParty/mingwBuild/x64/patches/parmetis-4.0.3/metis/GKlib/gk_arch.h b/ThirdParty/mingwBuild/x64/patches/parmetis-4.0.3/metis/GKlib/gk_arch.h new file mode 100644 index 0000000..0ae6ca5 --- /dev/null +++ b/ThirdParty/mingwBuild/x64/patches/parmetis-4.0.3/metis/GKlib/gk_arch.h @@ -0,0 +1,71 @@ +/*! +\file gk_arch.h +\brief This file contains various architecture-specific declerations + +\date Started 3/27/2007 +\author George +\version\verbatim $Id: gk_arch.h 10711 2011-08-31 22:23:04Z karypis $ \endverbatim +*/ + +#ifndef _GK_ARCH_H_ +#define _GK_ARCH_H_ + +/************************************************************************* +* Architecture-specific differences in header files +**************************************************************************/ +#ifdef LINUX +#if !defined(__USE_XOPEN) +#define __USE_XOPEN +#endif +#if !defined(_XOPEN_SOURCE) +#define _XOPEN_SOURCE 600 +#endif +#if !defined(__USE_XOPEN2K) +#define __USE_XOPEN2K +#endif +#endif + + +#ifdef HAVE_EXECINFO_H +#include +#endif + + +#ifdef __MSC__ + #include "ms_stdint.h" + #include "ms_inttypes.h" + #include "ms_stat.h" +#else +#ifndef SUNOS + #include +#endif + #include + #include +// #include + #include +#endif + + +/************************************************************************* +* Architecture-specific modifications +**************************************************************************/ +#ifdef WIN32 +typedef ptrdiff_t ssize_t; +#endif + + +#ifdef SUNOS +#define PTRDIFF_MAX INT64_MAX +#endif + +#ifdef __MSC__ +/* MSC does not have rint() function */ +#define rint(x) ((int)((x)+0.5)) + +/* MSC does not have INFINITY defined */ +#ifndef INFINITY +#define INFINITY FLT_MAX +#endif +#endif + +#endif diff --git a/ThirdParty/mingwBuild/x64/patches/parmetis-4.0.3/metis/GKlib/gk_getopt.h b/ThirdParty/mingwBuild/x64/patches/parmetis-4.0.3/metis/GKlib/gk_getopt.h new file mode 100644 index 0000000..d2b31c4 --- /dev/null +++ b/ThirdParty/mingwBuild/x64/patches/parmetis-4.0.3/metis/GKlib/gk_getopt.h @@ -0,0 +1,64 @@ +/*! +\file gk_getopt.h +\brief This file contains GNU's externs/structs/prototypes + +\date Started 3/27/2007 +\author George +\version\verbatim $Id: gk_getopt.h 10711 2011-08-31 22:23:04Z karypis $ \endverbatim +*/ + +#ifndef _GK_GETOPT_H_ +#define _GK_GETOPT_H_ + + +/* Externals from getopt.c */ +//extern char *gk_optarg; +//extern int gk_optind; +//extern int gk_opterr; +//extern int gk_optopt; + + +/*! \brief The structure that stores the information about the command-line options + +This structure describes a single long option name for the sake of +gk_getopt_long(). The argument long_options must be an array +of these structures, one for each long option. Terminate the array with +an element containing all zeros. +*/ +struct gk_option { + char *name; /*!< This field is the name of the option. */ + int has_arg; /*!< This field says whether the option takes an argument. + It is an integer, and there are three legitimate values: + no_argument, required_argument and optional_argument. + */ + int *flag; /*!< See the discussion on ::gk_option#val */ + int val; /*!< These fields control how to report or act on the option + when it occurs. + + If flag is a null pointer, then the val is a value which + identifies this option. Often these values are chosen + to uniquely identify particular long options. + + If flag is not a null pointer, it should be the address + of an int variable which is the flag for this option. + The value in val is the value to store in the flag to + indicate that the option was seen. */ +}; + +/* Names for the values of the `has_arg' field of `struct gk_option'. */ +#define no_argument 0 +#define required_argument 1 +#define optional_argument 2 + + +/* Function prototypes */ +//extern int gk_getopt(int __argc, char **__argv, char *__shortopts); +//extern int gk_getopt_long(int __argc, char **__argv, char *__shortopts, +// struct gk_option *__longopts, int *__longind); +//extern int gk_getopt_long_only (int __argc, char **__argv, +// char *__shortopts, struct gk_option *__longopts, int *__longind); + + + +#endif + diff --git a/ThirdParty/mingwBuild/x64/patches/pthreads-w32-2-9-1-release/Pre-built.2/include/sched.h b/ThirdParty/mingwBuild/x64/patches/pthreads-w32-2-9-1-release/Pre-built.2/include/sched.h new file mode 100644 index 0000000..17b753d --- /dev/null +++ b/ThirdParty/mingwBuild/x64/patches/pthreads-w32-2-9-1-release/Pre-built.2/include/sched.h @@ -0,0 +1,182 @@ +/* + * Module: sched.h + * + * Purpose: + * Provides an implementation of POSIX realtime extensions + * as defined in + * + * POSIX 1003.1b-1993 (POSIX.1b) + * + * -------------------------------------------------------------------------- + * + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2005 Pthreads-win32 contributors + * + * Contact Email: rpj@callisto.canberra.edu.au + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + */ +#if !defined(_SCHED_H) +#define _SCHED_H + +#undef PTW32_SCHED_LEVEL + +#if defined(_POSIX_SOURCE) +#define PTW32_SCHED_LEVEL 0 +/* Early POSIX */ +#endif + +#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309 +#undef PTW32_SCHED_LEVEL +#define PTW32_SCHED_LEVEL 1 +/* Include 1b, 1c and 1d */ +#endif + +#if defined(INCLUDE_NP) +#undef PTW32_SCHED_LEVEL +#define PTW32_SCHED_LEVEL 2 +/* Include Non-Portable extensions */ +#endif + +#define PTW32_SCHED_LEVEL_MAX 3 + +#if ( defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112 ) || !defined(PTW32_SCHED_LEVEL) +#define PTW32_SCHED_LEVEL PTW32_SCHED_LEVEL_MAX +/* Include everything */ +#endif + + +#if defined(__GNUC__) && !defined(__declspec) +# error Please upgrade your GNU compiler to one that supports __declspec. +#endif + +/* + * When building the library, you should define PTW32_BUILD so that + * the variables/functions are exported correctly. When using the library, + * do NOT define PTW32_BUILD, and then the variables/functions will + * be imported correctly. + */ +#if !defined(PTW32_STATIC_LIB) +# if defined(PTW32_BUILD) +# define PTW32_DLLPORT __declspec (dllexport) +# else +# define PTW32_DLLPORT __declspec (dllimport) +# endif +#else +# define PTW32_DLLPORT +#endif + +/* + * This is a duplicate of what is in the autoconf config.h, + * which is only used when building the pthread-win32 libraries. + */ + +#if !defined(PTW32_CONFIG_H) +# if defined(WINCE) +# define NEED_ERRNO +# define NEED_SEM +# endif +# if defined(__MINGW64__) +# define HAVE_STRUCT_TIMESPEC +# define HAVE_MODE_T +# elif defined(_UWIN) || defined(__MINGW32__) +# define HAVE_MODE_T +# endif +#endif + +/* + * + */ + +#if PTW32_SCHED_LEVEL >= PTW32_SCHED_LEVEL_MAX +#if defined(NEED_ERRNO) +#include "need_errno.h" +#else +#include +#endif +#endif /* PTW32_SCHED_LEVEL >= PTW32_SCHED_LEVEL_MAX */ + +#if (defined(__MINGW64__) || defined(__MINGW32__)) || defined(_UWIN) +# if PTW32_SCHED_LEVEL >= PTW32_SCHED_LEVEL_MAX +/* For pid_t */ +# include +/* Required by Unix 98 */ +# include +# else + typedef __int64 pid_t; +# endif +#else + typedef int pid_t; +#endif + +/* Thread scheduling policies */ + +enum { + SCHED_OTHER = 0, + SCHED_FIFO, + SCHED_RR, + SCHED_MIN = SCHED_OTHER, + SCHED_MAX = SCHED_RR +}; + +struct sched_param { + int sched_priority; +}; + +#if defined(__cplusplus) +extern "C" +{ +#endif /* __cplusplus */ + +PTW32_DLLPORT int __cdecl sched_yield (void); + +PTW32_DLLPORT int __cdecl sched_get_priority_min (int policy); + +PTW32_DLLPORT int __cdecl sched_get_priority_max (int policy); + +PTW32_DLLPORT int __cdecl sched_setscheduler (pid_t pid, int policy); + +PTW32_DLLPORT int __cdecl sched_getscheduler (pid_t pid); + +/* + * Note that this macro returns ENOTSUP rather than + * ENOSYS as might be expected. However, returning ENOSYS + * should mean that sched_get_priority_{min,max} are + * not implemented as well as sched_rr_get_interval. + * This is not the case, since we just don't support + * round-robin scheduling. Therefore I have chosen to + * return the same value as sched_setscheduler when + * SCHED_RR is passed to it. + */ +#define sched_rr_get_interval(_pid, _interval) \ + ( errno = ENOTSUP, (int) -1 ) + + +#if defined(__cplusplus) +} /* End of extern "C" */ +#endif /* __cplusplus */ + +#undef PTW32_SCHED_LEVEL +#undef PTW32_SCHED_LEVEL_MAX + +#endif /* !_SCHED_H */ diff --git a/ThirdParty/mingwBuild/x64/patches/scotch_6.0.0/src/Makefile.inc b/ThirdParty/mingwBuild/x64/patches/scotch_6.0.0/src/Makefile.inc new file mode 100644 index 0000000..c1f17a1 --- /dev/null +++ b/ThirdParty/mingwBuild/x64/patches/scotch_6.0.0/src/Makefile.inc @@ -0,0 +1,70 @@ +# This make include file is intended for building under MinGW32. As is, +# it relies on : +# - pthread-win32 (http://sourceware.org/pthreads-win32/), +# - zlib (http://www.zlib.net/) +# - mpich2 (http://www.mcs.anl.gov/research/projects/mpich2/). +# It must be adapted to reflect your environment, in particular +# installation root directories, include path and library name. +# Since all files are linked with the MPI libraries, this file is +# for compiling PT-Scotch only. To compile Scotch, remove the +# -DSCOTCH_PTSCOTCH flag, as well as all references to MPI in the +# CFLAGS and CLIBFLAGS = +#LDFLAGS variables. + +#MPI_ROOTDIR = /c/Programs/OpenMPI_v1.6.1-x64 + +EXE = +LIB = .a +OBJ = .o + +MAKE = make +AR = ar +ARFLAGS = -ruv +CAT = cat +CCS = gcc +CCP = mpicc +CCD = mpicc -I$(MPI_ROOTDIR)/include + +#--- Compiler/loader flags +CFLAGS_CPL = -O0 -g3 --std=c99 +CFLAGS_INC = +CFLAGS_DEF = -DCOMMON_RANDOM_FIXED_SEED -DCOMMON_STUB_FORK -DSCOTCH_PTSCOTCH -DSCOTCH_RENAME -D'pipe(pfds)=_pipe(pfds,1024,0x8000)' -DHAVE_STDINT_H=0 -DHAVE_UINT_T=1 +CLIBFLAGS = +LDFLAGS = + +PGMFILES=$(PROGRAMFILES) + +#--- MPI +CFLAGS_INC += -I$(MPI_ROOTDIR)/include +#--- Comment/Uncomment for threaded MPI +CLIBFLAGS = +LDFLAGS += -L$(MPI_ROOTDIR)/bin -lm -lmpi -lmpid +#CLIBFLAGS = +#LDFLAGS += -L$(MPI_ROOTDIR)/lib -lm -lmpich2mt + +#--- Pthread : Uncomment for pthread support +#PTHREAD_ROOTDIR = $(PGMFILES)/pthread-win32 +#CFLAGS_INC += -I$(PTHREAD_ROOTDIR)/include +#CLIBFLAGS = +LDFLAGS += -L$(PTHREADS_HOME)/Pre-built.2/lib/x64 -lpthreadGC2 + +#--- zlib: Uncomment for compressed files +#ZLIB_ROOTDIR = $(PGMFILES)/zlib-1.2.3 +#CFLAGS_INC += -I$(ZLIB_ROOTDIR)/include +#CLIBFLAGS = +LDFLAGS += -lz + +#--- COMMON_PTHREAD: Uncomment for compressed files +#CFLAGS_DEF += -DCOMMON_PTHREAD -DCOMMON_FILE_COMPRESS_GZ + +#--- SCOTCH_PTHREAD: Uncomment for threaded MPI +#CFLAGS_DEF += -DSCOTCH_PTHREAD + +CFLAGS = $(CFLAGS_CPL) $(CFLAGS_INC) $(CFLAGS_DEF) +CP = cp +LEX = flex -Pscotchyy -olex.yy.c +LN = cp +MKDIR = mkdir +MV = mv +RANLIB = ranlib +YACC = bison -pscotchyy -y -b y diff --git a/ThirdParty/mingwBuild/x64/patches/scotch_6.0.4/src/Makefile.inc b/ThirdParty/mingwBuild/x64/patches/scotch_6.0.4/src/Makefile.inc new file mode 100644 index 0000000..bfb7e1c --- /dev/null +++ b/ThirdParty/mingwBuild/x64/patches/scotch_6.0.4/src/Makefile.inc @@ -0,0 +1,70 @@ +# This make include file is intended for building under MinGW32. As is, +# it relies on : +# - pthread-win32 (http://sourceware.org/pthreads-win32/), +# - zlib (http://www.zlib.net/) +# - mpich2 (http://www.mcs.anl.gov/research/projects/mpich2/). +# It must be adapted to reflect your environment, in particular +# installation root directories, include path and library name. +# Since all files are linked with the MPI libraries, this file is +# for compiling PT-Scotch only. To compile Scotch, remove the +# -DSCOTCH_PTSCOTCH flag, as well as all references to MPI in the +# CFLAGS and CLIBFLAGS = +#LDFLAGS variables. + +#MPI_ROOTDIR = /c/Programs/OpenMPI_v1.6.1-x64 + +EXE = +LIB = .a +OBJ = .o + +MAKE = make +AR = ar +ARFLAGS = -ruv +CAT = cat +CCS = gcc +CCP = mpicc +CCD = mpicc -I$(MPI_ROOTDIR)/include + +#--- Compiler/loader flags +CFLAGS_CPL = -O0 -g3 --std=c99 +CFLAGS_INC = +CFLAGS_DEF = -DCOMMON_RANDOM_FIXED_SEED -DCOMMON_STUB_FORK -DSCOTCH_PTSCOTCH -DSCOTCH_RENAME -D'pipe(pfds)=_pipe(pfds,1024,0x8000)' -DHAVE_STDINT_H=0 -DHAVE_UINT_T=1 +CLIBFLAGS = +LDFLAGS = + +PGMFILES=$(PROGRAMFILES) + +#--- MPI +CFLAGS_INC += -I$(MPI_ROOTDIR)/include +#--- Comment/Uncomment for threaded MPI +CLIBFLAGS = +LDFLAGS += -L$(MPI_ROOTDIR)/bin -lm -lmpi -lmpid +#CLIBFLAGS = +#LDFLAGS += -L$(MPI_ROOTDIR)/lib -lm -lmpich2mt + +#--- Pthread : Uncomment for pthread support +#PTHREAD_ROOTDIR = $(PGMFILES)/pthread-win32 +#CFLAGS_INC += -I$(PTHREAD_ROOTDIR)/include +#CLIBFLAGS = +LDFLAGS += -L$(PTHREADS_HOME)/Pre-built.2/lib/x64 -lpthreadGC2 + +#--- zlib: Uncomment for compressed files +#ZLIB_ROOTDIR = $(PGMFILES)/zlib-1.2.3 +#CFLAGS_INC += -I$(ZLIB_ROOTDIR)/include +#CLIBFLAGS = +LDFLAGS += -lz + +#--- COMMON_PTHREAD: Uncomment for compressed files +#CFLAGS_DEF += -DCOMMON_PTHREAD -DCOMMON_FILE_COMPRESS_GZ + +#--- SCOTCH_PTHREAD: Uncomment for threaded MPI +CFLAGS_DEF += -DSCOTCH_PTHREAD + +CFLAGS = $(CFLAGS_CPL) $(CFLAGS_INC) $(CFLAGS_DEF) +CP = cp +LEX = flex -Pscotchyy -olex.yy.c +LN = cp +MKDIR = mkdir +MV = mv +RANLIB = ranlib +YACC = bison -pscotchyy -y -b y diff --git a/ThirdParty/mingwBuild/x64/patches/system/include/rand48.h b/ThirdParty/mingwBuild/x64/patches/system/include/rand48.h new file mode 100644 index 0000000..947cdbe --- /dev/null +++ b/ThirdParty/mingwBuild/x64/patches/system/include/rand48.h @@ -0,0 +1,19 @@ +#ifndef RAND48_H +#define RAND48_H + +#define drand48() (rand()*(1./RAND_MAX)) +static long _rand = 1; + +static __inline__ void srand48(long seed) +{ + _rand = seed; +} + +static __inline__ long lrand48(void) +{ + long val = (int)(abs(10000.0*sin(_rand))); + _rand++; + return val; +} + +#endif //RAND48_H diff --git a/ThirdParty/mingwBuild/x64/patches/system/include/sys/times.h b/ThirdParty/mingwBuild/x64/patches/system/include/sys/times.h new file mode 100644 index 0000000..80fc85e --- /dev/null +++ b/ThirdParty/mingwBuild/x64/patches/system/include/sys/times.h @@ -0,0 +1,40 @@ +// From http://www.linuxjournal.com/article/5574 + +#ifndef _TIMES_H +#define _TIMES_H + +#ifdef _WIN32 +#include +#include +#include + +int gettimeofday(struct timeval* t,void* timezone); + +// from linux's sys/times.h + +//#include + +#define __need_clock_t +#include + + +/* Structure describing CPU time used by a process and its children. */ +struct tms + { + clock_t tms_utime; /* User CPU time. */ + clock_t tms_stime; /* System CPU time. */ + + clock_t tms_cutime; /* User CPU time of dead children. */ + clock_t tms_cstime; /* System CPU time of dead children. */ + }; + +/* Store the CPU time used by this process and all its + dead children (and their dead children) in BUFFER. + Return the elapsed real time, or (clock_t) -1 for errors. + All times are in CLK_TCKths of a second. */ +clock_t times (struct tms *__buffer); + +typedef long long suseconds_t ; + +#endif +#endif \ No newline at end of file diff --git a/ThirdParty/rpmBuild/SOURCES/.emptyFileForGit b/ThirdParty/rpmBuild/SOURCES/.emptyFileForGit new file mode 100644 index 0000000..e69de29 diff --git a/ThirdParty/rpmBuild/SOURCES/ParMGridGen-1.0.patch b/ThirdParty/rpmBuild/SOURCES/ParMGridGen-1.0.patch new file mode 100644 index 0000000..394e0b3 --- /dev/null +++ b/ThirdParty/rpmBuild/SOURCES/ParMGridGen-1.0.patch @@ -0,0 +1,140 @@ +diff -ruN ParMGridGen-1.0_orig/Makefile ParMGridGen-1.0/Makefile +--- ParMGridGen-1.0_orig/Makefile 2017-04-04 15:02:44.020713666 +0200 ++++ ParMGridGen-1.0/Makefile 2017-04-04 15:21:48.582647336 +0200 +@@ -1,16 +1,21 @@ + default: ++ (mkdir bin) + (cd MGridGen ; make) + + serial: ++ (mkdir bin) + (cd MGridGen ; make) + + parallel: ++ (mkdir bin) + (cd MGridGen ; make) + (cd ParMGridGen ; make) + clean: ++ (mkdir bin) + (cd MGridGen ; make clean) + (cd ParMGridGen ; make clean ) + + realclean: ++ (mkdir bin) + (cd MGridGen ; make realclean ) + (cd ParMGridGen ; make realclean ) +diff -ruN ParMGridGen-1.0_orig/Makefile.in ParMGridGen-1.0/Makefile.in +--- ParMGridGen-1.0_orig/Makefile.in 2017-04-04 15:02:44.012713543 +0200 ++++ ParMGridGen-1.0/Makefile.in 2017-04-04 15:06:00.159742074 +0200 +@@ -1,6 +1,6 @@ + #-------------------------------------------------------------------------- + # Which make to use +-make = gmake ++make = make + + # Which compiler to use + # CC is the compiler for the serial code +@@ -12,7 +12,7 @@ + OPTFLAGS = -O3 + + # What options to be used by the compiler +-COPTIONS = ++COPTIONS = -fPIC + + # Which loader to use + LD = cc +@@ -22,7 +22,7 @@ + LDOPTIONS = -O3 + + # Where to put the executable +-BINDIR = ../.. ++BINDIR = ../../bin + + # Additional libraries + DMALLOCDIR = /usr/local +@@ -33,22 +33,25 @@ + + # In which directories to look for any additional libraries + LIBDIR = -L../.. \ ++ -L../Lib \ + -L/usr/lib32/ + + # Set some flags + DEBUGFLAGS = + + # What additional libraries to link the programs with (eg., -lmpi) +-LIBS = -lmgrid -lm +-PARLIBS = -lparmgrid -lmgrid -lmpi -lm ++LIBEXT = so ++ ++LIBS = -Xlinker --add-needed -Xlinker --no-as-needed -lMGridGen -lm ++PARLIBS = -Xlinker --add-needed -Xlinker --no-as-needed -lparmgrid -lMGridGen -lmpi -lm + + + # What archiving to use +-AR = ar rv ++AR = gcc -shared -o + + # What to use for indexing the archive + #RANLIB = ranlib +-RANLIB = ar -ts ++RANLIB = true + + #-------------------------------------------------------------------------- + # +diff -ruN ParMGridGen-1.0_orig/MGridGen/IMlib/Makefile ParMGridGen-1.0/MGridGen/IMlib/Makefile +--- ParMGridGen-1.0_orig/MGridGen/IMlib/Makefile 2001-12-04 14:46:56.000000000 -0800 ++++ ParMGridGen-1.0/MGridGen/IMlib/Makefile 2013-08-22 20:03:32.925673296 -0700 +@@ -33,7 +33,7 @@ + .c.o: + $(CC) $(CFLAGS) -c $*.c + +-./libIMlib.a: $(OBJS) ++libIMlib.$(LIBEXT): $(OBJS) + $(AR) $@ $(OBJS) + $(RANLIB) $@ + +@@ -41,4 +41,4 @@ + rm -f *.o + + realclean: +- rm -f *.o ; rm -f ./libIMlib.a ++ rm -f *.o ; rm -f ./libIMlib.$(LIBEXT) +diff -ruN ParMGridGen-1.0_orig/MGridGen/Lib/Makefile ParMGridGen-1.0/MGridGen/Lib/Makefile +--- ParMGridGen-1.0_orig/MGridGen/Lib/Makefile 2001-12-04 15:01:00.000000000 -0800 ++++ ParMGridGen-1.0/MGridGen/Lib/Makefile 2013-08-22 20:03:32.925673296 -0700 +@@ -22,7 +22,7 @@ + INCLUDES = -I./ -I$(IMLIBDIR) $(INCDIR) + CFLAGS = $(COPTIONS) $(OPTFLAGS) $(DEBUGFLAGS) $(INCLUDES) + +-OBJS = coarsen.o kwayfm.o match.o merge.o mgridgen.o refine.o setup.o ++OBJS = aratio.o coarsen.o kwayfm.o match.o merge.o mgridgen.o refine.o setup.o + IOBJS = blas.o dfkeysort.o dkeysort.o file.o ifkeysort.o ifloatsort.o \ + iintsort.o ikeysort.o memory.o sort.o util.o + IMOBJS = $(addprefix ../IMlib/, $(IOBJS)) +@@ -31,7 +31,7 @@ + .c.o: + $(CC) $(CFLAGS) -c $*.c + +-../../libmgrid.a: $(OBJS) $(IMOBJS) ++libMGridGen.$(LIBEXT): $(OBJS) $(IMOBJS) + $(AR) $@ $(OBJS) $(IMOBJS) + $(RANLIB) $@ + +@@ -39,4 +39,4 @@ + rm -f *.o + + realclean: +- rm -f *.o ; rm -f ../../libmgrid.a ++ rm -f *.o ; rm -f ./libMGridGen.$(LIBEXT) +diff -ruN ParMGridGen-1.0_orig/MGridGen/Programs/Makefile ParMGridGen-1.0/MGridGen/Programs/Makefile +--- ParMGridGen-1.0_orig/MGridGen/Programs/Makefile 2001-12-04 15:02:26.000000000 -0800 ++++ ParMGridGen-1.0/MGridGen/Programs/Makefile 2013-08-22 20:03:32.925673296 -0700 +@@ -1,6 +1,6 @@ + include ../../Makefile.in + +-MGRIDLIB = ../../libmgrid.a ++MGRIDLIB = ../Lib/libMGridGen.$(LIBEXT) + + ifeq ($(ddmalloc),yes) + DEBUGFLAGS := $(DEBUGFLAGS) -DDMALLOC -DDEBUG diff --git a/ThirdParty/rpmBuild/SOURCES/ParMGridGen-1.0.patch_64Bit b/ThirdParty/rpmBuild/SOURCES/ParMGridGen-1.0.patch_64Bit new file mode 100644 index 0000000..aa634ec --- /dev/null +++ b/ThirdParty/rpmBuild/SOURCES/ParMGridGen-1.0.patch_64Bit @@ -0,0 +1,38 @@ +--- orig/ParMGridGen-1.0/mgridgen.h 2019-01-15 13:32:54.247812378 +0100 ++++ ParMGridGen-1.0/mgridgen.h 2019-01-15 13:35:03.972952464 +0100 +@@ -1,4 +1,4 @@ +-typedef int idxtype; ++typedef long int idxtype; + typedef double realtype; + + +--- orig/ParMGridGen-1.0/parmgridgen.h 2019-01-15 13:32:54.251812414 +0100 ++++ ParMGridGen-1.0/parmgridgen.h 2019-01-15 13:42:14.344335223 +0100 +@@ -1,4 +1,4 @@ +-typedef int idxtype; ++typedef long int idxtype; + typedef double realtype; + + void ParMGridGen(idxtype *, idxtype *, realtype *, realtype *, idxtype *, +--- orig/ParMGridGen-1.0/ParMGridGen/IMParMetis-2.0/ParMETISLib/struct.h 2019-01-15 13:32:54.247812378 +0100 ++++ ParMGridGen-1.0/ParMGridGen/IMParMetis-2.0/ParMETISLib/struct.h 2019-01-15 13:44:17.605231500 +0100 +@@ -15,7 +15,7 @@ + + /* Indexes are as long as integers for now */ + #ifdef IDXTYPE_INT +-typedef int idxtype; ++typedef long int idxtype; + #define IDX_DATATYPE MPI_INT + #else + typedef short idxtype; +--- orig/ParMGridGen-1.0/MGridGen/IMlib/IMlib.h 2019-01-15 13:32:54.251812414 +0100 ++++ ParMGridGen-1.0/MGridGen/IMlib/IMlib.h 2019-01-15 13:52:11.504522970 +0100 +@@ -16,7 +16,7 @@ + + /* Indexes are as long as integers for now */ + #ifdef IDXTYPE_INT +-typedef int idxtype; ++typedef long int idxtype; + #else + typedef short idxtype; + #endif diff --git a/ThirdParty/rpmBuild/SOURCES/ParMGridGen-1.0.patch_darwin b/ThirdParty/rpmBuild/SOURCES/ParMGridGen-1.0.patch_darwin new file mode 100644 index 0000000..1e8a4bc --- /dev/null +++ b/ThirdParty/rpmBuild/SOURCES/ParMGridGen-1.0.patch_darwin @@ -0,0 +1,165 @@ +diff -ruN ParMGridGen-1.0_orig/MGridGen/IMlib/IMlib.h ParMGridGen-1.0/MGridGen/IMlib/IMlib.h +--- ParMGridGen-1.0_orig/MGridGen/IMlib/IMlib.h 2001-11-08 18:41:25.000000000 -0500 ++++ ParMGridGen-1.0/MGridGen/IMlib/IMlib.h 2011-12-24 13:46:41.000000000 -0500 +@@ -43,7 +43,7 @@ + #ifdef DMALLOC + #include + #else +-#include ++#include + #endif + + /************************************************************************* +diff -ruN ParMGridGen-1.0_orig/MGridGen/IMlib/Makefile ParMGridGen-1.0/MGridGen/IMlib/Makefile +--- ParMGridGen-1.0_orig/MGridGen/IMlib/Makefile 2001-12-04 17:46:56.000000000 -0500 ++++ ParMGridGen-1.0/MGridGen/IMlib/Makefile 2011-12-24 13:24:17.000000000 -0500 +@@ -33,7 +33,7 @@ + .c.o: + $(CC) $(CFLAGS) -c $*.c + +-./libIMlib.a: $(OBJS) ++libIMlib.$(LIBEXT): $(OBJS) + $(AR) $@ $(OBJS) + $(RANLIB) $@ + +@@ -41,4 +41,4 @@ + rm -f *.o + + realclean: +- rm -f *.o ; rm -f ./libIMlib.a ++ rm -f *.o ; rm -f ./libIMlib.$(LIBEXT) +diff -ruN ParMGridGen-1.0_orig/MGridGen/Lib/Makefile ParMGridGen-1.0/MGridGen/Lib/Makefile +--- ParMGridGen-1.0_orig/MGridGen/Lib/Makefile 2001-12-04 18:01:00.000000000 -0500 ++++ ParMGridGen-1.0/MGridGen/Lib/Makefile 2011-12-24 13:24:17.000000000 -0500 +@@ -22,7 +22,7 @@ + INCLUDES = -I./ -I$(IMLIBDIR) $(INCDIR) + CFLAGS = $(COPTIONS) $(OPTFLAGS) $(DEBUGFLAGS) $(INCLUDES) + +-OBJS = coarsen.o kwayfm.o match.o merge.o mgridgen.o refine.o setup.o ++OBJS = aratio.o coarsen.o kwayfm.o match.o merge.o mgridgen.o refine.o setup.o + IOBJS = blas.o dfkeysort.o dkeysort.o file.o ifkeysort.o ifloatsort.o \ + iintsort.o ikeysort.o memory.o sort.o util.o + IMOBJS = $(addprefix ../IMlib/, $(IOBJS)) +@@ -31,7 +31,7 @@ + .c.o: + $(CC) $(CFLAGS) -c $*.c + +-../../libmgrid.a: $(OBJS) $(IMOBJS) ++libMGridGen.$(LIBEXT): $(OBJS) $(IMOBJS) + $(AR) $@ $(OBJS) $(IMOBJS) + $(RANLIB) $@ + +@@ -39,4 +39,4 @@ + rm -f *.o + + realclean: +- rm -f *.o ; rm -f ../../libmgrid.a ++ rm -f *.o ; rm -f ./libMGridGen.$(LIBEXT) +diff -ruN ParMGridGen-1.0_orig/MGridGen/Lib/mgridgen.h ParMGridGen-1.0/MGridGen/Lib/mgridgen.h +--- ParMGridGen-1.0_orig/MGridGen/Lib/mgridgen.h 2001-11-08 18:41:25.000000000 -0500 ++++ ParMGridGen-1.0/MGridGen/Lib/mgridgen.h 2011-12-24 13:48:18.000000000 -0500 +@@ -26,7 +26,7 @@ + #ifdef DMALLOC + #include + #else +-#include ++#include + #endif + + #include "defs.h" +diff -ruN ParMGridGen-1.0_orig/MGridGen/Programs/Makefile ParMGridGen-1.0/MGridGen/Programs/Makefile +--- ParMGridGen-1.0_orig/MGridGen/Programs/Makefile 2001-12-04 18:02:26.000000000 -0500 ++++ ParMGridGen-1.0/MGridGen/Programs/Makefile 2011-12-24 13:24:17.000000000 -0500 +@@ -1,6 +1,6 @@ + include ../../Makefile.in + +-MGRIDLIB = ../../libmgrid.a ++MGRIDLIB = ../Lib/libMGridGen.$(LIBEXT) + + ifeq ($(ddmalloc),yes) + DEBUGFLAGS := $(DEBUGFLAGS) -DDMALLOC -DDEBUG +diff -ruN ParMGridGen-1.0_orig/Makefile.in ParMGridGen-1.0/Makefile.in +--- ParMGridGen-1.0_orig/Makefile.in 2001-12-05 01:30:33.000000000 +0100 ++++ ParMGridGen-1.0/Makefile.in 2017-04-04 15:36:04.695980033 +0200 +@@ -1,6 +1,6 @@ + #-------------------------------------------------------------------------- + # Which make to use +-make = gmake ++make = make + + # Which compiler to use + # CC is the compiler for the serial code +@@ -12,7 +12,7 @@ + OPTFLAGS = -O3 + + # What options to be used by the compiler +-COPTIONS = ++COPTIONS = -fPIC + + # Which loader to use + LD = cc +@@ -22,7 +22,7 @@ + LDOPTIONS = -O3 + + # Where to put the executable +-BINDIR = ../.. ++BINDIR = ../../bin + + # Additional libraries + DMALLOCDIR = /usr/local +@@ -33,22 +33,25 @@ + + # In which directories to look for any additional libraries + LIBDIR = -L../.. \ +- -L/usr/lib32/ ++ -L../Lib \ ++ -L/usr/lib/ + + # Set some flags + DEBUGFLAGS = + + # What additional libraries to link the programs with (eg., -lmpi) +-LIBS = -lmgrid -lm +-PARLIBS = -lparmgrid -lmgrid -lmpi -lm ++LIBEXT = dylib ++ ++LIBS = -lMGridGen -lm ++PARLIBS = -lparmgrid -lMGridGen -lmpi -lm + + + # What archiving to use +-AR = ar rv ++AR = clang -dynamiclib -headerpad_max_install_names -undefined dynamic_lookup -shared -o + + # What to use for indexing the archive + #RANLIB = ranlib +-RANLIB = ar -ts ++RANLIB = true + + #-------------------------------------------------------------------------- + # +diff -ruN ParMGridGen-1.0_orig/Makefile ParMGridGen-1.0/Makefile +--- ParMGridGen-1.0_orig/Makefile 2001-11-09 00:41:22.000000000 +0100 ++++ ParMGridGen-1.0/Makefile 2017-04-04 14:51:04.033914737 +0200 +@@ -1,16 +1,21 @@ + default: ++ (mkdir bin) + (cd MGridGen ; make) + + serial: ++ (mkdir bin) + (cd MGridGen ; make) + + parallel: ++ (mkdir bin) + (cd MGridGen ; make) + (cd ParMGridGen ; make) + clean: ++ (mkdir bin) + (cd MGridGen ; make clean) + (cd ParMGridGen ; make clean ) + + realclean: ++ (mkdir bin) + (cd MGridGen ; make realclean ) + (cd ParMGridGen ; make realclean ) diff --git a/ThirdParty/rpmBuild/SOURCES/ParMetis-3.1.1.patch b/ThirdParty/rpmBuild/SOURCES/ParMetis-3.1.1.patch new file mode 100644 index 0000000..6639c7f --- /dev/null +++ b/ThirdParty/rpmBuild/SOURCES/ParMetis-3.1.1.patch @@ -0,0 +1,97 @@ +diff -ruN ParMetis-3.1.1-orig/METISLib/Makefile ParMetis-3.1.1/METISLib/Makefile +--- ParMetis-3.1.1-orig/METISLib/Makefile 2007-03-19 13:46:34.000000000 -0400 ++++ ParMetis-3.1.1/METISLib/Makefile 2010-10-29 12:21:47.000000000 -0400 +@@ -19,7 +19,7 @@ + .c.o: + $(CC) $(CFLAGS) -c $*.c + +-../libmetis.a: $(OBJS) ++libmetis-parmetis.$(LIB_EXT): $(OBJS) + $(AR) $@ $(OBJS) + $(RANLIB) $@ + +@@ -27,7 +27,7 @@ + rm -f *.o + + realclean: +- rm -f *.o ; rm -f ../libmetis.a ++ rm -f *.o ; rm -f libmetis-parmetis.$(LIB_EXT) + + + checkin: + +diff -ruN ParMetis-3.1.1-orig/Makefile.in ParMetis-3.1.1/Makefile.in +--- ParMetis-3.1.1-orig/Makefile.in 2008-11-17 18:47:06.000000000 -0500 ++++ ParMetis-3.1.1/Makefile.in 2010-10-29 12:06:46.000000000 -0400 +@@ -4,7 +4,7 @@ + + + # What optimization level to use +-OPTFLAGS = -O3 ++OPTFLAGS = -O3 -fPIC + + # Include directories for the compiler + INCDIR = +@@ -22,11 +22,14 @@ + #XTRALIBS = -lefence + #XTRALIBS = -ldmalloc + ++# Dynamic lib extension ++LIB_EXT = so ++ + # What archiving to use +-AR = ar rv ++AR = gcc -shared -o + + # What to use for indexing the archive + #RANLIB = ranlib +-RANLIB = ar -ts ++RANLIB = true + + VERNUM = +diff -ruN ParMetis-3.1.1-orig/ParMETISLib/Makefile ParMetis-3.1.1/ParMETISLib/Makefile +--- ParMetis-3.1.1-orig/ParMETISLib/Makefile 2008-11-17 17:43:23.000000000 -0500 ++++ ParMetis-3.1.1/ParMETISLib/Makefile 2010-10-29 12:07:44.000000000 -0400 +@@ -22,7 +22,7 @@ + $(CC) $(CFLAGS) -c $*.c + + +-../libparmetis.a: $(OBJS) ++libparmetis.$(LIB_EXT): $(OBJS) + $(AR) $@ $(OBJS) + $(RANLIB) $@ + +@@ -30,7 +30,7 @@ + rm -f *.o + + realclean: +- rm -f *.o ; rm -f ../libparmetis.a ++ rm -f *.o ; rm -f ./libparmetis.$(LIB_EXT) + + + checkin: + +diff -ruN ParMetis-3.1.1-orig/Programs/Makefile ParMetis-3.1.1/Programs/Makefile +--- ParMetis-3.1.1-orig/Programs/Makefile 2008-11-17 18:47:06.000000000 -0500 ++++ ParMetis-3.1.1/Programs/Makefile 2010-10-29 12:27:24.000000000 -0400 +@@ -6,9 +6,9 @@ + CFLAGS = $(COPTIONS) $(OPTFLAGS) $(INCLUDES) + + +-LIBSDIR = -L.. $(LIBDIR) +-LIBS = -lparmetis -lmetis $(XTRALIBS) -lm +-PARMETISLIB = ../libparmetis.a ../libmetis.a ++LIBSDIR = -L../METISLib -L../ParMETISLib $(LIBDIR) ++LIBS = -lparmetis -lmetis-parmetis $(XTRALIBS) -lm ++PARMETISLIB = ../ParMETISLib/libparmetis.$(LIB_EXT) ../METISLib/libmetis-parmetis.$(LIB_EXT) + + + PTESTOBJS = ptest.o io.o adaptgraph.o +@@ -16,7 +16,6 @@ + PARMETISOBJS = parmetis.o io.o adaptgraph.o + POMETISOBJS = pometis.o io.o + +- + .c.o: + $(CC) $(CFLAGS) -c $*.c + diff --git a/ThirdParty/rpmBuild/SOURCES/ParMetis-3.1.1.patch_64Bit b/ThirdParty/rpmBuild/SOURCES/ParMetis-3.1.1.patch_64Bit new file mode 100644 index 0000000..0d26849 --- /dev/null +++ b/ThirdParty/rpmBuild/SOURCES/ParMetis-3.1.1.patch_64Bit @@ -0,0 +1,11 @@ +--- orig/parmetis-4.0.3/metis/include/metis.h 2019-01-15 12:40:31.050842343 +0100 ++++ parmetis-4.0.3/metis/include/metis.h 2019-01-15 12:43:01.883662756 +0100 +@@ -30,7 +30,7 @@ + GCC does provides these definitions in stdint.h, but it may require some + modifications on other architectures. + --------------------------------------------------------------------------*/ +-#define IDXTYPEWIDTH 32 ++#define IDXTYPEWIDTH 64 + + + /*-------------------------------------------------------------------------- diff --git a/ThirdParty/rpmBuild/SOURCES/ParMetis-3.1.1.patch_darwin b/ThirdParty/rpmBuild/SOURCES/ParMetis-3.1.1.patch_darwin new file mode 100644 index 0000000..a6ff2d7 --- /dev/null +++ b/ThirdParty/rpmBuild/SOURCES/ParMetis-3.1.1.patch_darwin @@ -0,0 +1,110 @@ +diff -ruN ParMetis-3.1.1_orig/METISLib/Makefile ParMetis-3.1.1/METISLib/Makefile +--- ParMetis-3.1.1_orig/METISLib/Makefile 2007-03-19 13:46:34.000000000 -0400 ++++ ParMetis-3.1.1/METISLib/Makefile 2011-12-24 15:06:49.000000000 -0500 +@@ -19,7 +19,7 @@ + .c.o: + $(CC) $(CFLAGS) -c $*.c + +-../libmetis.a: $(OBJS) ++libmetis-parmetis.$(LIB_EXT): $(OBJS) + $(AR) $@ $(OBJS) + $(RANLIB) $@ + +@@ -27,7 +27,7 @@ + rm -f *.o + + realclean: +- rm -f *.o ; rm -f ../libmetis.a ++ rm -f *.o ; rm -f libmetis-parmetis.$(LIB_EXT) + + + checkin: +diff -ruN ParMetis-3.1.1_orig/Makefile.in ParMetis-3.1.1/Makefile.in +--- ParMetis-3.1.1_orig/Makefile.in 2008-11-17 18:47:06.000000000 -0500 ++++ ParMetis-3.1.1/Makefile.in 2011-12-24 15:06:49.000000000 -0500 +@@ -10,7 +10,7 @@ + INCDIR = + + # What options to be used by the compiler +-COPTIONS = -DNDEBUG ++COPTIONS = -DNDEBUG -fPIC + + # Which loader to use + LD = $(CC) +@@ -22,11 +22,14 @@ + #XTRALIBS = -lefence + #XTRALIBS = -ldmalloc + ++# Dynamic lib extension ++LIB_EXT = dylib ++ + # What archiving to use +-AR = ar rv ++AR = gcc -dynamiclib -undefined dynamic_lookup -shared -o + + # What to use for indexing the archive + #RANLIB = ranlib +-RANLIB = ar -ts ++RANLIB = true + + VERNUM = +diff -ruN ParMetis-3.1.1_orig/ParMETISLib/Makefile ParMetis-3.1.1/ParMETISLib/Makefile +--- ParMetis-3.1.1_orig/ParMETISLib/Makefile 2008-11-17 17:43:23.000000000 -0500 ++++ ParMetis-3.1.1/ParMETISLib/Makefile 2011-12-24 15:06:49.000000000 -0500 +@@ -22,7 +22,7 @@ + $(CC) $(CFLAGS) -c $*.c + + +-../libparmetis.a: $(OBJS) ++libparmetis.$(LIB_EXT): $(OBJS) + $(AR) $@ $(OBJS) + $(RANLIB) $@ + +@@ -30,7 +30,7 @@ + rm -f *.o + + realclean: +- rm -f *.o ; rm -f ../libparmetis.a ++ rm -f *.o ; rm -f ./libparmetis.$(LIB_EXT) + + + checkin: +diff -ruN ParMetis-3.1.1_orig/ParMETISLib/stdheaders.h ParMetis-3.1.1/ParMETISLib/stdheaders.h +--- ParMetis-3.1.1_orig/ParMETISLib/stdheaders.h 2008-09-16 17:39:19.000000000 -0400 ++++ ParMetis-3.1.1/ParMETISLib/stdheaders.h 2011-12-24 15:07:42.000000000 -0500 +@@ -13,8 +13,11 @@ + + + #include ++#ifdef __STDC__ + #include ++#else + #include ++#endif + #include + #include + #include +diff -ruN ParMetis-3.1.1_orig/Programs/Makefile ParMetis-3.1.1/Programs/Makefile +--- ParMetis-3.1.1_orig/Programs/Makefile 2008-11-17 18:47:06.000000000 -0500 ++++ ParMetis-3.1.1/Programs/Makefile 2011-12-24 15:06:49.000000000 -0500 +@@ -6,9 +6,9 @@ + CFLAGS = $(COPTIONS) $(OPTFLAGS) $(INCLUDES) + + +-LIBSDIR = -L.. $(LIBDIR) +-LIBS = -lparmetis -lmetis $(XTRALIBS) -lm +-PARMETISLIB = ../libparmetis.a ../libmetis.a ++LIBSDIR = -L../METISLib -L../ParMETISLib $(LIBDIR) ++LIBS = -lparmetis -lmetis-parmetis $(XTRALIBS) -lm ++PARMETISLIB = ../ParMETISLib/libparmetis.$(LIB_EXT) ../METISLib/libmetis-parmetis.$(LIB_EXT) + + + PTESTOBJS = ptest.o io.o adaptgraph.o +@@ -16,7 +16,6 @@ + PARMETISOBJS = parmetis.o io.o adaptgraph.o + POMETISOBJS = pometis.o io.o + +- + .c.o: + $(CC) $(CFLAGS) -c $*.c + diff --git a/ThirdParty/rpmBuild/SOURCES/ParaView-3.12.0.patch_darwin b/ThirdParty/rpmBuild/SOURCES/ParaView-3.12.0.patch_darwin new file mode 100644 index 0000000..cc6942b --- /dev/null +++ b/ThirdParty/rpmBuild/SOURCES/ParaView-3.12.0.patch_darwin @@ -0,0 +1,12 @@ +diff -ruN ParaView-3.12.0_orig/Applications/ParaView-3.12.0_extra_install_Darwin.cmake ParaView-3.12.0/Applications/ParaView-3.12.0_extra_install_Darwin.cmake +--- ParaView-3.12.0_orig/Applications/ParaView-3.12.0_extra_install_Darwin.cmake 1969-12-31 19:00:00.000000000 -0500 ++++ ParaView-3.12.0/Applications/ParaView-3.12.0_extra_install_Darwin.cmake 2010-11-06 19:34:12.000000000 -0400 +@@ -0,0 +1,8 @@ ++# ++# Additional install rules for Mac OS X platforms ++# ++INSTALL (DIRECTORY ../../buildObj/bin/paraview.app ++ DESTINATION ${PV_INSTALL_BIN_DIR} ++ USE_SOURCE_PERMISSIONS ++ COMPONENT Runtime) ++ diff --git a/ThirdParty/rpmBuild/SOURCES/ParaView-3.14.1.patch_0_ParaView.git_0f43430 b/ThirdParty/rpmBuild/SOURCES/ParaView-3.14.1.patch_0_ParaView.git_0f43430 new file mode 100644 index 0000000..682a203 --- /dev/null +++ b/ThirdParty/rpmBuild/SOURCES/ParaView-3.14.1.patch_0_ParaView.git_0f43430 @@ -0,0 +1,243901 @@ +diff -x .git -ruN orig/Applications/ParaView/ParaViewFilters.xml git_0f43430/Applications/ParaView/ParaViewFilters.xml +--- orig/Applications/ParaView/ParaViewFilters.xml 2012-04-02 12:55:26.000000000 -0400 ++++ git_0f43430/Applications/ParaView/ParaViewFilters.xml 2012-04-20 23:43:06.000000000 -0400 +@@ -63,9 +63,30 @@ + + + +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -83,9 +104,6 @@ + + + +- +- +- + + + +@@ -100,10 +118,8 @@ + + + +- + + +- + + + +@@ -115,7 +131,7 @@ + + + +- ++ + + + +@@ -140,6 +156,7 @@ + + + ++ + + + +diff -x .git -ruN orig/Applications/ParaView/ParaViewReaders.xml git_0f43430/Applications/ParaView/ParaViewReaders.xml +--- orig/Applications/ParaView/ParaViewReaders.xml 2012-04-02 12:55:26.000000000 -0400 ++++ git_0f43430/Applications/ParaView/ParaViewReaders.xml 2012-04-20 23:43:06.000000000 -0400 +@@ -70,4 +70,6 @@ + + + ++ ++ + +diff -x .git -ruN orig/Applications/ParaView/ParaViewSources.xml git_0f43430/Applications/ParaView/ParaViewSources.xml +--- orig/Applications/ParaView/ParaViewSources.xml 2012-04-02 12:55:26.000000000 -0400 ++++ git_0f43430/Applications/ParaView/ParaViewSources.xml 2012-04-20 23:43:06.000000000 -0400 +@@ -24,4 +24,5 @@ + + + ++ + +diff -x .git -ruN orig/Applications/ParaView/Testing/Python/CMakeLists.txt git_0f43430/Applications/ParaView/Testing/Python/CMakeLists.txt +--- orig/Applications/ParaView/Testing/Python/CMakeLists.txt 2012-04-02 12:56:24.000000000 -0400 ++++ git_0f43430/Applications/ParaView/Testing/Python/CMakeLists.txt 2012-04-20 23:43:06.000000000 -0400 +@@ -79,4 +79,32 @@ + + # TODO: remote rendering tests and reverse connect tests. + ++# only enable TestPythonAnnotationFilter test if numpy is available ++include("TestNumPy") ++ ++IF ("1" STREQUAL ${HAS_NUMPY}) ++ # Add pvpython tests ++ add_test("pvpython.TestPythonAnnotationFilter" ++ ${PARAVIEW_PYTHON_EXECUTABLE} ++ --data=${PARAVIEW_DATA_ROOT}/Data/can.ex2 ++ ${CMAKE_CURRENT_SOURCE_DIR}/TestPythonAnnotationFilter.py) ++ENDIF ("1" STREQUAL ${HAS_NUMPY}) ++ + ENDIF (PARAVIEW_DATA_ROOT) ++ ++# Python Multi-servers test ++add_test("py-multi-servers.TestMultiServersConfig" ++ ${PARAVIEW_SMTESTDRIVER_EXECUTABLE} ++ --test-multi-servers 2 ++ --server ${PARAVIEW_SERVER_EXECUTABLE} ++ --client ${PARAVIEW_PYTHON_EXECUTABLE} ++ ${CMAKE_CURRENT_SOURCE_DIR}/TestMultiServersConfig.py ++) ++ ++add_test("py-multi-servers.TestMultiServersRemoteProxy" ++ ${PARAVIEW_SMTESTDRIVER_EXECUTABLE} ++ --test-multi-servers 3 ++ --server ${PARAVIEW_SERVER_EXECUTABLE} ++ --client ${PARAVIEW_PYTHON_EXECUTABLE} ++ ${CMAKE_CURRENT_SOURCE_DIR}/TestMultiServersRemoteProxy.py ++) +diff -x .git -ruN orig/Applications/ParaView/Testing/Python/TestMultiServersConfig.py git_0f43430/Applications/ParaView/Testing/Python/TestMultiServersConfig.py +--- orig/Applications/ParaView/Testing/Python/TestMultiServersConfig.py 1969-12-31 19:00:00.000000000 -0500 ++++ git_0f43430/Applications/ParaView/Testing/Python/TestMultiServersConfig.py 2012-04-20 23:43:06.000000000 -0400 +@@ -0,0 +1,153 @@ ++from paraview.simple import * ++from paraview import servermanager ++ ++import time ++ ++# Make sure the test driver know that process has properly started ++print "Process started" ++errors = 0 ++ ++#-------------------- Helpers methods ---------------- ++def getHost(url): ++ return url.split(':')[1][2:] ++ ++def getScheme(url): ++ return url.split(':')[0] ++ ++def getPort(url): ++ return int(url.split(':')[2]) ++#-------------------- ++import os ++ ++def findInSubdirectory(filename, subdirectory=''): ++ if subdirectory: ++ path = subdirectory ++ else: ++ path = os.getcwd() ++ for root, dirs, names in os.walk(path): ++ for name in names: ++ if (name.find(filename) > -1) and ( (name.find('.dll') > -1) or (name.find('.so') > -1) or (name.find('.dylib') > -1)): ++ return os.path.join(root, name) ++ raise 'File not found' ++#-------------------- ++ ++print "Start multi-server testing" ++enableMultiServer() ++ ++options = servermanager.vtkProcessModule.GetProcessModule().GetOptions() ++available_server_urls = options.GetServerURL().split('|') ++built_in_connection = servermanager.ActiveConnection ++ ++# Test if the built-in connection is here ++if (len(servermanager.MultiServerConnections) != 1): ++ errors += 1 ++ print "Error pvpython should be connected to a built-in session. Currently connected to ", servermanager.MultiServerConnections ++ ++url = available_server_urls[0] ++print "Connect to first server ", url ++server1_connection = Connect(getHost(url), getPort(url)) ++ ++# Test that we have one more connection ++if (len(servermanager.MultiServerConnections) != 2): ++ errors += 1 ++ print "Error pvpython should be connected to a built-in session + one remote one. Currently connected to ", servermanager.MultiServerConnections ++ ++url = available_server_urls[1] ++print "Connect to second server ", url ++server2_connection = Connect(getHost(url), getPort(url)) ++ ++# Test that we have one more connection ++if (len(servermanager.MultiServerConnections) != 3): ++ errors += 1 ++ print "Error pvpython should be connected to a built-in session + two remote one. Currently connected to ", servermanager.MultiServerConnections ++ ++print "Available connections: ", servermanager.MultiServerConnections ++ ++# Test that last created connection is the active one ++if ( servermanager.ActiveConnection != server2_connection): ++ errors += 1 ++ print "Error Invalid active connection. Expected ", server2_connection, " and got ", servermanager.ActiveConnection ++ ++# Test that switchActiveConnection is working as expected ++switchActiveConnection(server1_connection, globals()) ++if ( servermanager.ActiveConnection != server1_connection): ++ errors += 1 ++ print "Error Invalid active connection. Expected ", server1_connection, " and got ", servermanager.ActiveConnection ++ ++# Test that switchActiveConnection is working as expected ++switchActiveConnection(built_in_connection, globals()) ++if ( servermanager.ActiveConnection != built_in_connection): ++ errors += 1 ++ print "Error Invalid active connection. Expected ", built_in_connection, " and got ", servermanager.ActiveConnection ++ ++# Test that switchActiveConnection is working as expected ++switchActiveConnection(server2_connection, globals()) ++if ( servermanager.ActiveConnection != server2_connection): ++ errors += 1 ++ print "Error Invalid active connection. Expected ", server2_connection, " and got ", servermanager.ActiveConnection ++ ++ ++# Load plugin on server2 ++switchActiveConnection(server2_connection, globals()) ++LoadDistributedPlugin("PacMan", True, globals()) ++ ++# Create PacMan on server2 ++pacMan_s2 = PacMan() ++ ++# Swtich to server1 and Create PacMan ==> This should fail ++switchActiveConnection(server1_connection, globals()) ++try: ++ pacMan_s1 = PacMan() ++ errors += 1 ++ print "Error: PacMan should not be available on Server1" ++except NameError: ++ print "OK: PacMan is not available on server1" ++ ++# Swtich to server2 with globals and switch back to server1 with not updating the globals ++switchActiveConnection(server2_connection, globals()) ++switchActiveConnection(server1_connection) ++ ++# Create PacMan ==> This should fail ++try: ++ pacMan_s1 = PacMan() ++ errors += 1 ++ print "Error: PacMan should not be available on Server1" ++except RuntimeError: ++ print "OK: PacMan is not available on server1" ++ ++# Make sure built-in as not the pacMan ++switchActiveConnection(server2_connection, globals()) ++switchActiveConnection(built_in_connection, globals()) ++try: ++ pacMan_builtin = PacMan() ++ errors += 1 ++ print "Error: PacMan should not be available on built-in" ++except NameError: ++ print "OK: PacMan is not available on built-in" ++ ++# Load plugin localy for built-in ++# Create PacMan ==> This should be OK on built-in ++switchActiveConnection(built_in_connection, globals()) ++LoadDistributedPlugin("PacMan", False, globals()) ++pacMan_builtin = PacMan() ++print "After loading the plugin locally in built-in, the PacMan definition is available" ++ ++# Swtich to server1 and Create PacMan ==> This should fail ++switchActiveConnection(server1_connection, globals()) ++try: ++ pacMan_s1 = PacMan() ++ errors += 1 ++ print "Error: PacMan should not be available on Server1" ++except NameError: ++ print "OK: PacMan is still not available on server1" ++ ++# Disconnect and quit application... ++Disconnect() ++print "Available connections after disconnect: ", servermanager.MultiServerConnections ++Disconnect() ++print "Available connections after disconnect: ", servermanager.MultiServerConnections ++Disconnect() ++print "Available connections after disconnect: ", servermanager.MultiServerConnections ++ ++if errors > 0: ++ raise RuntimeError, "An error occured during the execution" +diff -x .git -ruN orig/Applications/ParaView/Testing/Python/TestMultiServersRemoteProxy.py git_0f43430/Applications/ParaView/Testing/Python/TestMultiServersRemoteProxy.py +--- orig/Applications/ParaView/Testing/Python/TestMultiServersRemoteProxy.py 1969-12-31 19:00:00.000000000 -0500 ++++ git_0f43430/Applications/ParaView/Testing/Python/TestMultiServersRemoteProxy.py 2012-04-20 23:43:06.000000000 -0400 +@@ -0,0 +1,151 @@ ++from paraview.simple import * ++from paraview import servermanager ++ ++import time ++ ++# Make sure the test driver know that process has properly started ++print "Process started" ++errors = 0 ++ ++#-------------------- Helpers methods ---------------- ++def getHost(url): ++ return url.split(':')[1][2:] ++ ++def getScheme(url): ++ return url.split(':')[0] ++ ++def getPort(url): ++ return int(url.split(':')[2]) ++#-------------------- ++ ++print "Start multi-server testing" ++enableMultiServer() ++ ++options = servermanager.vtkProcessModule.GetProcessModule().GetOptions() ++available_server_urls = options.GetServerURL().split('|') ++built_in_connection = servermanager.ActiveConnection ++ ++# Test if the built-in connection is here ++if (len(servermanager.MultiServerConnections) != 1): ++ errors += 1 ++ print "Error pvpython should be connected to a built-in session. Currently connected to ", servermanager.MultiServerConnections ++ ++url = available_server_urls[0] ++print "Connect to first server ", url ++server1_connection = Connect(getHost(url), getPort(url)) ++ ++# Test that we have one more connection ++if (len(servermanager.MultiServerConnections) != 2): ++ errors += 1 ++ print "Error pvpython should be connected to a built-in session + one remote one. Currently connected to ", servermanager.MultiServerConnections ++ ++url = available_server_urls[1] ++print "Connect to second server ", url ++server2_connection = Connect(getHost(url), getPort(url)) ++ ++# Test that we have one more connection ++if (len(servermanager.MultiServerConnections) != 3): ++ errors += 1 ++ print "Error pvpython should be connected to a built-in session + two remote one. Currently connected to ", servermanager.MultiServerConnections ++ ++url = available_server_urls[2] ++print "Connect to third server ", url ++server3_connection = Connect(getHost(url), getPort(url)) ++ ++# Test that we have one more connection ++if (len(servermanager.MultiServerConnections) != 4): ++ errors += 1 ++ print "Error pvpython should be connected to a built-in session + three remote one. Currently connected to ", servermanager.MultiServerConnections ++ ++print "Available connections: ", servermanager.MultiServerConnections ++ ++# Test that last created connection is the active one ++if ( servermanager.ActiveConnection != server3_connection): ++ errors += 1 ++ print "Error Invalid active connection. Expected ", server3_connection, " and got ", servermanager.ActiveConnection ++ ++# ------- Do the proper RemoteSourceProxy testing -------------- ++ ++# Create a set of sphere across the remote sessions ++switchActiveConnection(server1_connection, globals()) ++rSphere1 = Sphere(ThetaResolution=10, PhiResolution=10) ++rSphere1.UpdatePipeline() ++size1 = rSphere1.GetDataInformation().GetNumberOfPoints() ++ ++switchActiveConnection(server2_connection, globals()) ++rSphere2 = Sphere(ThetaResolution=11, PhiResolution=11) ++rSphere2.UpdatePipeline() ++size2 = rSphere2.GetDataInformation().GetNumberOfPoints() ++ ++switchActiveConnection(server3_connection, globals()) ++rSphere3 = Sphere(ThetaResolution=12, PhiResolution=12) ++rSphere3.UpdatePipeline() ++size3 = rSphere3.GetDataInformation().GetNumberOfPoints() ++ ++# Create remote source on the built-in session ++switchActiveConnection(built_in_connection, globals()) ++remoteProxy = RemoteSourceProxy() ++remoteProxy.SetExternalProxy(rSphere1, 0) ++remoteProxy.UpdatePipeline() ++ ++# Test that the data in built-in is the same size as the remote one ++remoteProxy.UpdatePipeline() ++size = remoteProxy.GetDataInformation().GetNumberOfPoints() ++if ( size1 != size ): ++ errors += 1 ++ print "Error Invalid data size. Expected ", size1, " and got ", size ++else: ++ print "Found size ", size, " for server 1" ++ ++# Switch to proxy on server 2 and test size ++remoteProxy.SetExternalProxy(rSphere2, 0) ++remoteProxy.UpdatePipeline() ++size = remoteProxy.GetDataInformation().GetNumberOfPoints() ++if ( size2 != size ): ++ errors += 1 ++ print "Error Invalid data size. Expected ", size2, " and got ", size ++else: ++ print "Found size ", size, " for server 2" ++ ++# Switch to proxy on server 3 and test size ++remoteProxy.SetExternalProxy(rSphere3, 0) ++remoteProxy.UpdatePipeline() ++size = remoteProxy.GetDataInformation().GetNumberOfPoints() ++if ( size3 != size ): ++ errors += 1 ++ print "Error Invalid data size. Expected ", size3, " and got ", size ++else: ++ print "Found size ", size, " for server 3" ++ ++# Change data size on server 3 and make sure the change get propagated to the built-in ++rSphere3.ThetaResolution = 13 ++rSphere3.PhiResolution = 13 ++rSphere3.UpdatePipeline() ++size3 = rSphere3.GetDataInformation().GetNumberOfPoints() ++ ++remoteProxy.UpdatePipeline() ++size = remoteProxy.GetDataInformation().GetNumberOfPoints() ++if ( size3 != size ): ++ errors += 1 ++ print "Error Invalid data size. Expected ", size3, " and got ", size ++else: ++ print "Found size ", size, " for server 3 after update" ++ ++# Make sure the size is not 0 ++if ( size == 0 or size1 == 0 or size1 == 0 or size1 == 0): ++ errors += 1 ++ print "Error Invalid data size. None of them should be 0" ++ ++# -------------------------------------------------------------- ++# Disconnect and quit application... ++Disconnect() ++print "Available connections after disconnect: ", servermanager.MultiServerConnections ++Disconnect() ++print "Available connections after disconnect: ", servermanager.MultiServerConnections ++Disconnect() ++print "Available connections after disconnect: ", servermanager.MultiServerConnections ++Disconnect() ++print "Available connections after disconnect: ", servermanager.MultiServerConnections ++ ++if errors > 0: ++ raise RuntimeError, "An error occured during the execution" +diff -x .git -ruN orig/Applications/ParaView/Testing/Python/TestPythonAnnotationFilter.py git_0f43430/Applications/ParaView/Testing/Python/TestPythonAnnotationFilter.py +--- orig/Applications/ParaView/Testing/Python/TestPythonAnnotationFilter.py 1969-12-31 19:00:00.000000000 -0500 ++++ git_0f43430/Applications/ParaView/Testing/Python/TestPythonAnnotationFilter.py 2012-04-20 23:43:06.000000000 -0400 +@@ -0,0 +1,119 @@ ++from paraview.simple import * ++from paraview import servermanager ++ ++import time ++ ++# Make sure the test driver know that process has properly started ++print "Process started" ++errors = 0 ++ ++#-------------------- Comparison helper ---------------------- ++ ++def equal(a, b): ++ if a == b: ++ return True ++ aList = a.replace(","," ").replace("["," ").replace("]", " ").split(" ") ++ bList = b.replace(","," ").replace("["," ").replace("]", " ").split(" ") ++ size = len(aList) ++ if size != len(bList): ++ return False ++ for i in xrange(size): ++ if len(aList[i]) > 0: ++ af = float(aList[i]) ++ bf = float(bList[i]) ++ if ((af-bf)*(af-bf)) > 0.000001: ++ return False ++ return True ++ ++#-------------------- Start testing -------------------------- ++ ++print "Start PythonAnnotationFilter testing" ++ ++options = servermanager.vtkProcessModule.GetProcessModule().GetOptions() ++dataToLoad = options.GetParaViewDataName() ++ ++ ++# Load data file ++reader = OpenDataFile(dataToLoad) ++reader.GlobalVariables = ['KE', 'XMOM', 'YMOM', 'ZMOM', 'NSTEPS', 'TMSTEP'] ++reader.UpdatePipeline() ++ ++# Time management ++timesteps = servermanager.ProxyManager().GetProxy('timekeeper','TimeKeeper').TimestepValues ++time = timesteps[5] ++ ++# Merge blocks ++merge = MergeBlocks() ++ ++# Annotation filter ++annotation = PythonAnnotation() ++annotation.Expression = '"%f %f %f" % (XMOM[t_index], YMOM[t_index], ZMOM[t_index])' ++ ++# Update time and trigger pipeline execution ++time = timesteps[5] ++annotation.UpdatePipeline(time) ++ ++annotation.SMProxy.UpdatePropertyInformation() ++value = annotation.SMProxy.GetProperty('AnnotationValue').GetElement(0) ++expected = "0.012132 0.001378 -1158.252808" ++ ++if not equal(value, expected): ++ errors += 1 ++ print "Error: Expected ", expected, " and got ", value ++ ++# Update time and trigger pipeline execution ++time = timesteps[7] ++annotation.UpdatePipeline(time) ++ ++annotation.SMProxy.UpdatePropertyInformation() ++value = annotation.SMProxy.GetProperty('AnnotationValue').GetElement(0) ++expected = "0.013970 0.001319 -1141.020020" ++ ++if not equal(value, expected): ++ errors += 1 ++ print "Error: Expected ", expected, " and got ", value ++ ++# Check time infos ++annotation.Expression = '"%i %f %s" % (t_index, t_value, str(t_range))' ++ ++# Update time and trigger pipeline execution ++time = timesteps[7] ++annotation.UpdatePipeline(time) ++ ++annotation.SMProxy.UpdatePropertyInformation() ++value = annotation.SMProxy.GetProperty('AnnotationValue').GetElement(0) ++expected = "7 0.000700 [0, 0.00429999]" ++ ++if not equal(value, expected): ++ errors += 1 ++ print "Error: Expected ", expected, " and got ", value ++ ++# Update time and trigger pipeline execution ++time = timesteps[27] ++annotation.UpdatePipeline(time) ++ ++annotation.SMProxy.UpdatePropertyInformation() ++value = annotation.SMProxy.GetProperty('AnnotationValue').GetElement(0) ++expected = "27 0.002700 [0, 0.00429999]" ++ ++if not equal(value, expected): ++ errors += 1 ++ print "Error: Expected ", expected, " and got ", value ++ ++# Update time and trigger pipeline execution ++time = timesteps[len(timesteps)-1] ++annotation.UpdatePipeline(time) ++ ++annotation.SMProxy.UpdatePropertyInformation() ++value = annotation.SMProxy.GetProperty('AnnotationValue').GetElement(0) ++expected = "43 0.004300 [0, 0.00429999]" ++ ++if not equal(value, expected): ++ errors += 1 ++ print "Error: Expected ", expected, " and got ", value ++ ++# Disconnect and quit application... ++Disconnect() ++ ++if errors > 0: ++ raise RuntimeError, "An error occured during the execution" +diff -x .git -ruN orig/Applications/ParaView/Testing/XML/CMakeLists.txt git_0f43430/Applications/ParaView/Testing/XML/CMakeLists.txt +--- orig/Applications/ParaView/Testing/XML/CMakeLists.txt 2012-04-02 12:56:24.000000000 -0400 ++++ git_0f43430/Applications/ParaView/Testing/XML/CMakeLists.txt 2012-04-20 23:43:06.000000000 -0400 +@@ -142,6 +142,10 @@ + SET(TESTS_WITH_BASELINES ${TESTS_WITH_BASELINES} ${CMAKE_CURRENT_SOURCE_DIR}/FindDataDialog.xml) + ENDIF ("1" STREQUAL ${HAS_NUMPY}) + ++# These tests cannot be run using ctest -j since they are affected by focus ++# changed events. ++set (AnimatePipelineTime_FORCE_SERIAL TRUE) ++ + # Set properties for CTH tests + set(CTHAMRBaseline_BREAK TRUE) + +@@ -202,6 +206,7 @@ + + SET(ExtractLevel_BREAK TRUE) + ++SET(Fractal2D_BREAK TRUE) + + # Add image threshold overrides for tests. + # Generally all tests with wireframes need higher thresholds. +@@ -350,74 +355,79 @@ + + # List of test Enable for collaboration + set (AnimatePipelineTime_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (CalcParens_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (Calculator_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (CameraLink_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (ColorEditor2_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (ColorEditor4_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (CompositeSurfaceSelection_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (CalcParens_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (Calculator_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (CameraLink_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (ColorEditor2_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (ColorEditor4_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (CompositeSurfaceSelection_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) + set (Contour_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (ContourRange_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (ContourRange_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) + set (CreateDelete_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (CustomSourceProbe_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (D3SmallCells_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (DualSphereAnimation_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (EnSight_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (ExodusIIPanel_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (ExodusModeShapes_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (ExodusXML_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (ExTimeseries_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (ExTimeseries2_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (ExtractBlock_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (ExtractLevel_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (FindDataDialog_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (FFTOverTime_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (Flow_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (Flow2_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (Fractal2D_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (GridConnectivity_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (NormalGlyphs_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (ObjectInspectorSphere_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (OpenSaveData_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (Plot3DReader_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (PlotEdges_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (PlotEdges2_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (PropertyConversion_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (CustomSourceProbe_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (D3SmallCells_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (DualSphereAnimation_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (EnSight_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (ExodusIIPanel_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (ExodusModeShapes_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (ExodusXML_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (ExTimeseries_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (ExTimeseries2_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (ExtractBlock_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (ExtractLevel_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (FindDataDialog_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (FFTOverTime_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (Flow_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (Flow2_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (Fractal2D_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (GridConnectivity_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (NormalGlyphs_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (ObjectInspectorSphere_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (OpenSaveData_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (Plot3DReader_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (PlotEdges_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (PlotEdges2_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (PropertyConversion_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) + set (PropertyConversion1_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) + set (PropertyConversion2_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-# disabling since the state file doesn't have view layout and such old state +-# files are not currently supported in collaborative mode. +-#set (PropertyLink_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (ReadXMLPolyDataFileSeries_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (RepresentationSelector_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (SaveColorMap_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (SaveCSV_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (SelectReader_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (SimpleInteraction_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (Slice_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++## disabling since the state file doesn't have view layout and such old state ++## files are not currently supported in collaborative mode. ++##set (PropertyLink_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (ReadXMLPolyDataFileSeries_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (RepresentationSelector_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (SaveColorMap_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (SaveCSV_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (SelectReader_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (SimpleInteraction_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (Slice_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) + set (SpreadSheet1_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (SpreadSheet2_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (SPTimeseries_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (SpyPlotHistoryReader_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (StreamTracerUpdates_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (SpreadSheet2_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (SPTimeseries_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (SpyPlotHistoryReader_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (StreamTracerUpdates_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) + set (TemporalInterpolator_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) + set (TemporalShiftScale_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (Tessellate_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (Threshold_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (UnstructuredOutline_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (Tessellate_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (Threshold_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (UnstructuredOutline_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) + set (VariableSelector_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) + set (VariableSelector1_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) + set (XdmfRead_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (XdmfReadImageData_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (XdmfReadImageDataCollection_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (XdmfReadRectilinearGrid_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (XdmfReadRectilinearGridCollection_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (XdmfReadStructuredGrid_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (XdmfReadStructuredGridCollection_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (XdmfGridAttributes_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) +-set (XYChart_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (XdmfReadImageData_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (XdmfReadImageDataCollection_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (XdmfReadRectilinearGrid_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (XdmfReadRectilinearGridCollection_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (XdmfReadStructuredGrid_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (XdmfReadStructuredGridCollection_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (XdmfGridAttributes_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) ++#set (XYChart_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) + set (ZLibXDMF_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING}) + ++ ++set(TESTS_WITH_MULTI_SERVERS_3 ++ ${CMAKE_CURRENT_SOURCE_DIR}/TestMultiServer3.xml ++) ++ + IF (PARAVIEW_DATA_ROOT) + set (TESTS_WITHOUT_BASELINES + ${TESTS_WITHOUT_BASELINES} +@@ -460,4 +470,28 @@ + BASELINE_DIR ${PARAVIEW_DATA_ROOT}/Baseline + TEST_SCRIPTS ${TESTS_WITH_BASELINES}) + ++ add_multi_server_tests("pvcs-multi-servers" 3 ++ BASELINE_DIR ${PARAVIEW_DATA_ROOT}/Baseline ++ TEST_SCRIPTS ${TESTS_WITH_MULTI_SERVERS_3}) ++ ++ add_tile_display_tests("pvcs-tile-display" 2 1 ++ BASELINE_DIR ${PARAVIEW_DATA_ROOT}/Baseline ++ TEST_SCRIPTS ${CMAKE_CURRENT_SOURCE_DIR}/TileDisplayScatterPlot-2x1.xml) ++ ++ add_tile_display_tests("pvcs-tile-display" 2 2 ++ BASELINE_DIR ${PARAVIEW_DATA_ROOT}/Baseline ++ TEST_SCRIPTS ${CMAKE_CURRENT_SOURCE_DIR}/TileDisplayScatterPlot-2x2.xml) ++ ++ add_tile_display_tests("pvcs-tile-display" 1 2 ++ BASELINE_DIR ${PARAVIEW_DATA_ROOT}/Baseline ++ TEST_SCRIPTS ${CMAKE_CURRENT_SOURCE_DIR}/TileDisplay3DTesting-1x2.xml) ++ ++ add_tile_display_tests("pvcs-tile-display" 2 1 ++ BASELINE_DIR ${PARAVIEW_DATA_ROOT}/Baseline ++ TEST_SCRIPTS ${CMAKE_CURRENT_SOURCE_DIR}/TileDisplay3DTesting-2x1.xml) ++ ++ add_tile_display_tests("pvcs-tile-display" 2 2 ++ BASELINE_DIR ${PARAVIEW_DATA_ROOT}/Baseline ++ TEST_SCRIPTS ${CMAKE_CURRENT_SOURCE_DIR}/TileDisplay3DTesting-2x2.xml) ++ + ENDIF (PARAVIEW_DATA_ROOT) +diff -x .git -ruN orig/Applications/ParaView/Testing/XML/CameraLink.xml git_0f43430/Applications/ParaView/Testing/XML/CameraLink.xml +--- orig/Applications/ParaView/Testing/XML/CameraLink.xml 2012-04-02 12:56:24.000000000 -0400 ++++ git_0f43430/Applications/ParaView/Testing/XML/CameraLink.xml 2012-04-20 23:43:06.000000000 -0400 +@@ -23,5 +23,4 @@ + + + +- + +diff -x .git -ruN orig/Applications/ParaView/Testing/XML/ExtractLevel.xml git_0f43430/Applications/ParaView/Testing/XML/ExtractLevel.xml +--- orig/Applications/ParaView/Testing/XML/ExtractLevel.xml 2012-04-02 12:55:26.000000000 -0400 ++++ git_0f43430/Applications/ParaView/Testing/XML/ExtractLevel.xml 2012-04-20 23:43:06.000000000 -0400 +@@ -3,6 +3,8 @@ + + + ++ ++ + + + +@@ -23,8 +25,5 @@ + + + +- +- +- + + +diff -x .git -ruN orig/Applications/ParaView/Testing/XML/EyeDomeLighting.xml git_0f43430/Applications/ParaView/Testing/XML/EyeDomeLighting.xml +--- orig/Applications/ParaView/Testing/XML/EyeDomeLighting.xml 2012-04-02 12:56:24.000000000 -0400 ++++ git_0f43430/Applications/ParaView/Testing/XML/EyeDomeLighting.xml 2012-04-20 23:43:06.000000000 -0400 +@@ -10,6 +10,4 @@ + + + +- +- + +diff -x .git -ruN orig/Applications/ParaView/Testing/XML/Fractal2D.xml git_0f43430/Applications/ParaView/Testing/XML/Fractal2D.xml +--- orig/Applications/ParaView/Testing/XML/Fractal2D.xml 2012-04-02 12:55:26.000000000 -0400 ++++ git_0f43430/Applications/ParaView/Testing/XML/Fractal2D.xml 2012-04-20 23:43:06.000000000 -0400 +@@ -4,9 +4,9 @@ + + + +- + ++ + + + +diff -x .git -ruN orig/Applications/ParaView/Testing/XML/OpenHelp.xml git_0f43430/Applications/ParaView/Testing/XML/OpenHelp.xml +--- orig/Applications/ParaView/Testing/XML/OpenHelp.xml 2012-04-02 12:55:26.000000000 -0400 ++++ git_0f43430/Applications/ParaView/Testing/XML/OpenHelp.xml 2012-04-20 23:43:06.000000000 -0400 +@@ -1,10 +1,7 @@ + + + +- + + +- +- +- ++ + +diff -x .git -ruN orig/Applications/ParaView/Testing/XML/SpyPlotHistoryReader.xml git_0f43430/Applications/ParaView/Testing/XML/SpyPlotHistoryReader.xml +--- orig/Applications/ParaView/Testing/XML/SpyPlotHistoryReader.xml 2012-04-02 12:56:24.000000000 -0400 ++++ git_0f43430/Applications/ParaView/Testing/XML/SpyPlotHistoryReader.xml 2012-04-20 23:43:06.000000000 -0400 +@@ -3,15 +3,17 @@ + + + ++ + + + + + + +- +- +- ++ ++ ++ ++ + + + +diff -x .git -ruN orig/Applications/ParaView/Testing/XML/TestMultiServer3.xml git_0f43430/Applications/ParaView/Testing/XML/TestMultiServer3.xml +--- orig/Applications/ParaView/Testing/XML/TestMultiServer3.xml 1969-12-31 19:00:00.000000000 -0500 ++++ git_0f43430/Applications/ParaView/Testing/XML/TestMultiServer3.xml 2012-04-20 23:43:06.000000000 -0400 +@@ -0,0 +1,43 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +diff -x .git -ruN orig/Applications/ParaView/Testing/XML/TileDisplay3DTesting-1x2.xml git_0f43430/Applications/ParaView/Testing/XML/TileDisplay3DTesting-1x2.xml +--- orig/Applications/ParaView/Testing/XML/TileDisplay3DTesting-1x2.xml 1969-12-31 19:00:00.000000000 -0500 ++++ git_0f43430/Applications/ParaView/Testing/XML/TileDisplay3DTesting-1x2.xml 2012-04-20 23:43:06.000000000 -0400 +@@ -0,0 +1,41 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +diff -x .git -ruN orig/Applications/ParaView/Testing/XML/TileDisplay3DTesting-2x1.xml git_0f43430/Applications/ParaView/Testing/XML/TileDisplay3DTesting-2x1.xml +--- orig/Applications/ParaView/Testing/XML/TileDisplay3DTesting-2x1.xml 1969-12-31 19:00:00.000000000 -0500 ++++ git_0f43430/Applications/ParaView/Testing/XML/TileDisplay3DTesting-2x1.xml 2012-04-20 23:43:06.000000000 -0400 +@@ -0,0 +1,41 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +diff -x .git -ruN orig/Applications/ParaView/Testing/XML/TileDisplay3DTesting-2x2.xml git_0f43430/Applications/ParaView/Testing/XML/TileDisplay3DTesting-2x2.xml +--- orig/Applications/ParaView/Testing/XML/TileDisplay3DTesting-2x2.xml 1969-12-31 19:00:00.000000000 -0500 ++++ git_0f43430/Applications/ParaView/Testing/XML/TileDisplay3DTesting-2x2.xml 2012-04-20 23:43:06.000000000 -0400 +@@ -0,0 +1,44 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +diff -x .git -ruN orig/Applications/ParaView/Testing/XML/TileDisplayScatterPlot-2x1.xml git_0f43430/Applications/ParaView/Testing/XML/TileDisplayScatterPlot-2x1.xml +--- orig/Applications/ParaView/Testing/XML/TileDisplayScatterPlot-2x1.xml 1969-12-31 19:00:00.000000000 -0500 ++++ git_0f43430/Applications/ParaView/Testing/XML/TileDisplayScatterPlot-2x1.xml 2012-04-20 23:43:06.000000000 -0400 +@@ -0,0 +1,16 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +diff -x .git -ruN orig/Applications/ParaView/Testing/XML/TileDisplayScatterPlot-2x2.xml git_0f43430/Applications/ParaView/Testing/XML/TileDisplayScatterPlot-2x2.xml +--- orig/Applications/ParaView/Testing/XML/TileDisplayScatterPlot-2x2.xml 1969-12-31 19:00:00.000000000 -0500 ++++ git_0f43430/Applications/ParaView/Testing/XML/TileDisplayScatterPlot-2x2.xml 2012-04-20 23:43:06.000000000 -0400 +@@ -0,0 +1,18 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +diff -x .git -ruN orig/CMake/ParaViewCommon.cmake git_0f43430/CMake/ParaViewCommon.cmake +--- orig/CMake/ParaViewCommon.cmake 2012-04-02 12:56:24.000000000 -0400 ++++ git_0f43430/CMake/ParaViewCommon.cmake 2012-04-20 23:43:06.000000000 -0400 +@@ -344,9 +344,6 @@ + # Set this to get VTKs FOR LOOP "fix" to apply too all of Paraviews Source. + SET(VTK_USE_FOR_SCOPE_WORKAROUND TRUE) + +-CONFIGURE_FILE(${ParaView_SOURCE_DIR}/VTK/Utilities/TclTk/.NoDartCoverage +- ${ParaView_BINARY_DIR}/VTK/.NoDartCoverage) +- + OPTION(PARAVIEW_DISABLE_VTK_TESTING "Disable VTK Testing" OFF) + MARK_AS_ADVANCED(PARAVIEW_DISABLE_VTK_TESTING) + IF (PARAVIEW_DISABLE_VTK_TESTING) +@@ -403,7 +400,7 @@ + ) + ENDIF(PARAVIEW_ENABLE_PYTHON) + +-SET(kits Common Charts Filtering GenericFiltering IO Imaging Rendering Parallel Graphics Hybrid VolumeRendering Widgets) ++SET(kits Common AMR Charts Filtering GenericFiltering IO Imaging Rendering Parallel Graphics Hybrid VolumeRendering Widgets) + FOREACH(kit ${kits}) + SET(VTK_INCLUDE_DIR ${VTK_INCLUDE_DIR} + ${ParaView_SOURCE_DIR}/VTK/${kit} +diff -x .git -ruN orig/CMake/ParaViewTestingMacros.cmake git_0f43430/CMake/ParaViewTestingMacros.cmake +--- orig/CMake/ParaViewTestingMacros.cmake 2012-04-02 12:56:24.000000000 -0400 ++++ git_0f43430/CMake/ParaViewTestingMacros.cmake 2012-04-20 23:43:06.000000000 -0400 +@@ -27,6 +27,8 @@ + set (counter 0) + set (extra_args) + set (full_test_name) ++ set (force_serial FALSE) ++ + while (${counter} LESS ${TEST_GROUP_SIZE}) + list(LENGTH ACT_TEST_SCRIPTS num_tests) + if (num_tests) +@@ -57,6 +59,9 @@ + if (DEFINED ${test_name}_BREAK) + set (counter 100000) # stop the group. + endif (DEFINED ${test_name}_BREAK) ++ if (${test_name}_FORCE_SERIAL) ++ set (force_serial TRUE) ++ endif (${test_name}_FORCE_SERIAL) + endwhile (${counter} LESS ${TEST_GROUP_SIZE}) + + if (extra_args) +@@ -66,6 +71,10 @@ + ${extra_args} + --exit + ) ++ if (force_serial) ++ set_tests_properties("${prefix}${full_test_name}" PROPERTIES RUN_SERIAL ON) ++ message(STATUS "Running in serial \"${prefix}${full_test_name}\"") ++ endif() + endif (extra_args) + endwhile (ACT_TEST_SCRIPTS) + +@@ -133,6 +142,69 @@ + ${extra_args} + --exit + ) ++ if (${test_name}_FORCE_SERIAL) ++ set_tests_properties("${prefix}.${test_name}" PROPERTIES RUN_SERIAL ON) ++ message(STATUS "Running in serial \"${prefix}.${test_name}\"") ++ endif (${test_name}_FORCE_SERIAL) + endif() + endforeach(test_script) + ENDFUNCTION(add_multi_client_tests) ++ ++FUNCTION(add_multi_server_tests prefix nbServers) ++ PV_PARSE_ARGUMENTS(ACT "TEST_SCRIPTS;BASELINE_DIR" "" ${ARGN}) ++ ++ foreach (test_script ${ACT_TEST_SCRIPTS}) ++ get_filename_component(test_name ${test_script} NAME_WE) ++ set (extra_args) ++ process_args(extra_args) ++ add_test("${prefix}.${test_name}" ++ ${PARAVIEW_SMTESTDRIVER_EXECUTABLE} ++ --test-multi-servers ${nbServers} ++ --server ${PARAVIEW_SERVER_EXECUTABLE} ++ ++ --client ${CLIENT_EXECUTABLE} ++ -dr ++ --disable-light-kit ++ --test-directory=${PARAVIEW_TEST_DIR} ++ --test-script=${test_script} ++ ${extra_args} ++ --exit ++ ) ++ endforeach(test_script) ++ENDFUNCTION(add_multi_server_tests) ++ ++FUNCTION (add_tile_display_tests prefix tdx tdy ) ++ PV_PARSE_ARGUMENTS(ACT "TEST_SCRIPTS;BASELINE_DIR" "" ${ARGN}) ++ ++ ++ MATH(EXPR REQUIRED_CPU '${tdx}*${tdy}-1') # -1 is for LESS ++ if (${REQUIRED_CPU} LESS ${VTK_MPI_MAX_NUMPROCS}) ++ foreach (test_script ${ACT_TEST_SCRIPTS}) ++ ++ get_filename_component(test_name ${test_script} NAME_WE) ++ set (extra_args) ++ process_args(extra_args) ++ add_test("${prefix}-${tdx}x${tdy}.${test_name}" ++ ${PARAVIEW_SMTESTDRIVER_EXECUTABLE} ++ --test-tiled ${tdx} ${tdy} ++ --server ${PARAVIEW_SERVER_EXECUTABLE} ++ ++ --client ${CLIENT_EXECUTABLE} ++ -dr ++ --disable-light-kit ++ --test-directory=${PARAVIEW_TEST_DIR} ++ --test-script=${test_script} ++ --tile-image-prefix=${PARAVIEW_TEST_DIR}/${test_name} ++ ++ ${extra_args} ++ --exit ++ ) ++ set_property(TEST "${prefix}-${tdx}x${tdy}.${test_name}" ++ PROPERTY ENVIRONMENT "PV_ICET_WINDOW_BORDERS=1") ++ if (${test_name}_FORCE_SERIAL) ++ set_tests_properties("${prefix}.${test_name}" PROPERTIES RUN_SERIAL ON) ++ message(STATUS "Running in serial \"${prefix}.${test_name}\"") ++ endif (${test_name}_FORCE_SERIAL) ++ endforeach(test_script) ++ endif(${REQUIRED_CPU} LESS ${VTK_MPI_MAX_NUMPROCS}) ++ENDFUNCTION (add_tile_display_tests) +diff -x .git -ruN orig/CMakeLists.txt git_0f43430/CMakeLists.txt +--- orig/CMakeLists.txt 2012-04-02 12:56:24.000000000 -0400 ++++ git_0f43430/CMakeLists.txt 2012-04-20 23:43:06.000000000 -0400 +@@ -62,9 +62,9 @@ + SET (PARAVIEW_VERSION_MAJOR 3) + SET (PARAVIEW_VERSION_MINOR 14) + SET (PARAVIEW_VERSION_PATCH 1) +-SET (PARAVIEW_VERSION_PATCH_EXTRA) ++SET (PARAVIEW_VERSION_PATCH_EXTRA "enhanced") + SET (PARAVIEW_VERSION "3.14") +-SET (PARAVIEW_VERSION_FULL "3.14.1") ++SET (PARAVIEW_VERSION_FULL "3.14.1-enhanced") + + INCLUDE(ParaViewDetermineVersion) + determine_version( +@@ -361,7 +361,7 @@ + + ######################################################################### + # Configure the CoProcessing library +-OPTION(PARAVIEW_ENABLE_COPROCESSING "Enable/Disable the CoProcessing library." OFF) ++OPTION(PARAVIEW_ENABLE_COPROCESSING "Enable/Disable the CoProcessing library." ON) + MARK_AS_ADVANCED(PARAVIEW_ENABLE_COPROCESSING) + IF (PARAVIEW_ENABLE_COPROCESSING) + ADD_SUBDIRECTORY (CoProcessing) +@@ -395,48 +395,11 @@ + DESTINATION ${PV_INSTALL_INCLUDE_DIR} + COMPONENT Development) + +- SET(cmakeDevFiles +- ${ParaView_CMAKE_DIR}/branded_splash.png +- ${ParaView_SOURCE_DIR}/ParaViewUse.cmake +- ${ParaView_CMAKE_DIR}/ParaViewMacros.cmake +- ${ParaView_CMAKE_DIR}/ParaViewPlugins.cmake +- ${ParaView_CMAKE_DIR}/ParaViewBranding.cmake +- ${ParaView_CMAKE_DIR}/ParaViewBrandingCPack.cmake +- ${ParaView_CMAKE_DIR}/pqParaViewPlugin.cxx.in +- ${ParaView_CMAKE_DIR}/pqParaViewPlugin.h.in +- ${ParaView_CMAKE_DIR}/branded_paraview_initializer.cxx.in +- ${ParaView_CMAKE_DIR}/branded_paraview_main.cxx.in +- ${ParaView_CMAKE_DIR}/branded_paraview_initializer.h.in +- ${ParaView_CMAKE_DIR}/ParaViewCPackOptions.cmake.in +- ${ParaView_CMAKE_DIR}/pv-forward.c.in +- # originaly from Qt/Components +- ${ParaView_CMAKE_DIR}/pqObjectPanelImplementation.h.in +- ${ParaView_CMAKE_DIR}/pqObjectPanelImplementation.cxx.in +- ${ParaView_CMAKE_DIR}/pqDisplayPanelImplementation.h.in +- ${ParaView_CMAKE_DIR}/pqDisplayPanelImplementation.cxx.in +- ${ParaView_CMAKE_DIR}/pqViewOptionsImplementation.h.in +- ${ParaView_CMAKE_DIR}/pqViewOptionsImplementation.cxx.in +- ${ParaView_CMAKE_DIR}/pqActionGroupImplementation.h.in +- ${ParaView_CMAKE_DIR}/pqActionGroupImplementation.cxx.in +- ${ParaView_CMAKE_DIR}/pqViewFrameActionGroupImplementation.h.in +- ${ParaView_CMAKE_DIR}/pqViewFrameActionGroupImplementation.cxx.in +- ${ParaView_CMAKE_DIR}/pqDockWindowImplementation.h.in +- ${ParaView_CMAKE_DIR}/pqDockWindowImplementation.cxx.in +- ${ParaView_CMAKE_DIR}/pqDisplayPanelDecoratorImplementation.h.in +- ${ParaView_CMAKE_DIR}/pqDisplayPanelDecoratorImplementation.cxx.in +- ${ParaView_CMAKE_DIR}/pq3DWidgetImplementation.h.in +- ${ParaView_CMAKE_DIR}/pq3DWidgetImplementation.cxx.in +- # originaly from Qt/Core +- ${ParaView_CMAKE_DIR}/pqViewModuleImplementation.h.in +- ${ParaView_CMAKE_DIR}/pqViewModuleImplementation.cxx.in +- ${ParaView_CMAKE_DIR}/pqAutoStartImplementation.h.in +- ${ParaView_CMAKE_DIR}/pqAutoStartImplementation.cxx.in +- ${ParaView_CMAKE_DIR}/pqGraphLayoutStrategyImplementation.h.in +- ${ParaView_CMAKE_DIR}/pqGraphLayoutStrategyImplementation.cxx.in +- ${ParaView_CMAKE_DIR}/pqTreeLayoutStrategyImplementation.h.in +- ${ParaView_CMAKE_DIR}/pqTreeLayoutStrategyImplementation.cxx.in) ++ # install all cmake files. + INSTALL( +- FILES ${cmakeDevFiles} ++ # the extra "/" is essential to ensure we don't end up with an extra ++ # directory at the install location. ++ DIRECTORY "${ParaView_CMAKE_DIR}/" + DESTINATION ${PV_INSTALL_CMAKE_DIR} + COMPONENT Development) + +diff -x .git -ruN orig/CoProcessing/Adaptors/ParticleAdaptor/vtkParticlePipeline.cxx git_0f43430/CoProcessing/Adaptors/ParticleAdaptor/vtkParticlePipeline.cxx +--- orig/CoProcessing/Adaptors/ParticleAdaptor/vtkParticlePipeline.cxx 2012-04-02 12:55:26.000000000 -0400 ++++ git_0f43430/CoProcessing/Adaptors/ParticleAdaptor/vtkParticlePipeline.cxx 2012-04-20 23:43:06.000000000 -0400 +@@ -19,6 +19,7 @@ + #include "vtkMultiProcessController.h" + #include "vtkObjectFactory.h" + #include "vtkOpaquePass.h" ++#include "vtkOpenGLRenderer.h" + #include "vtkOutlineSource.h" + #include "vtkPNGWriter.h" + #include "vtkProperty.h" +@@ -175,7 +176,17 @@ + + VTK_CREATE (vtkCameraPass, cameraP); + cameraP->SetDelegatePass (iceTPass); +- renderer->SetPass (cameraP); ++ vtkOpenGLRenderer *glRenderer = ++ vtkOpenGLRenderer::SafeDownCast( this->renderer ); ++ if( glRenderer != NULL ) ++ { ++ glRenderer->SetPass(cameraP); ++ } ++ else ++ { ++ vtkErrorMacro("Cannot cast renderer to vtkOpenGLRenderer!"); ++ return; ++ } + + this->syncWin->SetRenderWindow (window); + this->syncWin->SetParallelController (ctrl); +diff -x .git -ruN orig/CoProcessing/CoProcessor/CMakeLists.txt git_0f43430/CoProcessing/CoProcessor/CMakeLists.txt +--- orig/CoProcessing/CoProcessor/CMakeLists.txt 2012-04-02 12:55:26.000000000 -0400 ++++ git_0f43430/CoProcessing/CoProcessor/CMakeLists.txt 2012-04-20 23:43:06.000000000 -0400 +@@ -67,6 +67,16 @@ + target_link_libraries(vtkCoProcessor ${CoProcessor_LIBS}) + + IF (PARAVIEW_ENABLE_PYTHON) ++ IF(NOT APPLE) ++ FIND_LIBRARY(PYTHON_UTIL_LIBRARY ++ NAMES util ++ DOC "Utility library needed for pvpython" ++ ) ++ MARK_AS_ADVANCED(PYTHON_UTIL_LIBRARY) ++ IF(PYTHON_UTIL_LIBRARY) ++ SET(PYTHON_UTIL_LIBRARY_LIB ${PYTHON_UTIL_LIBRARY}) ++ ENDIF(PYTHON_UTIL_LIBRARY) ++ ENDIF(NOT APPLE) + # Create Python bindings for the co-processing library + set(BUILD_SHARED_LIBS ON CACHE BOOL "Needed for python scripting.") + INCLUDE(FindPythonLibs) +@@ -88,7 +98,7 @@ + # want to link to the python libray to resolve its symbols + # immediately. + IF(WIN32 OR APPLE) +- TARGET_LINK_LIBRARIES (vtkCoProcessorPythonD ${PYTHON_LIBRARIES}) ++ TARGET_LINK_LIBRARIES (vtkCoProcessorPythonD ${VTK_PYTHON_LIBRARIES} ${PYTHON_UTIL_LIBRARY_LIB}) + ENDIF(WIN32 OR APPLE) + + # Create a python module that can be loaded dynamically. It links to +@@ -104,7 +114,7 @@ + ENDIF(WIN32 AND NOT CYGWIN) + + IF(WIN32 OR APPLE) +- TARGET_LINK_LIBRARIES (vtkCoProcessorPython ${PYTHON_LIBRARIES}) ++ TARGET_LINK_LIBRARIES (vtkCoProcessorPython ${VTK_PYTHON_LIBRARIES} ${PYTHON_UTIL_LIBRARY_LIB}) + ENDIF(WIN32 OR APPLE) + + SET(PYTHON_MODULE_PREFIX "") +diff -x .git -ruN orig/CoProcessing/CoProcessor/Testing/Cxx/CMakeLists.txt git_0f43430/CoProcessing/CoProcessor/Testing/Cxx/CMakeLists.txt +--- orig/CoProcessing/CoProcessor/Testing/Cxx/CMakeLists.txt 2012-04-02 12:56:24.000000000 -0400 ++++ git_0f43430/CoProcessing/CoProcessor/Testing/Cxx/CMakeLists.txt 2012-04-20 23:43:06.000000000 -0400 +@@ -10,15 +10,14 @@ + ADD_EXECUTABLE(CoProcessingPythonScriptExample PythonScriptCoProcessingExample.cxx vtkPVCustomTestDriver.cxx) + TARGET_LINK_LIBRARIES(CoProcessingPythonScriptExample vtkCoProcessor vtkCPTestDriver) + +- ADD_TEST(CoProcessingTestPythonScript ${EXECUTABLE_OUTPUT_PATH}/CoProcessingPythonScriptExample ${CoProcessing_SOURCE_DIR}/CoProcessor/Testing/Cxx/PythonScriptTest.py) +- ++ ADD_TEST(CoProcessingTestPythonScript ${EXECUTABLE_OUTPUT_PATH}/CoProcessingPythonScriptExample ${CoProcessing_SOURCE_DIR}/CoProcessor/Testing/Python/PythonScriptTest.py) + + IF (VTK_MPIRUN_EXE) +- ADD_TEST(PCoProcessingPythonScriptExample ++ ADD_TEST(PCoProcessingTestPythonScript + ${VTK_MPIRUN_EXE} ${VTK_MPI_PRENUMPROC_FLAGS} ${VTK_MPI_NUMPROC_FLAG} ${VTK_MPI_MAX_NUMPROCS} + ${VTK_MPI_PREFLAGS} + ${EXECUTABLE_OUTPUT_PATH}/CoProcessingPythonScriptExample +- ${CoProcessing_SOURCE_DIR}/CoProcessor/Testing/Cxx/PythonScriptTest2.py ++ ${CoProcessing_SOURCE_DIR}/CoProcessor/Testing/Python/PythonScriptTest2.py + ${VTK_MPI_POSTFLAGS} + ) + ENDIF (VTK_MPIRUN_EXE) +@@ -26,30 +25,126 @@ + + ENDIF (PARAVIEW_ENABLE_PYTHON) + +- # below is for doing image comparisons +- # they are not done directly in the above python script due to the fact +- # that they would make the python script rather ugly +-IF (PARAVIEW_DATA_ROOT) +- ADD_EXECUTABLE(CoProcessingCompareImagesTester CompareImages.cxx) +- TARGET_LINK_LIBRARIES(CoProcessingCompareImagesTester vtkCommon vtkIO vtkRendering) ++# below is for doing image comparisons ++# they are not done directly in the above python script due to the fact ++# that they would make the python script rather ugly ++ADD_EXECUTABLE(CoProcessingCompareImagesTester CompareImages.cxx) ++TARGET_LINK_LIBRARIES(CoProcessingCompareImagesTester vtkCommon vtkIO vtkRendering) + ++IF (PARAVIEW_DATA_ROOT) + IF (PARAVIEW_ENABLE_PYTHON) + ADD_TEST(CoProcessingPythonScriptGridPlot +- ${EXECUTABLE_OUTPUT_PATH}/CoProcessingCompareImagesTester ${CoProcessing_BINARY_DIR}/CoProcessor/Testing/Cxx/CPGrid0.png 20 -V ${PARAVIEW_DATA_ROOT}/Baseline/CPGrid0.png -T ${CoProcessing_BINARY_DIR}/CoProcessor/Testing/Cxx) ++ ${EXECUTABLE_OUTPUT_PATH}/CoProcessingCompareImagesTester ++ ${CoProcessing_BINARY_DIR}/CoProcessor/Testing/Cxx/CPGrid0.png 20 -V ++ ${PARAVIEW_DATA_ROOT}/Baseline/CPGrid0.png ++ -T ${CoProcessing_BINARY_DIR}/CoProcessor/Testing/Cxx ) + + ADD_TEST(CoProcessingPythonScriptPressurePlot +- ${EXECUTABLE_OUTPUT_PATH}/CoProcessingCompareImagesTester ${CoProcessing_BINARY_DIR}/CoProcessor/Testing/Cxx/CPPressure0.png 20 -V ${PARAVIEW_DATA_ROOT}/Baseline/CPPressure0.png -T ${CoProcessing_BINARY_DIR}/CoProcessor/Testing/Cxx) ++ ${EXECUTABLE_OUTPUT_PATH}/CoProcessingCompareImagesTester ++ ${CoProcessing_BINARY_DIR}/CoProcessor/Testing/Cxx/CPPressure0.png 20 ++ -V ${PARAVIEW_DATA_ROOT}/Baseline/CPPressure0.png ++ -T ${CoProcessing_BINARY_DIR}/CoProcessor/Testing/Cxx) + + SET_TESTS_PROPERTIES(CoProcessingTestPythonScript CoProcessingPythonScriptGridPlot + CoProcessingPythonScriptPressurePlot PROPERTIES RUN_SERIAL ON) + IF (VTK_MPIRUN_EXE) + ADD_TEST(PCoProcessingPythonScriptGridPlot +- ${EXECUTABLE_OUTPUT_PATH}/CoProcessingCompareImagesTester ${CoProcessing_BINARY_DIR}/CoProcessor/Testing/Cxx/PCPGrid0.png 20 -V ${PARAVIEW_DATA_ROOT}/Baseline/CPGrid0.png -T ${CoProcessing_BINARY_DIR}/CoProcessor/Testing/Cxx) ++ ${EXECUTABLE_OUTPUT_PATH}/CoProcessingCompareImagesTester ++ ${CoProcessing_BINARY_DIR}/CoProcessor/Testing/Cxx/PCPGrid0.png 20 ++ -V ${PARAVIEW_DATA_ROOT}/Baseline/CPGrid0.png ++ -T ${CoProcessing_BINARY_DIR}/CoProcessor/Testing/Cxx) + + ADD_TEST(PCoProcessingPythonScriptPressurePlot +- ${EXECUTABLE_OUTPUT_PATH}/CoProcessingCompareImagesTester ${CoProcessing_BINARY_DIR}/CoProcessor/Testing/Cxx/PCPPressure0.png 20 -V ${PARAVIEW_DATA_ROOT}/Baseline/CPPressure0.png -T ${CoProcessing_BINARY_DIR}/CoProcessor/Testing/Cxx) ++ ${EXECUTABLE_OUTPUT_PATH}/CoProcessingCompareImagesTester ++ ${CoProcessing_BINARY_DIR}/CoProcessor/Testing/Cxx/PCPPressure0.png 20 ++ -V ${PARAVIEW_DATA_ROOT}/Baseline/CPPressure0.png ++ -T ${CoProcessing_BINARY_DIR}/CoProcessor/Testing/Cxx) ++ SET_TESTS_PROPERTIES(PCoProcessingTestPythonScript PCoProcessingPythonScriptGridPlot ++ PCoProcessingPythonScriptPressurePlot PROPERTIES RUN_SERIAL ON) + ENDIF (VTK_MPIRUN_EXE) + ++ # here is the full workflow for coprocessing where we generate ++ # a script, run simulation driver code, and then check the output ++ IF (PARAVIEW_BUILD_PLUGIN_CoProcessingScriptGenerator) ++ set(REAL_EXECUTABLE_PATH ${EXECUTABLE_OUTPUT_PATH}) ++ set(PARAVIEW_EXECUTABLE_PATH ${EXECUTABLE_OUTPUT_PATH}) ++ if(Q_WS_MAC) ++ set(REAL_EXECUTABLE_PATH ${EXECUTABLE_OUTPUT_PATH}/${PROJECT_NAME}.app/Contents/MacOS) ++ set(PARAVIEW_EXECUTABLE_PATH ${EXECUTABLE_OUTPUT_PATH}/paraview.app/Contents/MacOS) ++ set(MAC_TEST_NAME "-Mac") ++ endif(Q_WS_MAC) ++ ++ file(WRITE ++"${CoProcessing_BINARY_DIR}/CoProcessingFullWorkflowTest.cmake" ++"set(fullexe \"${PARAVIEW_EXECUTABLE_PATH}/paraview\") ++if(NOT EXISTS \${fullexe}) ++ set(fullexe \"${PARAVIEW_EXECUTABLE_PATH}/\${cfg}/paraview.exe\") ++endif() ++FILE(REMOVE \"${CMAKE_BINARY_DIR}/Testing/Temporary/cptest.py ${CoProcessing_BINARY_DIR}/CoProcessor/Testing/Cxx/image_0.png ${CoProcessing_BINARY_DIR}/CoProcessor/Testing/Cxx/filename_0.pvtp ${CoProcessing_BINARY_DIR}/CoProcessor/Testing/Cxx/filename_0_0.vtp\" ) ++ ++set(ARGS \"-dr;--test-directory=${CMAKE_BINARY_DIR}/Testing/Temporary;--test-script=${CMAKE_SOURCE_DIR}/Plugins/CoProcessingScriptGenerator/Testing/CoProcessingGUI${MAC_TEST_NAME}.xml;--exit\") ++execute_process(COMMAND \${fullexe} \${ARGS} RESULT_VARIABLE rv) ++if(NOT rv EQUAL 0) ++ message(FATAL_ERROR \"ParaView return value was \${rv}\") ++endif() ++ ++set(fullexe \"${REAL_EXECUTABLE_PATH}/pvpython\") ++if(NOT EXISTS \${fullexe}) ++ set(fullexe \"${REAL_EXECUTABLE_PATH}/\${cfg}/pvpython.exe\") ++endif() ++if(NOT EXISTS \${fullexe}) ++ set(fullexe \"${EXECUTABLE_OUTPUT_PATH}/pvpython\") ++endif() ++if(NOT EXISTS \${fullexe}) ++ message(FATAL_ERROR \"'\${fullexe}' does not exist\") ++endif() ++ ++set(ARGS \"${CoProcessing_SOURCE_DIR}/CoProcessor/Testing/Python/waveletdriver.py;${CMAKE_BINARY_DIR}/Testing/Temporary/cptest.py;1\") ++execute_process(COMMAND \${fullexe} \${ARGS} RESULT_VARIABLE failed) ++if(failed) ++ message(FATAL_ERROR \"pvpython return value was = '\${failed}' \") ++endif() ++ ++set(fullexe \"${REAL_EXECUTABLE_PATH}/CoProcessingCompareImagesTester\") ++if(NOT EXISTS \${fullexe}) ++ set(fullexe \"${REAL_EXECUTABLE_PATH}/\${cfg}/CoProcessingCompareImagesTester.exe\") ++endif() ++if(NOT EXISTS \${fullexe}) ++ set(fullexe \"${EXECUTABLE_OUTPUT_PATH}/CoProcessingCompareImagesTester\") ++endif() ++if(NOT EXISTS \${fullexe}) ++ message(FATAL_ERROR \"'\${fullexe}' does not exist\") ++endif() ++ ++set(ARGS \"${CoProcessing_BINARY_DIR}/CoProcessor/Testing/Cxx/image_0.png;20;-V;${PARAVIEW_DATA_ROOT}/Baseline/CPFullWorkflow.png;-T;${CoProcessing_BINARY_DIR}/CoProcessor/Testing/Cxx\") ++execute_process(COMMAND \${fullexe} \${ARGS} RESULT_VARIABLE failed) ++if(failed) ++ message(FATAL_ERROR \"CoProcessingCompareImageTester return value was = '\${failed}' \") ++endif() ++ ++set(fullexe \"${REAL_EXECUTABLE_PATH}/vtkpython\") ++if(NOT EXISTS \${fullexe}) ++ set(fullexe \"${REAL_EXECUTABLE_PATH}/\${cfg}/vtkpython.exe\") ++endif() ++if(NOT EXISTS \${fullexe}) ++ set(fullexe \"${EXECUTABLE_OUTPUT_PATH}/vtkpython\") ++endif() ++if(NOT EXISTS \${fullexe}) ++ message(FATAL_ERROR \"'\${fullexe}' does not exist\") ++endif() ++ ++set(ARGS \"${CoProcessing_SOURCE_DIR}/CoProcessor/Testing/Python/outputcheck.py;${CoProcessing_BINARY_DIR}/CoProcessor/Testing/Cxx/filename_0.pvtp\") ++execute_process(COMMAND \${fullexe} \${ARGS} RESULT_VARIABLE failed) ++if(failed) ++ message(FATAL_ERROR \"vtkpython return value was = '\${failed}' \") ++endif() ++" ) ++ ++ add_test(NAME CoProcessingFullWorkflow COMMAND ${CMAKE_COMMAND} ++ -Dcfg=$ -P "${CoProcessing_BINARY_DIR}/CoProcessingFullWorkflowTest.cmake") ++ SET_TESTS_PROPERTIES(CoProcessingFullWorkflow PROPERTIES RUN_SERIAL ON) ++ ENDIF (PARAVIEW_BUILD_PLUGIN_CoProcessingScriptGenerator) ++ + ENDIF (PARAVIEW_ENABLE_PYTHON) + + ENDIF (PARAVIEW_DATA_ROOT) +diff -x .git -ruN orig/CoProcessing/CoProcessor/Testing/Cxx/CompareImages.cxx git_0f43430/CoProcessing/CoProcessor/Testing/Cxx/CompareImages.cxx +--- orig/CoProcessing/CoProcessor/Testing/Cxx/CompareImages.cxx 2012-04-02 12:56:24.000000000 -0400 ++++ git_0f43430/CoProcessing/CoProcessor/Testing/Cxx/CompareImages.cxx 2012-04-20 23:43:06.000000000 -0400 +@@ -63,7 +63,7 @@ + + double threshold = atof(argv[2]); + +- if(!testing->RegressionTest(vtkImageData::SafeDownCast(reader->GetOutput()), threshold)) ++ if(!testing->RegressionTest(reader, threshold)) + { + return 1; + } +diff -x .git -ruN orig/CoProcessing/CoProcessor/Testing/Cxx/PythonScriptTest.py git_0f43430/CoProcessing/CoProcessor/Testing/Cxx/PythonScriptTest.py +--- orig/CoProcessing/CoProcessor/Testing/Cxx/PythonScriptTest.py 2012-04-02 12:56:24.000000000 -0400 ++++ git_0f43430/CoProcessing/CoProcessor/Testing/Cxx/PythonScriptTest.py 1969-12-31 19:00:00.000000000 -0500 +@@ -1,94 +0,0 @@ +-def DoCoProcessing(datadescription): +- timestep = datadescription.GetTimeStep() +- +- grid = datadescription.GetInputDescriptionByName("input").GetGrid() +- pressure = grid.GetPointData().GetArray('Pressure') +- +- grid.GetPointData().SetScalars(pressure) +- obj.SetOutput(grid) +- +- # get global range of Pressure +- di = trivialproducer.GetDataInformation(0) +- trivialproducer.UpdatePipeline() +- di.Update() +- pdi = di.GetPointDataInformation() +- ai = pdi.GetArrayInformation('Pressure') +- pressurerange = ai.GetComponentRange(0) +- +- contour.Isosurfaces = .5*(pressurerange[0]+pressurerange[1]) +- +- # now output the results to the screen as well as taking +- # a screen shot of the view +- #setup a window +- rep = Show(contour) +- ren = Render() +- +- #set the background color +- ren.Background=[1,1,1] #white +- +- #set image size +- ren.ViewSize = [200, 300] #[width, height] +- +- #set representation +- rep.Representation="Surface" +- +- #save screenshot +- gridimagefilename = 'CPGrid'+str(timestep) + '.png' +- WriteImage(gridimagefilename) +- +- rep = Show(trivialproducer) +- rep.LookupTable = MakeBlueToRedLT(pressurerange[0], pressurerange[1]) +- rep.ColorArrayName = 'Pressure' +- rep.ColorAttributeType = 'POINT_DATA' +- #set representation +- rep.Representation="Surface" +- rep = Show(contour) +- #set the background color +- ren = Render() +- ren.Background=[1,1,1] #white +- +- pressureimagefilename = 'CPPressure'+str(timestep) + '.png' +- WriteImage(pressureimagefilename) +- +- # explicitly delete the proxies -- may have to do this multiple times +- tobedeleted = GetNextProxyToDelete() +- while tobedeleted != None: +- Delete(tobedeleted) +- tobedeleted = GetNextProxyToDelete() +- +-def GetNextProxyToDelete(): +- iter = servermanager.vtkSMProxyIterator() +- iter.SetSession(servermanager.ActiveConnection.Session) +- iter.Begin() +- while not iter.IsAtEnd(): +- if iter.GetGroup().find("prototypes") != -1: +- iter.Next() +- continue +- proxy = servermanager._getPyProxy(iter.GetProxy()) +- proxygroup = iter.GetGroup() +- iter.Next() +- if proxygroup != 'timekeeper' and proxy != None and proxygroup.find("pq_helper_proxies") == -1 : +- return proxy +- +- return None +- +-def RequestDataDescription(datadescription): +- time = datadescription.GetTime() +- timestep = datadescription.GetTimeStep() +- if timestep % 20 == 0: +- # add in some fields +- #print 'added Pressure and wanting to do coprocessing' +- datadescription.GetInputDescriptionByName("input").AddPointField("Pressure") +- datadescription.GetInputDescriptionByName('input').GenerateMeshOn() +- return +- +-# the code below is needed to import objects from paraview.simple +-# plus the definition of vtkTrivialProducer into this python script. +-try: paraview.simple +-except: from paraview.simple import * +- +-trivialproducer = TrivialProducer() +-contour = Contour(Input=trivialproducer) +-obj = trivialproducer.GetClientSideObject() +- +- +diff -x .git -ruN orig/CoProcessing/CoProcessor/Testing/Cxx/PythonScriptTest2.py git_0f43430/CoProcessing/CoProcessor/Testing/Cxx/PythonScriptTest2.py +--- orig/CoProcessing/CoProcessor/Testing/Cxx/PythonScriptTest2.py 2012-04-02 12:56:24.000000000 -0400 ++++ git_0f43430/CoProcessing/CoProcessor/Testing/Cxx/PythonScriptTest2.py 1969-12-31 19:00:00.000000000 -0500 +@@ -1,92 +0,0 @@ +-def DoCoProcessing(datadescription): +- timestep = datadescription.GetTimeStep() +- +- grid = datadescription.GetInputDescriptionByName("input").GetGrid() +- pressure = grid.GetPointData().GetArray('Pressure') +- +- grid.GetPointData().SetScalars(pressure) +- obj.SetOutput(grid) +- +- # get global range of Pressure +- di = trivialproducer.GetDataInformation(0) +- trivialproducer.UpdatePipeline() +- di.Update() +- pdi = di.GetPointDataInformation() +- ai = pdi.GetArrayInformation('Pressure') +- pressurerange = ai.GetComponentRange(0) +- +- contour.Isosurfaces = .5*(pressurerange[0]+pressurerange[1]) +- +- # now output the results to the screen as well as taking +- # a screen shot of the view +- #setup a window +- rep = Show(contour) +- ren = Render() +- +- #set the background color +- ren.Background=[1,1,1] #white +- +- #set image size +- ren.ViewSize = [200, 300] #[width, height] +- +- #set representation +- rep.Representation="Surface" +- +- #save screenshot +- gridimagefilename = 'PCPGrid'+str(timestep) + '.png' +- WriteImage(gridimagefilename) +- +- rep = Show(trivialproducer) +- rep.LookupTable = MakeBlueToRedLT(pressurerange[0], pressurerange[1]) +- rep.ColorArrayName = 'Pressure' +- rep.ColorAttributeType = 'POINT_DATA' +- #set representation +- rep.Representation="Surface" +- rep = Show(contour) +- #set the background color +- ren = Render() +- ren.Background=[1,1,1] #white +- +- pressureimagefilename = 'PCPPressure'+str(timestep) + '.png' +- WriteImage(pressureimagefilename) +- +- # explicitly delete the proxies -- may have to do this multiple times +- tobedeleted = GetNextProxyToDelete() +- while tobedeleted != None: +- Delete(tobedeleted) +- tobedeleted = GetNextProxyToDelete() +- +-def GetNextProxyToDelete(): +- iter = servermanager.vtkSMProxyIterator() +- iter.SetSession(servermanager.ActiveConnection.Session) +- iter.Begin() +- while not iter.IsAtEnd(): +- if iter.GetGroup().find("prototypes") != -1: +- iter.Next() +- continue +- proxy = servermanager._getPyProxy(iter.GetProxy()) +- proxygroup = iter.GetGroup() +- iter.Next() +- if proxygroup != 'timekeeper' and proxy != None and proxygroup.find("pq_helper_proxies") == -1 : +- return proxy +- +- return None +- +-def RequestDataDescription(datadescription): +- time = datadescription.GetTime() +- timestep = datadescription.GetTimeStep() +- if timestep % 20 == 0: +- # add in some fields +- #print 'added Pressure and wanting to do coprocessing' +- datadescription.GetInputDescriptionByName("input").AddPointField("Pressure") +- datadescription.GetInputDescriptionByName('input').GenerateMeshOn() +- return +- +-# the code below is needed to import objects from paraview.simple +-# plus the definition of vtkTrivialProducer into this python script. +-try: paraview.simple +-except: from paraview.simple import * +- +-trivialproducer = TrivialProducer() +-contour = Contour(Input=trivialproducer) +-obj = trivialproducer.GetClientSideObject() +diff -x .git -ruN orig/CoProcessing/CoProcessor/Testing/Python/PythonScriptTest.py git_0f43430/CoProcessing/CoProcessor/Testing/Python/PythonScriptTest.py +--- orig/CoProcessing/CoProcessor/Testing/Python/PythonScriptTest.py 1969-12-31 19:00:00.000000000 -0500 ++++ git_0f43430/CoProcessing/CoProcessor/Testing/Python/PythonScriptTest.py 2012-04-20 23:43:06.000000000 -0400 +@@ -0,0 +1,92 @@ ++def DoCoProcessing(datadescription): ++ timestep = datadescription.GetTimeStep() ++ ++ grid = datadescription.GetInputDescriptionByName("input").GetGrid() ++ pressure = grid.GetPointData().GetArray('Pressure') ++ ++ grid.GetPointData().SetScalars(pressure) ++ obj.SetOutput(grid) ++ ++ # get global range of Pressure ++ di = trivialproducer.GetDataInformation(0) ++ trivialproducer.UpdatePipeline() ++ di.Update() ++ pdi = di.GetPointDataInformation() ++ ai = pdi.GetArrayInformation('Pressure') ++ pressurerange = ai.GetComponentRange(0) ++ ++ contour.Isosurfaces = .5*(pressurerange[0]+pressurerange[1]) ++ ++ # now output the results to the screen as well as taking ++ # a screen shot of the view ++ #setup a window ++ rep = Show(contour) ++ ren = Render() ++ ++ #set the background color ++ ren.Background=[1,1,1] #white ++ ++ #set image size ++ ren.ViewSize = [200, 300] #[width, height] ++ ++ #set representation ++ rep.Representation="Surface" ++ ++ #save screenshot ++ gridimagefilename = 'CPGrid'+str(timestep) + '.png' ++ WriteImage(gridimagefilename) ++ ++ rep = Show(trivialproducer) ++ rep.LookupTable = MakeBlueToRedLT(pressurerange[0], pressurerange[1]) ++ rep.ColorArrayName = 'Pressure' ++ rep.ColorAttributeType = 'POINT_DATA' ++ #set representation ++ rep.Representation="Surface" ++ rep = Show(contour) ++ #set the background color ++ ren = Render() ++ ren.Background=[1,1,1] #white ++ ++ pressureimagefilename = 'CPPressure'+str(timestep) + '.png' ++ WriteImage(pressureimagefilename) ++ ++ # explicitly delete the proxies -- may have to do this multiple times ++ tobedeleted = GetNextProxyToDelete() ++ while tobedeleted != None: ++ Delete(tobedeleted) ++ tobedeleted = GetNextProxyToDelete() ++ ++def GetNextProxyToDelete(): ++ iter = servermanager.vtkSMProxyIterator() ++ iter.SetSession(servermanager.ActiveConnection.Session) ++ iter.Begin() ++ while not iter.IsAtEnd(): ++ if iter.GetGroup().find("prototypes") != -1: ++ iter.Next() ++ continue ++ proxy = servermanager._getPyProxy(iter.GetProxy()) ++ proxygroup = iter.GetGroup() ++ iter.Next() ++ if proxygroup != 'timekeeper' and proxy != None and proxygroup.find("pq_helper_proxies") == -1 : ++ return proxy ++ ++ return None ++ ++def RequestDataDescription(datadescription): ++ time = datadescription.GetTime() ++ timestep = datadescription.GetTimeStep() ++ if timestep % 20 == 0: ++ # add in some fields ++ #print 'added Pressure and wanting to do coprocessing' ++ datadescription.GetInputDescriptionByName("input").AddPointField("Pressure") ++ datadescription.GetInputDescriptionByName('input').GenerateMeshOn() ++ return ++ ++# the code below is needed to import objects from paraview.simple ++# plus the definition of vtkTrivialProducer into this python script. ++try: paraview.simple ++except: from paraview.simple import * ++ ++trivialproducer = TrivialProducer() ++contour = Contour(Input=trivialproducer) ++obj = trivialproducer.GetClientSideObject() +diff -x .git -ruN orig/CoProcessing/CoProcessor/Testing/Python/PythonScriptTest2.py git_0f43430/CoProcessing/CoProcessor/Testing/Python/PythonScriptTest2.py +--- orig/CoProcessing/CoProcessor/Testing/Python/PythonScriptTest2.py 1969-12-31 19:00:00.000000000 -0500 ++++ git_0f43430/CoProcessing/CoProcessor/Testing/Python/PythonScriptTest2.py 2012-04-20 23:43:06.000000000 -0400 +@@ -0,0 +1,92 @@ ++def DoCoProcessing(datadescription): ++ timestep = datadescription.GetTimeStep() ++ ++ grid = datadescription.GetInputDescriptionByName("input").GetGrid() ++ pressure = grid.GetPointData().GetArray('Pressure') ++ ++ grid.GetPointData().SetScalars(pressure) ++ obj.SetOutput(grid) ++ ++ # get global range of Pressure ++ di = trivialproducer.GetDataInformation(0) ++ trivialproducer.UpdatePipeline() ++ di.Update() ++ pdi = di.GetPointDataInformation() ++ ai = pdi.GetArrayInformation('Pressure') ++ pressurerange = ai.GetComponentRange(0) ++ ++ contour.Isosurfaces = .5*(pressurerange[0]+pressurerange[1]) ++ ++ # now output the results to the screen as well as taking ++ # a screen shot of the view ++ #setup a window ++ rep = Show(contour) ++ ren = Render() ++ ++ #set the background color ++ ren.Background=[1,1,1] #white ++ ++ #set image size ++ ren.ViewSize = [200, 300] #[width, height] ++ ++ #set representation ++ rep.Representation="Surface" ++ ++ #save screenshot ++ gridimagefilename = 'PCPGrid'+str(timestep) + '.png' ++ WriteImage(gridimagefilename) ++ ++ rep = Show(trivialproducer) ++ rep.LookupTable = MakeBlueToRedLT(pressurerange[0], pressurerange[1]) ++ rep.ColorArrayName = 'Pressure' ++ rep.ColorAttributeType = 'POINT_DATA' ++ #set representation ++ rep.Representation="Surface" ++ rep = Show(contour) ++ #set the background color ++ ren = Render() ++ ren.Background=[1,1,1] #white ++ ++ pressureimagefilename = 'PCPPressure'+str(timestep) + '.png' ++ WriteImage(pressureimagefilename) ++ ++ # explicitly delete the proxies -- may have to do this multiple times ++ tobedeleted = GetNextProxyToDelete() ++ while tobedeleted != None: ++ Delete(tobedeleted) ++ tobedeleted = GetNextProxyToDelete() ++ ++def GetNextProxyToDelete(): ++ iter = servermanager.vtkSMProxyIterator() ++ iter.SetSession(servermanager.ActiveConnection.Session) ++ iter.Begin() ++ while not iter.IsAtEnd(): ++ if iter.GetGroup().find("prototypes") != -1: ++ iter.Next() ++ continue ++ proxy = servermanager._getPyProxy(iter.GetProxy()) ++ proxygroup = iter.GetGroup() ++ iter.Next() ++ if proxygroup != 'timekeeper' and proxy != None and proxygroup.find("pq_helper_proxies") == -1 : ++ return proxy ++ ++ return None ++ ++def RequestDataDescription(datadescription): ++ time = datadescription.GetTime() ++ timestep = datadescription.GetTimeStep() ++ if timestep % 20 == 0: ++ # add in some fields ++ #print 'added Pressure and wanting to do coprocessing' ++ datadescription.GetInputDescriptionByName("input").AddPointField("Pressure") ++ datadescription.GetInputDescriptionByName('input').GenerateMeshOn() ++ return ++ ++# the code below is needed to import objects from paraview.simple ++# plus the definition of vtkTrivialProducer into this python script. ++try: paraview.simple ++except: from paraview.simple import * ++ ++trivialproducer = TrivialProducer() ++contour = Contour(Input=trivialproducer) ++obj = trivialproducer.GetClientSideObject() +diff -x .git -ruN orig/CoProcessing/CoProcessor/Testing/Python/outputcheck.py git_0f43430/CoProcessing/CoProcessor/Testing/Python/outputcheck.py +--- orig/CoProcessing/CoProcessor/Testing/Python/outputcheck.py 1969-12-31 19:00:00.000000000 -0500 ++++ git_0f43430/CoProcessing/CoProcessor/Testing/Python/outputcheck.py 2012-04-20 23:43:06.000000000 -0400 +@@ -0,0 +1,18 @@ ++import sys ++if len(sys.argv) != 2: ++ print "command is 'python '" ++ sys.exit(1) ++ ++import vtk ++ ++r = vtk.vtkXMLPPolyDataReader() ++r.SetFileName(sys.argv[1]) ++r.Update() ++ ++g = r.GetOutput() ++ ++if g.GetNumberOfPoints() != 441 or g.GetNumberOfCells() != 800: ++ print 'Output grid is incorrect. The number of points is', g.GetNumberOfPoints(), \ ++ 'but should be 441 and the number of cells is', g.GetNumberOfCells(), \ ++ 'but should be 800.' ++ sys.exit(1) +diff -x .git -ruN orig/CoProcessing/CoProcessor/Testing/Python/waveletdriver.py git_0f43430/CoProcessing/CoProcessor/Testing/Python/waveletdriver.py +--- orig/CoProcessing/CoProcessor/Testing/Python/waveletdriver.py 1969-12-31 19:00:00.000000000 -0500 ++++ git_0f43430/CoProcessing/CoProcessor/Testing/Python/waveletdriver.py 2012-04-20 23:43:06.000000000 -0400 +@@ -0,0 +1,71 @@ ++import sys ++if len(sys.argv) != 3: ++ print "command is 'python